From 75fbedc8e3c6b025ee418ffe461e64555c170e19 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 (cherry picked from commit 65e22e5b962fc7a90ca12e85355dfd1bac24d4c1) --- osm_nbi/instance_topics.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index f95ab21..ece55b2 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -765,6 +765,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 @@ -774,6 +782,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"] -- 2.25.1