2014-08-29 18:05:56 +00:00
|
|
|
""" Exception classes for CloudCtrl classes. """
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class ApiError(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 500 Compute Error. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class BadRequest(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 400 Bad Request. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class ComputeFault(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 400|500 Compute Fault. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class Forbidden(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 403 Forbidden. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class ItemNotFound(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 404 Not Found. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class KeyPairExists(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 409 Conflict Key pair exists. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class MethodNotAllowed(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 405 Method Not Allowed. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class OverLimit(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 413 Over Limit. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class ServerCapacityUnavailable(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 503 Server Capacity Uavailable. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class ServiceUnavailable(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 503 Service Unavailable. """
|
|
|
|
pass
|
|
|
|
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
class Unauthorized(Exception):
|
2015-01-20 12:24:00 +00:00
|
|
|
|
2014-08-29 18:05:56 +00:00
|
|
|
""" Raised when the server returns 401 Unauthorized. """
|
|
|
|
pass
|