OSMENG-992 - Implement create model activity 91/13191/1
authorPatricia Reinoso <patricia.reinoso@canonical.com>
Wed, 12 Apr 2023 15:57:25 +0000 (15:57 +0000)
committerPatricia Reinoso <patricia.reinoso@canonical.com>
Wed, 12 Apr 2023 15:57:25 +0000 (15:57 +0000)
in NS Workflow.

An exception is raised if model already exists

Change-Id: I0000f98e2d6c1b458d3234ac83594b9ce5c86f26
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
osm_common/dataclasses/temporal_dataclasses.py
osm_common/temporal_constants.py

index 953c95f..a0e3d19 100644 (file)
@@ -365,9 +365,9 @@ class UpdateNsStateInput:
 
 
 @dataclass
-class CreateModelInput:
+class ModelInfo:
     """
-    Input dataclass for creating a Juju Model.
+    Contains the information related to a model.
 
     Attributes:
     -----------
@@ -376,7 +376,7 @@ class CreateModelInput:
         collection in Mongo.
 
     model_name : str
-        Name of the model to create in Juju.
+        Name of the Juju model used to deploy charms.
     """
 
     vim_uuid: str
index 3b7c3eb..a953119 100644 (file)
@@ -34,7 +34,8 @@ 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_CREATE_MODEL = "create-model"
+ACTIVITY_GET_MODEL_INFO = "get-model-info"
 ACTIVITY_DEPLOY_CHARM = "deploy-charm"
 ACTIVITY_CHECK_CHARM_STATUS = "check-charm-status"
 ACTIVITY_CHANGE_NF_STATE = "change_nf_state"