The ooi.exception Module

exception ooi.exception.ConvertedException(code=0, title='', explanation='')

Bases: webob.exc.WSGIHTTPException

exception ooi.exception.Forbidden(message=None, **kwargs)

Bases: ooi.exception.Invalid

code = 403
msg_fmt = 'Forbidden: %(reason)s'
exception ooi.exception.Invalid(message=None, **kwargs)

Bases: ooi.exception.OCCIException

code = 400
msg_fmt = 'Unacceptable parameters.'
exception ooi.exception.InvalidAccept(message=None, **kwargs)

Bases: ooi.exception.InvalidContentType

msg_fmt = 'Invalid Accept %(content_type)s.'
exception ooi.exception.InvalidAction(message=None, **kwargs)

Bases: ooi.exception.Invalid

msg_fmt = 'Invalid action %(action)s provided.'
exception ooi.exception.InvalidContentType(message=None, **kwargs)

Bases: ooi.exception.Invalid

code = 406
msg_fmt = 'Invalid Content-type %(content_type)s.'
exception ooi.exception.LinkNotFound(message=None, **kwargs)

Bases: ooi.exception.NotFound

msg_fmt = "Link Not Found: '%(link_id)s"
exception ooi.exception.MissingKeypairName(message=None, **kwargs)

Bases: ooi.exception.Invalid

code = 400
msg_fmt = 'Missing Keypair Name'
exception ooi.exception.NetworkNotFound(message=None, **kwargs)

Bases: ooi.exception.NotFound

msg_fmt = "Network Resource Not Found: '%(resource_id)s'"
exception ooi.exception.NetworkPoolFound(message=None, **kwargs)

Bases: ooi.exception.NotFound

msg_fmt = "Network Pool Not Found: '%(pool)s'"
exception ooi.exception.NoContentType(message=None, **kwargs)

Bases: ooi.exception.InvalidContentType

msg_fmt = 'No Content-type provided.'
exception ooi.exception.NotFound(message=None, **kwargs)

Bases: ooi.exception.OCCIException

code = 404
msg_fmt = 'Not Found'
exception ooi.exception.NotImplemented(message=None, **kwargs)

Bases: ooi.exception.OCCIException

code = 501
msg_fmt = 'Action not implemented.'
exception ooi.exception.OCCIException(message=None, **kwargs)

Bases: Exception

Base Nova Exception

To correctly use this class, inherit from it and define a ‘msg_fmt’ property. That msg_fmt will get printf’d with the keyword arguments provided to the constructor.

code = 500
format_message()
headers = {}
msg_fmt = 'An unknown exception occurred.'
safe = False
exception ooi.exception.OCCIInvalidSchema(message=None, **kwargs)

Bases: ooi.exception.Invalid

msg_fmt = "Found invalid schema: '%(msg)s'."
exception ooi.exception.OCCIMissingType(message=None, **kwargs)

Bases: ooi.exception.Invalid

msg_fmt = "Missing OCCI types: '%(type_id)s'."
exception ooi.exception.OCCISchemaMismatch(message=None, **kwargs)

Bases: ooi.exception.Invalid

msg_fmt = "Schema does not match. Expecting '%(expected)s', but found '%(found)s'."
exception ooi.exception.ResourceNotFound(message=None, **kwargs)

Bases: ooi.exception.NotFound

msg_fmt = "Resource Not Found: '%(resource_id)s'"
ooi.exception.raise_deprecation_message(message)