Package ganeti :: Package server :: Module noded :: Class NodeHttpServer
[hide private]
[frames] | no frames]

Class NodeHttpServer

source code


The server implementation.

This class holds all methods exposed over the RPC interface.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Initializes the HTTP server
source code
 
HandleRequest(self, req)
Handle a request.
source code

Inherited from http.server.HttpServer: OnSignal, PreHandleRequest, Start, Stop, handle_accept

Inherited from http.HttpBase: GetSslCiphers

Inherited from http.HttpBase (private): _CreateSocket, _SSLVerifyCallback

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

Inherited from asyncore.dispatcher: __getattr__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_close, handle_connect, handle_connect_event, handle_error, handle_expt, handle_expt_event, handle_read, handle_read_event, handle_write, handle_write_event, listen, log, log_info, readable, recv, send, set_reuse_addr, set_socket, writable

Static Methods [hide private]
 
perspective_blockdev_create(params)
Create a block device.
source code
 
perspective_blockdev_wipe(params)
Wipe a block device.
source code
 
perspective_blockdev_remove(params)
Remove a block device.
source code
 
perspective_blockdev_rename(params)
Remove a block device.
source code
 
perspective_blockdev_assemble(params)
Assemble a block device.
source code
 
perspective_blockdev_shutdown(params)
Shutdown a block device.
source code
 
perspective_blockdev_addchildren(params)
Add a child to a mirror device.
source code
 
perspective_blockdev_removechildren(params)
Remove a child from a mirror device.
source code
 
perspective_blockdev_getmirrorstatus(params)
Return the mirror status for a list of disks.
source code
 
perspective_blockdev_getmirrorstatus_multi(params)
Return the mirror status for a list of disks.
source code
 
perspective_blockdev_find(params)
Expose the FindBlockDevice functionality for a disk.
source code
 
perspective_blockdev_snapshot(params)
Create a snapshot device.
source code
 
perspective_blockdev_grow(params)
Grow a stack of devices.
source code
 
perspective_blockdev_close(params)
Closes the given block devices.
source code
 
perspective_blockdev_getsize(params)
Compute the sizes of the given block devices.
source code
 
perspective_blockdev_export(params)
Compute the sizes of the given block devices.
source code
 
perspective_drbd_disconnect_net(params)
Disconnects the network connection of drbd disks.
source code
 
perspective_drbd_attach_net(params)
Attaches the network connection of drbd disks.
source code
 
perspective_drbd_wait_sync(params)
Wait until DRBD disks are synched.
source code
 
perspective_drbd_helper(params)
Query drbd helper.
source code
 
perspective_finalize_export(params)
Expose the finalize export functionality.
source code
 
perspective_export_info(params)
Query information about an existing export on this node.
source code
 
perspective_export_list(params)
List the available exports on this node.
source code
 
perspective_export_remove(params)
Remove an export.
source code
 
perspective_lv_list(params)
Query the list of logical volumes in a given volume group.
source code
 
perspective_vg_list(params)
Query the list of volume groups.
source code
 
perspective_storage_list(params)
Get list of storage units.
source code
 
perspective_storage_modify(params)
Modify a storage unit.
source code
 
perspective_storage_execute(params)
Execute an operation on a storage unit.
source code
 
perspective_bridges_exist(params)
Check if all bridges given exist on this node.
source code
 
perspective_instance_os_add(params)
Install an OS on a given instance.
source code
 
perspective_instance_run_rename(params)
Runs the OS rename script for an instance.
source code
 
perspective_instance_shutdown(params)
Shutdown an instance.
source code
 
perspective_instance_start(params)
Start an instance.
source code
 
perspective_migration_info(params)
Gather information about an instance to be migrated.
source code
 
perspective_accept_instance(params)
Prepare the node to accept an instance.
source code
 
perspective_finalize_migration(params)
Finalize the instance migration.
source code
 
perspective_instance_migrate(params)
Migrates an instance.
source code
 
perspective_instance_reboot(params)
Reboot an instance.
source code
 
perspective_instance_info(params)
Query instance information.
source code
 
perspective_instance_migratable(params)
Query whether the specified instance can be migrated.
source code
 
perspective_all_instances_info(params)
Query information about all instances.
source code
 
perspective_instance_list(params)
Query the list of running instances.
source code
 
perspective_node_tcp_ping(params)
Do a TcpPing on the remote node.
source code
 
perspective_node_has_ip_address(params)
Checks if a node has the given ip address.
source code
 
perspective_node_info(params)
Query node information.
source code
 
perspective_etc_hosts_modify(params)
Modify a node entry in /etc/hosts.
source code
 
perspective_node_verify(params)
Run a verify sequence on this node.
source code
 
perspective_node_start_master(params)
Promote this node to master status.
source code
 
perspective_node_stop_master(params)
Demote this node from master status.
source code
 
perspective_node_leave_cluster(params)
Cleanup after leaving a cluster.
source code
 
