Adds IpAddressGenerationFailureClient exception
Adds the IpAddressGenerationFailureClient exception so a more specific exception than NeutronClientException is raised when IPs run out. This will allow for better exception handling in Nova and help fix nova bug 1212137 Change-Id: I921ba5d5f5ee3dc9620dcdbbd04d6fef824c9a53 Closes-Bug: 1231836
This commit is contained in:
@@ -90,6 +90,10 @@ class AlreadyAttachedClient(NeutronClientException):
|
||||
pass
|
||||
|
||||
|
||||
class IpAddressGenerationFailureClient(NeutronClientException):
|
||||
pass
|
||||
|
||||
|
||||
class Unauthorized(NeutronClientException):
|
||||
message = _("Unauthorized: bad credentials.")
|
||||
|
||||
|
||||
@@ -49,7 +49,9 @@ def exception_handler_v20(status_code, error_content):
|
||||
'PortNotFound': exceptions.PortNotFoundClient,
|
||||
'RequestedStateInvalid': exceptions.StateInvalidClient,
|
||||
'PortInUse': exceptions.PortInUseClient,
|
||||
'AlreadyAttached': exceptions.AlreadyAttachedClient, }
|
||||
'AlreadyAttached': exceptions.AlreadyAttachedClient,
|
||||
'IpAddressGenerationFailure':
|
||||
exceptions.IpAddressGenerationFailureClient, }
|
||||
|
||||
error_dict = None
|
||||
if isinstance(error_content, dict):
|
||||
|
||||
Reference in New Issue
Block a user