Package ganeti :: Module rpc :: Class RpcRunner
[hide private]
[frames] | no frames]

Class RpcRunner

source code


RPC runner class

Instance Methods [hide private]
 
__init__(self, cfg)
Initialized the rpc runner.
source code
dict
_InstDict(self, instance, hvp=None, bep=None, osp=None)
Convert the given instance to a dict.
source code
 
_ConnectList(self, client, node_list, call, read_timeout=None)
Helper for computing node addresses.
source code
 
_ConnectNode(self, client, node, call, read_timeout=None)
Helper for computing one node's address.
source code
 
_MultiNodeCall(self, node_list, procedure, args, read_timeout=None)
Helper for making a multi-node call
source code
 
_SingleNodeCall(self, node, procedure, args, read_timeout=None)
Helper for making a single-node call
source code
 
call_lv_list(self, node_list, vg_name)
Gets the logical volumes present in a given volume group.
source code
 
call_vg_list(self, node_list)
Gets the volume group list.
source code
 
call_storage_list(self, node_list, su_name, su_args, name, fields)
Get list of storage units.
source code
 
call_storage_modify(self, node, su_name, su_args, name, changes)
Modify a storage unit.
source code
 
call_storage_execute(self, node, su_name, su_args, name, op)
Executes an operation on a storage unit.
source code
 
call_bridges_exist(self, node, bridges_list)
Checks if a node has all the bridges given.
source code
 
call_instance_start(self, node, instance, hvp, bep)
Starts an instance.
source code
 
call_instance_shutdown(self, node, instance, timeout)
Stops an instance.
source code
 
call_migration_info(self, node, instance)
Gather the information necessary to prepare an instance migration.
source code
 
call_accept_instance(self, node, instance, info, target)
Prepare a node to accept an instance.
source code
 
call_finalize_migration(self, node, instance, info, success)
Finalize any target-node migration specific operation.
source code
 
call_instance_migrate(self, node, instance, target, live)
Migrate an instance.
source code
 
call_instance_reboot(self, node, inst, reboot_type, shutdown_timeout)
Reboots an instance.
source code
 
call_instance_os_add(self, node, inst, reinstall, debug)
Installs an OS on the given instance.
source code
 
call_instance_run_rename(self, node, inst, old_name, debug)
Run the OS rename script for an instance.
source code
 
call_instance_info(self, node, instance, hname)
Returns information about a single instance.
source code
 
call_instance_migratable(self, node, instance)
Checks whether the given instance can be migrated.
source code
 
call_all_instances_info(self, node_list, hypervisor_list)
Returns information about all instances on the given nodes.
source code
 
call_instance_list(self, node_list, hypervisor_list)
Returns the list of running instances on a given node.
source code
 
call_node_tcp_ping(self, node, source, target, port, timeout, live_port_needed)
Do a TcpPing on the remote node
source code
 
call_node_has_ip_address(self, node, address)
Checks if a node has the given IP address.
source code
 
call_node_info(self, node_list, vg_name, hypervisor_type)
Return node information.
source code
 
call_node_add(self, node, dsa, dsapub, rsa, rsapub, ssh, sshpub)
Add a node to the cluster.
source code
 
call_node_verify(self, node_list, checkdict, cluster_name)
Request verification of given parameters.
source code
 
call_blockdev_create(self, node, bdev, size, owner, on_primary, info)
Request creation of a given block device.
source code
 
call_blockdev_remove(self, node, bdev)
Request removal of a given block device.
source code
 
call_blockdev_rename(self, node, devlist)
Request rename of the given block devices.
source code
 
call_blockdev_assemble(self, node, disk, owner, on_primary)
Request assembling of a given block device.
source code
 
call_blockdev_shutdown(self, node, disk)
Request shutdown of a given block device.
source code
 
call_blockdev_addchildren(self, node, bdev, ndevs)
Request adding a list of children to a (mirroring) device.
source code
 
call_blockdev_removechildren(self, node, bdev, ndevs)
Request removing a list of children from a (mirroring) device.
source code
 
call_blockdev_getmirrorstatus(self, node, disks)
Request status of a (mirroring) device.
source code
 
call_blockdev_find(self, node, disk)
Request identification of a given block device.
source code
 
call_blockdev_close(self, node, instance_name, disks)
Closes the given block devices.
source code
 
