From: tierno Date: Fri, 17 Apr 2020 11:27:47 +0000 (+0000) Subject: fix kdu_model instantianion parameter X-Git-Tag: v7.1.0rc1~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=bce98f096fa109eb2323ad9153d15144e897e2c4;p=osm%2FNBI.git fix kdu_model instantianion parameter Change-Id: Ia0afd32c664961216dad5a4c74dc93ea99103417 Signed-off-by: tierno --- diff --git a/osm_nbi/__init__.py b/osm_nbi/__init__.py index 2c895ce..7bd5b6b 100644 --- a/osm_nbi/__init__.py +++ b/osm_nbi/__init__.py @@ -12,8 +12,8 @@ # under the License. ## -version = '7.0.1.post17' -version_date = '2019-03-31' +version = '7.0.1.post23' +version_date = '2020-04-17' # Obtain installed package version. Ignore if error, e.g. pkg_resources not installed try: diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 319a690..1a54135 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -144,18 +144,18 @@ class NsrTopic(BaseTopic): additional_params = copy(item.get("additionalParams")) or {} if vdu_id and item.get("additionalParamsForVdu"): item_vdu = next((x for x in item["additionalParamsForVdu"] if x["vdu_id"] == vdu_id), None) + other_params = item_vdu if item_vdu and item_vdu.get("additionalParams"): where_ += ".additionalParamsForVdu[vdu_id={}]".format(vdu_id) additional_params = item_vdu["additionalParams"] - other_params = item_vdu 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) + other_params = item_kdu if item_kdu and item_kdu.get("additionalParams"): where_ += ".additionalParamsForKdu[kdu_name={}]".format(kdu_name) additional_params = item_kdu["additionalParams"] - other_params = item_kdu if additional_params: for k, v in additional_params.items(): @@ -376,7 +376,7 @@ class NsrTopic(BaseTopic): member_vnf["member-vnf-index"], kdu_name=kdu["name"], descriptor=vnfd) kdu_k8s_namespace = vnf_k8s_namespace - kdu_model = kdu_params.get("kdu_model") + kdu_model = kdu_params.get("kdu_model") if kdu_params else None if kdu_params and kdu_params.get("k8s-namespace"): kdu_k8s_namespace = kdu_params["k8s-namespace"]