Another minor fix

This commit is contained in:
Anton Beloglazov 2012-10-08 15:46:44 +11:00
parent 25190c3ee8
commit 829c9a1927

View File

@ -574,7 +574,7 @@ def is_vm_migrating(nova, vm):
:return: Whether the VM is migrating.
:rtype: bool
"""
return nova.servers.get('vm').status != u'ACTIVE'
return nova.servers.get(vm).status != u'ACTIVE'
@contract
@ -597,7 +597,7 @@ def migrate_vms(nova, placement):
while True:
for vm in list(vms):
if (is_vm_migrating(vm)):
if (is_vm_migrating(nova, vm)):
break
else:
vms.remove(vm)