From 1674de87bdfcd8548910dd379a486749daf29f5c Mon Sep 17 00:00:00 2001 From: tierno Date: Tue, 9 Apr 2019 13:03:14 +0000 Subject: [PATCH] allow RO ip-address to be a semicolon separated list Change-Id: I8f3080f0ff668f913fb077ec84837d178a0bb10a Signed-off-by: tierno --- osm_lcm/ns.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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") -- 2.25.1