The ironic.drivers.modules.irmc.power Module¶
iRMC Power Driver using the Base Server Profile
-
class
ironic.drivers.modules.irmc.power.IRMCPower[source]¶ Bases:
ironic.drivers.base.PowerInterfaceInterface for power-related actions.
-
get_power_state(*args, **kwargs)[source]¶ Return the 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 if required ipmi parameters are missing. Raises: MissingParameterValue if a required parameter is missing. Raises: IPMIFailure on an error from ipmitool (from _power_status call).
-
get_properties()[source]¶ Return the properties of the interface.
Returns: dictionary of <property name>:<property description> entries.
-
get_supported_power_states(*args, **kwargs)[source]¶ Get a list of the supported power states.
Parameters: task – A TaskManager instance containing the node to act on. currently not used. Returns: A list with the supported power states defined in ironic.common.states.
-
reboot(*args, **kwargs)[source]¶ Perform a hard reboot of the task’s node.
Parameters: - task – a TaskManager instance containing the node to act on.
- timeout – timeout (in seconds) positive integer (> 0) for any
power state.
Noneindicates default timeout.
Raises: InvalidParameterValue if an invalid power state was specified.
Raises: IRMCOperationError if failed to set the power state.
-
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.
- power_state – Any power state from
ironic.common.states. - timeout – timeout (in seconds) positive integer (> 0) for any
power state.
Noneindicates default timeout.
Raises: InvalidParameterValue if an invalid power state was specified.
Raises: MissingParameterValue if some mandatory information is missing on the node
Raises: IRMCOperationError if failed to set the power state.
-
validate(*args, **kwargs)[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. Raises: MissingParameterValue if a required parameter is missing.
-
-
ironic.drivers.modules.irmc.power.METRICS= <ironic_lib.metrics.NoopMetricLogger object>¶ SC2.mib: sc2srvCurrentBootStatus returns status of the current boot