diff options
Diffstat (limited to 'src/onaptests/steps/simulator/pnf/pnf_instantiate.py')
-rw-r--r-- | src/onaptests/steps/simulator/pnf/pnf_instantiate.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/onaptests/steps/simulator/pnf/pnf_instantiate.py b/src/onaptests/steps/simulator/pnf/pnf_instantiate.py new file mode 100644 index 0000000..31ea6bf --- /dev/null +++ b/src/onaptests/steps/simulator/pnf/pnf_instantiate.py @@ -0,0 +1,30 @@ +"""Base step that runs a PNF simulator.""" +from onaptests.steps.simulator.pnf import utils +from onaptests.steps.base import BaseStep + +class PNFInstanceStep(BaseStep): + """Run PNF simulator containers.""" + + @property + def description(self) -> str: + """Step description.""" + return "Run PNF simulator containers." + + @property + def component(self) -> str: + """Component name.""" + return "Environment" + + @BaseStep.store_state + def execute(self) -> None: + """Run PNF simulator containers.""" + utils.build_image() + utils.bootstrap_simulator() + utils.run_container() + + @BaseStep.store_state + def cleanup(self) -> None: + """Remove containers and images.""" + utils.stop_container() + utils.remove_simulator() + utils.remove_image() |