Fix colours of network status elements

This commit is contained in:
Joshua Boniface 2021-08-18 19:41:53 -04:00
parent 7ecc6a2635
commit 13e309b450
1 changed files with 3 additions and 7 deletions

View File

@ -491,14 +491,10 @@ def net_sriov_vf_info(config, node, vf):
# Output display functions # Output display functions
# #
def getColour(value): def getColour(value):
if value in ['True', "start"]: if value in ["False", "None"]:
return ansiprint.green()
elif value in ["restart", "shutdown"]:
return ansiprint.yellow()
elif value in ["stop", "fail"]:
return ansiprint.red()
else:
return ansiprint.blue() return ansiprint.blue()
else:
return ansiprint.green()
def getOutputColours(network_information): def getOutputColours(network_information):