The nova.virt.xenapi.host Module

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

class Host(session, virtapi)

Bases: object

Implements host related operations.

get_host_uptime()

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

host_maintenance_mode(host, mode)

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

host_power_action(action)

Reboots or shuts down the host.

set_host_enabled(enabled)

Sets the compute 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.

to_cpu_model(host_cpu_info)
to_supported_instances(host_capabilities)

Previous topic

The nova.virt.xenapi.firewall Module

Next topic

The nova.virt.xenapi.image.bittorrent Module

Project Source

This Page