The ironic.drivers.modules.ucs.power
Module¶
Ironic Cisco UCSM interfaces. Provides basic power control of servers managed by Cisco UCSM using PyUcs Sdk.
-
class
ironic.drivers.modules.ucs.power.
Power
[source]¶ Bases:
ironic.drivers.base.PowerInterface
Cisco Power Interface.
This PowerInterface class provides a mechanism for controlling the power state of servers managed by Cisco UCS Manager.
-
get_power_state
(task, *args, **kwargs)[source]¶ Get the current power state.
Poll the host for the current power state of the node.
Parameters: - task – instance of ironic.manager.task_manager.TaskManager.
- helper – ucs helper instance
Raises: MissingParameterValue if required CiscoDriver parameters are missing.
Raises: UcsOperationError on error from UCS Client.
Returns: power state. One of
ironic.common.states
.
-
reboot
(*args, **kwargs)[source]¶ Cycles the power to a node.
Parameters: - task – a TaskManager instance.
- helper – ucs helper instance.
Raises: UcsOperationError on error from UCS Client.
Raises: PowerStateFailure if the final state of the node is not POWER_ON.
-
set_power_state
(*args, **kwargs)[source]¶ Turn the power on or off.
Set the power state of a node.
Parameters: - task – instance of ironic.manager.task_manager.TaskManager.
- pstate – Either POWER_ON or POWER_OFF from :class: ironic.common.states.
- helper – ucs helper instance
Raises: InvalidParameterValue if an invalid power state was specified.
Raises: MissingParameterValue if required CiscoDriver parameters are missing.
Raises: UcsOperationError on error from UCS Client.
Raises: PowerStateFailure if the desired power state couldn’t be set.
-