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:
@@ -162,6 +162,10 @@ class IpAddressInUseClient(Conflict):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class IpAddressAlreadyAllocatedClient(Conflict):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class InvalidIpForNetworkClient(BadRequest):
|
class InvalidIpForNetworkClient(BadRequest):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@@ -911,6 +911,8 @@ class CLITestV20ExceptionHandler(CLITestV20Base):
|
|||||||
('OverQuota', exceptions.OverQuotaClient, 409),
|
('OverQuota', exceptions.OverQuotaClient, 409),
|
||||||
('InvalidIpForNetwork', exceptions.InvalidIpForNetworkClient, 400),
|
('InvalidIpForNetwork', exceptions.InvalidIpForNetworkClient, 400),
|
||||||
('InvalidIpForSubnet', exceptions.InvalidIpForSubnetClient, 400),
|
('InvalidIpForSubnet', exceptions.InvalidIpForSubnetClient, 400),
|
||||||
|
('IpAddressAlreadyAllocated',
|
||||||
|
exceptions.IpAddressAlreadyAllocatedClient, 400),
|
||||||
]
|
]
|
||||||
|
|
||||||
error_msg = 'dummy exception message'
|
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``.
|
Reference in New Issue
Block a user