NS LCM OP Workflow wrapper
Change-Id: If3784fef5e54f5f41e744cc0ae7ac0d6ee83f97f
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
diff --git a/osm_common/dataclasses/temporal_dataclasses.py b/osm_common/dataclasses/temporal_dataclasses.py
index 37736c7..c472ca6 100644
--- a/osm_common/dataclasses/temporal_dataclasses.py
+++ b/osm_common/dataclasses/temporal_dataclasses.py
@@ -44,10 +44,70 @@
op_id: str
+@dataclass
+class NsLcmOperationInput:
+ """
+ Input dataclass for workflows that run as LCM operations.
+
+ Attributes:
+ -----------
+
+ nslcmop: dict
+ A dictionary representing the nslcmop record from the
+ database.
+ """
+
+ nslcmop: dict
+
+
#######################################################################################
# Activity Dataclasses
+class LcmOperationState(IntEnum):
+ PROCESSING = auto()
+ COMPLETED = auto()
+ FAILED = auto()
+
+
+@dataclass
+class UpdateLcmOperationStateInput:
+ """
+ Input dataclass for updating LCM Operations in the Mongo nslcmops
+ collection. The following attributes will be updated automatically
+ - statusEnteredTime
+ - _admin.modified
+
+ Attributes:
+ -----------
+ op_id: str
+ The operation (task) id for this activity. This is the key
+ to the record in nslcmops collection that will be updated.
+
+ op_state : LcmOperationState
+ A representation of the state of the specified operation id,
+ such as PROCESSING, COMPLETED, or FAILED.
+
+ stage: str
+ Human readable checkpoint message, intended only to give the
+ user feedback.
+
+ error_message: str
+ Human readable error message if any failure occurred.
+
+ detailed_status : str
+ Human readable message providing additional details to the
+ operation state, such as the error message explaining why
+ the operation failed.
+ """
+
+ op_id: str
+ op_state: LcmOperationState
+ stage: str
+ error_message: str
+ detailed_status: str
+
+
@dataclass
class TestVimConnectivityInput:
"""