Introduce NetworkAddressScopeAffinityError

This introduces NetworkAddressScopeAffinityError, which is to be
raised when address scope affinity constraints on a network are
violated.

Change-Id: Id541059b8fe0ab74035819516f079d93bb76d43c
Partial-Bug: 1830240
Implements: subnets-different-pools-same-net
This commit is contained in:
Ryan Tidwell 2019-06-26 10:04:00 -05:00
parent c26573f847
commit d441518669
2 changed files with 12 additions and 0 deletions

View File

@ -29,3 +29,8 @@ class AddressScopeInUse(exceptions.InUse):
class AddressScopeUpdateError(exceptions.BadRequest): class AddressScopeUpdateError(exceptions.BadRequest):
message = _("Unable to update address scope %(address_scope_id)s : " message = _("Unable to update address scope %(address_scope_id)s : "
"%(reason)s.") "%(reason)s.")
class NetworkAddressScopeAffinityError(exceptions.BadRequest):
message = _("Subnets of the same address family hosted on the same "
"network must all participate in the same address scope.")

View File

@ -0,0 +1,7 @@
---
features:
- |
A new exception named ``NetworkAddressScopeAffinityError`` has been added
in neutron_lib/exceptions/address_scope.py. This is to be raised by
consumers when network / address scope affinity constraints are violated
on subnet creation and subnet pool updates.