aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/scenario/pnf_macro.py
diff options
context:
space:
mode:
authorMicha? Jagie??o <michal.jagiello@t-mobile.pl>2023-06-21 05:59:12 +0000
committerGerrit Code Review <gerrit@onap.org>2023-06-21 05:59:12 +0000
commit99ee76f7f618282987e71a2c0b2ddbaa5bbd2689 (patch)
tree1bf841d2161f4d4feabe2e93f53861db9ac06470 /src/onaptests/scenario/pnf_macro.py
parent66cb2f9168c8a8f0c19e662491019d01f16de146 (diff)
parentc10f9f4706aeb848cc55ad7a552081dbf3e7b6a7 (diff)
Merge "BaseScenario class added"
Diffstat (limited to 'src/onaptests/scenario/pnf_macro.py')
-rw-r--r--src/onaptests/scenario/pnf_macro.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/onaptests/scenario/pnf_macro.py b/src/onaptests/scenario/pnf_macro.py
index 24f9a1e..7ecf3c2 100644
--- a/src/onaptests/scenario/pnf_macro.py
+++ b/src/onaptests/scenario/pnf_macro.py
@@ -1,17 +1,18 @@
"""Instantiate service with PNF using SO macro flow."""
import logging
import time
-from yaml import load, SafeLoader
-from xtesting.core import testcase
from onapsdk.configuration import settings
from onapsdk.exceptions import SDKException
-
+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 CbaEnrichStep
-from onaptests.steps.simulator.pnf_simulator_cnf.pnf_register import PnfSimulatorCnfRegisterStep
-from onaptests.steps.instantiate.service_macro import YamlTemplateServiceMacroInstantiateStep
+from onaptests.steps.simulator.pnf_simulator_cnf.pnf_register import \
+ PnfSimulatorCnfRegisterStep
from onaptests.utils.exceptions import OnapTestException
+from yaml import SafeLoader, load
class PnfMacroScenarioStep(YamlTemplateBaseStep):
@@ -102,17 +103,14 @@ class PnfMacroScenarioStep(YamlTemplateBaseStep):
return settings.SERVICE_INSTANCE_NAME
-class PnfMacro(testcase.TestCase):
+class PnfMacro(ScenarioBase):
"""Run PNF simulator and onboard then instantiate a service with PNF."""
__logger = logging.getLogger(__name__)
def __init__(self, **kwargs):
"""Init Basic Network use case."""
- if "case_name" not in kwargs:
- kwargs["case_name"] = 'pnf_macro'
- super().__init__(**kwargs)
- self.__logger.debug("PnfMacro init started")
+ super().__init__('pnf_macro', **kwargs)
self.test = PnfMacroScenarioStep(cleanup=settings.CLEANUP_FLAG)
def run(self):