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
This commit is contained in:
dparalen 2016-05-25 20:38:30 +02:00
parent 10d00c040f
commit 4c1e534df1

View File

@ -36,7 +36,9 @@ class BaremetalPowerStates(object):
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 @@ class BaremetalScenarioTest(manager.ScenarioTest):
BaremetalPowerStates.POWER_OFF)
self.wait_provisioning_state(
self.node['uuid'],
BaremetalProvisionStates.NOSTATE,
[BaremetalProvisionStates.NOSTATE,
BaremetalProvisionStates.AVAILABLE],
timeout=CONF.baremetal.unprovision_timeout,
interval=30)