From: Mark Beierl Date: Tue, 28 Mar 2023 18:04:47 +0000 (+0000) Subject: Adding Update and Delete X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=30e050771684d560dd8e029d5a9876fd24840333;p=osm%2Fcommon.git Adding Update and Delete Adds constants and dataclasses for VIM Update and Delete Change-Id: I5bc3e3a6c2ec0bbb7a99ba531af78b34d51e8a2f Signed-off-by: Mark Beierl --- diff --git a/osm_common/dataclasses/temporal_dataclasses.py b/osm_common/dataclasses/temporal_dataclasses.py index de04186..3b8a857 100644 --- a/osm_common/dataclasses/temporal_dataclasses.py +++ b/osm_common/dataclasses/temporal_dataclasses.py @@ -37,6 +37,7 @@ class VimOperationInput: by the workflow at the end to update the status of the operation in Mongo vim collection. """ + vim_uuid: str op_id: str @@ -55,6 +56,7 @@ class TestVimConnectivityInput: The UUID of the VIM account as stored in the OSM vim collection in Mongo """ + vim_uuid: str @@ -78,6 +80,7 @@ class UpdateVimStateInput: operational state, such as the error message associated with the ERROR operational_state. """ + vim_uuid: str operational_state: str message: str @@ -108,7 +111,24 @@ class UpdateVimOperationStateInput: operation state, such as the error message explaining why the operation failed. """ + vim_uuid: str op_id: str op_state: str message: str + + +@dataclass +class DeleteVimInput: + """ + Input dataclass for deleting vim record from the database + + Attributes: + ----------- + vim_uuid : str + The UUID of the VIM account as stored in the OSM vim + collection in Mongo + + """ + + vim_uuid: str diff --git a/osm_common/temporal_constants.py b/osm_common/temporal_constants.py index 64569ff..62a6119 100644 --- a/osm_common/temporal_constants.py +++ b/osm_common/temporal_constants.py @@ -18,9 +18,12 @@ LCM_TASK_QUEUE = "lcm-task-queue" # Activities +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-operation-state" ACTIVITY_UPDATE_VIM_STATE = "update-vim-state" # Workflows WORKFLOW_VIM_CREATE = "vim-create" +WORKFLOW_VIM_UPDATE = "vim-update" +WORKFLOW_VIM_DELETE = "vim-delete"