WOL driver - include POWER_OFF in supported power states
The WakeOnLanPower class is designed to POWER_ON using WOL and log REBOOT/POWER_OFF operations as they require manual intervention. However the POWER_OFF state was mistakenly omitted from get_supported_power_states, which results in an error instead of a log entry. Introspection on tripleo fails as a result of this. Story: #2005292 Task: #30162 Change-Id: I34ee6da8600d6e6107f00732bf1c34c5b745b333
This commit is contained in:
parent
0e1be8bb81
commit
88e85766c6
|
@ -211,4 +211,11 @@ class WakeOnLanDriverTestCase(db_base.DbTestCase):
|
|||
with task_manager.acquire(
|
||||
self.context, self.node.uuid, shared=True) as task:
|
||||
pstate = task.driver.power.get_supported_power_states(task)
|
||||
self.assertEqual([states.POWER_ON, states.REBOOT], pstate)
|
||||
self.assertEqual(
|
||||
[
|
||||
states.POWER_ON,
|
||||
states.POWER_OFF,
|
||||
states.REBOOT
|
||||
],
|
||||
pstate
|
||||
)
|
||||
|
|
|
@ -198,4 +198,4 @@ class WakeOnLanPower(base.PowerInterface):
|
|||
:returns: A list with the supported power states defined
|
||||
in :mod:`ironic.common.states`.
|
||||
"""
|
||||
return [states.POWER_ON, states.REBOOT]
|
||||
return [states.POWER_ON, states.POWER_OFF, states.REBOOT]
|
||||
|
|
Loading…
Reference in New Issue