From: limon Date: Wed, 17 Mar 2021 12:24:00 +0000 (+0100) Subject: Fix 1472 - Error executing upgrade action over K8S NS X-Git-Tag: branch-sol006v331-start~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F10505%2F1;p=osm%2FNBI.git Fix 1472 - Error executing upgrade action over K8S NS Change-Id: Ibc9cb5e12d90f5582f49d99bcee002e2813dd9eb Signed-off-by: limon --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index cae9f54..bf0e3a9 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -772,18 +772,20 @@ class NsLcmOpTopic(BaseTopic): descriptor_configuration = utils.find_in_list( configs, lambda config: config["id"] == indata["vdu_id"] - ).get("config-primitive") + ) elif indata.get("kdu_name"): self._check_valid_kdu(vnfd, indata["kdu_name"]) descriptor_configuration = utils.find_in_list( configs, lambda config: config["id"] == indata.get("kdu_name") - ).get("config-primitive") + ) else: descriptor_configuration = utils.find_in_list( configs, lambda config: config["id"] == vnfd["id"] - ).get("config-primitive") + ) + if descriptor_configuration is not None: + descriptor_configuration = descriptor_configuration.get("config-primitive") else: # use a NSD descriptor_configuration = nsd.get("ns-configuration", {}).get("config-primitive")