Merge "Define IpAddressAlreadyAllocated exception"

This commit is contained in:
Zuul 2018-01-24 19:31:28 +00:00 committed by Gerrit Code Review
commit 8b3516d40a
3 changed files with 12 additions and 0 deletions

View File

@ -162,6 +162,10 @@ class IpAddressInUseClient(Conflict):
pass
class IpAddressAlreadyAllocatedClient(Conflict):
pass
class InvalidIpForNetworkClient(BadRequest):
pass

View File

@ -911,6 +911,8 @@ class CLITestV20ExceptionHandler(CLITestV20Base):
('OverQuota', exceptions.OverQuotaClient, 409),
('InvalidIpForNetwork', exceptions.InvalidIpForNetworkClient, 400),
('InvalidIpForSubnet', exceptions.InvalidIpForSubnetClient, 400),
('IpAddressAlreadyAllocated',
exceptions.IpAddressAlreadyAllocatedClient, 400),
]
error_msg = 'dummy exception message'

View File

@ -0,0 +1,6 @@
---
other:
- |
Define a new exception type ``IpAddressAlreadyAllocatedClient``.
Users can catch this specific exception instead of the generic
``NeutronClientException``.