call_blockdev_getsizes(self, node, disks)
Returns the size of the given disks.
source code
 
call_drbd_disconnect_net(self, node_list, nodes_ip, disks)
Disconnects the network of the given drbd devices.
source code
 
call_drbd_attach_net(self, node_list, nodes_ip, disks, instance_name, multimaster)
Disconnects the given drbd devices.
source code
 
call_drbd_wait_sync(self, node_list, nodes_ip, disks)
Waits for the synchronization of drbd devices is complete.
source code
 
call_drbd_helper(self, node_list)
Gets drbd helper.
source code
 
call_os_diagnose(self, node_list)
Request a diagnose of OS definitions.
source code
 
call_os_get(self, node, name)
Returns an OS definition.
source code
 
call_os_validate(self, required, nodes, name, checks, params)
Run a validation routine for a given OS.
source code
 
call_hooks_runner(self, node_list, hpath, phase, env)
Call the hooks runner.
source code
 
call_iallocator_runner(self, node, name, idata)
Call an iallocator on a remote node
source code
 
call_blockdev_grow(self, node, cf_bdev, amount)
Request a snapshot of the given block device.
source code
 
call_blockdev_export(self, node, cf_bdev, dest_node, dest_path, cluster_name)
Export a given disk to another node.
source code
 
call_blockdev_snapshot(self, node, cf_bdev)
Request a snapshot of the given block device.
source code
 
call_finalize_export(self, node, instance, snap_disks)
Request the completion of an export operation.
source code
 
call_export_info(self, node, path)
Queries the export information in a given path.
source code
 
call_export_list(self, node_list)
Gets the stored exports list.
source code
 
call_export_remove(self, node, export)
Requests removal of a given export.
source code
 
call_node_volumes(self, node_list)
Gets all volumes on node(s).
source code
 
call_node_demote_from_mc(self, node)
Demote a node from the master candidate role.
source code
 
call_node_powercycle(self, node, hypervisor)
Tries to powercycle a node.
source code
 
call_test_delay(self, node_list, duration)
Sleep for a fixed time on given node(s).
source code
 
call_file_storage_dir_create(self, node, file_storage_dir)
Create the given file storage directory.
source code
 
call_file_storage_dir_remove(self, node, file_storage_dir)
Remove the given file storage directory.
source code
 
call_file_storage_dir_rename(self, node, old_file_storage_dir, new_file_storage_dir)
Rename file storage directory.
source code
 
call_hypervisor_validate_params(self, node_list, hvname, hvparams)
Validate the hypervisor params.
source code
 
call_x509_cert_create(self, node, validity)
Creates a new X509 certificate for SSL/TLS.
source code
 
call_x509_cert_remove(self, node, name)
Removes a X509 certificate.
source code
 
call_import_start(self, node, opts, instance, dest, dest_args)
Starts a listener for an import.
source code
 
call_export_start(self, node, opts, host, port, instance, source, source_args)
Starts an export daemon.
source code
List of objects.ImportExportStatus instances
call_impexp_status(self, node, names)
Gets the status of an import or export.
source code
 
call_impexp_abort(self, node, name)
Aborts an import or export.
source code
 
call_impexp_cleanup(self, node, name)
Cleans up after an import or export.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
_StaticMultiNodeCall(cls, node_list, procedure, args, address_list=None, read_timeout=None)
Helper for making a multi-node static call
source code
 
_StaticSingleNodeCall(cls, node, procedure, args, read_timeout=None)
Helper for making a single-node static call
source code
 
call_node_start_master(cls, node, start_daemons, no_voting)
Tells a node to activate itself as a master.
source code
 
call_node_stop_master(cls, node, stop_daemons)
Tells a node to demote itself from master status.
source code
 
call_master_info(cls, node_list)
Query master info.
source code
 
call_version(cls, node_list)
Query node version.
source code
 
call_upload_file(cls, node_list, file_name, address_list=None)
Upload a file.
source code
 
call_write_ssconf_files(cls, node_list, values)
Write ssconf files.
source code
 
call_node_leave_cluster(cls, node, modify_ssh_setup)
Requests a node to clean the cluster information it has.
source code
 
call_jobqueue_update(cls, node_list, address_list, file_name, content)
Update job queue.
source code
 
call_jobqueue_purge(cls, node)
Purge job queue.
source code
 
