Adding Update and Delete
Adds constants and dataclasses for VIM Update and Delete
Change-Id: I5bc3e3a6c2ec0bbb7a99ba531af78b34d51e8a2f
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 de04186..3b8a857 100644
--- a/osm_common/dataclasses/temporal_dataclasses.py
+++ b/osm_common/dataclasses/temporal_dataclasses.py
@@ -37,6 +37,7 @@
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 @@
The UUID of the VIM account as stored in the OSM vim
collection in Mongo
"""
+
vim_uuid: str
@@ -78,6 +80,7 @@
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 @@
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"