From: bravof Date: Wed, 10 Nov 2021 20:58:58 +0000 (-0300) Subject: bugfix(VNFR): virtual storages added to VDU section inside the VNFR. bug 1511 X-Git-Tag: v12.0.0rc1~35 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F11330%2F2;p=osm%2FNBI.git bugfix(VNFR): virtual storages added to VDU section inside the VNFR. bug 1511 Change-Id: I60b33c5e4066545ba39e5dcaf1b7d9f27e6905d2 Signed-off-by: bravof --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 243a199..fd2e6ab 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -766,6 +766,14 @@ class NsrTopic(BaseTopic): additional_params, vdu_params = self._format_additional_params( ns_request, vnf_index, vdu_id=vdu["id"], descriptor=vnfd ) + + try: + vdu_virtual_storage_descriptors = utils.filter_in_list( + vnfd.get("virtual-storage-desc", []), + lambda stg_desc: stg_desc["id"] in vdu["virtual-storage-desc"] + ) + except Exception: + vdu_virtual_storage_descriptors = [] vdur = { "vdu-id-ref": vdu["id"], # TODO "name": "" Name of the VDU in the VIM @@ -775,6 +783,7 @@ class NsrTopic(BaseTopic): "interfaces": [], "additionalParams": additional_params, "vdu-name": vdu["name"], + "virtual-storages": vdu_virtual_storage_descriptors } if vdu_params and vdu_params.get("config-units"): vdur["config-units"] = vdu_params["config-units"]