call_jobqueue_rename(cls, node_list, address_list, rename)
Rename a job queue file.
source code
Static Methods [hide private]
tuple
_Compress(data)
Compresses a string for transport over RPC.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cfg)
(Constructor)

source code 

Initialized the rpc runner.

Parameters:
  • cfg (config.ConfigWriter) - the configuration object that will be used to get data about the cluster
Overrides: object.__init__

_InstDict(self, instance, hvp=None, bep=None, osp=None)

source code 

Convert the given instance to a dict.

This is done via the instance's ToDict() method and additionally we fill the hvparams with the cluster defaults.

Parameters:
  • instance (objects.Instance) - an Instance object
  • hvp (dict or None) - a dictionary with overridden hypervisor parameters
  • bep (dict or None) - a dictionary with overridden backend parameters
  • osp (dict or None) - a dictionary with overriden os parameters
Returns: dict
the instance dict, with the hvparams filled with the cluster defaults

_ConnectList(self, client, node_list, call, read_timeout=None)

source code 

Helper for computing node addresses.

Parameters:
  • client (ganeti.rpc.Client) - a Client instance
  • node_list (list) - the node list we should connect
  • call (string) - the name of the remote procedure call, for filling in correctly any eventual offline nodes' results
  • read_timeout (int) - overwrites the default read timeout for the given operation

_ConnectNode(self, client, node, call, read_timeout=None)

source code 

Helper for computing one node's address.

Parameters:
  • client (ganeti.rpc.Client) - a Client instance
  • node (str) - the node we should connect
  • call (string) - the name of the remote procedure call, for filling in correctly any eventual offline nodes' results
  • read_timeout (int) - overwrites the default read timeout for the given operation

_Compress(data)
Static Method

source code 

Compresses a string for transport over RPC.

Small amounts of data are not compressed.

Parameters:
  • data (str) - Data
Returns: tuple
Encoded data to send

call_lv_list(self, node_list, vg_name)

source code 

Gets the logical volumes present in a given volume group.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_vg_list(self, node_list)

source code 

Gets the volume group list.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_storage_list(self, node_list, su_name, su_args, name, fields)

source code 

Get list of storage units.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_storage_modify(self, node, su_name, su_args, name, changes)

source code 

Modify a storage unit.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_storage_execute(self, node, su_name, su_args, name, op)

source code 

Executes an operation on a storage unit.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_bridges_exist(self, node, bridges_list)

source code 

Checks if a node has all the bridges given.

This method checks if all bridges given in the bridges_list are present on the remote node, so that an instance that uses interfaces on those bridges can be started.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_instance_start(self, node, instance, hvp, bep)

source code 

Starts an instance.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_instance_shutdown(self, node, instance, timeout)

source code 

Stops an instance.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_migration_info(self, node, instance)

source code 

Gather the information necessary to prepare an instance migration.

This is a single-node call.

Parameters:
  • node (string) - the node on which the instance is currently running
  • instance (objects.Instance) - the instance definition
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_accept_instance(self, node, instance, info, target)

source code 

Prepare a node to accept an instance.

This is a single-node call.

Parameters:
  • node (string) - the target node for the migration
  • instance (objects.Instance) - the instance definition
  • info (opaque/hypervisor specific (string/data)) - result for the call_migration_info call
  • target (string) - target hostname (usually ip address) (on the node itself)
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_finalize_migration(self, node, instance, info, success)

source code 

Finalize any target-node migration specific operation.

This is called both in case of a successful migration and in case of error (in which case it should abort the migration).

This is a single-node call.

Parameters:
  • node (string) - the target node for the migration
  • instance (objects.Instance) - the instance definition
  • info (opaque/hypervisor specific (string/data)) - result for the call_migration_info call
  • success (boolean) - whether the migration was a success or a failure
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_instance_migrate(self, node, instance, target, live)

source code 

Migrate an instance.

This is a single-node call.

Parameters:
  • node (string) - the node on which the instance is currently running
  • instance (objects.Instance) - the instance definition
  • target (string) - the target node name
  • live (boolean) - whether the migration should be done live or not (the interpretation of this parameter is left to the hypervisor)
Decorators:
  • @_RpcTimeout(_TMO_SLOW)

call_instance_reboot(self, node, inst, reboot_type, shutdown_timeout)

source code 

