The ironic.drivers.modules.oneview.power Module

The ironic.drivers.modules.oneview.power Module

class ironic.drivers.modules.oneview.power.OneViewPower[source]

Bases: ironic.drivers.base.PowerInterface

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

Gets the current power state.

Parameters:task – a TaskManager instance.
Returns:one of ironic.common.states POWER_OFF, POWER_ON or ERROR.
Raises:OneViewError if fails to retrieve power state of OneView resource
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]

Reboot the node.

  • task – a TaskManager instance.
  • timeout – timeout (in seconds) positive integer (> 0) for any power state. None indicates to use default timeout.

PowerStateFailure if the final state of the node is not POWER_ON.

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

Turn the current power state on or off.

  • task – a TaskManager instance.
  • power_state – The desired power state POWER_ON, POWER_OFF or REBOOT from ironic.common.states.
  • timeout – timeout (in seconds) positive integer (> 0) for any power state. None indicates the default timeout.

InvalidParameterValue if an invalid power state was specified.


PowerStateFailure if the power couldn’t be set to power_state.


OneViewError if OneView fails setting the power state.

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

Checks required info on ‘driver_info’ and validates node with OneView

Validates whether the ‘oneview_info’ property of the supplied task’s node contains the required info such as server_hardware_uri, server_hardware_type, server_profile_template_uri and enclosure_group_uri. Also, checks if the server profile of the node is applied, if NICs are valid for the server profile of the node, and if the server hardware attributes (ram, memory, vcpus count) are consistent with OneView. It validates if the node is being used by Oneview.

Parameters:task – a task from TaskManager.
Raises:MissingParameterValue if a required parameter is missing.
Raises:InvalidParameterValue if parameters set are inconsistent with resources in OneView
Raises:InvalidParameterValue if the node in use by OneView.
Raises:OneViewError if not possible to get OneView’s information for the given node, if not possible to retrieve Server Hardware from OneView.
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.