The agent power interface.
ironic.drivers.modules.agent_power.
AgentPower
[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
).
Parameters: | task – A TaskManager instance containing the node to act on. |
---|---|
Returns: | A power state. One of ironic.common.states . |
get_properties
()[source]¶Return the properties of the interface.
Returns: | dictionary of <property name>:<property description> entries. |
---|
get_supported_power_states
(task)[source]¶Get a list of the supported power states.
Only contains REBOOT.
Parameters: | task – A TaskManager instance containing the node to act on. |
---|---|
Returns: | 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.
Parameters: |
|
---|
set_power_state
(task, power_state, timeout=None)[source]¶Set the power state of the task’s node.
Parameters: |
|
---|---|
Raises: | 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.
Parameters: | task – A TaskManager instance containing the node to act on with a shared lock. |
---|---|
Returns: | 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.