sync neutron.common.exceptions into neutron-lib

While the common exceptions have already been rehomed into neutron-lib
[1] and have been shimmed in neutron [2], folks continue to add them
to neutron.common.exceptions. This patch syncs them by rehoming those
that have been added to neutron after the fact.

[1] https://review.openstack.org/#/c/319328/
[2] https://review.openstack.org/#/c/586525/

Change-Id: I10f6bf2d62c95613627101c3fdd7c9cb98d494db
This commit is contained in:
Boden R 2019-01-02 09:52:03 -07:00
parent 6bbac3c726
commit 4db006ea6d
3 changed files with 38 additions and 0 deletions

View File

@ -786,3 +786,24 @@ class FailedToAddQdiscToDevice(NeutronException):
class PortBindingNotFound(NotFound):
message = _("Binding for port %(port_id)s for host %(host)s could not be "
"found.")
class PortBindingAlreadyActive(Conflict):
message = _("Binding for port %(port_id)s on host %(host)s is already "
"active.")
class PortBindingAlreadyExists(Conflict):
message = _("Binding for port %(port_id)s on host %(host)s already "
"exists.")
class PortBindingError(NeutronException):
message = _("Binding for port %(port_id)s on host %(host)s could not be "
"created or updated.")
class ProcessExecutionError(RuntimeError):
def __init__(self, message, returncode):
super(ProcessExecutionError, self).__init__(message)
self.returncode = returncode

View File

@ -95,3 +95,13 @@ class TcLibQdiscTypeError(e.NeutronException):
class TcLibQdiscNeededArguments(e.NeutronException):
message = _("TC Qdisc type %(qdisc_type)s needs following arguments: "
"%(needed_arguments)s.")
class RouterQosBindingNotFound(e.NotFound):
message = _("QoS binding for router %(router_id)s gateway and policy "
"%(policy_id)s could not be found.")
class RouterQosBindingError(e.NeutronException):
message = _("QoS binding for router %(router_id)s gateway and policy "
"%(policy_id)s could not be created: %(db_error)s.")

View File

@ -0,0 +1,7 @@
---
features:
- The following exceptions from ``neutron.common.exceptions`` have been
rehomed into neutron-lib; ``PortBindingAlreadyActive``,
``PortBindingAlreadyExists``, ``PortBindingError``,
``ProcessExecutionError``, ``RouterQosBindingNotFound``,
``RouterQosBindingError``.