Merge "WOL driver - include POWER_OFF in supported power states"

This commit is contained in:
Zuul 2019-03-25 12:54:34 +00:00 committed by Gerrit Code Review
commit 611b44863b
2 changed files with 9 additions and 2 deletions

View File

@ -213,4 +213,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
)

View File

@ -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]