Drop neutron masking exception in vif_attach

This patch drops masking exceptions when try to get physnets for
ports in vif_attach as neutron is mandatory when using flat, neutron
network interfaces.
Api tests were reworked 5cb1720b6e1f2f799a3282828c317f1ef29b2189 to use
real neutron port.

Change-Id: Ic1138e6da790bfe6903d13b548c230187b119a3d
This commit is contained in:
Vasyl Saienko 2017-09-18 11:03:20 +03:00
parent e35f230e1a
commit 6bc46cc8a2

View File

@ -527,20 +527,7 @@ class NeutronVIFPortIDMixin(VIFPortIDMixin):
# they will not affect the VIF to port mapping.
physnets = set()
if any(port.physical_network is not None for port in task.ports):
try:
physnets = neutron.get_physnets_by_port_uuid(client, vif_id)
except (exception.InvalidParameterValue, exception.NetworkError):
# TODO(mgoddard): Remove this except clause and handle errors
# properly. We can do this once a strategy has been determined
# for handling the tempest VIF tests in an environment that
# may not support neutron.
# NOTE(sambetts): If a client error occurs this is because
# either neutron doesn't exist because we're running in
# standalone environment or we can't find a matching neutron
# port which means a user might be requesting a non-neutron
# port. Assume no physical network information exists in these
# cases.
pass
if len(physnets) > 1:
# NOTE(mgoddard): Neutron cannot currently handle hosts which