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:
"""
LCM_TASK_QUEUE = "lcm-task-queue"
# Activities
+ACTIVITY_NSLCM_NO_OP = "nslcm-no-op"
+ACTIVITY_EXECUTE_NS_LCM_WORKFLOW = "execute-ns-lcm-workflow"
+ACTIVITY_UPDATE_LCM_OPERATION_STATE = "update-lcm-operation-state"
ACTIVITY_DELETE_VIM = "delete-vim"
ACTIVITY_TEST_VIM_CONNECTIVITY = "test-vim-connectivity"
-ACTIVITY_UPDATE_VIM_OPERATION_STATE = "update-operation-state"
+ACTIVITY_UPDATE_VIM_OPERATION_STATE = "update-vim-operation-state"
ACTIVITY_UPDATE_VIM_STATE = "update-vim-state"
+ACTIVITY_UPDATE_LCM_OPERATION_STATE = "update-lcm-operation-state"
# Workflows
+WORKFLOW_NSLCM_NO_OP = "nslcm-no-op"
WORKFLOW_VIM_CREATE = "vim-create"
WORKFLOW_VIM_UPDATE = "vim-update"
WORKFLOW_VIM_DELETE = "vim-delete"