blob: 8d5467a97206f6b5d302cbbbb9dd56d8754464fb (
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
31
32
33
34
35
36
37
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()
|