From 227f55ed67caec8e67a037bc3e901caf54617c4c Mon Sep 17 00:00:00 2001 From: morganrol Date: Tue, 27 Apr 2021 17:08:34 +0200 Subject: [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 Change-Id: I5f353488e64b420fa94303695311a473682a5fa1 --- src/onaptests/steps/loop/clamp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/onaptests/steps/loop/clamp.py') 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() -- cgit 1.2.3-korg