gh-41: update state constants in onegate

pull/49/head v5.0.0
Javi Fontan 9 years ago
parent b10446a695
commit 57daf9798c

@ -131,15 +131,71 @@ end
module OneGate
module VirtualMachine
VM_STATE=%w{INIT PENDING HOLD ACTIVE STOPPED SUSPENDED DONE FAILED
POWEROFF UNDEPLOYED}
LCM_STATE=%w{LCM_INIT PROLOG BOOT RUNNING MIGRATE SAVE_STOP SAVE_SUSPEND
SAVE_MIGRATE PROLOG_MIGRATE PROLOG_RESUME EPILOG_STOP EPILOG
SHUTDOWN CANCEL FAILURE CLEANUP_RESUBMIT UNKNOWN HOTPLUG SHUTDOWN_POWEROFF
BOOT_UNKNOWN BOOT_POWEROFF BOOT_SUSPENDED BOOT_STOPPED CLEANUP_DELETE
HOTPLUG_SNAPSHOT HOTPLUG_NIC HOTPLUG_SAVEAS HOTPLUG_SAVEAS_POWEROFF
HOTPLUG_SAVEAS_SUSPENDED SHUTDOWN_UNDEPLOY EPILOG_UNDEPLOY
PROLOG_UNDEPLOY BOOT_UNDEPLOY}
POWEROFF UNDEPLOYED CLONING CLONING_FAILURE}
LCM_STATE=%w{
LCM_INIT
PROLOG
BOOT
RUNNING
MIGRATE
SAVE_STOP
SAVE_SUSPEND
SAVE_MIGRATE
PROLOG_MIGRATE
PROLOG_RESUME
EPILOG_STOP
EPILOG
SHUTDOWN
CANCEL
FAILURE
CLEANUP_RESUBMIT
UNKNOWN
HOTPLUG
SHUTDOWN_POWEROFF
BOOT_UNKNOWN
BOOT_POWEROFF
BOOT_SUSPENDED
BOOT_STOPPED
CLEANUP_DELETE
HOTPLUG_SNAPSHOT
HOTPLUG_NIC
HOTPLUG_SAVEAS
HOTPLUG_SAVEAS_POWEROFF
HOTPLUG_SAVEAS_SUSPENDED
SHUTDOWN_UNDEPLOY
EPILOG_UNDEPLOY
PROLOG_UNDEPLOY
BOOT_UNDEPLOY
HOTPLUG_PROLOG_POWEROFF
HOTPLUG_EPILOG_POWEROFF
BOOT_MIGRATE
BOOT_FAILURE
BOOT_MIGRATE_FAILURE
PROLOG_MIGRATE_FAILURE
PROLOG_FAILURE
EPILOG_FAILURE
EPILOG_STOP_FAILURE
EPILOG_UNDEPLOY_FAILURE
PROLOG_MIGRATE_POWEROFF
PROLOG_MIGRATE_POWEROFF_FAILURE
PROLOG_MIGRATE_SUSPEND
PROLOG_MIGRATE_SUSPEND_FAILURE
BOOT_UNDEPLOY_FAILURE
BOOT_STOPPED_FAILURE
PROLOG_RESUME_FAILURE
PROLOG_UNDEPLOY_FAILURE
DISK_SNAPSHOT_POWEROFF
DISK_SNAPSHOT_REVERT_POWEROFF
DISK_SNAPSHOT_DELETE_POWEROFF
DISK_SNAPSHOT_SUSPENDED
DISK_SNAPSHOT_REVERT_SUSPENDED
DISK_SNAPSHOT_DELETE_SUSPENDED
DISK_SNAPSHOT
DISK_SNAPSHOT_DELETE
PROLOG_MIGRATE_UNKNOWN
PROLOG_MIGRATE_UNKNOWN_FAILURE
}
SHORT_VM_STATES={
"INIT" => "init",
@ -151,7 +207,9 @@ module OneGate
"DONE" => "done",
"FAILED" => "fail",
"POWEROFF" => "poff",
"UNDEPLOYED"=> "unde"
"UNDEPLOYED" => "unde",
"CLONING" => "clon",
"CLONING_FAILURE" => "fail"
}
SHORT_LCM_STATES={
@ -186,7 +244,35 @@ module OneGate
"SHUTDOWN_UNDEPLOY" => "shut",
"EPILOG_UNDEPLOY" => "epil",
"PROLOG_UNDEPLOY" => "prol",
"BOOT_UNDEPLOY" => "boot"
"BOOT_UNDEPLOY" => "boot",
"HOTPLUG_PROLOG_POWEROFF" => "hotp",
"HOTPLUG_EPILOG_POWEROFF" => "hotp",
"BOOT_MIGRATE" => "boot",
"BOOT_FAILURE" => "fail",
"BOOT_MIGRATE_FAILURE" => "fail",
"PROLOG_MIGRATE_FAILURE" => "fail",
"PROLOG_FAILURE" => "fail",
"EPILOG_FAILURE" => "fail",
"EPILOG_STOP_FAILURE" => "fail",
"EPILOG_UNDEPLOY_FAILURE" => "fail",
"PROLOG_MIGRATE_POWEROFF" => "migr",
"PROLOG_MIGRATE_POWEROFF_FAILURE" => "fail",
"PROLOG_MIGRATE_SUSPEND" => "migr",
"PROLOG_MIGRATE_SUSPEND_FAILURE" => "fail",
"BOOT_UNDEPLOY_FAILURE" => "fail",
"BOOT_STOPPED_FAILURE" => "fail",
"PROLOG_RESUME_FAILURE" => "fail",
"PROLOG_UNDEPLOY_FAILURE" => "fail",
"DISK_SNAPSHOT_POWEROFF" => "snap",
"DISK_SNAPSHOT_REVERT_POWEROFF" => "snap",
"DISK_SNAPSHOT_DELETE_POWEROFF" => "snap",
"DISK_SNAPSHOT_SUSPENDED" => "snap",
"DISK_SNAPSHOT_REVERT_SUSPENDED"=> "snap",
"DISK_SNAPSHOT_DELETE_SUSPENDED"=> "snap",
"DISK_SNAPSHOT" => "snap",
"DISK_SNAPSHOT_DELETE" => "snap",
"PROLOG_MIGRATE_UNKNOWN" => "migr",
"PROLOG_MIGRATE_UNKNOWN_FAILURE" => "fail"
}
def self.state_to_str(id, lcm_id)

Loading…
Cancel
Save