Merge "Fix vm_by_host bug"

This commit is contained in:
Jenkins 2015-04-29 12:49:24 +00:00 committed by Gerrit Code Review
commit 4edb23ef27

View File

@ -705,7 +705,7 @@ def vms_by_host(nova, host):
:rtype: list(str)
"""
return [str(vm.id) for vm in nova.servers.list()
if vm_hostname(vm) == host]
if (vm_hostname(vm) == host and str(getattr(vm, 'OS-EXT-STS:vm_state')) == 'active')]
@contract