From: tierno Date: Tue, 9 Apr 2019 13:03:14 +0000 (+0000) Subject: allow RO ip-address to be a semicolon separated list X-Git-Tag: v6.0.0~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F94%2F7394%2F1;p=osm%2FLCM.git allow RO ip-address to be a semicolon separated list Change-Id: I8f3080f0ff668f913fb077ec84837d178a0bb10a Signed-off-by: tierno --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 20c8c4c..98c9968 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -560,7 +560,7 @@ class NsLcm(LcmBase): continue vnfr_update = {} if vnf_RO.get("ip_address"): - db_vnfr["ip-address"] = vnfr_update["ip-address"] = vnf_RO["ip_address"] + db_vnfr["ip-address"] = vnfr_update["ip-address"] = vnf_RO["ip_address"].split(";")[0] elif not db_vnfr.get("ip-address"): raise LcmExceptionNoMgmtIP("ns member_vnf_index '{}' has no IP address".format(vnf_index)) @@ -575,7 +575,8 @@ class NsLcm(LcmBase): vdur_RO_count_index += 1 continue vdur["vim-id"] = vdur_RO.get("vim_vm_id") - vdur["ip-address"] = vdur_RO.get("ip_address") + if vdur_RO.get("ip_address"): + vdur["ip-address"] = vdur_RO["ip_address"].split(";")[0] vdur["vdu-id-ref"] = vdur_RO.get("vdu_osm_id") vdur["name"] = vdur_RO.get("vim_name") vdur["status"] = vdur_RO.get("status")