From b091dc1758a3ac2838d5c6d324e8cacaa11be7d7 Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 2 Dec 2019 15:53:25 +0000 Subject: [PATCH] additionalParams for Kdu will not get those additionalParamsForVnf Change-Id: I19916bd7d552f107ead206ca26e8b455088387e2 Signed-off-by: tierno --- osm_nbi/instance_topics.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index d04d99b..986d4d3 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -141,12 +141,14 @@ class NsrTopic(BaseTopic): item_vdu = next((x for x in item["additionalParamsForVdu"] if x["vdu_id"] == vdu_id), None) if item_vdu and item_vdu.get("additionalParams"): where_ += ".additionalParamsForVdu[vdu_id={}]".format(vdu_id) - additional_params.update(item_vdu["additionalParams"]) - if kdu_name and item.get("additionalParamsForKdu"): - item_kdu = next((x for x in item["additionalParamsForKdu"] if x["kdu_name"] == kdu_name), None) - if item_kdu and item_kdu.get("additionalParams"): - where_ += ".additionalParamsForKdu[kdu_name={}]".format(kdu_name) - additional_params.update(item_kdu["additionalParams"]) + additional_params = item_vdu["additionalParams"] + if kdu_name: + additional_params = {} + if item.get("additionalParamsForKdu"): + item_kdu = next((x for x in item["additionalParamsForKdu"] if x["kdu_name"] == kdu_name), None) + if item_kdu and item_kdu.get("additionalParams"): + where_ += ".additionalParamsForKdu[kdu_name={}]".format(kdu_name) + additional_params = item_kdu["additionalParams"] if additional_params: for k, v in additional_params.items(): -- 2.25.1