Add check for hypervisor state before getting uptime
show_hypervisor_uptime will take several minutes to return fail info if hypervisor is not good, so this is to add check for hypervisor state up before show_hypervisor_uptime to save running time in the situation where there is abnormal hypervisor in the system. Change-Id: I93753a73ac84243d6837b3364d1f252018e03431
This commit is contained in:
@@ -79,7 +79,8 @@ class HypervisorAdminTestJSON(HypervisorAdminTestBase):
|
||||
for hyper in hypers:
|
||||
details = (self.client.show_hypervisor(hyper['id'])
|
||||
['hypervisor'])
|
||||
if details['hypervisor_type'] != 'ironic':
|
||||
if (details['hypervisor_type'] != 'ironic' and
|
||||
details['state'] == 'up'):
|
||||
hypers_without_ironic.append(hyper)
|
||||
ironic_only = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user