Fetch only 'up' state nodes for nova hypervisor list
Change-Id: I2ea545960365b666d4bd4dbb3f96613400ee804b
(cherry picked from commit b06080b6bf
)
This commit is contained in:
parent
421e97213d
commit
4571bfc598
|
@ -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…
Reference in New Issue