module documentation

RPC definitions for communication between master and node daemons.

RPC definition fields:

  • Name as string
  • SINGLE for single-node calls, MULTI for multi-node
  • Name resolver option(s), can be callable receiving all arguments in a tuple
  • Timeout (e.g. constants.RPC_TMO_NORMAL), or callback receiving all arguments in a tuple to calculate timeout
  • List of arguments as tuples
    • Name as string
    • Argument kind used for encoding/decoding
    • Description for docstring (can be None)
  • Custom body encoder (e.g. for preparing per-node bodies)
  • Return value wrapper (e.g. for deserializing into objects-based objects)
  • Short call description for docstring
Constant ACCEPT_OFFLINE_NODE Undocumented
Constant CALLS Undocumented
Constant ED_BLOCKDEV_RENAME Undocumented
Constant ED_COMPRESS Undocumented
Constant ED_DEVICE_DICT Undocumented
Constant ED_DISKS_DICT_DP Undocumented
Constant ED_FILE_DETAILS Undocumented
Constant ED_FINALIZE_EXPORT_DISKS Undocumented
Constant ED_IMPEXP_IO Undocumented
Constant ED_INST_DICT Undocumented
Constant ED_INST_DICT_HVP_BEP_DP Undocumented
Constant ED_INST_DICT_OSP_DP Undocumented
Constant ED_MULTI_DISKS_DICT_DP Undocumented
Constant ED_NIC_DICT Undocumented
Constant ED_NODE_TO_DISK_DICT_DP Undocumented
Constant ED_OBJECT_DICT Undocumented
Constant ED_OBJECT_DICT_LIST Undocumented
Constant ED_SINGLE_DISK_DICT_DP Undocumented
Constant MULTI Undocumented
Constant SINGLE Undocumented
Function _BlockdevFindPostProc Post-processor for rpc.node.RpcRunner.call_blockdev_find.
Function _BlockdevGetMirrorStatusMultiPostProc Post-processor for call_blockdev_getmirrorstatus_multi.
Function _BlockdevGetMirrorStatusMultiPreProc Prepares the appropriate node values for blockdev_getmirrorstatus_multi.
Function _BlockdevGetMirrorStatusPostProc Post-processor for call_blockdev_getmirrorstatus.
Function _ImpExpStatusPostProc Post-processor for import/export status.
Function _MigrationStatusPostProc Post-processor for rpc.node.RpcRunner.call_instance_get_migration_status
Function _NodeInfoPreProc Prepare the storage_units argument for node_info calls.
Function _Prepare Converts list of calls to dictionary.
Function _TestDelayTimeout Calculate timeout for "test_delay" RPC.
Constant _BLOCKDEV_CALLS Undocumented
Constant _EXTSTORAGE_CALLS Undocumented
Constant _FILE_STORAGE_CALLS Undocumented
Constant _IMPEXP_CALLS Undocumented
Constant _INSTANCE_CALLS Undocumented
Constant _MISC_CALLS Undocumented
Constant _NODE_CALLS Undocumented
Constant _OS_CALLS Undocumented
Constant _STORAGE_CALLS Undocumented
Constant _X509_CALLS Undocumented
ACCEPT_OFFLINE_NODE =

Undocumented

Value
object()
CALLS =

Undocumented

