The ironic.drivers.modules.msftocs.power Module

MSFT OCS Power Driver

class ironic.drivers.modules.msftocs.power.MSFTOCSPower[source]

Bases: ironic.drivers.base.PowerInterface

get_power_state(task)[source]

Get the power state from the node.

Parameters:task – a TaskManager instance containing the target node.
Raises:MSFTOCSClientApiException.
get_properties()[source]

Returns the driver’s properties.

reboot(*args, **kwargs)[source]

Cycle the power of the node

Parameters:task – a TaskManager instance contains the target node.
Raises:PowerStateFailure if failed to reboot.
set_power_state(*args, **kwargs)[source]

Set the power state of the node.

Turn the node power on or off.

Parameters:
  • task – a TaskManager instance contains the target node.
  • pstate – The desired power state of the node.
Raises:

PowerStateFailure if the power cannot set to pstate.

Raises:

InvalidParameterValue

validate(task)[source]

Validate the driver_info in the node.

Check if the driver_info contains correct required fields.

Parameters:task – a TaskManager instance containing the target node.
Raises:MissingParameterValue if any required parameters are missing.
Raises:InvalidParameterValue if any parameters have invalid values.

Project Source

This Page