Make javelin2 create_server wait for server to boot
Creating a server is a asynchronous command, make create_server wait for
the server to go to 'ACTIVE' state so we can run a check on the server
afterwards.
This also helps address the issue where the server isn't in ACTIVE yet
and grenade moves on and turns off nova-compute causing the server to go
to ERROR state.
Change-Id: Iafc0fe95e8224b1a800bd52aade3eb6488948639
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 9a71942..ca79cf1 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -384,7 +384,10 @@
image_id = _get_image_by_name(client, server['image'])['id']
flavor_id = _get_flavor_by_name(client, server['flavor'])['id']
- client.servers.create_server(server['name'], image_id, flavor_id)
+ resp, body = client.servers.create_server(server['name'], image_id,
+ flavor_id)
+ server_id = body['id']
+ client.servers.wait_for_server_status(server_id, 'ACTIVE')
def destroy_servers(servers):