ironic.drivers.modules.drac.power module¶
DRAC power interface
- class ironic.drivers.modules.drac.power.DracPower(*args, **kwargs)[source]¶
Bases:
DracWSManPower
Class alias of class DracWSManPower.
This class provides ongoing support of the deprecated ‘idrac’ power interface implementation entrypoint.
All bug fixes and new features should be implemented in its base class, DracWSManPower. That makes them available to both the deprecated ‘idrac’ and new ‘idrac-wsman’ entrypoints. Such changes should not be made to this class.
- class ironic.drivers.modules.drac.power.DracRedfishPower(*args, **kwargs)[source]¶
Bases:
RedfishPower
iDRAC Redfish interface for power-related actions.
Presently, this class entirely defers to its base class, a generic, vendor-independent Redfish interface. Future resolution of Dell EMC- specific incompatibilities and introduction of vendor value added should be implemented by this class.
- class ironic.drivers.modules.drac.power.DracWSManPower(*args, **kwargs)[source]¶
Bases:
PowerInterface
Interface for power-related actions.
- get_power_state(task)[source]¶
Return the power state of the node.
- Parameters:
task – a TaskManager instance containing the node to act on.
- Returns:
the power state, one of
ironic.common.states
.- Raises:
InvalidParameterValue if required DRAC credentials are missing.
- Raises:
DracOperationError on an error from python-dracclient.
- reboot(task, timeout=None)[source]¶
Perform a reboot of the task’s node.
- Parameters:
task – a TaskManager instance containing the node to act on.
timeout – timeout (in seconds). Unsupported by this interface.
- Raises:
InvalidParameterValue if required DRAC credentials are missing.
- Raises:
DracOperationError on an error from python-dracclient.
- set_power_state(task, power_state, timeout=None)[source]¶
Set the power state of the node.
- Parameters:
task – a TaskManager instance containing the node to act on.
power_state – a power state from
ironic.common.states
.timeout – Time to wait for the node to reach the requested state. When requested state is reboot, not used as not waiting then.
- Raises:
InvalidParameterValue if required DRAC credentials are missing.
- Raises:
DracOperationError on an error from python-dracclient.
- validate(task)[source]¶
Validate the driver-specific Node power info.
This method validates whether the ‘driver_info’ property of the supplied node contains the required information for this driver to manage the power state of the node.
- Parameters:
task – a TaskManager instance containing the node to act on.
- Raises:
InvalidParameterValue if required driver_info attribute is missing or invalid on the node.