Reboots an instance.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_instance_os_add(self, node, inst, reinstall, debug)

source code 

Installs an OS on the given instance.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_1DAY)

call_instance_run_rename(self, node, inst, old_name, debug)

source code 

Run the OS rename script for an instance.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_SLOW)

call_instance_info(self, node, instance, hname)

source code 

Returns information about a single instance.

This is a single-node call.

Parameters:
  • node (list) - the list of nodes to query
  • instance (string) - the instance name
  • hname (string) - the hypervisor type of the instance
Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_instance_migratable(self, node, instance)

source code 

Checks whether the given instance can be migrated.

This is a single-node call.

Parameters:
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_all_instances_info(self, node_list, hypervisor_list)

source code 

Returns information about all instances on the given nodes.

This is a multi-node call.

Parameters:
  • node_list (list) - the list of nodes to query
  • hypervisor_list (list) - the hypervisors to query for instances
Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_instance_list(self, node_list, hypervisor_list)

source code 

Returns the list of running instances on a given node.

This is a multi-node call.

Parameters:
  • node_list (list) - the list of nodes to query
  • hypervisor_list (list) - the hypervisors to query for instances
Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_node_tcp_ping(self, node, source, target, port, timeout, live_port_needed)

source code 

Do a TcpPing on the remote node

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_node_has_ip_address(self, node, address)

source code 

Checks if a node has the given IP address.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_node_info(self, node_list, vg_name, hypervisor_type)

source code 

Return node information.

This will return memory information and volume group size and free space.

This is a multi-node call.

Parameters:
  • node_list (list) - the list of nodes to query
  • vg_name (string) - the name of the volume group to ask for disk space information
  • hypervisor_type (str) - the name of the hypervisor to ask for memory information
Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_node_add(self, node, dsa, dsapub, rsa, rsapub, ssh, sshpub)

source code 

Add a node to the cluster.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_node_verify(self, node_list, checkdict, cluster_name)

source code 

Request verification of given parameters.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_node_start_master(cls, node, start_daemons, no_voting)
Class Method

source code 

Tells a node to activate itself as a master.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_node_stop_master(cls, node, stop_daemons)
Class Method

source code 

Tells a node to demote itself from master status.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_master_info(cls, node_list)
Class Method

source code 

Query master info.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_version(cls, node_list)
Class Method

source code 

Query node version.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_blockdev_create(self, node, bdev, size, owner, on_primary, info)

source code 

Request creation of a given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_remove(self, node, bdev)

source code 

Request removal of a given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_rename(self, node, devlist)

source code 

Request rename of the given block devices.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_assemble(self, node, disk, owner, on_primary)

source code 

Request assembling of a given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_shutdown(self, node, disk)

source code 

Request shutdown of a given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_addchildren(self, node, bdev, ndevs)

source code 

Request adding a list of children to a (mirroring) device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_removechildren(self, node, bdev, ndevs)

source code 

Request removing a list of children from a (mirroring) device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_getmirrorstatus(self, node, disks)

source code 

Request status of a (mirroring) device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_find(self, node, disk)

source code 

Request identification of a given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_close(self, node, instance_name, disks)

source code 

Closes the given block devices.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_getsizes(self, node, disks)

source code 

Returns the size of the given disks.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_drbd_disconnect_net(self, node_list, nodes_ip, disks)

source code 

Disconnects the network of the given drbd devices.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_drbd_attach_net(self, node_list, nodes_ip, disks, instance_name, multimaster)

source code 

Disconnects the given drbd devices.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_drbd_wait_sync(self, node_list, nodes_ip, disks)

source code 

Waits for the synchronization of drbd devices is complete.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_SLOW)

call_drbd_helper(self, node_list)

source code 

Gets drbd helper.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_URGENT)

call_upload_file(cls, node_list, file_name, address_list=None)
Class Method

source code 

Upload a file.

The node will refuse the operation in case the file is not on the approved file list.

This is a multi-node call.

Parameters:
  • node_list (list) - the list of node names to upload to
  • file_name (str) - the filename to upload
  • address_list (list or None) - an optional list of node addresses, in order to optimize the RPC speed
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_write_ssconf_files(cls, node_list, values)
Class Method

source code 

Write ssconf files.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_os_diagnose(self, node_list)

source code 

Request a diagnose of OS definitions.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_os_get(self, node, name)

source code 

