From 4b3aa17a07e05e86e925b6c7abe77f48069fee66 Mon Sep 17 00:00:00 2001 From: limon Date: Wed, 17 Mar 2021 13:24:00 +0100 Subject: [PATCH] Fix 1472 - Error executing upgrade action over K8S NS Change-Id: Ibc9cb5e12d90f5582f49d99bcee002e2813dd9eb Signed-off-by: limon (cherry picked from commit 9b33fa825aaf935e4f467b1a01f65c85d1b9b694) --- osm_nbi/instance_topics.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 5088b24..de49738 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -764,18 +764,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") -- 2.25.1