from dataclasses import dataclass
from enum import auto, IntEnum
+
+#######################################################################################
+# Defining States
+class VimState(IntEnum):
+ PROCESSING = auto()
+ ENABLED = auto()
+ ERROR = auto()
+
+
+class VimOperationState(IntEnum):
+ COMPLETED = auto()
+ FAILED = auto()
+
+
+class NsState(IntEnum):
+ PROCESSING = auto()
+ INSTANTIATED = auto()
+ ERROR = auto()
+
+
+class VnfLcmOperationState(IntEnum):
+ PROCESSING = auto()
+ COMPLETED = auto()
+ FAILED = auto()
+
+
+class VnfInstantiationState(IntEnum):
+ NOT_INSTANTIATED = auto()
+ INSTANTIATED = auto()
+
+
+class VnfState(IntEnum):
+ STOPPED = auto()
+ STARTED = auto()
+
+
+class LcmOperationState(IntEnum):
+ PROCESSING = auto()
+ COMPLETED = auto()
+ FAILED = auto()
+
+
#######################################################################################
# Workflow Dataclasses
charm_info: CharmInfo
-#######################################################################################
-# Activity Dataclasses
+@dataclass
+class VnfInstantiateInput:
+ """
+ Input dataclass for workflow that instantiates a VNF.
+
+ Attributes:
+ -----------
+ vnfr_uuid : str
+ The UUID of the VNF which is stored in the OSM vnfrs
+ collection in Mongo.
+ """
-class LcmOperationState(IntEnum):
- PROCESSING = auto()
- COMPLETED = auto()
- FAILED = auto()
+ vnfr_uuid: str
+
+
+@dataclass
+class PrepareVnfInput:
+ """
+ Input dataclass for workflow that instantiates a VNF.
+
+ Attributes:
+ -----------
+ vnfr_uuid : str
+ The UUID of the VNF which is stored in the OSM vnfrs
+ collection in Mongo.
+
+ """
+
+ vnfr_uuid: str
+
+
+#######################################################################################
+# Activity Dataclasses
@dataclass
vim_uuid: str
-class VimState(IntEnum):
- PROCESSING = auto()
- ENABLED = auto()
- ERROR = auto()
-
-
@dataclass
class UpdateVimStateInput:
"""
message: str
-class VimOperationState(IntEnum):
- COMPLETED = auto()
- FAILED = auto()
-
-
@dataclass
class UpdateVimOperationStateInput:
"""
ns_uuid: str
-class NsState(IntEnum):
- PROCESSING = auto()
- INSTANTIATED = auto()
- ERROR = auto()
-
-
@dataclass
class UpdateNsStateInput:
"""
vim_uuid: str
model_name: str
+
+
+@dataclass
+class ChangeNFStateInput:
+ """
+ Input dataclass for creating a Juju Model.
+
+ Attributes:
+ -----------
+ vnfr_uuid : str
+ The UUID of the VNF which is stored in the OSM vnfrs
+ collection in Mongo.
+
+ nf_state : VnfState
+ A representation of the VNF state (STOPPED or STARTED).
+ """
+
+ vnfr_uuid: str
+ state: VnfState
+
+
+@dataclass
+class ChangeNFInstantiationStateInput:
+ """
+ Input dataclass for creating a Juju Model.
+
+ Attributes:
+ -----------
+ vnfr_uuid : str
+ The UUID of the VNF which is stored in the OSM vnfrs
+ collection in Mongo.
+
+ nf_instantiation_state : VnfInstantiationState
+ A representation of the VNF instantiation state (NOT_INSTANTIATED or INSTANTIATED).
+
+ """
+
+ vnfr_uuid: str
+ state: VnfInstantiationState
+
+
+@dataclass
+class GetTaskQueueInput:
+ """
+ Input dataclass for creating a Juju Model.
+
+ Attributes:
+ -----------
+ vnfr_uuid : str
+ The UUID of the VNF which is stored in the OSM vnfrs
+ collection in Mongo.
+
+ """
+
+ vnfr_uuid: str
+
+
+@dataclass
+class GetTaskQueueOutput:
+ """
+ Output dataclass for get task queue activity.
+
+ Attributes:
+ -----------
+ task_queue : str
+ Name of the queue which is used to Deploy VNF.
+ """
+
+ task_queue: str