Adding Update and Delete 06/13106/2
authorMark Beierl <mark.beierl@canonical.com>
Tue, 28 Mar 2023 18:04:47 +0000 (18:04 +0000)
committerMark Beierl <mark.beierl@canonical.com>
Tue, 28 Mar 2023 18:05:33 +0000 (18:05 +0000)
Adds constants and dataclasses for VIM Update and Delete

Change-Id: I5bc3e3a6c2ec0bbb7a99ba531af78b34d51e8a2f
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
osm_common/dataclasses/temporal_dataclasses.py
osm_common/temporal_constants.py

index de04186..3b8a857 100644 (file)
@@ -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
index 64569ff..62a6119 100644 (file)
 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"