The nova.compute.cells_api Module

Compute API that proxies via Cells Service.

class ComputeCellsAPI(*args, **kwargs)

Bases: nova.compute.api.API

add_fixed_ip(context, instance, *args, **kwargs)
associate_floating_ip(context, target, *args, **kwargs)
create(*args, **kwargs)

We can use the base functionality, but I left this here just for completeness.

delete(context, instance)
delete_instance_metadata(context, instance, *args, **kwargs)
evacuate(context, instance, *args, **kwargs)
force_delete(context, instance)
get_console_output(context, instance, *args, **kwargs)
get_diagnostics(context, instance)

Retrieve diagnostics for the given instance.

get_instance_diagnostics(context, instance)

Retrieve diagnostics for the given instance.

get_migrations(context, filters)
get_rdp_console(context, target, *args, **kwargs)
get_serial_console(context, target, *args, **kwargs)
get_spice_console(context, target, *args, **kwargs)
get_vnc_console(context, target, *args, **kwargs)
remove_fixed_ip(context, instance, *args, **kwargs)
rescue(context, instance, *args, **kwargs)
restore(context, instance, *args, **kwargs)
shelve(context, target, *args, **kwargs)
shelve_offload(context, target, *args, **kwargs)
soft_delete(context, instance)
unrescue(context, instance, *args, **kwargs)
unshelve(context, target, *args, **kwargs)
update_instance_metadata(context, target, *args, **kwargs)
class ComputeRPCAPIRedirect(cells_rpcapi)

Bases: object

cells_compatible = ['start_instance', 'stop_instance', 'reboot_instance', 'suspend_instance', 'resume_instance', 'terminate_instance', 'soft_delete_instance', 'pause_instance', 'unpause_instance', 'revert_resize', 'confirm_resize', 'reset_network', 'inject_network_info', 'backup_instance', 'snapshot_instance', 'set_admin_password']
class ComputeRPCProxyAPI

Bases: nova.compute.rpcapi.ComputeAPI

Class used to substitute Compute RPC API that will proxy via the cells manager to a compute manager in a child cell.

get_client(target, version_cap, serializer)
class ConductorTaskRPCAPIRedirect(cells_rpcapi_obj)

Bases: object

cells_compatible = ['build_instances', 'resize_instance', 'live_migrate_instance', 'rebuild_instance']
class HostAPI

Bases: nova.compute.api.HostAPI

HostAPI() class for cells.

Implements host management related operations. Works by setting the RPC API used by the base class to proxy via the cells manager to the compute manager in the correct cell. Hosts specified with cells will need to be of the format 'path!to!cell@host‘.

DB methods in the base class are also overridden to proxy via the cells manager.

compute_node_get(context, compute_id)

Get a compute node from a particular cell by its integer ID. compute_id should be in the format of 'path!to!cell@ID‘.

compute_node_search_by_hypervisor(context, hypervisor_match)
get_host_uptime(context, host_name)

Returns the result of calling “uptime” on the target host.

host_power_action(context, host_name, action)
instance_get_all_by_host(context, host_name)

Get all instances by host. Host might have a cell prepended to it, so we’ll need to strip it out. We don’t need to proxy this call to cells, as we have instance information here in the API cell.

service_delete(context, service_id)

Deletes the specified service.

service_get_all(context, filters=None, set_zones=False)
service_get_by_compute_host(context, host_name)
service_update(context, host_name, binary, params_to_update)

Used to enable/disable a service. For compute services, setting to disabled stops new builds arriving on that host.

  • host_name – the name of the host machine that the service is running
  • binary – The name of the executable that the service runs as
  • params_to_update – eg. {‘disabled’: True}
set_host_enabled(context, host_name, enabled)
task_log_get_all(context, task_name, beginning, ending, host=None, state=None)

Return the task logs within a given range from cells, optionally filtering by the host and/or state. For cells, the host should be a path like 'path!to!cell@host‘. If no @host is given, only task logs from a particular cell will be returned.

class InstanceActionAPI

Bases: nova.compute.api.InstanceActionAPI

InstanceActionAPI() class for cells.

action_events_get(context, instance, action_id)
action_get_by_request_id(context, instance, request_id)
actions_get(context, instance)
class RPCClientCellsProxy(target, version_cap)

Bases: object

call(ctxt, method, **kwargs)
cast(ctxt, method, **kwargs)

Previous topic

The nova.compute.build_results Module

Next topic

The Module

Project Source

This Page