#######################################################################################
from dataclasses import dataclass
+from enum import auto, IntEnum
+#######################################################################################
# Workflow Dataclasses
op_id: str
+#######################################################################################
# Activity Dataclasses
vim_uuid: str
+class VimState(IntEnum):
+ PROCESSING = auto()
+ ENABLED = auto()
+ ERROR = auto()
+
+
@dataclass
class UpdateVimStateInput:
"""
The UUID of the VIM account as stored in the OSM vim
collection in Mongo
- operational_state : str
+ operational_state : VimState
A representation of the operational state (ENABLED or ERROR)
of the VIM.
"""
vim_uuid: str
- operational_state: str
+ operational_state: VimState
message: str
+class VimOperationState(IntEnum):
+ COMPLETED = auto()
+ FAILED = auto()
+
+
@dataclass
class UpdateVimOperationStateInput:
"""
The operation (task) id for this workflow. This is used
to update the status of the operation in Mongo vim collection.
- op_state : str
+ op_state : VimOperationState
A representation of the state of the specified operation id,
such as COMPLETED, or FAILED.
vim_uuid: str
op_id: str
- op_state: str
+ op_state: VimOperationState
message: str