From: tierno Date: Mon, 2 Dec 2019 15:53:25 +0000 (+0000) Subject: additionalParams for Kdu will not get those additionalParamsForVnf X-Git-Tag: v7.0.0rc1~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F8288%2F1;p=osm%2FNBI.git additionalParams for Kdu will not get those additionalParamsForVnf Change-Id: I19916bd7d552f107ead206ca26e8b455088387e2 Signed-off-by: tierno --- 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():