Define IpAddressAlreadyAllocated exception
This exception will raise when creating a port with an IP allocated IP address. This exception needs to be defined in client so that nova can catch it and perform the error handling. Needed-By: I5bee9ae18764b6f285ecc5e8d7148a1019c74701 Change-Id: Ie1d4581d334e1ec491e56371c62978945ae24a44 Related-Bug: #1744103
This commit is contained in:
parent
86e90cfb86
commit
58c1be2b65
|
@ -162,6 +162,10 @@ class IpAddressInUseClient(Conflict):
|
|||
pass
|
||||
|
||||
|
||||
class IpAddressAlreadyAllocatedClient(Conflict):
|
||||
pass
|
||||
|
||||
|
||||
class InvalidIpForNetworkClient(BadRequest):
|
||||
pass
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
other:
|
||||
- |
|
||||
Define a new exception type ``IpAddressAlreadyAllocatedClient``.
|
||||
Users can catch this specific exception instead of the generic
|
||||
``NeutronClientException``.
|
Loading…
Reference in New Issue