diff options
author | 2023-06-16 15:56:52 +0000 | |
---|---|---|
committer | 2023-06-20 10:31:35 +0000 | |
commit | c10f9f4706aeb848cc55ad7a552081dbf3e7b6a7 (patch) | |
tree | affe65029df890a676185a777a2c21459d3c381f /src/onaptests/scenario/basic_vm_macro.py | |
parent | 27ddbbeebee8dd18b266ade15d075d88b5c50c7e (diff) |
BaseScenario class added
It prints out settings and will unify logic of
scenarios later on.
Issue-ID: TEST-395
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: Ie5929e0cc136183d4374b95bfc1600445126c4b6
Diffstat (limited to 'src/onaptests/scenario/basic_vm_macro.py')
-rw-r--r-- | src/onaptests/scenario/basic_vm_macro.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/onaptests/scenario/basic_vm_macro.py b/src/onaptests/scenario/basic_vm_macro.py index 3b10983..7159686 100644 --- a/src/onaptests/scenario/basic_vm_macro.py +++ b/src/onaptests/scenario/basic_vm_macro.py @@ -1,16 +1,16 @@ """Instantiate basic vm using SO macro flow.""" import logging import time -from yaml import load, SafeLoader from onapsdk.configuration import settings from onapsdk.exceptions import SDKException -from xtesting.core import testcase - +from onaptests.scenario.scenario_base import ScenarioBase from onaptests.steps.base import YamlTemplateBaseStep +from onaptests.steps.instantiate.service_macro import \ + YamlTemplateServiceMacroInstantiateStep from onaptests.steps.onboard.cds import CbaPublishStep from onaptests.utils.exceptions import OnapTestException -from onaptests.steps.instantiate.service_macro import YamlTemplateServiceMacroInstantiateStep +from yaml import SafeLoader, load class BasicVmMacroStep(YamlTemplateBaseStep): @@ -98,17 +98,14 @@ class BasicVmMacroStep(YamlTemplateBaseStep): return settings.SERVICE_INSTANCE_NAME -class BasicVmMacro(testcase.TestCase): +class BasicVmMacro(ScenarioBase): """Instantiate a basic vm macro.""" __logger = logging.getLogger() def __init__(self, **kwargs): """Init Basic Macro use case.""" - if "case_name" not in kwargs: - kwargs["case_name"] = 'basic_vm_macro' - super().__init__(**kwargs) - self.__logger.debug("Basic VM macro init started") + super().__init__('basic_vm_macro', **kwargs) self.test = BasicVmMacroStep(cleanup=settings.CLEANUP_FLAG) def run(self): |