perspective_node_volumes(params)
Query the list of all logical volume groups.
source code
 
perspective_node_demote_from_mc(params)
Demote a node from the master candidate role.
source code
 
perspective_node_powercycle(params)
Tries to powercycle the nod.
source code
 
perspective_version(params)
Query version information.
source code
 
perspective_upload_file(params)
Upload a file.
source code
 
perspective_master_info(params)
Query master information.
source code
 
perspective_write_ssconf_files(params)
Write ssconf files.
source code
 
perspective_os_diagnose(params)
Query detailed information about existing OSes.
source code
 
perspective_os_get(params)
Query information about a given OS.
source code
 
perspective_os_validate(params)
Run a given OS' validation routine.
source code
 
perspective_hooks_runner(params)
Run hook scripts.
source code
 
perspective_iallocator_runner(params)
Run an iallocator script.
source code
 
perspective_test_delay(params)
Run test delay.
source code
 
perspective_file_storage_dir_create(params)
Create the file storage directory.
source code
 
perspective_file_storage_dir_remove(params)
Remove the file storage directory.
source code
 
perspective_file_storage_dir_rename(params)
Rename the file storage directory.
source code
 
perspective_jobqueue_update(params)
Update job queue.
source code
 
perspective_jobqueue_purge(params)
Purge job queue.
source code
 
perspective_jobqueue_rename(params)
Rename a job queue file.
source code
 
perspective_hypervisor_validate_params(params)
Validate the hypervisor parameters.
source code
 
perspective_x509_cert_create(params)
Creates a new X509 certificate for SSL/TLS.
source code
 
perspective_x509_cert_remove(params)
Removes a X509 certificate.
source code
 
perspective_import_start(params)
Starts an import daemon.
source code
 
perspective_export_start(params)
Starts an export daemon.
source code
 
perspective_impexp_status(params)
Retrieves the status of an import or export daemon.
source code
 
perspective_impexp_abort(params)
Aborts an import or export.
source code
 
perspective_impexp_cleanup(params)
Cleans up after an import or export.
source code
Class Variables [hide private]

Inherited from http.server.HttpServer: MAX_CHILDREN

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, debug, ignore_log_types

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Initializes the HTTP server

Parameters:
  • mainloop - Mainloop used to poll for I/O events
  • local_address - Local IP address to bind to
  • port - TCP port to listen on
  • ssl_params - SSL key and certificate
  • ssl_verify_peer - Whether to require client certificate and compare it with our certificate
  • request_executor_class - an class derived from the HttpServerRequestExecutor class
Overrides: asyncore.dispatcher.__init__

HandleRequest(self, req)

source code 

Handle a request.

Overrides: http.server.HttpServer.HandleRequest

perspective_blockdev_addchildren(params)
Static Method

source code 

Add a child to a mirror device.

Note: this is only valid for mirror devices. It's the caller's duty to send a correct disk, otherwise we raise an error.

perspective_blockdev_removechildren(params)
Static Method

source code 

Remove a child from a mirror device.

This is only valid for mirror devices, of course. It's the callers duty to send a correct disk, otherwise we raise an error.

perspective_blockdev_find(params)
Static Method

source code 

Expose the FindBlockDevice functionality for a disk.

This will try to find but not activate a disk.

perspective_blockdev_snapshot(params)
Static Method

source code 

Create a snapshot device.

Note that this is only valid for LVM disks, if we get passed something else we raise an exception. The snapshot device can be remove by calling the generic block device remove call.

perspective_drbd_disconnect_net(params)
Static Method

source code 

Disconnects the network connection of drbd disks.

Note that this is only valid for drbd disks, so the members of the disk list must all be drbd devices.

perspective_drbd_attach_net(params)
Static Method

source code 

Attaches the network connection of drbd disks.

Note that this is only valid for drbd disks, so the members of the disk list must all be drbd devices.

perspective_drbd_wait_sync(params)
Static Method

source code 

Wait until DRBD disks are synched.

Note that this is only valid for drbd disks, so the members of the disk list must all be drbd devices.

perspective_export_info(params)
Static Method

source code 

Query information about an existing export on this node.

The given path may not contain an export, in which case we return None.

perspective_export_list(params)
Static Method

source code 

List the available exports on this node.

Note that as opposed to export_info, which may query data about an export in any path, this only queries the standard Ganeti path (constants.EXPORT_DIR).

perspective_upload_file(params)
Static Method

source code 

Upload a file.

Note that the backend implementation imposes strict rules on which files are accepted.

perspective_jobqueue_update(params)
Static Method

source code 

Update job queue.

Decorators:
  • @_RequireJobQueueLock

perspective_jobqueue_purge(params)
Static Method

source code 

Purge job queue.

Decorators:
  • @_RequireJobQueueLock

perspective_jobqueue_rename(params)
Static Method

source code 

Rename a job queue file.

Decorators:
  • @_RequireJobQueueLock