aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/loop/clamp.py
diff options
context:
space:
mode:
authormorganrol <morgan.richomme@orange.com>2021-04-27 17:08:34 +0200
committermorganrol <morgan.richomme@orange.com>2021-04-27 17:17:33 +0200
commit227f55ed67caec8e67a037bc3e901caf54617c4c (patch)
tree4ef47588975e7a3a8521a00cc6aa4a8fa0a54af6 /src/onaptests/steps/loop/clamp.py
parent83e0a5a4fa8a7dedc1af3c3c0c5cb1706a5f2646 (diff)
[CLAMP] Update clamp to allow re-play of the test
Today a docker restart is failing because we try to enrich a certified artifacts Like for other basic_* tests, if the service is already distributed we may just consider creating the loop (bypass the model onboarding part) so we can run the test as a replay and use it for parallel tests Issue-ID: TEST-334 Signed-off-by: morganrol <morgan.richomme@orange.com> Change-Id: I5f353488e64b420fa94303695311a473682a5fa1
Diffstat (limited to 'src/onaptests/steps/loop/clamp.py')
-rw-r--r--src/onaptests/steps/loop/clamp.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/onaptests/steps/loop/clamp.py b/src/onaptests/steps/loop/clamp.py
index e781bd2..86bcbb0 100644
--- a/src/onaptests/steps/loop/clamp.py
+++ b/src/onaptests/steps/loop/clamp.py
@@ -7,6 +7,8 @@
# http://www.apache.org/licenses/LICENSE-2.0
"""Clamp Scenario class."""
from yaml import load
+import random
+import string
import time
from onapsdk.clamp.clamp_element import Clamp
@@ -93,8 +95,11 @@ class ClampStep(YamlTemplateBaseStep):
def instantiate_clamp(self, loop_template: str, loop_name: str, operational_policies: list):
"""Instantite a closed loopin CLAMP."""
+ letters = string.ascii_letters
+ loop_name_random = loop_name.join(
+ random.choice(letters) for i in range(6))
loop = InstantiateLoop(template=loop_template,
- loop_name=loop_name,
+ loop_name=loop_name_random,
operational_policies=operational_policies)
return loop.instantiate_loop()