aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/simulator/pnf/pnf_register.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/simulator/pnf/pnf_register.py')
-rw-r--r--src/onaptests/steps/simulator/pnf/pnf_register.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/onaptests/steps/simulator/pnf/pnf_register.py b/src/onaptests/steps/simulator/pnf/pnf_register.py
new file mode 100644
index 0000000..8d5467a
--- /dev/null
+++ b/src/onaptests/steps/simulator/pnf/pnf_register.py
@@ -0,0 +1,38 @@
+"""Base step that runs a PNF simulator."""
+from onaptests.steps.simulator.pnf import utils
+from onaptests.steps.base import BaseStep
+from onaptests.steps.simulator.pnf.pnf_instantiate import PNFInstanceStep
+
+class PNFRegisterStep(BaseStep):
+ """Run PNF simulator containers."""
+
+ def __init__(self, cleanup=True):
+ """Initialize step.
+
+ Substeps:
+ - PNFInstanceStep
+
+ """
+ super().__init__(cleanup=cleanup)
+ self.add_step(PNFInstanceStep(cleanup=cleanup))
+
+ @property
+ def description(self) -> str:
+ """Step description."""
+ return "Register PNF with VES."
+
+ @property
+ def component(self) -> str:
+ """Component name."""
+ return "Environment"
+
+ @BaseStep.store_state
+ def execute(self) -> None:
+ """Register with VES."""
+ super().execute()
+ utils.register()
+
+ @BaseStep.store_state
+ def cleanup(self) -> None:
+ """Substeps cleanup - no unregister."""
+ super().cleanup()