IPMI power manager driver.
Uses the ‘ipmitool’ command (http://ipmitool.sourceforge.net/) to remotely manage hardware. This includes setting the boot device, getting a serial-over-LAN console, and controlling the power state of the machine.
NOTE THAT CERTAIN DISTROS MAY INSTALL openipmi BY DEFAULT, INSTEAD OF ipmitool, WHICH PROVIDES DIFFERENT COMMAND-LINE OPTIONS AND IS NOT SUPPORTED BY THIS DRIVER.
ironic.drivers.modules.ipmitool.
IPMIConsole
[source]¶Bases: ironic.drivers.base.ConsoleInterface
A base ConsoleInterface that uses ipmitool.
ironic.drivers.modules.ipmitool.
IPMIManagement
[source]¶Bases: ironic.drivers.base.ManagementInterface
get_boot_device
(task)[source]¶Get the current boot device for the task’s node.
Returns the current boot device of the node.
task – a task from TaskManager.
InvalidParameterValue if required IPMI parameters are missing.
IPMIFailure on an error from ipmitool.
MissingParameterValue if a required parameter is missing.
a dictionary containing:
the boot device, one of
ironic.common.boot_devices
or None if it is unknown.
Whether the boot device will persist to all future boots or not, None if it is unknown.
get_properties
()[source]¶Return the properties of the interface.
dictionary of <property name>:<property description> entries.
get_sensors_data
(task)[source]¶Get sensors data.
task – a TaskManager instance.
FailedToGetSensorData when getting the sensor data fails.
FailedToParseSensorData when parsing sensor data fails.
InvalidParameterValue if required ipmi parameters are missing
MissingParameterValue if a required parameter is missing.
returns a dict of sensor data group by sensor type.
get_supported_boot_devices
(task)[source]¶Get a list of the supported boot devices.
task – a task from TaskManager.
A list with the supported boot devices defined
in ironic.common.boot_devices
.
inject_nmi
(task)[source]¶Inject NMI, Non Maskable Interrupt.
Inject NMI (Non Maskable Interrupt) for a node immediately.
task – A TaskManager instance containing the node to act on.
IPMIFailure on an error from ipmitool.
None
set_boot_device
(task, device, persistent=False)[source]¶Set the boot device for the task’s node.
Set the boot device to use on next reboot of the node.
task – a task from TaskManager.
device – the boot device, one of
ironic.common.boot_devices
.
persistent – Boolean value. True if the boot device will persist to all future boots, False if not. Default: False.
InvalidParameterValue if an invalid boot device is specified
MissingParameterValue if required ipmi parameters are missing.
IPMIFailure on an error from ipmitool.
validate
(task)[source]¶Check that ‘driver_info’ contains IPMI credentials.
Validates whether the ‘driver_info’ property of the supplied task’s node contains the required credentials information.
task – a task from TaskManager.
InvalidParameterValue if required IPMI parameters are missing.
MissingParameterValue if a required parameter is missing.
ironic.drivers.modules.ipmitool.
IPMIPower
[source]¶Bases: ironic.drivers.base.PowerInterface
get_power_state
(task)[source]¶Get the current power state of the task’s node.
task – a TaskManager instance containing the node to act on.
one of ironic.common.states POWER_OFF, POWER_ON or ERROR.
InvalidParameterValue if required ipmi parameters are missing.
MissingParameterValue if a required parameter is missing.
IPMIFailure on an error from ipmitool (from _power_status call).
get_properties
()[source]¶Return the properties of the interface.
dictionary of <property name>:<property description> entries.
get_supported_power_states
(task)[source]¶Get a list of the supported power states.
task – A TaskManager instance containing the node to act on. currently not used.
A list with the supported power states defined
in ironic.common.states
.
reboot
(task, timeout=None)[source]¶Cycles the power to the task’s node.
task – a TaskManager instance containing the node to act on.
timeout – timeout (in seconds) positive integer (> 0) for any
power state. The timeout is counted once during power off and once
during power on for reboots. None
indicates that the default
timeout will be used.
MissingParameterValue if required ipmi parameters are missing.
InvalidParameterValue if an invalid power state was specified.
PowerStateFailure if the final state of the node is not POWER_ON or the intermediate state of the node is not POWER_OFF.
set_power_state
(task, power_state, timeout=None)[source]¶Turn the power on, off, soft reboot, or soft power off.
task – a TaskManager instance containing the node to act on.
power_state – desired power state. one of ironic.common.states, POWER_ON, POWER_OFF, SOFT_POWER_OFF, or SOFT_REBOOT.
timeout – timeout (in seconds) positive integer (> 0) for any
power state. The timeout is counted once during power off and once
during power on for reboots. None
indicates that the default
timeout will be used.
InvalidParameterValue if an invalid power state was specified.
MissingParameterValue if required ipmi parameters are missing
PowerStateFailure if the power couldn’t be set to pstate.
validate
(task)[source]¶Validate driver_info for ipmitool driver.
Check that node[‘driver_info’] contains IPMI credentials.
task – a TaskManager instance containing the node to act on.
InvalidParameterValue if required ipmi parameters are missing.
MissingParameterValue if a required parameter is missing.
ironic.drivers.modules.ipmitool.
IPMIShellinaboxConsole
[source]¶Bases: ironic.drivers.modules.ipmitool.IPMIConsole
A ConsoleInterface that uses ipmitool and shellinabox.
start_console
(task)[source]¶Start a remote console for the node.
task – a task from TaskManager
InvalidParameterValue if required ipmi parameters are missing
PasswordFileFailedToCreate if unable to create a file containing the password
ConsoleError if the directory for the PID file cannot be created
ConsoleSubprocessFailed when invoking the subprocess failed
ironic.drivers.modules.ipmitool.
IPMISocatConsole
[source]¶Bases: ironic.drivers.modules.ipmitool.IPMIConsole
A ConsoleInterface that uses ipmitool and socat.
get_console
(task)[source]¶Get the type and connection information about the console.
task – a task from TaskManager
start_console
(task)[source]¶Start a remote console for the node.
task – a task from TaskManager
InvalidParameterValue if required ipmi parameters are missing
PasswordFileFailedToCreate if unable to create a file containing the password
ConsoleError if the directory for the PID file cannot be created
ConsoleSubprocessFailed when invoking the subprocess failed
ironic.drivers.modules.ipmitool.
VendorPassthru
[source]¶Bases: ironic.drivers.base.VendorInterface
bmc_reset
(task, http_method, warm=True)[source]¶Reset BMC with IPMI command ‘bmc reset (warm|cold)’.
task – a TaskManager instance.
http_method – the HTTP method used on the request.
warm – boolean parameter to decide on warm or cold reset.
IPMIFailure on an error from ipmitool.
MissingParameterValue if a required parameter is missing.
InvalidParameterValue when an invalid value is specified
get_properties
()[source]¶Return the properties of the interface.
dictionary of <property name>:<property description> entries.
send_raw
(task, http_method, raw_bytes)[source]¶Send raw bytes to the BMC. Bytes should be a string of bytes.
task – a TaskManager instance.
http_method – the HTTP method used on the request.
raw_bytes – a string of raw bytes to send, e.g. ‘0x00 0x01’
IPMIFailure on an error from ipmitool.
MissingParameterValue if a required parameter is missing.
InvalidParameterValue when an invalid value is specified.
validate
(task, method, **kwargs)[source]¶Validate vendor-specific actions.
If invalid, raises an exception; otherwise returns None.
send_raw
bmc_reset
task – a task from TaskManager.
method – method to be validated
kwargs – info for action.
InvalidParameterValue when an invalid parameter value is specified.
MissingParameterValue if a required parameter is missing.
ironic.drivers.modules.ipmitool.
dump_sdr
(task, file_path)[source]¶Dump SDR data to a file.
task – a TaskManager instance.
file_path – the path to SDR dump file.
IPMIFailure on an error from ipmitool.
MissingParameterValue if a required parameter is missing.
InvalidParameterValue when an invalid value is specified.
ironic.drivers.modules.ipmitool.
send_raw
(task, raw_bytes)[source]¶Send raw bytes to the BMC. Bytes should be a string of bytes.
task – a TaskManager instance.
raw_bytes – a string of raw bytes to send, e.g. ‘0x00 0x01’
a tuple with stdout and stderr.
IPMIFailure on an error from ipmitool.
MissingParameterValue if a required parameter is missing.
InvalidParameterValue when an invalid value is specified.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.