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_EVAC_PRI = "primary-only"
|
|
NODE_EVAC_SEC = "secondary-only"
|
|
NODE_EVAC_ALL = "all"
|
|
NODE_ROLE_DRAINED = "drained"
|
|
NODE_ROLE_MASTER_CANDIATE = "master-candidate"
|
|
NODE_ROLE_MASTER = "master"
|
|
NODE_ROLE_OFFLINE = "offline"
|
|
NODE_ROLE_REGULAR = "regular"
|
|
JOB_STATUS_QUEUED = "queued"
|
|
JOB_STATUS_WAITING = "waiting"
|
|
JOB_STATUS_CANCELING = "canceling"
|
|
JOB_STATUS_RUNNING = "running"
|
|
JOB_STATUS_CANCELED = "canceled"
|
|
JOB_STATUS_SUCCESS = "success"
|
|
JOB_STATUS_ERROR = "error"
|
|
JOB_STATUS_FINALIZED = frozenset([JOB_STATUS_CANCELED, JOB_STA...
|
|
JOB_STATUS_ALL = frozenset([JOB_STATUS_QUEUED, JOB_STATUS_WAIT...
|
|
JOB_STATUS_WAITLOCK = "waiting"
|
|
_REQ_DATA_VERSION_FIELD = "__version__"
|
|
_INST_CREATE_REQV1 = "instance-create-reqv1"
|
|
_INST_REINSTALL_REQV1 = "instance-reinstall-reqv1"
|
|
_NODE_MIGRATE_REQV1 = "node-migrate-reqv1"
|
|
_NODE_EVAC_RES1 = "node-evac-res1"
|
|
_INST_NIC_PARAMS = frozenset(["mac", "ip", "mode", "link"])
|
|
_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...
|