OSMENG-1171 NsDeleteRecords Workflow
Change-Id: I05690ba6566e509bd652917f2a5dd69e3798e2bd
Signed-off-by: gatici <gulsum.atici@canonical.com>
diff --git a/osm_common/temporal/states.py b/osm_common/temporal/states.py
index 1c4c896..ded7845 100644
--- a/osm_common/temporal/states.py
+++ b/osm_common/temporal/states.py
@@ -32,6 +32,7 @@
class NsState(IntEnum):
PROCESSING = auto()
INSTANTIATED = auto()
+ NOT_INSTANTIATED = auto()
ERROR = auto()
diff --git a/osm_common/temporal/workflows/ns.py b/osm_common/temporal/workflows/ns.py
index acd2670..70e1e3d 100644
--- a/osm_common/temporal/workflows/ns.py
+++ b/osm_common/temporal/workflows/ns.py
@@ -18,6 +18,7 @@
from abc import abstractmethod
from dataclasses import dataclass
+from osm_common.temporal.workflows.base import BaseWorkflow
from osm_common.temporal.workflows.lcm import LcmOperationWorkflow
@@ -46,3 +47,31 @@
@abstractmethod
async def run(self, workflow_input: Input) -> None:
pass
+
+
+class NsDeleteRecordsWorkflow(BaseWorkflow):
+ """Delete the records belongs to NS from DB.
+
+ Workflow Identifier:
+ It is recommended that the ID for the NS is referred as a workflow
+ ID when invoking this workflow.
+ """
+
+ @dataclass
+ class Input:
+ """
+ Input dataclass for workflow that deletes a NS.
+
+ Attributes:
+ -----------
+ ns_uuid : str
+ The UUID of the VNF which is stored in the OSM nsrs
+ collection in Mongo.
+
+ """
+
+ ns_uuid: str
+
+ @abstractmethod
+ async def run(self, workflow_input: Input) -> None:
+ pass