Package ganeti :: Module luxi
[hide private]
[frames] | no frames]

Module luxi

source code

Module for the unix socket protocol

This module implements the local unix socket protocol. You only need this module and the opcodes module in the client program in order to communicate with the master.

The module is also used by the master daemon.

Classes [hide private]
  ProtocolError
Denotes an error in the LUXI protocol.
  ConnectionClosedError
Connection closed error.
  TimeoutError
Operation timeout error.
  RequestError
Error on request.
  NoMasterError
The master cannot be reached.
  PermissionError
Permission denied while connecting to the master socket.
  Transport
Low-level transport class.
  Client
High-level client implementation.
Functions [hide private]
 
ParseRequest(msg)
Parses a LUXI request message.
source code
 
ParseResponse(msg)
Parses a LUXI response message.
source code
 
FormatResponse(success, result, version=None)
Formats a LUXI response message.
source code
 
FormatRequest(method, args, version=None)
Formats a LUXI request message.
source code
 
CallLuxiMethod(transport_cb, method, args, version=None)
Send a LUXI request via a transport and return the response.
source code
Variables [hide private]
  KEY_METHOD = constants.LUXI_KEY_METHOD
  KEY_ARGS = constants.LUXI_KEY_ARGS
  KEY_SUCCESS = constants.LUXI_KEY_SUCCESS
  KEY_RESULT = constants.LUXI_KEY_RESULT
  KEY_VERSION = constants.LUXI_KEY_VERSION
  REQ_SUBMIT_JOB = constants.LUXI_REQ_SUBMIT_JOB
  REQ_SUBMIT_JOB_TO_DRAINED_QUEUE = constants.LUXI_REQ_SUBMIT_JO...
  REQ_SUBMIT_MANY_JOBS = constants.LUXI_REQ_SUBMIT_MANY_JOBS
  REQ_WAIT_FOR_JOB_CHANGE = constants.LUXI_REQ_WAIT_FOR_JOB_CHANGE
  REQ_CANCEL_JOB = constants.LUXI_REQ_CANCEL_JOB
  REQ_ARCHIVE_JOB = constants.LUXI_REQ_ARCHIVE_JOB
  REQ_CHANGE_JOB_PRIORITY = constants.LUXI_REQ_CHANGE_JOB_PRIORITY
  REQ_AUTO_ARCHIVE_JOBS = constants.LUXI_REQ_AUTO_ARCHIVE_JOBS
  REQ_QUERY = constants.LUXI_REQ_QUERY
  REQ_QUERY_FIELDS = constants.LUXI_REQ_QUERY_FIELDS
  REQ_QUERY_JOBS = constants.LUXI_REQ_QUERY_JOBS
  REQ_QUERY_INSTANCES = constants.LUXI_REQ_QUERY_INSTANCES
  REQ_QUERY_NODES = constants.LUXI_REQ_QUERY_NODES
  REQ_QUERY_GROUPS = constants.LUXI_REQ_QUERY_GROUPS
  REQ_QUERY_NETWORKS = constants.LUXI_REQ_QUERY_NETWORKS
  REQ_QUERY_EXPORTS = constants.LUXI_REQ_QUERY_EXPORTS
  REQ_QUERY_CONFIG_VALUES = constants.LUXI_REQ_QUERY_CONFIG_VALUES
  REQ_QUERY_CLUSTER_INFO = constants.LUXI_REQ_QUERY_CLUSTER_INFO
  REQ_QUERY_TAGS = constants.LUXI_REQ_QUERY_TAGS
  REQ_SET_DRAIN_FLAG = constants.LUXI_REQ_SET_DRAIN_FLAG
  REQ_SET_WATCHER_PAUSE = constants.LUXI_REQ_SET_WATCHER_PAUSE
  REQ_ALL = constants.LUXI_REQ_ALL
  DEF_CTMO = constants.LUXI_DEF_CTMO
  DEF_RWTO = constants.LUXI_DEF_RWTO
  WFJC_TIMEOUT = constants.LUXI_WFJC_TIMEOUT

Imports: socket, collections, time, errno, logging, serializer, constants, errors, utils, objects, pathutils


Variables Details [hide private]

REQ_SUBMIT_JOB_TO_DRAINED_QUEUE

Value:
constants.LUXI_REQ_SUBMIT_JOB_TO_DRAINED_QUEUE