nslcmop: dict
+@dataclass
+class NsInstantiateInput:
+ """
+ Input dataclass for workflow that instantiate NS.
+
+ Attributes:
+ -----------
+ ns_uuid : str
+ The UUID of the NS as stored in the OSM nsr
+ collection in Mongo
+
+ op_id: str
+ The operation (task) id for this workflow. This is used
+ by the workflow at the end to update the status of the
+ operation in Mongo vim collection.
+ """
+
+ ns_uuid: str
+ op_id: str
+
+
+@dataclass
+class CharmInfo:
+ """
+ Input dataclass for
+
+ Attributes:
+ -----------
+ app_name : str
+
+ channel: str
+
+ entity_url: str
+ """
+
+ app_name: str
+ channel: str
+ entity_url: str
+
+
+@dataclass
+class VduInstantiateInput:
+ """
+ Input dataclass for workflow that instantiates a VDU.
+
+ vim_uuid: str
+
+ model_name: str
+
+ charm_info : CharmInfo
+
+ """
+
+ vim_uuid: str
+ model_name: str
+ charm_info: CharmInfo
+
+
#######################################################################################
# Activity Dataclasses
"""
vim_uuid: str
+
+
+@dataclass
+class DeployNsInput:
+ """
+ Input dataclass for
+
+ Attributes:
+ -----------
+ ns_uuid : str
+ The UUID of the NS as stored in the OSM nsr
+ collection in Mongo
+ """
+
+ ns_uuid: str
+
+
+class NsState(IntEnum):
+ PROCESSING = auto()
+ INSTANTIATED = auto()
+ ERROR = auto()
+
+
+@dataclass
+class UpdateNsStateInput:
+ """
+ Input dataclass for updating NS state in the DB
+
+ Attributes:
+ -----------
+ ns_uuid : str
+ The UUID of the NS as stored in the OSM ns
+ collection in Mongo
+
+ operational_state : NsState
+ A representation of the operational state (ENABLED or ERROR)
+ of the NS.
+
+ message : str
+ Human readable message providing additional details to the
+ operational state, such as the error message associated
+ with the ERROR operational_state.
+ """
+
+ ns_uuid: str
+ state: NsState
+ message: str
+
+
+@dataclass
+class CreateModelInput:
+ """
+ Input dataclass for creating a Juju Model.
+
+ Attributes:
+ -----------
+ vim_uuid : str
+ The UUID of the VIM as stored in the OSM vim_accounts
+ collection in Mongo.
+
+ model_name : str
+ Name of the model to create in Juju.
+ """
+
+ vim_uuid: str
+ model_name: str
ACTIVITY_UPDATE_VIM_OPERATION_STATE = "update-vim-operation-state"
ACTIVITY_UPDATE_VIM_STATE = "update-vim-state"
ACTIVITY_UPDATE_LCM_OPERATION_STATE = "update-lcm-operation-state"
+ACTIVITY_PREPARE_VNF_RECORDS = "prepare-vnf-records"
+ACTIVITY_DEPLOY_NS = "deploy-ns"
+ACTIVITY_UPDATE_NS_STATE = "update-ns-state"
+ACTIVITY_CHECK_NS_INSTANTIATION_FINISHED = "check-ns-instantiation-finish"
+ACTIVITY_CREATE_MODEL_IF_DOESNT_EXIST = "create-model-if-doesnt-exist"
+ACTIVITY_DEPLOY_CHARM = "deploy-charm"
+ACTIVITY_CHECK_CHARM_STATUS = "check-charm-status"
# Workflows
WORKFLOW_NSLCM_NO_OP = "nslcm-no-op"
WORKFLOW_VIM_CREATE = "vim-create"
WORKFLOW_VIM_UPDATE = "vim-update"
WORKFLOW_VIM_DELETE = "vim-delete"
+WORKFLOW_NS_INSTANTIATE = "ns-instantiate"
+WORKFLOW_VDU_INSTANTIATE = "vdu-instantiate"
--- /dev/null
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---