Implement disabled state in cluster status

References #53
This commit is contained in:
Joshua Boniface 2019-10-23 23:49:04 -04:00
parent 32b4ed66e8
commit 9736a3c653
1 changed files with 4 additions and 4 deletions

View File

@ -73,7 +73,7 @@ def getClusterInformation(zk_conn):
vm_report_status = list(range(0, vm_count)) vm_report_status = list(range(0, vm_count))
for index, vm in enumerate(vm_list): for index, vm in enumerate(vm_list):
vm_state = vm['state'] vm_state = vm['state']
if vm_state != 'start': if vm_state != 'start' and vm_state != 'disabled':
vm_healthy_status[index] = False vm_healthy_status[index] = False
else: else:
vm_healthy_status[index] = True vm_healthy_status[index] = True
@ -114,7 +114,7 @@ def getClusterInformation(zk_conn):
'stop,ready', 'stop,flush', 'stop,flushed', 'stop,unflush' 'stop,ready', 'stop,flush', 'stop,flushed', 'stop,unflush'
] ]
vm_state_combinations = [ vm_state_combinations = [
'start', 'stop', 'shutdown', 'failed', 'migrate' 'start', 'restart', 'shutdown', 'stop', 'disabled', 'failed', 'migrate', 'unmigrate'
] ]
ceph_osd_state_combinations = [ ceph_osd_state_combinations = [
'up,in', 'up,out', 'down,in', 'down,out' 'up,in', 'up,out', 'down,in', 'down,out'
@ -219,8 +219,8 @@ def format_info(cluster_information, oformat):
if state == 'total' or state == 'start': if state == 'total' or state == 'start':
continue continue
if state == 'disable': if state == 'disabled':
colour = ansiprint.green() colour = ansiprint.blue()
else: else:
colour = ansiprint.yellow() colour = ansiprint.yellow()