Ganeti RAPI client.
Attention:
To use the RAPI client, the application must call
pycurl.global_init
during initialization and
pycurl.global_cleanup
before exiting the process. This
is very important in multi-threaded programs. See
curl_global_init(3) and curl_global_cleanup(3) for details. The
decorator UsesRapiClient can be used.
|
GANETI_RAPI_PORT = 5080
|
|
GANETI_RAPI_VERSION = 2
|
|
HTTP_DELETE = "DELETE"
|
|
HTTP_GET = "GET"
|
|
HTTP_PUT = "PUT"
|
|
HTTP_POST = "POST"
|
|
HTTP_OK = 200
|
|
HTTP_NOT_FOUND = 404
|
|
HTTP_APP_JSON = "application/json"
|
|
REPLACE_DISK_PRI = "replace_on_primary"
|
|
REPLACE_DISK_SECONDARY = "replace_on_secondary"
|
|
REPLACE_DISK_CHG = "replace_new_secondary"
|
|
REPLACE_DISK_AUTO = "replace_auto"
|
|
NODE_ROLE_DRAINED = "drained"
|
|
NODE_ROLE_MASTER_CANDIATE = "master-candidate"
|
|
NODE_ROLE_MASTER = "master"
|
|
NODE_ROLE_OFFLINE = "offline"
|
|
NODE_ROLE_REGULAR = "regular"
|
|
_REQ_DATA_VERSION_FIELD = "__version__"
|
|
_INST_CREATE_REQV1 = "instance-create-reqv1"
|
|
_INST_NIC_PARAMS = frozenset(["mac", "ip", "mode", "link", "br...
|
|
_INST_CREATE_V0_DISK_PARAMS = frozenset(["size"])
|
|
_INST_CREATE_V0_PARAMS = frozenset(["os", "pnode", "snode", "i...
|
|
_INST_CREATE_V0_DPARAMS = frozenset(["beparams", "hvparams"])
|
|
_CURLE_SSL_CACERT = 60
|
|
_CURLE_SSL_CACERT_BADFILE = 77
|
|
_CURL_SSL_CERT_ERRORS = frozenset([_CURLE_SSL_CACERT, _CURLE_S...
|