Add MacAddressInUseClient exception handling

Nova needs a specific client exception defined for the server's
MacAddressInUse exception when allocating ports so it can handle the
exception properly, otherwise the NeutronClientException with a 409 can
be confused with other errors.

Partial-Bug: #1347778

Change-Id: Ia02dbc8fe32a43adeb229e3b640b9b33ec0dd6c7
This commit is contained in:
Matt Riedemann 2014-07-23 09:27:46 -07:00
parent e0591432fc
commit 5eeba0ca19
2 changed files with 5 additions and 0 deletions
neutronclient

@ -155,6 +155,10 @@ class IpAddressGenerationFailureClient(Conflict):
pass
class MacAddressInUseClient(Conflict):
pass
class ExternalIpAddressExhaustedClient(BadRequest):
pass

@ -604,6 +604,7 @@ class CLITestV20ExceptionHandler(CLITestV20Base):
('IpAddressInUse', exceptions.IpAddressInUseClient, 409),
('IpAddressGenerationFailure',
exceptions.IpAddressGenerationFailureClient, 409),
('MacAddressInUse', exceptions.MacAddressInUseClient, 409),
('ExternalIpAddressExhausted',
exceptions.ExternalIpAddressExhaustedClient, 400),
('OverQuota', exceptions.OverQuotaClient, 409),