Fetch only 'up' state nodes for nova hypervisor list
Change-Id: I2ea545960365b666d4bd4dbb3f96613400ee804b
This commit is contained in:
parent
45b7cbe59c
commit
b06080b6bf
@ -24,7 +24,8 @@ class NovaHealth(object):
|
||||
hypervisors = self.novaclient.hypervisors.list()
|
||||
except (ClientException, Exception) as e:
|
||||
return (400, e.message, [])
|
||||
hypervisor_names = [node.hypervisor_hostname for node in hypervisors]
|
||||
hypervisor_names = [node.hypervisor_hostname for node in hypervisors
|
||||
if node.state == "up"]
|
||||
return (200, "success", hypervisor_names)
|
||||
|
||||
def nova_service_list(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user