From 9f9d202449dd8422d7b97b54b70d9f9196c7fc54 Mon Sep 17 00:00:00 2001 From: bravof Date: Wed, 10 Nov 2021 17:58:58 -0300 Subject: [PATCH] bugfix(VNFR): virtual storages added to VDU section inside the VNFR. bug 1511 Change-Id: I60b33c5e4066545ba39e5dcaf1b7d9f27e6905d2 Signed-off-by: bravof Signed-off-by: sousaedu --- osm_nbi/instance_topics.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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"] -- 2.25.1