From d53b9bcaf16fc22554bd8b18e293d310a6056859 Mon Sep 17 00:00:00 2001 From: Thierry Hardy Date: Fri, 18 Sep 2020 13:32:36 +0200 Subject: Allows to launch only instantiation It is requested to be able to launch instantiation without performing again onboarding and cloud configuration steps. Issue-ID: TEST-254 Signed-off-by: jardellos Change-Id: I4e25a0cc4c9e195ed26c96f15ac5ae9a36ec9bfb --- .../configuration/ubuntu16_multicloud_yaml_settings.py | 4 +++- src/onaptests/configuration/ubuntu16_nomulticloud_settings.py | 3 +++ src/onaptests/steps/instantiate/service_ala_carte.py | 11 ++++++----- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py b/src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py index 71b8810..6f19fc1 100644 --- a/src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py +++ b/src/onaptests/configuration/ubuntu16_multicloud_yaml_settings.py @@ -3,7 +3,9 @@ from .settings import * # pylint: disable=W0614 """ Specific ubuntu16 with multicloud and yaml config scenario.""" USE_MULTICLOUD = True - +# Set ONLY_INSTANTIATE to true to run an instantiation without repeating +# onboarding and related AAI configuration (Cloud config) +ONLY_INSTANTIATE= False VENDOR_NAME = "sdktests_vendor" SERVICE_NAME = "ubuntu16test" # must be the same as in YAML diff --git a/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py b/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py index 84f994a..3f410c0 100644 --- a/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py +++ b/src/onaptests/configuration/ubuntu16_nomulticloud_settings.py @@ -9,6 +9,9 @@ from .settings import * # pylint: disable=W0614 # pylint: disable=bad-whitespace # The ONAP part USE_MULTICLOUD = False +# Set ONLY_INSTANTIATE to true to run an instantiation without repeating +# onboarding and related AAI configuration (Cloud config) +ONLY_INSTANTIATE= False SERVICE_YAML_TEMPLATE = "templates/vnf-services/ubuntu16test-service.yaml" CLEANUP_FLAG = True CLEANUP_ACTIVITY_TIMER = 10 # nb of seconds before cleanup in case cleanup option is set diff --git a/src/onaptests/steps/instantiate/service_ala_carte.py b/src/onaptests/steps/instantiate/service_ala_carte.py index 249a171..84d8208 100644 --- a/src/onaptests/steps/instantiate/service_ala_carte.py +++ b/src/onaptests/steps/instantiate/service_ala_carte.py @@ -26,8 +26,9 @@ class ServiceAlaCarteInstantiateStep(BaseStep): - ConnectServiceSubToCloudRegionStep. """ super().__init__(cleanup=cleanup) - self.add_step(ServiceOnboardStep(cleanup)) - self.add_step(ConnectServiceSubToCloudRegionStep(cleanup)) + if not settings.ONLY_INSTANTIATE: + self.add_step(ServiceOnboardStep(cleanup)) + self.add_step(ConnectServiceSubToCloudRegionStep(cleanup)) def execute(self): """Instantiate service. @@ -85,9 +86,9 @@ class YamlTemplateServiceAlaCarteInstantiateStep(YamlTemplateBaseStep): self._yaml_template: dict = None self._service_instance_name: str = None self._service_instance: str = None - - self.add_step(YamlTemplateServiceOnboardStep(cleanup)) - self.add_step(ConnectServiceSubToCloudRegionStep(cleanup)) + if not settings.ONLY_INSTANTIATE: + self.add_step(YamlTemplateServiceOnboardStep(cleanup)) + self.add_step(ConnectServiceSubToCloudRegionStep(cleanup)) @property def yaml_template(self) -> dict: -- cgit 1.2.3-korg