The ironic.drivers.modules.cimc.power Module

class ironic.drivers.modules.cimc.power.Power[source]

Bases: ironic.drivers.base.PowerInterface

get_power_state(task)[source]

Return the power state of the task’s node.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:MissingParameterValue if a required parameter is missing.
Returns:a power state. One of ironic.common.states.
Raises:CIMCException if there is an error communicating with CIMC
get_properties()[source]

Return the properties of the interface.

Returns:dictionary of <property name>:<property description> entries.
reboot(*args, **kwargs)[source]

Perform a hard reboot of the task’s node.

If the node is already powered on then it shall reboot the node, if its off then the node will just be turned on.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:MissingParameterValue if a required parameter is missing.
Raises:CIMCException if there is an error communicating with CIMC
set_power_state(*args, **kwargs)[source]

Set the power state of the task’s node.

Parameters:
  • task – a TaskManager instance containing the node to act on.
  • pstate – Any power state from ironic.common.states.
Raises:

MissingParameterValue if a required parameter is missing.

Raises:

InvalidParameterValue if an invalid power state is passed

Raises:

CIMCException if there is an error communicating with CIMC

validate(task)[source]

Check if node.driver_info contains the required CIMC credentials.

Parameters:task – a TaskManager instance.
Raises:InvalidParameterValue if required CIMC credentials are missing.