OSMENG-1047 Use constraints from VDU definition 69/13269/1
authorGulsum Atici <gulsum.atici@canonical.com>
Tue, 25 Apr 2023 11:56:49 +0000 (14:56 +0300)
committerGulsum Atici <gulsum.atici@canonical.com>
Tue, 25 Apr 2023 11:56:49 +0000 (14:56 +0300)
Change-Id: I12c8f5f000488c8cd59e094ca7ab332548ea93e8
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
osm_common/dataclasses/temporal_dataclasses.py
osm_common/temporal_constants.py

index 38dfcfa..f197186 100644 (file)
@@ -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
index 63f90e1..91a45ac 100644 (file)
@@ -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"