Ganeti RAPI client.
|
_AppendIf(container,
condition,
value)
Appends to a list if a condition evaluates to truth. |
source code
|
|
|
_AppendDryRunIf(container,
condition)
Appends a "dry-run" parameter if a condition evaluates to
truth. |
source code
|
|
|
_AppendForceIf(container,
condition)
Appends a "force" parameter if a condition evaluates to
truth. |
source code
|
|
|
|
|
_SetItemIf(container,
condition,
item,
value)
Sets an item if a condition evaluates to truth. |
source code
|
|
|
UsesRapiClient(fn)
Decorator for code using RAPI client to initialize pycURL. |
source code
|
|
|
GenericCurlConfig(verbose=False,
use_signal=False,
use_curl_cabundle=False,
cafile=None,
capath=None,
proxy=None,
verify_hostname=False,
connect_timeout=None,
timeout=None,
_pycurl_version_fn=pycurl.version_info)
Curl configuration function generator. |
source code
|
|
|
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_CANDIDATE = "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_PENDING = frozenset([JOB_STATUS_QUEUED, JOB_STATUS_...
|
|
JOB_STATUS_FINALIZED = frozenset([JOB_STATUS_CANCELED, JOB_STA...
|
|
JOB_STATUS_ALL = frozenset([JOB_STATUS_RUNNING,]) | JOB_STATUS...
|
|
JOB_STATUS_WAITLOCK = "waiting"
|
|
_REQ_DATA_VERSION_FIELD = "__version__"
|
|
_QPARAM_DRY_RUN = "dry-run"
|
|
_QPARAM_FORCE = "force"
|
|
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_CREATE_REQV1 = "instance-create-reqv1"
|
|
_INST_REINSTALL_REQV1 = "instance-reinstall-reqv1"
|
|
_NODE_MIGRATE_REQV1 = "node-migrate-reqv1"
|
|
_NODE_EVAC_RES1 = "node-evac-res1"
|
|
ECODE_RESOLVER = "resolver_error"
Resolver errors
|
|
ECODE_NORES = "insufficient_resources"
Not enough resources (iallocator failure, disk space, memory, etc.)
|
|
ECODE_TEMP_NORES = "temp_insufficient_resources"
Temporarily out of resources; operation can be tried again
|
|
ECODE_INVAL = "wrong_input"
Wrong arguments (at syntax level)
|
|
ECODE_STATE = "wrong_state"
Wrong entity state
|
|
ECODE_NOENT = "unknown_entity"
Entity not found
|
|
ECODE_EXISTS = "already_exists"
Entity already exists
|
|
ECODE_NOTUNIQUE = "resource_not_unique"
Resource not unique (e.g.
|
|
ECODE_FAULT = "internal_error"
Internal cluster error
|
|
ECODE_ENVIRON = "environment_error"
Environment error (e.g.
|
|
ECODE_ALL = frozenset([ECODE_RESOLVER, ECODE_NORES, ECODE_TEMP...
List of all failure types
|
|
_CURLE_SSL_CACERT = 60
|
|
_CURLE_SSL_CACERT_BADFILE = 77
|
|
_CURL_SSL_CERT_ERRORS = frozenset([_CURLE_SSL_CACERT, _CURLE_S...
|