Effort is made to ensure a VM always have a status and Unused VM statuses are removed

This commit is contained in:
ahmadbilalkhalid 2019-11-27 12:12:29 +05:00
commit f3f2f6127a
11 changed files with 86 additions and 77 deletions

View file

@ -6,25 +6,9 @@ from .classes import SpecificEtcdEntryBase
class VMStatus:
# Must be only assigned to brand new VM
requested_new = "REQUESTED_NEW"
# Only Assigned to already created vm
requested_start = "REQUESTED_START"
# These all are for running vms
requested_shutdown = "REQUESTED_SHUTDOWN"
requested_migrate = "REQUESTED_MIGRATE"
requested_delete = "REQUESTED_DELETE"
# either its image is not found or user requested
# to delete it
deleted = "DELETED"
stopped = "STOPPED" # After requested_shutdown
killed = "KILLED" # either host died or vm died itself
running = "RUNNING"
error = "ERROR" # An error occurred that cannot be resolved automatically