The ironic.drivers.modules.wol Module

Ironic Wake-On-Lan power manager.

class ironic.drivers.modules.wol.WakeOnLanPower[source]

Bases: ironic.drivers.base.PowerInterface

Wake-On-Lan Driver for Ironic

This PowerManager class provides a mechanism for controlling power state via Wake-On-Lan.

get_power_state(task)[source]

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

This operation is not supported by the Wake-On-Lan driver. So value returned will be from the database and may not reflect the actual state of the system.

Returns:POWER_OFF if power state is not set otherwise return the node’s power_state value from the database.
get_properties()[source]
reboot(*args, **kwargs)[source]

Not supported. Cycles the power to the task’s node.

This operation is not fully supported by the Wake-On-Lan driver. So this method will just try to power the task’s node on.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:InvalidParameterValue if parameters are invalid.
Raises:MissingParameterValue if required parameters are missing.
Raises:WolOperationError if an error occur when sending the magic packets
set_power_state(*args, **kwargs)[source]

Wakes the task’s node on power on. Powering off is not supported.

Wakes the task’s node on. Wake-On-Lan does not support powering the task’s node off so, just log it.

Parameters:
  • task – a TaskManager instance containing the node to act on.
  • pstate – The desired power state, one of ironic.common.states POWER_ON, POWER_OFF.
Raises:

InvalidParameterValue if parameters are invalid.

Raises:

MissingParameterValue if required parameters are missing.

Raises:

WolOperationError if an error occur when sending the magic packets

validate(task)[source]

Validate driver.

Parameters:task – a TaskManager instance containing the node to act on.
Raises:InvalidParameterValue if parameters are invalid.
Raises:MissingParameterValue if required parameters are missing.

Project Source

This Page