Exceptions for: Drive binding by placement allocation

New exception types used in https://review.openstack.org/574783.

Change-Id: I46d89ef6d7630ec2c44d619c022aa8bbb6e51b63
Needed-By: https://review.openstack.org/574783
Partial-Bug: #1578989
See-Also: https://review.openstack.org/502306 (nova spec)
See-Also: https://review.openstack.org/508149 (neutron spec)
This commit is contained in:
Bence Romsics 2019-02-06 14:53:22 +01:00
parent aceb7c50ed
commit b71eaf4256
2 changed files with 16 additions and 0 deletions

View File

@ -69,3 +69,14 @@ class PlacementResourceProviderNameNotUnique(exceptions.Conflict):
class PlacementClientError(exceptions.NeutronException): class PlacementClientError(exceptions.NeutronException):
message = _("Placement Client Error (4xx): %(msg)s") message = _("Placement Client Error (4xx): %(msg)s")
class UnknownResourceProvider(exceptions.BadRequest):
"""Resource provider not known by neutron backends."""
message = _("No such resource provider known by Neutron: %(rsc_provider)s")
class AmbiguousResponsibilityForResourceProvider(exceptions.NeutronException):
"""Not clear who's responsible for resource provider."""
message = _("Expected one driver to be responsible for resource provider "
"%(rsc_provider)s, but got many: %(drivers)s")

View File

@ -0,0 +1,5 @@
---
features:
- |
New exception classes: ``UnknownResourceProvider`` and
``AmbiguousResponsibilityForResourceProvider``.