Add failed state to output
This commit is contained in:
parent
27dd4b5720
commit
260a403c0a
3
pvc.py
3
pvc.py
|
@ -268,6 +268,7 @@ def getInformationFromXML(zk, uuid, long_output):
|
||||||
'restart': ansiiprint.yellow(),
|
'restart': ansiiprint.yellow(),
|
||||||
'shutdown': ansiiprint.yellow(),
|
'shutdown': ansiiprint.yellow(),
|
||||||
'stop': ansiiprint.red(),
|
'stop': ansiiprint.red(),
|
||||||
|
'failed': ansiiprint.red(),
|
||||||
'migrate': ansiiprint.blue(),
|
'migrate': ansiiprint.blue(),
|
||||||
'unmigrate': ansiiprint.blue()
|
'unmigrate': ansiiprint.blue()
|
||||||
}
|
}
|
||||||
|
@ -1367,6 +1368,8 @@ def _vm_list(hypervisor):
|
||||||
vm_state_colour = ansiiprint.yellow()
|
vm_state_colour = ansiiprint.yellow()
|
||||||
elif vm_state[vm] == 'stop':
|
elif vm_state[vm] == 'stop':
|
||||||
vm_state_colour = ansiiprint.red()
|
vm_state_colour = ansiiprint.red()
|
||||||
|
elif vm_state[vm] == 'failed':
|
||||||
|
vm_state_colour = ansiiprint.red()
|
||||||
else:
|
else:
|
||||||
vm_state_colour = ansiiprint.blue()
|
vm_state_colour = ansiiprint.blue()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue