From 56e41a595a501017bbaa3cffc7ca52e0d88e8264 Mon Sep 17 00:00:00 2001 From: Gulsum Atici Date: Fri, 7 Apr 2023 00:04:28 +0300 Subject: [PATCH] OSM-989 Fetch vnfrs and vnfds using activity Change-Id: Ia22464d28969cec0c53f51ec6d8639dd00604ea1 Signed-off-by: Gulsum Atici --- .../dataclasses/temporal_dataclasses.py | 41 +++++++++++++++++-- osm_common/temporal_constants.py | 1 + 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/osm_common/dataclasses/temporal_dataclasses.py b/osm_common/dataclasses/temporal_dataclasses.py index 8694fa7..050ae9a 100644 --- a/osm_common/dataclasses/temporal_dataclasses.py +++ b/osm_common/dataclasses/temporal_dataclasses.py @@ -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 diff --git a/osm_common/temporal_constants.py b/osm_common/temporal_constants.py index a4697a2..ff05875 100644 --- a/osm_common/temporal_constants.py +++ b/osm_common/temporal_constants.py @@ -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" -- 2.25.1