mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
F #4393: Add Resize states to Sunstone and OneGate
This commit is contained in:
parent
1811827c5d
commit
04d01697e1
@ -201,6 +201,9 @@ module OneGate
|
|||||||
DISK_SNAPSHOT_DELETE
|
DISK_SNAPSHOT_DELETE
|
||||||
PROLOG_MIGRATE_UNKNOWN
|
PROLOG_MIGRATE_UNKNOWN
|
||||||
PROLOG_MIGRATE_UNKNOWN_FAILURE
|
PROLOG_MIGRATE_UNKNOWN_FAILURE
|
||||||
|
DISK_RESIZE
|
||||||
|
DISK_RESIZE_POWEROFF
|
||||||
|
DISK_RESIZE_UNDEPLOYED
|
||||||
}
|
}
|
||||||
|
|
||||||
SHORT_VM_STATES={
|
SHORT_VM_STATES={
|
||||||
@ -278,7 +281,10 @@ module OneGate
|
|||||||
"DISK_SNAPSHOT" => "snap",
|
"DISK_SNAPSHOT" => "snap",
|
||||||
"DISK_SNAPSHOT_DELETE" => "snap",
|
"DISK_SNAPSHOT_DELETE" => "snap",
|
||||||
"PROLOG_MIGRATE_UNKNOWN" => "migr",
|
"PROLOG_MIGRATE_UNKNOWN" => "migr",
|
||||||
"PROLOG_MIGRATE_UNKNOWN_FAILURE" => "fail"
|
"PROLOG_MIGRATE_UNKNOWN_FAILURE" => "fail",
|
||||||
|
"DISK_RESIZE" => "drsz",
|
||||||
|
"DISK_RESIZE_POWEROFF" => "drsz",
|
||||||
|
"DISK_RESIZE_UNDEPLOYED" => "drsz"
|
||||||
}
|
}
|
||||||
|
|
||||||
def self.state_to_str(id, lcm_id)
|
def self.state_to_str(id, lcm_id)
|
||||||
|
@ -61,7 +61,7 @@ VNC_STATES = [
|
|||||||
"26", #HOTPLUG_SAVEAS
|
"26", #HOTPLUG_SAVEAS
|
||||||
"27", #HOTPLUG_SAVEAS_POWEROFF
|
"27", #HOTPLUG_SAVEAS_POWEROFF
|
||||||
"28", #HOTPLUG_SAVEAS_SUSPENDED
|
"28", #HOTPLUG_SAVEAS_SUSPENDED
|
||||||
"29" #SHUTDOWN_UNDEPLOY
|
"29", #SHUTDOWN_UNDEPLOY
|
||||||
#30, #EPILOG_UNDEPLOY
|
#30, #EPILOG_UNDEPLOY
|
||||||
#31, #PROLOG_UNDEPLOY
|
#31, #PROLOG_UNDEPLOY
|
||||||
#32, #BOOT_UNDEPLOY
|
#32, #BOOT_UNDEPLOY
|
||||||
@ -89,11 +89,14 @@ VNC_STATES = [
|
|||||||
#54, #DISK_SNAPSHOT_SUSPENDED
|
#54, #DISK_SNAPSHOT_SUSPENDED
|
||||||
#55, #DISK_SNAPSHOT_REVERT_SUSPENDED
|
#55, #DISK_SNAPSHOT_REVERT_SUSPENDED
|
||||||
#56, #DISK_SNAPSHOT_DELETE_SUSPENDED
|
#56, #DISK_SNAPSHOT_DELETE_SUSPENDED
|
||||||
#57, #DISK_SNAPSHOT
|
"57", #DISK_SNAPSHOT
|
||||||
#58, #DISK_SNAPSHOT_REVERT
|
"58", #DISK_SNAPSHOT_REVERT
|
||||||
#59, #DISK_SNAPSHOT_DELETE
|
#59, #DISK_SNAPSHOT_DELETE
|
||||||
#60, #PROLOG_MIGRATE_UNKNOWN
|
#60, #PROLOG_MIGRATE_UNKNOWN
|
||||||
#61 #PROLOG_MIGRATE_UNKNOWN_FAILURE
|
#61, #PROLOG_MIGRATE_UNKNOWN_FAILURE
|
||||||
|
"62" #DISK_RESIZE
|
||||||
|
#63, #DISK_RESIZE_POWEROFF
|
||||||
|
#64 #DISK_RESIZE_UNDEPLOYED
|
||||||
]
|
]
|
||||||
|
|
||||||
class OpenNebulaVNC
|
class OpenNebulaVNC
|
||||||
|
@ -118,6 +118,9 @@ define(function(require) {
|
|||||||
"DISK_SNAPSHOT_DELETE",
|
"DISK_SNAPSHOT_DELETE",
|
||||||
"PROLOG_MIGRATE_UNKNOWN",
|
"PROLOG_MIGRATE_UNKNOWN",
|
||||||
"PROLOG_MIGRATE_UNKNOWN_FAILURE",
|
"PROLOG_MIGRATE_UNKNOWN_FAILURE",
|
||||||
|
"DISK_RESIZE",
|
||||||
|
"DISK_RESIZE_POWEROFF",
|
||||||
|
"DISK_RESIZE_UNDEPLOYED"
|
||||||
];
|
];
|
||||||
|
|
||||||
var LCM_STATES = {
|
var LCM_STATES = {
|
||||||
@ -182,7 +185,10 @@ define(function(require) {
|
|||||||
//DISK_SNAPSHOT_REVERT : 58,
|
//DISK_SNAPSHOT_REVERT : 58,
|
||||||
DISK_SNAPSHOT_DELETE : 59,
|
DISK_SNAPSHOT_DELETE : 59,
|
||||||
PROLOG_MIGRATE_UNKNOWN : 60,
|
PROLOG_MIGRATE_UNKNOWN : 60,
|
||||||
PROLOG_MIGRATE_UNKNOWN_FAILURE : 61
|
PROLOG_MIGRATE_UNKNOWN_FAILURE : 61,
|
||||||
|
DISK_RESIZE : 62,
|
||||||
|
DISK_RESIZE_POWEROFF : 63,
|
||||||
|
DISK_RESIZE_UNDEPLOYED : 64
|
||||||
};
|
};
|
||||||
|
|
||||||
var SHORT_LCM_STATES_STR = [
|
var SHORT_LCM_STATES_STR = [
|
||||||
@ -248,6 +254,9 @@ define(function(require) {
|
|||||||
Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_DELETE
|
Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_DELETE
|
||||||
Locale.tr("MIGRATE"), // PROLOG_MIGRATE_UNKNOWN
|
Locale.tr("MIGRATE"), // PROLOG_MIGRATE_UNKNOWN
|
||||||
Locale.tr("FAILURE"), // PROLOG_MIGRATE_UNKNOWN_FAILURE
|
Locale.tr("FAILURE"), // PROLOG_MIGRATE_UNKNOWN_FAILURE
|
||||||
|
Locale.tr("DISK_RSZ"), // DISK_RESIZE
|
||||||
|
Locale.tr("DISK_RSZ"), // DISK_RESIZE_POWEROFF
|
||||||
|
Locale.tr("DISK_RSZ") // DISK_RESIZE_UNDEPLOYED
|
||||||
];
|
];
|
||||||
|
|
||||||
var VNC_STATES = [
|
var VNC_STATES = [
|
||||||
@ -263,7 +272,10 @@ define(function(require) {
|
|||||||
LCM_STATES.HOTPLUG_SAVEAS,
|
LCM_STATES.HOTPLUG_SAVEAS,
|
||||||
LCM_STATES.HOTPLUG_SAVEAS_POWEROFF,
|
LCM_STATES.HOTPLUG_SAVEAS_POWEROFF,
|
||||||
LCM_STATES.HOTPLUG_SAVEAS_SUSPENDED,
|
LCM_STATES.HOTPLUG_SAVEAS_SUSPENDED,
|
||||||
LCM_STATES.SHUTDOWN_UNDEPLOY
|
LCM_STATES.SHUTDOWN_UNDEPLOY,
|
||||||
|
LCM_STATES.DISK_SNAPSHOT,
|
||||||
|
LCM_STATES.DISK_SNAPSHOT_REVERT,
|
||||||
|
LCM_STATES.DISK_RESIZE
|
||||||
];
|
];
|
||||||
|
|
||||||
var EXTERNAL_IP_ATTRS = [
|
var EXTERNAL_IP_ATTRS = [
|
||||||
@ -331,7 +343,8 @@ define(function(require) {
|
|||||||
"snap-create", // DISK_SNAPSHOT_CREATE_ACTION = 25
|
"snap-create", // DISK_SNAPSHOT_CREATE_ACTION = 25
|
||||||
"snap-delete", // DISK_SNAPSHOT_DELETE_ACTION = 26
|
"snap-delete", // DISK_SNAPSHOT_DELETE_ACTION = 26
|
||||||
"terminate", // TERMINATE_ACTION = 27
|
"terminate", // TERMINATE_ACTION = 27
|
||||||
"terminate-hard" // TERMINATE_HARD_ACTION = 28
|
"terminate-hard", // TERMINATE_HARD_ACTION = 28
|
||||||
|
"disk-resize" // DISK_RESIZE_ACTION = 29
|
||||||
];
|
];
|
||||||
|
|
||||||
var VM = {
|
var VM = {
|
||||||
|
@ -839,6 +839,9 @@ define(function(require) {
|
|||||||
case OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_POWEROFF:
|
case OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_POWEROFF:
|
||||||
case OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_SUSPEND:
|
case OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_SUSPEND:
|
||||||
case OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_UNKNOWN:
|
case OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_UNKNOWN:
|
||||||
|
case OpenNebulaVM.LCM_STATES.DISK_RESIZE:
|
||||||
|
case OpenNebulaVM.LCM_STATES.DISK_RESIZE_POWEROFF:
|
||||||
|
case OpenNebulaVM.LCM_STATES.DISK_RESIZE_UNDEPLOYED:
|
||||||
state_color = 'running';
|
state_color = 'running';
|
||||||
state_str = Locale.tr("RUNNING");
|
state_str = Locale.tr("RUNNING");
|
||||||
break;
|
break;
|
||||||
|
@ -120,6 +120,9 @@ define(function(require) {
|
|||||||
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.DISK_SNAPSHOT_DELETE ] = [];
|
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.DISK_SNAPSHOT_DELETE ] = [];
|
||||||
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_UNKNOWN ] = [];
|
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_UNKNOWN ] = [];
|
||||||
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE ] = [];
|
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE ] = [];
|
||||||
|
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.DISK_RESIZE ] = [];
|
||||||
|
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.DISK_RESIZE_POWEROFF ] = [];
|
||||||
|
LCM_STATE_ACTIONS[ OpenNebulaVM.LCM_STATES.DISK_RESIZE_UNDEPLOYED ] = [];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'disableAllStateActions': disableAllStateActions,
|
'disableAllStateActions': disableAllStateActions,
|
||||||
|
Loading…
Reference in New Issue
Block a user