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:
@@ -786,3 +786,24 @@ class FailedToAddQdiscToDevice(NeutronException):
|
|||||||
class PortBindingNotFound(NotFound):
|
class PortBindingNotFound(NotFound):
|
||||||
message = _("Binding for port %(port_id)s for host %(host)s could not be "
|
message = _("Binding for port %(port_id)s for host %(host)s could not be "
|
||||||
"found.")
|
"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
|
||||||
|
|||||||
@@ -95,3 +95,13 @@ class TcLibQdiscTypeError(e.NeutronException):
|
|||||||
class TcLibQdiscNeededArguments(e.NeutronException):
|
class TcLibQdiscNeededArguments(e.NeutronException):
|
||||||
message = _("TC Qdisc type %(qdisc_type)s needs following arguments: "
|
message = _("TC Qdisc type %(qdisc_type)s needs following arguments: "
|
||||||
"%(needed_arguments)s.")
|
"%(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.")
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- The following exceptions from ``neutron.common.exceptions`` have been
|
||||||
|
rehomed into neutron-lib; ``PortBindingAlreadyActive``,
|
||||||
|
``PortBindingAlreadyExists``, ``PortBindingError``,
|
||||||
|
``ProcessExecutionError``, ``RouterQosBindingNotFound``,
|
||||||
|
``RouterQosBindingError``.
|
||||||
Reference in New Issue
Block a user