From: Gulsum Atici Date: Tue, 25 Apr 2023 11:56:49 +0000 (+0300) Subject: OSMENG-1047 Use constraints from VDU definition X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F13269%2F1;p=osm%2Fcommon.git OSMENG-1047 Use constraints from VDU definition Change-Id: I12c8f5f000488c8cd59e094ca7ab332548ea93e8 Signed-off-by: Gulsum Atici --- diff --git a/osm_common/dataclasses/temporal_dataclasses.py b/osm_common/dataclasses/temporal_dataclasses.py index 38dfcfa..f197186 100644 --- a/osm_common/dataclasses/temporal_dataclasses.py +++ b/osm_common/dataclasses/temporal_dataclasses.py @@ -122,6 +122,55 @@ class CharmInfo: entity_url: str +@dataclass +class GetVimCloudInput: + """ + Input dataclass for get vim cloud activity. + + Attributes: + ----------- + vnfr_uuid : str + The UUID of the VNF which is stored in the OSM vnfrs + collection in Mongo. + + """ + + vnfr_uuid: str + + +@dataclass +class GetVimCloudOutput: + """ + Output dataclass for get vim cloud activity. + + Attributes: + ----------- + cloud : str + Type of the cloud which is used to Deploy VNF. + """ + + cloud: str + + +@dataclass +class VduComputeConstraints: + """ + Input dataclass for VDU constraints + + Attributes: + ----------- + cores : int (Number of virtual CPUs) + + mem: int (GB) + + cloud: str (VIM cloud type) + """ + + cores: int + mem: int + cloud: str + + @dataclass class VduInstantiateInput: """ @@ -133,11 +182,13 @@ class VduInstantiateInput: charm_info : CharmInfo + constraints: VduComputeConstraints """ vim_uuid: str model_name: str charm_info: CharmInfo + constraints: VduComputeConstraints @dataclass diff --git a/osm_common/temporal_constants.py b/osm_common/temporal_constants.py index 63f90e1..91a45ac 100644 --- a/osm_common/temporal_constants.py +++ b/osm_common/temporal_constants.py @@ -42,6 +42,7 @@ ACTIVITY_SEND_NOTIFICATION_FOR_VNF = "send-notification-for-vnf" ACTIVITY_GET_TASK_QUEUE = "get_task_queue" ACTIVITY_GET_VNF_DETAILS = "get_vnf_details" ACTIVITY_SET_VNF_MODEL = "set-vnf-model" +ACTIVITY_GET_VIM_CLOUD = "get-vim-cloud" # Workflows WORKFLOW_NSLCM_NO_OP = "nslcm-no-op"