allow RO ip-address to be a semicolon separated list 94/7394/1 feature7106
authortierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 9 Apr 2019 13:03:14 +0000 (13:03 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 9 Apr 2019 13:03:14 +0000 (13:03 +0000)
Change-Id: I8f3080f0ff668f913fb077ec84837d178a0bb10a
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_lcm/ns.py

index 20c8c4c..98c9968 100644 (file)
@@ -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")