Package ganeti :: Package rapi :: Module client
[hide private]
[frames] | no frames]

Module client

source code

Ganeti RAPI client.

Classes [hide private]
  Error
Base error class for this module.
  CertificateError
Raised when a problem is found with the SSL certificate.
  GanetiApiError
Generic error raised from Ganeti API.
  CertAuthorityVerify
Certificate verificator for SSL context.
  _HTTPSConnectionOpenSSL
HTTPS Connection handler that verifies the SSL certificate.
  _SslSocketWrapper
  _HTTPSHandler
  _RapiRequest
  GanetiRapiClient
Ganeti RAPI client.
Functions [hide private]
 
FormatX509Name(x509_name)
Formats an X509 name.
source code
Variables [hide private]
  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"])

Imports: sys, httplib, urllib2, logging, simplejson, socket, urllib, OpenSSL, distutils


Function Details [hide private]

FormatX509Name(x509_name)

source code 

Formats an X509 name.

Parameters:
  • x509_name (OpenSSL.crypto.X509Name)

Variables Details [hide private]

_INST_NIC_PARAMS

Value:
frozenset(["mac", "ip", "mode", "link", "bridge"])

_INST_CREATE_V0_PARAMS

Value:
frozenset(["os", "pnode", "snode", "iallocator", "start", "ip_check", \
"name_check", "hypervisor", "file_storage_dir", "file_driver", "dry_ru\
n",])