1 """Instantiate basic vm using SO macro flow."""
5 from onapsdk.configuration import settings
6 from onapsdk.exceptions import SDKException
7 from xtesting.core import testcase
9 from onaptests.utils.exceptions import OnapTestException
10 from onaptests.steps.instantiate.service_macro import YamlTemplateServiceMacroInstantiateStep
13 class BasicVmMacroStability(testcase.TestCase):
14 """Instantiate a basic vm macro."""
16 __logger = logging.getLogger(__name__)
18 def __init__(self, **kwargs):
19 """Init Basic Macro use case."""
20 if "case_name" not in kwargs:
21 kwargs["case_name"] = 'basic_vm_macro_stability'
22 super().__init__(**kwargs)
23 self.__logger.debug("Basic VM macro stability init started")
24 self.test = YamlTemplateServiceMacroInstantiateStep(cleanup=settings.CLEANUP_FLAG)
27 """Run basic vm macro test."""
28 self.start_time = time.time()
33 except OnapTestException as exc:
35 self.__logger.exception(exc.error_message)
38 self.__logger.exception("SDK Exception")
40 self.stop_time = time.time()
43 """Generate report."""
44 self.test.reports_collection.generate_report()