1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Feature #3748: Fix shutdown-hard from sunstone, delete deprecated cancel action

This commit is contained in:
Carlos Martín 2015-07-08 18:17:39 +02:00
parent ae86849be6
commit 7f213bc356
5 changed files with 9 additions and 9 deletions

View File

@ -43,7 +43,6 @@ module OpenNebulaJSON
end
rc = case action_hash['perform']
when "cancel" then self.cancel
when "deploy" then self.deploy(action_hash['params'])
when "finalize" then self.finalize
when "hold" then self.hold
@ -61,7 +60,7 @@ module OpenNebulaJSON
when "disk_snapshot_create" then self.disk_snapshot_create(action_hash['params'])
when "disk_snapshot_revert" then self.disk_snapshot_revert(action_hash['params'])
when "disk_snapshot_delete" then self.disk_snapshot_delete(action_hash['params'])
when "shutdown" then self.shutdown
when "shutdown" then self.shutdown(action_hash['params'])
when "reboot" then self.reboot
when "poweroff" then self.poweroff(action_hash['params'])
when "resubmit" then self.resubmit
@ -98,6 +97,10 @@ module OpenNebulaJSON
super(params['hard'])
end
def shutdown(params=Hash.new)
super(params['hard'])
end
def poweroff(params=Hash.new)
super(params['hard'])
end

View File

@ -144,7 +144,7 @@ define(function(require) {
generate_batch_action_params(),
PATH);
},
"cancel" : function(params) {
"shutdown_hard" : function(params) {
OpenNebulaAction.simple_action(params,
RESOURCE,
"shutdown-hard",

View File

@ -329,9 +329,6 @@ define(function(require) {
"stop": function(params) {
OpenNebulaAction.simple_action(params, RESOURCE, "stop");
},
"cancel": function(params) {
OpenNebulaAction.simple_action(params, RESOURCE, "cancel");
},
"suspend": function(params) {
OpenNebulaAction.simple_action(params, RESOURCE, "suspend");
},

View File

@ -240,7 +240,7 @@ define(function(require) {
"Role.shutdown_hard" : {
type: "multiple",
call: OpenNebulaRole.cancel,
call: OpenNebulaRole.shutdown_hard,
callback: roleCallback,
elements: roleElements,
error: Notifier.onError,
@ -413,7 +413,7 @@ define(function(require) {
"RoleVM.shutdown_hard" : {
type: "multiple",
call: OpenNebulaVM.cancel,
call: OpenNebulaVM.shutdown_hard,
callback: roleCallback,
elements: roleVMElements,
error: Notifier.onError,

View File

@ -627,7 +627,7 @@ define(function(require) {
button.attr("disabled", "disabled");
var vm_id = $(".provision_info_vm", context).attr("vm_id");
OpenNebula.VM.cancel({
OpenNebula.VM.shutdown_hard({
data : {
id: vm_id
},