Use purple for mirror state colour

This commit is contained in:
Joshua Boniface 2024-10-11 10:44:39 -04:00
parent 28b8b3bb44
commit bcfa6851e1
1 changed files with 6 additions and 8 deletions

View File

@ -1861,7 +1861,7 @@ def format_info(config, domain_information, long_output):
"provision": ansiprint.blue(), "provision": ansiprint.blue(),
"restore": ansiprint.blue(), "restore": ansiprint.blue(),
"import": ansiprint.blue(), "import": ansiprint.blue(),
"mirror": ansiprint.blue(), "mirror": ansiprint.purple(),
} }
ainformation.append( ainformation.append(
"{}State:{} {}{}{}".format( "{}State:{} {}{}{}".format(
@ -2371,16 +2371,14 @@ def format_list(config, vm_list):
# Format the string (elements) # Format the string (elements)
for domain_information in sorted(vm_list, key=lambda v: v["name"]): for domain_information in sorted(vm_list, key=lambda v: v["name"]):
if domain_information["state"] == "start": if domain_information["state"] in ["start"]:
vm_state_colour = ansiprint.green() vm_state_colour = ansiprint.green()
elif domain_information["state"] == "restart": elif domain_information["state"] in ["restart", "shutdown"]:
vm_state_colour = ansiprint.yellow() vm_state_colour = ansiprint.yellow()
elif domain_information["state"] == "shutdown": elif domain_information["state"] in ["stop", "fail"]:
vm_state_colour = ansiprint.yellow()
elif domain_information["state"] == "stop":
vm_state_colour = ansiprint.red()
elif domain_information["state"] == "fail":
vm_state_colour = ansiprint.red() vm_state_colour = ansiprint.red()
elif domain_information["state"] in ["mirror"]:
vm_state_colour = ansiprint.purple()
else: else:
vm_state_colour = ansiprint.blue() vm_state_colour = ansiprint.blue()