The nova.virt.baremetal.driver Module

A connection to a hypervisor through baremetal.

Related Flags

baremetal_type:Baremetal domain type.
baremetal_uri:Override for the default baremetal URI (baremetal_type).
rescue_image_id:
 Rescue ami image (default: ami-rescue).
rescue_kernel_id:
 Rescue aki image (default: aki-rescue).
rescue_ramdisk_id:
 Rescue ari image (default: ari-rescue).
injected_network_template:
 Template file for injected network
allow_project_net_traffic:
 Whether to allow in project network traffic
class BareMetalDriver(read_only)

Bases: nova.virt.driver.ComputeDriver

HostState
attach_volume(f)
block_stats(instance_name, disk)
destroy(instance, network_info, block_device_info=None, cleanup=True)
detach_volume(f)
ensure_filtering_rules_for_instance(instance_ref, network_info)
get_ajax_console(f)
get_available_resource()

Updates compute manager resource info on ComputeNode table.

This method is called when nova-coompute launches, and whenever admin executes “nova-manage service update_resource”.

get_console_output(instance)
get_console_pool_info(console_type)
get_cpu_info()

Get cpuinfo information.

Obtains cpu feature from virConnect.getCapabilities, and returns as a json string.

Returns:see above description
get_diagnostics(instance_name)
get_disks(instance_name)
get_host_stats(refresh=False)

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

get_hypervisor_type()

Get hypervisor type.

Returns:hypervisor type (ex. qemu)
get_hypervisor_version()

Get hypervisor version.

Returns:hypervisor version (ex. 12003)
get_info(instance)

Retrieve information from baremetal for a specific instance name.

If a baremetal error is encountered during lookup, we might raise a NotFound exception or Error exception depending on how severe the baremetal error is.

get_interfaces(instance_name)
get_local_gb_total()

Get the total hdd size(GB) of physical computer.

Returns:The total amount of HDD(GB). Note that this value shows a partition where NOVA-INST-DIR/instances mounts.
get_local_gb_used()

Get the free hdd size(GB) of physical computer.

Returns:The total usage of HDD(GB). Note that this value shows a partition where NOVA-INST-DIR/instances mounts.
get_memory_mb_total()

Get the total memory size(MB) of physical computer.

Returns:the total amount of memory(MB).
get_memory_mb_used()

Get the free memory size(MB) of physical computer.

Returns:the total usage of memory(MB).
get_pty_for_instance(instance_name)
get_vcpu_total()

Get vcpu number of physical computer.

Returns:the number of cpu core.
get_vcpu_used()

Get vcpu usage number of physical computer.

Returns:The total number of vcpu that currently used.
get_vnc_console(f)
init_host(host)
interface_stats(instance_name, interface)
list_instances()
live_migration(ctxt, instance_ref, dest, post_method, recover_method)
reboot(f)
refresh_instance_security_rules(instance)
refresh_security_group_members(security_group_id)
refresh_security_group_rules(security_group_id)
rescue(f)
snapshot(f)
spawn(context, instance, image_meta, injected_files, admin_password, network_info, block_device_info=None)
to_xml_dict(instance, rescue=False, network_info=None)
unfilter_instance(instance_ref)

See comments of same method in firewall_driver.

unrescue(f)
update_host_status()

Update the status info of the host, and return those values to the calling program.

class HostState(connection)

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()

We can get host status information.

Previous topic

The nova.virt.baremetal.dom Module

Next topic

The nova.virt.baremetal.fake Module

This Page