Browse Source

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
changes/44/667644/3
Ryan Tidwell 2 years ago
parent
commit
d441518669
2 changed files with 12 additions and 0 deletions
  1. +5
    -0
      neutron_lib/exceptions/address_scope.py
  2. +7
    -0
      releasenotes/notes/add-network-address-scope-affinity-error-8f6b4493a92142d4.yaml

+ 5
- 0
neutron_lib/exceptions/address_scope.py View File

@ -29,3 +29,8 @@ class AddressScopeInUse(exceptions.InUse):
class AddressScopeUpdateError(exceptions.BadRequest):
message = _("Unable to update address scope %(address_scope_id)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.")

+ 7
- 0
releasenotes/notes/add-network-address-scope-affinity-error-8f6b4493a92142d4.yaml 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.

Loading…
Cancel
Save