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)
attach_volume(context, target, *args, **kwargs)
backup(context, instance, name, backup_type, rotation, extra_properties=None, image_id=None)

Backup the given instance.

confirm_resize(context, instance, *args, **kw)
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, *args, **kwargs)
get_console_output(context, instance, *args, **kwargs)
get_diagnostics(context, instance)

Retrieve diagnostics for the given instance.

get_spice_console(context, target, *args, **kwargs)
get_vnc_console(context, target, *args, **kwargs)
inject_file(context, instance, *args, **kwargs)
inject_network_info(context, instance, *args, **kwargs)
lock(context, instance)

Lock the given instance.

pause(context, instance, *args, **kwargs)
reboot(context, instance, *args, **kwargs)
rebuild(context, instance, *args, **kwargs)
remove_fixed_ip(context, instance, *args, **kwargs)
rescue(context, instance, *args, **kwargs)
reset_network(context, instance, *args, **kwargs)
resize(context, instance, *args, **kw)
restore(context, instance, *args, **kwargs)
resume(context, instance, *args, **kwargs)
revert_resize(context, instance, *args, **kw)
set_admin_password(context, instance, *args, **kwargs)
snapshot(context, instance, name, extra_properties=None, image_id=None)

Snapshot the given instance.

soft_delete(context, instance)
start(context, instance, *args, **kwargs)
stop(context, instance, *args, **kwargs)
suspend(context, instance, *args, **kwargs)
unlock(context, instance)

Unlock the given instance.

unpause(context, instance, *args, **kwargs)
unrescue(context, instance, *args, **kwargs)
update(context, instance, pass_on_state_change=False, **kwargs)

Update an instance. :param pass_on_state_change: if true, the state change will be passed

on to child cells
update_instance_metadata(context, target, *args, **kwargs)
update_state(context, instance, new_state)

Updates the state of a compute instance. For example to ‘active’ or ‘error’. Also sets ‘task_state’ to None. Used by admin_actions api

Parameters:
  • context – The security context
  • instance – The instance to update
  • new_state – A member of vm_state to change the instance’s state to, eg. ‘active’
class ComputeRPCAPINoOp

Bases: object

class ComputeRPCProxyAPI(*args, **kwargs)

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.

call(ctxt, msg, topic=None, version=None, timeout=None)
cast(ctxt, msg, topic=None, version=None)
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_get_all(context)
compute_node_search_by_hypervisor(context, hypervisor_match)
compute_node_statistics(context)
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_get_all(context, filters=None, set_zones=False)
service_get_by_compute_host(context, host_name)
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 SchedulerRPCAPIRedirect(cells_rpcapi_obj)

Bases: object

run_instance(context, **kwargs)
validate_cell(fn)

Previous topic

The nova.compute.api Module

Next topic

The nova.compute.claims Module

This Page