Introduce provision states: AVAILABLE, ENROLL
BaremetalProvisionStates.NOSTATE (``None``) was replaced by AVAILABLE
("available") in Ironic version 1.2. ENROLL ("enroll") state was introduced
in version 1.12. This patch also updates the
BaremetalScenarioTest.terminate_instance method to wait for etiher NOSTATE
or AVAILABLE.
Change-Id: I067504e49f68929298c91e61819aa9a61169fe52
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
index e5e166b..a56c941 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
@@ -36,7 +36,9 @@
class BaremetalProvisionStates(object):
"""Possible provision states of an Ironic node."""
+ ENROLL = 'enroll'
NOSTATE = None
+ AVAILABLE = 'available'
INIT = 'initializing'
ACTIVE = 'active'
BUILDING = 'building'
@@ -175,6 +177,7 @@
BaremetalPowerStates.POWER_OFF)
self.wait_provisioning_state(
self.node['uuid'],
- BaremetalProvisionStates.NOSTATE,
+ [BaremetalProvisionStates.NOSTATE,
+ BaremetalProvisionStates.AVAILABLE],
timeout=CONF.baremetal.unprovision_timeout,
interval=30)