ironic.drivers.modules.ibmc.power module

iBMC Power Interface

class ironic.drivers.modules.ibmc.power.IBMCPower(*args, **kwargs)[source]

Bases: PowerInterface

get_power_state(task)[source]

Get the current power state of the task’s node.

Parameters:

task – A TaskManager instance containing the node to act on.

Returns:

A power state. One of ironic.common.states.

Raises:

InvalidParameterValue on malformed parameter(s)

Raises:

MissingParameterValue on missing parameter(s)

Raises:

IBMCConnectionError when it fails to connect to iBMC

Raises:

IBMCError when iBMC responses an error information

get_properties()[source]

Return the properties of the interface.

Returns:

dictionary of <property name>:<property description> entries.

get_supported_power_states(task)[source]

Get a list of the supported power states.

Parameters:

task – A TaskManager instance containing the node to act on. Not used by this driver at the moment.

Returns:

A list with the supported power states defined in ironic.common.states.

reboot(task, timeout=None)[source]

Perform a hard reboot of the task’s node.

Parameters:
  • task – A TaskManager instance containing the node to act on.

  • timeout – Time to wait for the node to become powered on.

Raises:

InvalidParameterValue on malformed parameter(s)

Raises:

MissingParameterValue if a required parameter is missing.

Raises:

IBMCConnectionError when it fails to connect to iBMC

Raises:

IBMCError when iBMC responses an error information

set_power_state(task, power_state, timeout=None)[source]

Set the power state of the task’s node.

Parameters:
  • task – A TaskManager instance containing the node to act on.

  • power_state – Any power state from ironic.common.states.

  • timeout – Time to wait for the node to reach the requested state.

Raises:

InvalidParameterValue on malformed parameter(s)

Raises:

MissingParameterValue if a required parameter is missing.

Raises:

IBMCConnectionError when it fails to connect to iBMC

Raises:

IBMCError when iBMC responses an error information

supported = False

Indicates if an interface is supported.

This will be set to False for interfaces which are untested in first- or third-party CI, or in the process of being deprecated.

validate(task)[source]

Validates the driver information needed by the iBMC driver.

Parameters:

task – A TaskManager instance containing the node to act on.

Raises:

InvalidParameterValue on malformed parameter(s)

Raises:

MissingParameterValue on missing parameter(s)