Value
{'RpcClientDefault': _Prepare(((((((((_IMPEXP_CALLS+_X509_CALLS)+_OS_CALLS)+_NODE_CALLS)+_FILE_STORAGE_CALLS)+_MISC_CALLS)+_INSTANCE_CALLS)+_BLOCKDEV_CALLS)+_STORAGE_CALLS)+_EXTSTORAGE_CALLS),
 'RpcClientJobQueue': _Prepare([('jobqueue_update',
                                 MULTI,
                                 None,
                                 constants.RPC_TMO_URGENT,
                                 [('file_name', None, None),
                                  ('content', ED_COMPRESS, None)],
...
ED_BLOCKDEV_RENAME =

Undocumented

ED_COMPRESS =

Undocumented

ED_DEVICE_DICT =

Undocumented

ED_DISKS_DICT_DP =

Undocumented

ED_FILE_DETAILS =

Undocumented

ED_FINALIZE_EXPORT_DISKS =

Undocumented

ED_IMPEXP_IO =

Undocumented

ED_INST_DICT =

Undocumented

ED_INST_DICT_HVP_BEP_DP =

Undocumented

ED_INST_DICT_OSP_DP =

Undocumented

ED_MULTI_DISKS_DICT_DP =

Undocumented

ED_NIC_DICT =

Undocumented

ED_NODE_TO_DISK_DICT_DP =

Undocumented

ED_OBJECT_DICT =

Undocumented

ED_OBJECT_DICT_LIST =

Undocumented

ED_SINGLE_DISK_DICT_DP =

Undocumented

MULTI: str =

Undocumented

Value
'multi-node'
SINGLE: str =

Undocumented

Value
'single-node'
def _BlockdevFindPostProc(result):
def _BlockdevGetMirrorStatusMultiPostProc(result):

Post-processor for call_blockdev_getmirrorstatus_multi.

def _BlockdevGetMirrorStatusMultiPreProc(node, args):

Prepares the appropriate node values for blockdev_getmirrorstatus_multi.

def _BlockdevGetMirrorStatusPostProc(result):

Post-processor for call_blockdev_getmirrorstatus.

def _ImpExpStatusPostProc(result):

Post-processor for import/export status.

Returns
Payload containing list of objects.ImportExportStatus instancesReturns a list of the state of each named import/export or None if a status couldn't be retrieved
def _MigrationStatusPostProc(result):
def _NodeInfoPreProc(node, args):

Prepare the storage_units argument for node_info calls.

def _Prepare(calls):

Converts list of calls to dictionary.

def _TestDelayTimeout(duration):

Calculate timeout for "test_delay" RPC.

_BLOCKDEV_CALLS =

Undocumented

Value
[('bdev_sizes',
  MULTI,
  None,
  constants.RPC_TMO_URGENT,
  [('devices', None, None)],
  None,
  None,
...
_EXTSTORAGE_CALLS =

Undocumented

Value
[('extstorage_diagnose',
  MULTI,
  None,
  constants.RPC_TMO_FAST,
  [],
  None,
  None,
...
_FILE_STORAGE_CALLS =

Undocumented

Value
[('file_storage_dir_create',
  SINGLE,
  None,
  constants.RPC_TMO_FAST,
  [('file_storage_dir', None, 'File storage directory')],
  None,
  None,
...
_IMPEXP_CALLS =

Undocumented

Value
[('import_start',
  SINGLE,
  None,
  constants.RPC_TMO_NORMAL,
  [('opts', ED_OBJECT_DICT, None),
   ('instance', ED_INST_DICT, None),
   ('component', None, None),
...
_INSTANCE_CALLS =

Undocumented

Value
[('instance_info',
  SINGLE,
  None,
  constants.RPC_TMO_URGENT,
  [('instance', None, 'Instance name'),
   ('hname', None, 'Hypervisor type'),
   ('hvparams', None, 'Hypervisor parameters')],
...
_MISC_CALLS =

Undocumented

Value
[('lv_list',
  MULTI,
  None,
  constants.RPC_TMO_URGENT,
  [('vg_name', None, None)],
  None,
  None,
...
_NODE_CALLS =

Undocumented

Value
[('node_has_ip_address',
  SINGLE,
  None,
  constants.RPC_TMO_FAST,
  [('address', None, 'IP address')],
  None,
  None,
...
_OS_CALLS =

Undocumented

Value
[('os_diagnose',
  MULTI,
  None,
  constants.RPC_TMO_FAST,
  [],
  None,
  None,
...
_STORAGE_CALLS =

Undocumented

Value
[('storage_list',
  MULTI,
  None,
  constants.RPC_TMO_NORMAL,
  [('su_name', None, None),
   ('su_args', None, None),
   ('name', None, None),
...
_X509_CALLS =

Undocumented

Value
[('x509_cert_create',
  SINGLE,
  None,
  constants.RPC_TMO_NORMAL,
  [('validity', None, 'Validity in seconds')],
  None,
  None,
...