The agent power interface.
ironic.drivers.modules.agent_power.
AgentPower
(*args, **kwargs)[source]¶Bases: ironic.drivers.base.PowerInterface
Power interface using the running agent for power actions.
get_power_state
(task)[source]¶Return the power state of the task’s node.
Essentially, the only known state is POWER ON, everything else is
an error (or more precisely None
).
task – A TaskManager instance containing the node to act on.
A power state. One of ironic.common.states
.
get_properties
()[source]¶Return the properties of the interface.
dictionary of <property name>:<property description> entries.
get_supported_power_states
(task)[source]¶Get a list of the supported power states.
Only contains REBOOT.
task – A TaskManager instance containing the node to act on.
A list with the supported power states defined
in ironic.common.states
.
reboot
(task, timeout=None)[source]¶Perform a reboot of the task’s node.
Only soft reboot is implemented.
task – A TaskManager instance containing the node to act on.
timeout – timeout (in seconds) positive integer (> 0) for any
power state. None
indicates to use default timeout.
set_power_state
(task, power_state, timeout=None)[source]¶Set the power state of the task’s node.
task – A TaskManager instance containing the node to act on.
power_state – Power state from ironic.common.states
.
Only REBOOT and SOFT_REBOOT are supported and are synonymous.
timeout – timeout (in seconds) positive integer (> 0) for any
power state. None
indicates to use default timeout.
PowerStateFailure on non-supported power state.
supports_power_sync
(task)[source]¶Check if power sync is supported for the given node.
Not supported for the agent power since it is not possible to power on/off nodes.
task – A TaskManager instance containing the node to act on with a shared lock.
boolean, whether power sync is supported.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.