From abac1e20c3b93bdc7eb58d0ee8e2e0fd062389db Mon Sep 17 00:00:00 2001 From: kasar Date: Thu, 17 May 2018 02:44:39 -0700 Subject: [PATCH] Small change in refresh_vms_status to get network_name Change-Id: I602cb0342199e7e0d4e84f2c05377f0d22035f54 Signed-off-by: kasar --- osm_ro/vimconn_vmware.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.25.1