Some clouds, *cough*HP*cough* append extra data to their
status strings. Such as: BUILD(scheduling) or BUILD(networking).
We don't really want to be on the hook for keeping a list of those,
but if we just grab the bit in front of the parenthetical, we should
be able to tell state sensibly, even when people are being weird.
Change-Id: Idaf079d6090db50c9041f398a257b427d63ff48d
if server.status != 'ACTIVE':
server.get()
- if server.status in self._deferred_server_statuses:
+ # Some clouds append extra (STATUS) strings to the status
+ short_server_status = server.status.split('(')[0]
+ if short_server_status in self._deferred_server_statuses:
return False
elif server.status == 'ACTIVE':
self._set_ipaddress(server.networks)
scheduler.TaskRunner(instance.create)()
self.assertEqual(instance.state, instance.CREATE_COMPLETE)
+ def test_instance_status_build_spawning(self):
+ self._test_instance_status_not_build_active('BUILD(SPAWNING)')
+
def test_instance_status_hard_reboot(self):
self._test_instance_status_not_build_active('HARD_REBOOT')