Merge "sync neutron.common.exceptions into neutron-lib"

This commit is contained in:
Zuul 2019-01-09 23:39:16 +00:00 committed by Gerrit Code Review
commit 533ed4bdb3
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``.