The tricircleclient.exceptions Module

The tricircleclient.exceptions Module

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

Bases: tricircleclient.exceptions.ClientException

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

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

Bases: exceptions.Exception

The base exception class for all exceptions this library raises.

message = 'Unknown Error'
exception tricircleclient.exceptions.Conflict(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.ClientException

HTTP 409 - Conflict

http_status = 409
message = 'Conflict'
class tricircleclient.exceptions.MutipleMeaningException

Bases: object

An mixin for exception that can be enhanced by reading the details

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

Bases: tricircleclient.exceptions.ClientException

HTTP 404 - Not found

http_status = 404
message = 'Not found'
exception tricircleclient.exceptions.PodNotFound(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.NotFound, tricircleclient.exceptions.MutipleMeaningException

match = <_sre.SRE_Pattern object>
message = 'Pod not found'
exception tricircleclient.exceptions.PodRegionDuplicated(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.Conflict, tricircleclient.exceptions.MutipleMeaningException

match = <_sre.SRE_Pattern object at 0x3072e20>
message = 'Pod region name duplicated with the top region name'
exception tricircleclient.exceptions.RecordAlreadyExists(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.Conflict, tricircleclient.exceptions.MutipleMeaningException

match = <_sre.SRE_Pattern object>
message = 'Record already exists'
exception tricircleclient.exceptions.RegionRequiredForPod(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.UnprocessableEntity, tricircleclient.exceptions.MutipleMeaningException

match = <_sre.SRE_Pattern object at 0x30dd1c0>
message = 'Valid region_name is required for pod'
exception tricircleclient.exceptions.RegionRequiredForTopRegion(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.UnprocessableEntity, tricircleclient.exceptions.MutipleMeaningException

match = <_sre.SRE_Pattern object at 0x3079ae0>
message = 'Valid region_name is required for top region'
exception tricircleclient.exceptions.TopRegionAlreadyExists(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.Conflict, tricircleclient.exceptions.MutipleMeaningException

match = <_sre.SRE_Pattern object at 0x309cfd0>
message = 'Top region already exists'
exception tricircleclient.exceptions.Unauthorized(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.ClientException

HTTP 401 - Unauthorized: bad credentials.

http_status = 401
message = 'Unauthorized'
exception tricircleclient.exceptions.UnprocessableEntity(code=None, message=None, request_id=None, url=None, method=None)

Bases: tricircleclient.exceptions.ClientException

HTTP 422 - Unprocessable Entity

http_status = 422
message = 'Unprocessable Entity'
tricircleclient.exceptions.from_response(response, method=None)

Return an instance of one of the ClientException on an requests response.

Usage:

resp, body = requests.request(...)
if resp.status_code != 200:
    raise from_response(resp)
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.