OSM-989 Fetch vnfrs and vnfds using activity 70/13170/5
authorGulsum Atici <gulsum.atici@canonical.com>
Thu, 6 Apr 2023 21:04:28 +0000 (00:04 +0300)
committerGulsum Atici <gulsum.atici@canonical.com>
Mon, 17 Apr 2023 15:46:26 +0000 (18:46 +0300)
Change-Id: Ia22464d28969cec0c53f51ec6d8639dd00604ea1
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
osm_common/dataclasses/temporal_dataclasses.py
osm_common/temporal_constants.py

index 8694fa7..050ae9a 100644 (file)
@@ -179,7 +179,7 @@ class VnfInstantiateInput:
 @dataclass
 class PrepareVnfInput:
     """
-    Input dataclass for workflow that instantiates a VNF.
+    Input dataclass for workflow that prepares a VNF.
 
     Attributes:
     -----------
@@ -386,7 +386,7 @@ class ModelInfo:
 @dataclass
 class ChangeVnfStateInput:
     """
-    Input dataclass for changing NF State.
+    Input dataclass for changing VNF State.
 
     Attributes:
     -----------
@@ -405,7 +405,7 @@ class ChangeVnfStateInput:
 @dataclass
 class ChangeVnfInstantiationStateInput:
     """
-    Input dataclass for changing NF Instantiation State.
+    Input dataclass for changing VNF Instantiation State.
 
     Attributes:
     -----------
@@ -425,7 +425,7 @@ class ChangeVnfInstantiationStateInput:
 @dataclass
 class GetTaskQueueInput:
     """
-    Input dataclass for creating a Juju Model.
+    Input dataclass for get task queue activity.
 
     Attributes:
     -----------
@@ -450,3 +450,36 @@ class GetTaskQueueOutput:
     """
 
     task_queue: str
+
+
+@dataclass
+class GetVnfDetailsInput:
+    """
+    Input dataclass for get vnf details 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 GetVnfDetailsOutput:
+    """
+    Output dataclass for get vnf details activity.
+
+    Attributes:
+    -----------
+    vnfr : dict
+        VNF record retrieved from Database.
+
+    vnfd : dict
+        VNF descriptor retrieved from Database.
+    """
+
+    vnfr: dict
+    vnfd: dict
index a4697a2..ff05875 100644 (file)
@@ -42,6 +42,7 @@ ACTIVITY_CHANGE_VNF_STATE = "change-vnf-state"
 ACTIVITY_CHANGE_VNF_INSTANTIATION_STATE = "change-vnf-instantiation-state"
 ACTIVITY_SEND_NOTIFICATION_FOR_VNF = "send-notification-for-vnf"
 ACTIVITY_GET_TASK_QUEUE = "get_task_queue"
+ACTIVITY_GET_VNF_DETAILS = "get_vnf_details"
 
 # Workflows
 WORKFLOW_NSLCM_NO_OP = "nslcm-no-op"