X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2Fdataclasses%2Ftemporal_dataclasses.py;h=38dfcfabc4d80bddfefa26790cbf1dd3309a8d66;hb=refs%2Fchanges%2F42%2F13242%2F5;hp=a0e3d19bd066a750f2349937fcf47280e02ae183;hpb=4ddf2c7055362b6f06ffc5b341f0cd0b54661fe6;p=osm%2Fcommon.git diff --git a/osm_common/dataclasses/temporal_dataclasses.py b/osm_common/dataclasses/temporal_dataclasses.py index a0e3d19..38dfcfa 100644 --- a/osm_common/dataclasses/temporal_dataclasses.py +++ b/osm_common/dataclasses/temporal_dataclasses.py @@ -17,6 +17,7 @@ from dataclasses import dataclass from enum import auto, IntEnum +from typing import List ####################################################################################### @@ -102,27 +103,6 @@ class NsLcmOperationInput: nslcmop: dict -@dataclass -class NsInstantiateInput: - """ - Input dataclass for workflow that instantiate NS. - - Attributes: - ----------- - ns_uuid : str - The UUID of the NS as stored in the OSM nsr - collection in Mongo - - op_id: str - The operation (task) id for this workflow. This is used - by the workflow at the end to update the status of the - operation in Mongo vim collection. - """ - - ns_uuid: str - op_id: str - - @dataclass class CharmInfo: """ @@ -171,25 +151,12 @@ class VnfInstantiateInput: The UUID of the VNF which is stored in the OSM vnfrs collection in Mongo. - """ - - vnfr_uuid: str - - -@dataclass -class PrepareVnfInput: - """ - Input dataclass for workflow that instantiates a VNF. - - Attributes: - ----------- - vnfr_uuid : str - The UUID of the VNF which is stored in the OSM vnfrs - collection in Mongo. + model_name: str """ vnfr_uuid: str + model_name: str ####################################################################################### @@ -384,9 +351,38 @@ class ModelInfo: @dataclass -class ChangeNFStateInput: +class CheckCharmStatusInput: + """ + Input dataclass for checking on a specific charm's deployment + status + + Attributes: + ----------- + vim_uuid : str + The UUID of the VIM as stored in the OSM vim_accounts + collection in Mongo. + + model_name : str + Name of the model to create in Juju. + + application_name : str + Name of the application that the state is going to be + awaited. + + poll_interval : int (optional) + Time, in seconds, to wait between status checks. + """ + + vim_uuid: str + model_name: str + application_name: str + poll_interval: int = 1 + + +@dataclass +class ChangeVnfStateInput: """ - Input dataclass for creating a Juju Model. + Input dataclass for changing VNF State. Attributes: ----------- @@ -394,7 +390,7 @@ class ChangeNFStateInput: The UUID of the VNF which is stored in the OSM vnfrs collection in Mongo. - nf_state : VnfState + state : VnfState A representation of the VNF state (STOPPED or STARTED). """ @@ -403,9 +399,9 @@ class ChangeNFStateInput: @dataclass -class ChangeNFInstantiationStateInput: +class ChangeVnfInstantiationStateInput: """ - Input dataclass for creating a Juju Model. + Input dataclass for changing VNF Instantiation State. Attributes: ----------- @@ -413,7 +409,7 @@ class ChangeNFInstantiationStateInput: The UUID of the VNF which is stored in the OSM vnfrs collection in Mongo. - nf_instantiation_state : VnfInstantiationState + state : VnfInstantiationState A representation of the VNF instantiation state (NOT_INSTANTIATED or INSTANTIATED). """ @@ -425,7 +421,7 @@ class ChangeNFInstantiationStateInput: @dataclass class GetTaskQueueInput: """ - Input dataclass for creating a Juju Model. + Input dataclass for get task queue activity. Attributes: ----------- @@ -450,3 +446,60 @@ 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 + + +@dataclass +class GetVnfRecordIdsInput: + """ + Attributes: + ----------- + ns_uuid : str + The UUID of the NS from which to retrieve the VNF records. + """ + + ns_uuid: str + + +@dataclass +class GetVnfRecordIdsOutput: + """ + Attributes: + ----------- + vnfr_ids : list[str] + List of the VNF record IDs associated with the NS. + """ + + vnfr_ids: List[str]