blob: d9d2620073a38e675c7beb0cc89767ddeb7feaf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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."""
super().execute()
utils.build_image()
utils.bootstrap_simulator()
utils.run_container()
def cleanup(self) -> None:
"""Remove containers and images."""
utils.stop_container()
utils.remove_simulator()
utils.remove_image()
|