From b29028f71dff6b37f4f56af881fe2d2acceff15e Mon Sep 17 00:00:00 2001 From: nanitebased Date: Wed, 4 May 2022 11:28:41 +0200 Subject: [PATCH] Fix SliceId expansion, exception on SingleSliceCreationTime. Update documentation --- CHANGELOG.md | 4 ++++ Executor/Tasks/Run/single_slice_creation_time.py | 2 +- Experiment/variable_expander.py | 3 ++- README.md | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a51707d..e82b4f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +**04/05/2022** [Version 3.3.1] + + - Fix SliceId expansion, exception on SingleSliceCreationTime + **01/04/2022** [Version 3.3.0] - TestCase definition Version 2 diff --git a/Executor/Tasks/Run/single_slice_creation_time.py b/Executor/Tasks/Run/single_slice_creation_time.py index 545cc29..da4545e 100644 --- a/Executor/Tasks/Run/single_slice_creation_time.py +++ b/Executor/Tasks/Run/single_slice_creation_time.py @@ -26,7 +26,7 @@ def Run(self): self.Log(Level.INFO, f"Waiting for slice to be running. Timeout: {timeout}") while True: count += 1 - status = Management.SliceManager().Check(sliceId).get('status', '') + status = Management.SliceManager().CheckSlice(sliceId).get('status', '') self.Log(Level.DEBUG, f'Slice {sliceId} status: {status} (retry {count})') if status == 'Running' or (timeout is not None and timeout >= count): break else: sleep(1) diff --git a/Experiment/variable_expander.py b/Experiment/variable_expander.py index 17d024f..9d4dee6 100644 --- a/Experiment/variable_expander.py +++ b/Experiment/variable_expander.py @@ -35,7 +35,8 @@ def expand(cls, item: str, context: Union[ExecutorBase, ExperimentRun], config: # Dynamic values "@{TempFolder}": context.TempFolder, "@{ExecutionId}": context.ExecutionId, - "@{SliceId}": context.Params.get("SliceId", "None"), + "@{SliceId}": context.Params.get("DeployedSliceId", "None"), + "@{DeployedSliceId}": context.Params.get("DeployedSliceId", "None"), "@{Application}": context.Descriptor.Application, "@{JSONParameters}": dumps(context.Descriptor.Parameters, indent=None), "@{ReservationTime}": duration, diff --git a/README.md b/README.md index 7383236..e4c033a 100644 --- a/README.md +++ b/README.md @@ -630,7 +630,7 @@ Results\{Identifier}\{Date}-{ResultType}-{Identifier}.csv It's possible to expand the value of some variables enclosed by @{ }. (Use quotes where required in order to generate valid YAML format). Available values are: - `@{ExecutionId}`: Experiment execution ID (unique identifier) -- `@{SliceId}`: ID of the slice deployed by the Slice Manager during the PreRun stage +- `@{SliceId}`, `@{DeployedSliceId}`: ID of the slice deployed by the Slice Manager during the PreRun stage - `@{TempFolder}`: Temporal folder exclusive to the current executor, it's deleted when the experiment finishes. - `@{Application}`: The `Application` field from the Experiment Descriptor - `@{JSONParameters}`: The `Parameters` dictionary from the Experiment Descriptor, in JSON format (a single line string)