From 260a403c0a270e98292ce66450dac93ed58966ba Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Thu, 14 Jun 2018 12:16:04 -0400 Subject: [PATCH] Add failed state to output --- pvc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pvc.py b/pvc.py index b04f0e90..0c185367 100755 --- a/pvc.py +++ b/pvc.py @@ -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()