From 4ddf2c7055362b6f06ffc5b341f0cd0b54661fe6 Mon Sep 17 00:00:00 2001 From: Patricia Reinoso Date: Wed, 12 Apr 2023 15:57:25 +0000 Subject: [PATCH] OSMENG-992 - Implement create model activity in NS Workflow. An exception is raised if model already exists Change-Id: I0000f98e2d6c1b458d3234ac83594b9ce5c86f26 Signed-off-by: Patricia Reinoso --- osm_common/dataclasses/temporal_dataclasses.py | 6 +++--- osm_common/temporal_constants.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/osm_common/dataclasses/temporal_dataclasses.py b/osm_common/dataclasses/temporal_dataclasses.py index 953c95f..a0e3d19 100644 --- a/osm_common/dataclasses/temporal_dataclasses.py +++ b/osm_common/dataclasses/temporal_dataclasses.py @@ -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 diff --git a/osm_common/temporal_constants.py b/osm_common/temporal_constants.py index 3b7c3eb..a953119 100644 --- a/osm_common/temporal_constants.py +++ b/osm_common/temporal_constants.py @@ -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" -- 2.25.1