Previous topic

The nova.virt.xenapi.firewall Module

Next topic

The nova.virt.xenapi.network_utils Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.virt.xenapi.host Module

Management class for host-related functions (start, reboot, etc).

class Host(session)

Bases: object

Implements host related operations.

host_maintenance_mode(host, mode)

Start/Stop host maintenance window. On start, it triggers guest VMs evacuation.

host_power_action(_host, action)

Reboots or shuts down the host.

set_host_enabled(_host, enabled)

Sets the specified host’s ability to accept new instances.

class HostState(session)

Bases: object

Manages information about the XenServer host this compute node is running on.

get_host_stats(refresh=False)

Return the current state of the host. If ‘refresh’ is True, run the update first.

update_status()

Since under Xenserver, a compute node runs on a given host, we can get host status information using xenapi.

call_xenhost(session, method, arg_dict)

There will be several methods that will need this general handling for interacting with the xenhost plugin, so this abstracts out that behavior.