From: kasar Date: Thu, 17 May 2018 09:44:39 +0000 (-0700) Subject: Small change in refresh_vms_status to get network_name X-Git-Tag: v4.0.0~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=abac1e20c3b93bdc7eb58d0ee8e2e0fd062389db;p=osm%2FRO.git Small change in refresh_vms_status to get network_name Change-Id: I602cb0342199e7e0d4e84f2c05377f0d22035f54 Signed-off-by: kasar --- diff --git a/osm_ro/vimconn_vmware.py b/osm_ro/vimconn_vmware.py index e24082c2..733cf654 100644 --- a/osm_ro/vimconn_vmware.py +++ b/osm_ro/vimconn_vmware.py @@ -2269,7 +2269,9 @@ class vimconnector(vimconn.vimconnector): if vm_mac is not None: vm_ip = self.get_ipaddr_from_NSXedge(nsx_edge_list, vm_mac) - network_name = vm.NetworkConnectionSection.NetworkConnection.get('network') + net_s = re.search('network="(.*?)"',network) + network_name = net_s.group(1) if net_s else None + vm_net_id = self.get_network_id_by_name(network_name) interface = {"mac_address": vm_mac, "vim_net_id": vm_net_id,