Previous topic

The nova.virt.baremetal.dom Module

Next topic

The nova.virt.baremetal.nodes 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.fake Module

class BareMetalNodes

Bases: object

This manages node information and implements singleton.

BareMetalNodes class handles machine architectures of interest to technical computing users have either poor or non-existent support for virtualization.

activate_node(node_id, node_ip, name, mac_address, ip_address)

Activates the given node using ID, IP, and MAC address.

check_activated(node_id, node_ip)

Checks whether the given node is activated or not.

deactivate_node(node_id)

Deactivates the given node by turnning it off.

free_node(node_id)

Sets/frees status of the given node as 0 (IDLE).

get_console_output(console_log)

Gets console output of the given node.

get_hw_info(field)

Returns hardware information of bare-metal node by the given field.

Given field can be vcpus, memory_mb, local_gb, memory_mb_used, local_gb_used, hypervisor_type, hypervisor_version, and cpu_info.

get_idle_node()

Gets an idle node, sets the status as 1 (RUNNING) and Returns node ID.

get_image(bp)

Gets the bare-metal file system image into the instance path.

Noting to do for tilera nodes: actual image is used.

get_ip_by_id(id)

Returns default IP address of the given node.

get_status()

Gets status of the given node.

iptables_set(node_ip, user_data)

Sets security setting (iptables:port) if needed.

network_set(node_ip, mac_address, ip_address)

Sets network configuration based on the given ip and mac address.

User can access the bare-metal node using ssh.

power_mgr(node_id, mode)

Changes power state of the given node.

According to the mode (1-ON, 2-OFF, 3-REBOOT), power state can be changed. /tftpboot/pdu_mgr script handles power management of PDU (Power Distribution Unit).

set_image(bpath, node_id)

Sets the PXE bare-metal file system from the instance path.

This should be done after ssh key is injected.

set_status(node_id, status)

Sets status of the given node by the given status.

Returns 1 if the node is in the nodes list.

sleep_mgr(time)

Sleeps until the node is activated.

ssh_set(node_ip)

Sets and Runs sshd in the node.

vmlinux_set(node_id, mode)

Sets kernel into default path (/tftpboot) if needed.

From basepath to /tftpboot, kernel is set based on the given mode such as 0-NoSet, 1-SetVmlinux, or 9-RemoveVmlinux.

get_baremetal_nodes()