From beb31bd4aab1ff63dce983a93ccf2ab818539d49 Mon Sep 17 00:00:00 2001 From: Hampapur Ajay Date: Wed, 12 Nov 2014 23:15:50 -0800 Subject: [PATCH] Ignore deleted network during port-list as it may have disappeared. In case of parallel tests, it is possible that during port list, we collect a port which along with its network is deleted by the time it is transformed to neutron representation. Ignore NoIdError in such cases and proceed to remaining ports in the list. Change-Id: I204e2bf9c216223ae2a918e20121950396554283 Fixes-Bug: #1384582 (cherry picked from commit 66a44bdb7304f989420129da4f909b978239bb47) --- src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py b/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py index 4f019526ccf..14bab332b01 100644 --- a/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py +++ b/src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py @@ -1068,7 +1068,10 @@ def _port_list(self, net_objs, port_objs, iip_objs): memo_req['instance-ips'][iip_obj.uuid] = iip_obj for port_obj in port_objs: - port_info = self._port_vnc_to_neutron(port_obj, memo_req) + try: + port_info = self._port_vnc_to_neutron(port_obj, memo_req) + except NoIdError: + continue ret_q_ports.append(port_info) return ret_q_ports