Script ganeti_rapi :: Class JsonErrorRequestExecutor
[hide private]
[frames] | no frames]

Class JsonErrorRequestExecutor


Custom Request Executor class that formats HTTP errors in JSON.

Instance Methods [hide private]
string
_FormatErrorMessage(self, values)
Formats the body of an error message.

Inherited from ganeti.http.server.HttpServerRequestExecutor: __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  error_content_type = "application/json"

Inherited from ganeti.http.server.HttpServerRequestExecutor: CLOSE_TIMEOUT, READ_TIMEOUT, WRITE_TIMEOUT, default_request_version, error_message_format, responses

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_FormatErrorMessage(self, values)

 

Formats the body of an error message.

Parameters:
  • values (dict) - dictionary with keys code, message and explain.
Returns: string
the body of the message
Overrides: ganeti.http.server.HttpServerRequestExecutor._FormatErrorMessage