Merge pull request #3078 from bennojoy/devel

bug fix nova_compute
This commit is contained in:
Michael DeHaan 2013-05-31 05:25:24 -07:00
commit 4a5b567f0c

View file

@ -126,7 +126,7 @@ requirements: ["novaclient"]
def _delete_server(module, nova):
name = None
try:
server = nova.servers.list({'name': module.params['name']}).pop()
server = nova.servers.list(True, {'name': module.params['name']}).pop()
nova.servers.delete(server)
except Exception as e:
module.fail_json( msg = "Error in deleting vm: %s" % e.message)
@ -134,7 +134,7 @@ def _delete_server(module, nova):
module.exit_json(changed = True, result = "deleted")
expire = time.time() + module.params['wait_for']
while time.time() < expire:
name = nova.servers.list({'name': module.params['name']})
name = nova.servers.list(True, {'name': module.params['name']})
if not name:
module.exit_json(changed = True, result = "deleted")
time.sleep(5)
@ -182,7 +182,7 @@ def _create_server(module, nova):
def _get_server_state(module, nova):
server = None
try:
servers = nova.servers.list({'name': module.params['name']})
servers = nova.servers.list(True, {'name': module.params['name']})
if servers:
server = servers.pop()
except Exception as e: