From: Gulsum Atici Date: Tue, 28 Mar 2023 14:50:48 +0000 (+0300) Subject: Fix Bug 2229 Set fixed IP address for VDU through VNFD and the instantiation params X-Git-Tag: v12.0.7~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F13126%2F1;p=osm%2FNBI.git Fix Bug 2229 Set fixed IP address for VDU through VNFD and the instantiation params Change-Id: Ia912cd52a0965a6c2b23faa2b88d9b4d0569fd3f Signed-off-by: Gulsum Atici --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index b4c121e..43450d6 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -913,7 +913,7 @@ class NsrTopic(BaseTopic): # Name, mac-address and interface position is taken from VNFD # and included into VNFR. By this way RO can process this information # while creating the VDU. - iface_fields = ("name", "mac-address", "position") + iface_fields = ("name", "mac-address", "position", "ip-address") vdu_iface = { x: iface[x] for x in iface_fields if iface.get(x) is not None } @@ -1552,8 +1552,8 @@ class NsLcmOpTopic(BaseTopic): ivld.get("id"): set() for ivld in get_iterable(vnfd.get("int-virtual-link-desc")) } - for vdu in get_iterable(vnfd.get("vdu")): - for cpd in get_iterable(vnfd.get("int-cpd")): + for vdu in vnfd.get("vdu", {}): + for cpd in vdu.get("int-cpd", {}): if cpd.get("int-virtual-link-desc"): vnfd_ivlds_cpds[cpd.get("int-virtual-link-desc")] = cpd.get("id")