Effort is made to ensure a VM always have a status and Unused VM statuses are removed
This commit is contained in:
parent
befb22b9cb
commit
f3f2f6127a
11 changed files with 86 additions and 77 deletions
16
common/vm.py
16
common/vm.py
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue