ExceptionsΒΆ

Exception definitions.

exception novaclient.exceptions.AmbiguousEndpoints(endpoints=None)

Bases: exceptions.Exception

Found more than one matching endpoint in Service Catalog.

exception novaclient.exceptions.AuthSystemNotFound(auth_system)

Bases: exceptions.Exception

When the user specify a AuthSystem but not installed.

exception novaclient.exceptions.AuthorizationFailure

Bases: exceptions.Exception

exception novaclient.exceptions.BadRequest(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 400 - Bad request: you sent some malformed data.

BadRequest.http_status = 400
BadRequest.message = 'Bad request'
exception novaclient.exceptions.ClientException(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: exceptions.Exception

The base exception class for all exceptions this library raises.

exception novaclient.exceptions.CommandError

Bases: exceptions.Exception

exception novaclient.exceptions.Conflict(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 409 - Conflict

Conflict.http_status = 409
Conflict.message = 'Conflict'
exception novaclient.exceptions.ConnectionRefused(response=None)

Bases: exceptions.Exception

Connection refused: the server refused the connection.

exception novaclient.exceptions.EndpointNotFound

Bases: exceptions.Exception

Could not find Service or Region in Service Catalog.

exception novaclient.exceptions.Forbidden(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 403 - Forbidden: your credentials don’t give you access to this resource.

Forbidden.http_status = 403
Forbidden.message = 'Forbidden'
exception novaclient.exceptions.HTTPNotImplemented(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 501 - Not Implemented: the server does not support this operation.

HTTPNotImplemented.http_status = 501
HTTPNotImplemented.message = 'Not Implemented'
exception novaclient.exceptions.MethodNotAllowed(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 405 - Method Not Allowed

MethodNotAllowed.http_status = 405
MethodNotAllowed.message = 'Method Not Allowed'
exception novaclient.exceptions.NoTokenLookupException

Bases: exceptions.Exception

This form of authentication does not support looking up endpoints from an existing token.

exception novaclient.exceptions.NoUniqueMatch

Bases: exceptions.Exception

exception novaclient.exceptions.NotFound(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 404 - Not found

NotFound.http_status = 404
NotFound.message = 'Not found'
exception novaclient.exceptions.OverLimit(*args, **kwargs)

Bases: novaclient.exceptions.ClientException

HTTP 413 - Over limit: you’re over the API limits for this time period.

OverLimit.http_status = 413
OverLimit.message = 'Over limit'
exception novaclient.exceptions.RateLimit(*args, **kwargs)

Bases: novaclient.exceptions.OverLimit

HTTP 429 - Rate limit: you’ve sent too many requests for this time period.

RateLimit.http_status = 429
RateLimit.message = 'Rate limit'
exception novaclient.exceptions.Unauthorized(code, message=None, details=None, request_id=None, url=None, method=None)

Bases: novaclient.exceptions.ClientException

HTTP 401 - Unauthorized: bad credentials.

Unauthorized.http_status = 401
Unauthorized.message = 'Unauthorized'
exception novaclient.exceptions.UnsupportedVersion

Bases: exceptions.Exception

Indicates that the user is trying to use an unsupported version of the API.

novaclient.exceptions.from_response(response, body, url, method=None)

Return an instance of an ClientException or subclass based on an requests response.

Usage:

resp, body = requests.request(...)
if resp.status_code != 200:
    raise exception_from_response(resp, rest.text)

Previous topic

Exceptions

Next topic

Version 1.1, Version 2 API Reference

This Page