OSMENG-1047 Use constraints from VDU definition
Change-Id: I12c8f5f000488c8cd59e094ca7ab332548ea93e8
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
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
@@ -123,6 +123,55 @@
@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:
"""
Input dataclass for workflow that instantiates a VDU.
@@ -133,11 +182,13 @@
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_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"