Add failed state to output

This commit is contained in:
Joshua Boniface 2018-06-14 12:16:04 -04:00
parent 27dd4b5720
commit 260a403c0a
1 changed files with 3 additions and 0 deletions

3
pvc.py
View File

@ -268,6 +268,7 @@ def getInformationFromXML(zk, uuid, long_output):
'restart': ansiiprint.yellow(),
'shutdown': ansiiprint.yellow(),
'stop': ansiiprint.red(),
'failed': ansiiprint.red(),
'migrate': ansiiprint.blue(),
'unmigrate': ansiiprint.blue()
}
@ -1367,6 +1368,8 @@ def _vm_list(hypervisor):
vm_state_colour = ansiiprint.yellow()
elif vm_state[vm] == 'stop':
vm_state_colour = ansiiprint.red()
elif vm_state[vm] == 'failed':
vm_state_colour = ansiiprint.red()
else:
vm_state_colour = ansiiprint.blue()