ironic.drivers.modules.xclarity.power module

class ironic.drivers.modules.xclarity.power.XClarityPower(*args, **kwargs)[source]

Bases: PowerInterface

get_power_state(task)[source]

Gets the current power state.

Parameters:

task – a TaskManager instance.

Returns:

one of ironic.common.states POWER_OFF, POWER_ON or ERROR.

Raises:

XClarityError if fails to retrieve power state of XClarity resource

get_properties()[source]

Return the properties of the interface.

Returns:

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

reboot(task, timeout=None)[source]

Soft reboot the node

Parameters:
  • task – a TaskManager instance.

  • timeout – timeout (in seconds). Unsupported by this interface.

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

Turn the current power state on or off.

Parameters:
  • task – a TaskManager instance.

  • power_state – The desired power state POWER_ON, POWER_OFF or REBOOT from ironic.common.states.

  • timeout – timeout (in seconds). Unsupported by this interface.

Raises:

InvalidParameterValue if an invalid power state was specified.

Raises:

XClarityError if XClarity fails setting the power state.

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]

Validate the driver-specific info supplied.

This method validates if the ‘driver_info’ property of the supplied task’s node contains the required information for this driver to manage the power state of the node.

Parameters:

task – a task from TaskManager.