- for index in range(0,len(vm['interfaces'])):
- vm['interfaces'][index]['port-security'] = vm['interfaces'][index].pop("port_security")
- vm['interfaces'][index]['floating-ip'] = vm['interfaces'][index].pop("floating_ip")
+ for iface in vm['interfaces']:
+ iface['port-security'] = iface.pop("port_security")
+ iface['floating-ip'] = iface.pop("floating_ip")
+ for sce_interface in vnf["interfaces"]:
+ if sce_interface["interface_id"] == iface["uuid"]:
+ if sce_interface["ip_address"]:
+ iface["ip_address"] = sce_interface["ip_address"]
+ break