commit b7ffb49e2369913df0c6b7aeb72cbc0b1e42c947
Author: Matt Riedemann <email address hidden>
Date: Thu Oct 2 13:53:06 2014 -0700
neutronv2: translate 401 and 404 neutron client errors in show_port
This translates the PortNotFoundClient and Unauthorized exceptions from
the neutron client's show_port call into the corresponding nova
exceptions. This is useful in the case of a compute API calling
network_api.show_port, e.g. the os-interface API. The compute API
should expect a NovaException back from the network API rather than a
NeutronClientException (since the compute API shouldn't know if it's
talking to nova-network or neutron).
Long-term we should refactor more of the neutronv2 API code to re-use
the show_port method since there are several places where
neutron.show_port is called directly with additional filtering, etc,
but they potentially also have the same exception translation issues.
Reviewed: https:/ /review. openstack. org/125777 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b7ffb49e236 9913df0c6b7aeb7 2cbc0b1e42c947
Committed: https:/
Submitter: Jenkins
Branch: master
commit b7ffb49e2369913 df0c6b7aeb72cbc 0b1e42c947
Author: Matt Riedemann <email address hidden>
Date: Thu Oct 2 13:53:06 2014 -0700
neutronv2: translate 401 and 404 neutron client errors in show_port
This translates the PortNotFoundClient and Unauthorized exceptions from api.show_ port, e.g. the os-interface API. The compute API ntException (since the compute API shouldn't know if it's
the neutron client's show_port call into the corresponding nova
exceptions. This is useful in the case of a compute API calling
network_
should expect a NovaException back from the network API rather than a
NeutronClie
talking to nova-network or neutron).
Long-term we should refactor more of the neutronv2 API code to re-use show_port is called directly with additional filtering, etc,
the show_port method since there are several places where
neutron.
but they potentially also have the same exception translation issues.
Partial-Bug: #1378389
Change-Id: Ic76d3af6b31e50 1d9ded5f60da910 6d5ef88f4b7