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: v9.1.5^0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=9f9d202449dd8422d7b97b54b70d9f9196c7fc54;p=osm%2FNBI.git bugfix(VNFR): virtual storages added to VDU section inside the VNFR. bug 1511 Change-Id: I60b33c5e4066545ba39e5dcaf1b7d9f27e6905d2 Signed-off-by: bravof Signed-off-by: sousaedu --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 3626e53..07018c5 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -573,7 +573,16 @@ class NsrTopic(BaseTopic): vdu_mgmt_cp.append(ee["external-connection-point-ref"]) additional_params, vdu_params = self._format_additional_params( - ns_request, vnf_index, vdu_id=vdu["id"], descriptor=vnfd) + 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 @@ -582,7 +591,8 @@ class NsrTopic(BaseTopic): "internal-connection-point": [], "interfaces": [], "additionalParams": additional_params, - "vdu-name": vdu["name"] + "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"]