Add provision state for VMs
This commit is contained in:
parent
9cab1c6eb5
commit
c515d63340
|
@ -129,7 +129,7 @@ def format_info(cluster_information, oformat):
|
|||
if state == 'total' or state == 'start':
|
||||
continue
|
||||
|
||||
if state in ['disable', 'migrate', 'unmigrate']:
|
||||
if state in ['disable', 'migrate', 'unmigrate', 'provision']:
|
||||
colour = ansiprint.blue()
|
||||
else:
|
||||
colour = ansiprint.yellow()
|
||||
|
|
|
@ -437,7 +437,8 @@ def format_info(config, domain_information, long_output):
|
|||
'disable': ansiprint.blue(),
|
||||
'fail': ansiprint.red(),
|
||||
'migrate': ansiprint.blue(),
|
||||
'unmigrate': ansiprint.blue()
|
||||
'unmigrate': ansiprint.blue(),
|
||||
'provision': ansiprint.blue()
|
||||
}
|
||||
ainformation.append('{}State:{} {}{}{}'.format(ansiprint.purple(), ansiprint.end(), dstate_colour[domain_information['state']], domain_information['state'], ansiprint.end()))
|
||||
ainformation.append('{}Current Node:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['node']))
|
||||
|
|
|
@ -73,7 +73,7 @@ def getClusterInformation(zk_conn):
|
|||
vm_report_status = list(range(0, vm_count))
|
||||
for index, vm in enumerate(vm_list):
|
||||
vm_state = vm['state']
|
||||
if vm_state not in ['start', 'disable', 'migrate', 'unmigrate']:
|
||||
if vm_state not in ['start', 'disable', 'migrate', 'unmigrate', 'provision']:
|
||||
vm_healthy_status[index] = False
|
||||
else:
|
||||
vm_healthy_status[index] = True
|
||||
|
@ -114,7 +114,7 @@ def getClusterInformation(zk_conn):
|
|||
'stop,ready', 'stop,flush', 'stop,flushed', 'stop,unflush'
|
||||
]
|
||||
vm_state_combinations = [
|
||||
'start', 'restart', 'shutdown', 'stop', 'disable', 'fail', 'migrate', 'unmigrate'
|
||||
'start', 'restart', 'shutdown', 'stop', 'disable', 'fail', 'migrate', 'unmigrate', 'provision'
|
||||
]
|
||||
ceph_osd_state_combinations = [
|
||||
'up,in', 'up,out', 'down,in', 'down,out'
|
||||
|
|
|
@ -487,6 +487,9 @@ class VMInstance(object):
|
|||
# restart
|
||||
# shutdown
|
||||
# stop
|
||||
# States we don't (need to) handle are:
|
||||
# disable
|
||||
# provision
|
||||
|
||||
# Conditional pass one - Are we already performing an action
|
||||
if self.instart == False \
|
||||
|
|
Loading…
Reference in New Issue