Returns an OS definition.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_os_validate(self, required, nodes, name, checks, params)

source code 

Run a validation routine for a given OS.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_hooks_runner(self, node_list, hpath, phase, env)

source code 

Call the hooks runner.

Args:

  • op: the OpCode instance
  • env: a dictionary with the environment

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_iallocator_runner(self, node, name, idata)

source code 

Call an iallocator on a remote node

Args:

  • name: the iallocator name
  • input: the json-encoded input string

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_grow(self, node, cf_bdev, amount)

source code 

Request a snapshot of the given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_blockdev_export(self, node, cf_bdev, dest_node, dest_path, cluster_name)

source code 

Export a given disk to another node.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_1DAY)

call_blockdev_snapshot(self, node, cf_bdev)

source code 

Request a snapshot of the given block device.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_finalize_export(self, node, instance, snap_disks)

source code 

Request the completion of an export operation.

This writes the export config file, etc.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_export_info(self, node, path)

source code 

Queries the export information in a given path.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_export_list(self, node_list)

source code 

Gets the stored exports list.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_export_remove(self, node, export)

source code 

Requests removal of a given export.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_node_leave_cluster(cls, node, modify_ssh_setup)
Class Method

source code 

Requests a node to clean the cluster information it has.

This will remove the configuration information from the ganeti data dir.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_node_volumes(self, node_list)

source code 

Gets all volumes on node(s).

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_node_demote_from_mc(self, node)

source code 

Demote a node from the master candidate role.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_node_powercycle(self, node, hypervisor)

source code 

Tries to powercycle a node.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_test_delay(self, node_list, duration)

source code 

Sleep for a fixed time on given node(s).

This is a multi-node call.

Decorators:
  • @_RpcTimeout(None)

call_file_storage_dir_create(self, node, file_storage_dir)

source code 

Create the given file storage directory.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_file_storage_dir_remove(self, node, file_storage_dir)

source code 

Remove the given file storage directory.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_file_storage_dir_rename(self, node, old_file_storage_dir, new_file_storage_dir)

source code 

Rename file storage directory.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_jobqueue_update(cls, node_list, address_list, file_name, content)
Class Method

source code 

Update job queue.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_jobqueue_purge(cls, node)
Class Method

source code 

Purge job queue.

This is a single-node call.

Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_jobqueue_rename(cls, node_list, address_list, rename)
Class Method

source code 

Rename a job queue file.

This is a multi-node call.

Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_hypervisor_validate_params(self, node_list, hvname, hvparams)

source code 

Validate the hypervisor params.

This is a multi-node call.

Parameters:
  • node_list (list) - the list of nodes to query
  • hvname (string) - the hypervisor name
  • hvparams (dict) - the hypervisor parameters to be validated
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_x509_cert_create(self, node, validity)

source code 

Creates a new X509 certificate for SSL/TLS.

This is a single-node call.

Parameters:
  • validity (int) - Validity in seconds
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_x509_cert_remove(self, node, name)

source code 

Removes a X509 certificate.

This is a single-node call.

Parameters:
  • name (string) - Certificate name
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_import_start(self, node, opts, instance, dest, dest_args)

source code 

Starts a listener for an import.

This is a single-node call.

Parameters:
  • node (string) - Node name
  • instance (objects.Instance) - Instance object
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_export_start(self, node, opts, host, port, instance, source, source_args)

source code 

Starts an export daemon.

This is a single-node call.

Parameters:
  • node (string) - Node name
  • instance (objects.Instance) - Instance object
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_impexp_status(self, node, names)

source code 

Gets the status of an import or export.

This is a single-node call.

Parameters:
  • node (string) - Node name
  • names (List of strings) - Import/export names
Returns: List of objects.ImportExportStatus instances
Returns a list of the state of each named import/export or None if a status couldn't be retrieved
Decorators:
  • @_RpcTimeout(_TMO_FAST)

call_impexp_abort(self, node, name)

source code 

Aborts an import or export.

This is a single-node call.

Parameters:
  • node (string) - Node name
  • name (string) - Import/export name
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)

call_impexp_cleanup(self, node, name)

source code 

Cleans up after an import or export.

This is a single-node call.

Parameters:
  • node (string) - Node name
  • name (string) - Import/export name
Decorators:
  • @_RpcTimeout(_TMO_NORMAL)