Previous topic

The nova.virt.baremetal.nodes Module

Next topic

The nova.virt.baremetal.tilera 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.baremetal.proxy 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 HostState(read_only)

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.

class ProxyConnection(read_only)

Bases: nova.virt.driver.ComputeDriver

HostState
attach_volume(f)
block_stats(instance_name, disk)
compare_cpu(cpu_info)
destroy(instance, network_info, block_device_info=None, cleanup=True)
detach_volume(f)
ensure_filtering_rules_for_instance(instance_ref, time=None)
get_ajax_console(f)
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()
list_instances_detail()
live_migration(ctxt, instance_ref, dest, post_method, recover_method)
reboot(f)
refresh_security_group_members(security_group_id)
refresh_security_group_rules(security_group_id)
rescue(f)
snapshot(f)
spawn(context, instance, image_meta, 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_available_resource(ctxt, host)

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”.

Parameters:
  • ctxt – security context
  • host – hostname that compute manager is currently running
update_host_status()

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

get_connection(read_only)