diff --git a/include/History.h b/include/History.h index b0253c4548..208b6a38fc 100644 --- a/include/History.h +++ b/include/History.h @@ -50,8 +50,8 @@ public: SUSPEND_ACTION, RESUME_ACTION, BOOT_ACTION, - DESTROY_ACTION, - DESTROY_RECREATE_ACTION, + DELETE_ACTION, + DELETE_RECREATE_ACTION, REBOOT_ACTION, REBOOT_HARD_ACTION, RESCHED_ACTION, @@ -102,11 +102,11 @@ public: case BOOT_ACTION: st = "boot"; break; - case DESTROY_ACTION: - st = "destroy"; + case DELETE_ACTION: + st = "delete"; break; - case DESTROY_RECREATE_ACTION: - st = "destroy-recreate"; + case DELETE_RECREATE_ACTION: + st = "delete-recreate"; break; case REBOOT_ACTION: st = "reboot"; @@ -184,13 +184,13 @@ public: { action = BOOT_ACTION; } - else if (st == "destroy") + else if (st == "delete") { - action = DESTROY_ACTION; + action = DELETE_ACTION; } - else if (st == "destroy-recreate") + else if (st == "delete-recreate") { - action = DESTROY_RECREATE_ACTION; + action = DELETE_RECREATE_ACTION; } else if (st == "reboot") { diff --git a/share/doc/states/states-complete.dot b/share/doc/states/states-complete.dot index 62835d80e2..775a63f11b 100644 --- a/share/doc/states/states-complete.dot +++ b/share/doc/states/states-complete.dot @@ -105,11 +105,11 @@ digraph OpenNebula { poweroff -> boot_poweroff [label="resume"]; boot_poweroff -> running [style="dashed"]; -# destroy - ANY -> done [label="destroy"]; +# delete + ANY -> done [label="delete"]; # resubmit - "ANY \\ {suspended,poweroff,done}" -> pending [label="destroy --recreate"]; + "ANY \\ {suspended,poweroff,done}" -> pending [label="delete --recreate"]; # boot boot -> boot [label="boot"]; diff --git a/share/doc/states/states-simple.dot b/share/doc/states/states-simple.dot index 25ba06bf1a..ac9c65ffe1 100644 --- a/share/doc/states/states-simple.dot +++ b/share/doc/states/states-simple.dot @@ -78,7 +78,7 @@ digraph OpenNebula { poweroff -> boot [label="resume"]; # delete - ANY -> done [label="destroy"]; + ANY -> done [label="delete"]; # restart unknown -> boot [label="boot"]; @@ -97,7 +97,7 @@ digraph OpenNebula { snapshot -> running [style="dashed"]; # resubmit - "ANY \\ {suspended,poweroff,done}" -> pending [label="destroy --recreate"]; + "ANY \\ {suspended,poweroff,done}" -> pending [label="delete --recreate"]; # failures and misc. ANY -> failure [style="dotted"]; diff --git a/share/doc/xsd/acct.xsd b/share/doc/xsd/acct.xsd index a34fbebf51..a45c88c420 100644 --- a/share/doc/xsd/acct.xsd +++ b/share/doc/xsd/acct.xsd @@ -52,8 +52,8 @@ SUSPEND_ACTION = 10 RESUME_ACTION = 11 BOOT_ACTION = 12 - DESTROY_ACTION = 13 - DESTROY_RECREATE_ACTION = 14 + DELETE_ACTION = 13 + DELETE_RECREATE_ACTION = 14 REBOOT_ACTION = 15 REBOOT_HARD_ACTION = 16 RESCHED_ACTION = 17 diff --git a/share/doc/xsd/oned.conf b/share/doc/xsd/oned.conf index 2e22dca0bf..f790499cd4 100644 --- a/share/doc/xsd/oned.conf +++ b/share/doc/xsd/oned.conf @@ -449,13 +449,13 @@ HM_MAD = [ #VM_HOOK = [ # name = "on_failure_delete", # on = "FAILED", -# command = "/usr/bin/env onevm destroy", +# command = "/usr/bin/env onevm delete", # arguments = "$ID" ] # #VM_HOOK = [ # name = "on_failure_recreate", # on = "FAILED", -# command = "/usr/bin/env onevm destroy --recreate", +# command = "/usr/bin/env onevm delete --recreate", # arguments = "$ID" ] #------------------------------------------------------------------------------- diff --git a/share/doc/xsd/test.sh b/share/doc/xsd/test.sh index e9bedbd477..f61bb2d152 100755 --- a/share/doc/xsd/test.sh +++ b/share/doc/xsd/test.sh @@ -90,7 +90,7 @@ done sleep 5 onevm migrate --live 0 0 -onevm destroy 1 +onevm delete 1 onevm poweroff 2 sleep 5 diff --git a/share/doc/xsd/vm.xsd b/share/doc/xsd/vm.xsd index 072f194288..9e2e9b9b5d 100644 --- a/share/doc/xsd/vm.xsd +++ b/share/doc/xsd/vm.xsd @@ -144,8 +144,8 @@ SUSPEND_ACTION = 10 RESUME_ACTION = 11 BOOT_ACTION = 12 - DESTROY_ACTION = 13 - DESTROY_RECREATE_ACTION = 14 + DELETE_ACTION = 13 + DELETE_RECREATE_ACTION = 14 REBOOT_ACTION = 15 REBOOT_HARD_ACTION = 16 RESCHED_ACTION = 17 diff --git a/share/etc/oned.conf b/share/etc/oned.conf index 7196bd0e63..28d290f6cc 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -449,13 +449,13 @@ HM_MAD = [ #VM_HOOK = [ # name = "on_failure_delete", # on = "FAILED", -# command = "/usr/bin/env onevm destroy", +# command = "/usr/bin/env onevm delete", # arguments = "$ID" ] # #VM_HOOK = [ # name = "on_failure_recreate", # on = "FAILED", -# command = "/usr/bin/env onevm destroy --recreate", +# command = "/usr/bin/env onevm delete --recreate", # arguments = "$ID" ] #------------------------------------------------------------------------------- diff --git a/share/hooks/host_error.rb b/share/hooks/host_error.rb index 15ee2b4a40..56c753ace6 100755 --- a/share/hooks/host_error.rb +++ b/share/hooks/host_error.rb @@ -51,7 +51,7 @@ if !(host_id=ARGV[0]) end mode = "-r" # By default, recreate VMs -force = "n" # By default, don't recreate/destroy suspended VMs +force = "n" # By default, don't recreate/delete suspended VMs repeat = nil # By default, don't wait fo monitorization cycles" opts = GetoptLong.new( @@ -121,9 +121,9 @@ if vm_ids_array vm.info if mode == "-r" - vm.destroy(true) + vm.delete(true) elsif mode == "-d" - vm.destroy + vm.delete end end end diff --git a/src/cli/onevm b/src/cli/onevm index 02de1522fb..7c1611900a 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -204,7 +204,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do end end - destroy_desc = <<-EOT.unindent + delete_desc = <<-EOT.unindent Deletes the given VM. Using --recreate resubmits the VM. Resubmits the VM to PENDING state. This is intended for VMs stuck in a @@ -214,17 +214,17 @@ cmd=CommandParser::CmdParser.new(ARGV) do States: ANY EOT - command :destroy, destroy_desc, [:range, :vmid_list], + command :delete, delete_desc, [:range, :vmid_list], :options => [OneVMHelper::SCHEDULE, OneVMHelper::RECREATE] do - command_name="destroy" + command_name="delete" command_name<<"-recreate" if options[:recreate] if (!options[:schedule].nil?) helper.schedule_actions(args[0], options, command_name) else helper.perform_actions(args[0],options,"deleted") do |vm| - vm.destroy(options[:recreate]==true) + vm.delete(options[:recreate]==true) end end end @@ -268,7 +268,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do Sets the specified VM disk to be saved in a new Image. The Image is created immediately, but the contents are saved only if the VM is shut down gracefully (i.e., using 'onevm shutdown' and not - 'onevm destroy') + 'onevm delete') If '--live' is specified, the Image will be saved immediately. @@ -783,6 +783,5 @@ cmd=CommandParser::CmdParser.new(ARGV) do deprecated_command(:cancel, 'shutdown --hard') deprecated_command(:reset, 'reboot --hard') deprecated_command(:restart, 'boot') - deprecated_command(:delete, 'destroy') deprecated_command(:resubmit, 'destroy --recreate') end diff --git a/src/lcm/LifeCycleActions.cc b/src/lcm/LifeCycleActions.cc index cba4ff7dab..08ca55afbe 100644 --- a/src/lcm/LifeCycleActions.cc +++ b/src/lcm/LifeCycleActions.cc @@ -844,12 +844,12 @@ void LifeCycleManager::clean_up_vm(VirtualMachine * vm, bool dispose, int& imag if (dispose) { vm->set_state(VirtualMachine::CLEANUP_DELETE); - vm->set_action(History::DESTROY_ACTION); + vm->set_action(History::DELETE_ACTION); } else { vm->set_state(VirtualMachine::CLEANUP_RESUBMIT); - vm->set_action(History::DESTROY_RECREATE_ACTION); + vm->set_action(History::DELETE_RECREATE_ACTION); } vm->set_resched(false); diff --git a/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java b/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java index 6e02efa24e..96679c1a0f 100644 --- a/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java +++ b/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java @@ -506,7 +506,7 @@ public class VirtualMachine extends PoolElement{ *
  • {@link VirtualMachine#stop()}
  • *
  • {@link VirtualMachine#suspend()}
  • *
  • {@link VirtualMachine#resume()}
  • - *
  • {@link VirtualMachine#destroy(boolean)}
  • + *
  • {@link VirtualMachine#delete(boolean)}
  • *
  • {@link VirtualMachine#boot()}
  • *
  • {@link VirtualMachine#poweroff()}
  • *
  • {@link VirtualMachine#resched()}
  • @@ -516,7 +516,7 @@ public class VirtualMachine extends PoolElement{ * * @param action The action name to be performed, can be:
    * "shutdown", "hold", "release", "stop", "shutdown-hard", "suspend", - * "resume", "boot", "destroy", "destroy-recreate", "reboot", "resched", + * "resume", "boot", "delete", "delete-recreate", "reboot", "resched", * "unresched", "reboot-hard", "poweroff", "undeploy", "undeploy-hard" * @return If an error occurs the error message contains the reason. */ @@ -952,9 +952,9 @@ public class VirtualMachine extends PoolElement{ * Deletes the VM from the pool and database. * @return If an error occurs the error message contains the reason. */ - public OneResponse destroy() + public OneResponse delete() { - return destroy(false); + return delete(false); } /** @@ -962,9 +962,9 @@ public class VirtualMachine extends PoolElement{ * @param recreate True to recreate the VM in the pending state. * @return If an error occurs the error message contains the reason. */ - public OneResponse destroy(boolean recreate) + public OneResponse delete(boolean recreate) { - String actionSt = recreate ? "destroy-recreate" : "destroy"; + String actionSt = recreate ? "delete-recreate" : "delete"; return action(actionSt); } @@ -1141,7 +1141,7 @@ public class VirtualMachine extends PoolElement{ * Deletes the VM from the pool and database. * @return If an error occurs the error message contains the reason. * - * @deprecated Replaced by {@link #destroy} + * @deprecated Replaced by {@link #delete} */ @Deprecated public OneResponse finalizeVM() { @@ -1152,7 +1152,7 @@ public class VirtualMachine extends PoolElement{ * Resubmits a VM to PENDING state. * @return If an error occurs the error message contains the reason. * - * @deprecated Replaced by destroy and recreate {@link #destroy(boolean)} + * @deprecated Replaced by delete and recreate {@link #delete(boolean)} */ @Deprecated public OneResponse resubmit() { diff --git a/src/oca/ruby/opennebula/virtual_machine.rb b/src/oca/ruby/opennebula/virtual_machine.rb index 3084a7819a..dbd4d3a399 100644 --- a/src/oca/ruby/opennebula/virtual_machine.rb +++ b/src/oca/ruby/opennebula/virtual_machine.rb @@ -114,8 +114,8 @@ module OpenNebula } HISTORY_ACTION=%w{none migrate live-migrate shutdown shutdown-hard - undeploy undeploy-hard hold release stop suspend resume boot destroy - destroy-recreate reboot reboot-hard resched unresched poweroff + undeploy undeploy-hard hold release stop suspend resume boot delete + delete-recreate reboot reboot-hard resched unresched poweroff poweroff-hard} # Creates a VirtualMachine description with just its identifier @@ -314,17 +314,17 @@ module OpenNebula end # Deletes a VM from the pool - def destroy(recreate=false) + def delete(recreate=false) if recreate - action('destroy-recreate') + action('delete-recreate') else - action('destroy') + action('delete') end end - # @deprecated use {#destroy} instead + # @deprecated use {#delete} instead def finalize(recreate=false) - destroy(recreate) + delete(recreate) end # Forces a re-deployment of a VM in UNKNOWN or BOOT state @@ -334,9 +334,9 @@ module OpenNebula alias_method :restart, :boot - # @deprecated use {#destroy} instead + # @deprecated use {#delete} instead def resubmit - action('destroy-recreate') + action('delete-recreate') end # Sets the re-scheduling flag for the VM diff --git a/src/rm/RequestManagerVirtualMachine.cc b/src/rm/RequestManagerVirtualMachine.cc index 638019728f..f7d8624e9f 100644 --- a/src/rm/RequestManagerVirtualMachine.cc +++ b/src/rm/RequestManagerVirtualMachine.cc @@ -323,11 +323,11 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList, } else if (action_st == "finalize") { - action_st = "destroy"; + action_st = "delete"; } else if (action_st == "resubmit") { - action_st = "destroy-recreate"; + action_st = "delete-recreate"; } else if (action_st == "reset") { @@ -372,10 +372,10 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList, case History::BOOT_ACTION: rc = dm->restart(id); break; - case History::DESTROY_ACTION: + case History::DELETE_ACTION: rc = dm->finalize(id); break; - case History::DESTROY_RECREATE_ACTION: + case History::DELETE_RECREATE_ACTION: rc = dm->resubmit(id); break; case History::REBOOT_ACTION: diff --git a/src/scheduler/src/pool/VirtualMachineXML.cc b/src/scheduler/src/pool/VirtualMachineXML.cc index 6cecc6ad93..4ecd9f601c 100644 --- a/src/scheduler/src/pool/VirtualMachineXML.cc +++ b/src/scheduler/src/pool/VirtualMachineXML.cc @@ -304,8 +304,8 @@ int VirtualMachineXML::parse_action_name(string& action_st) && action_st != "suspend" && action_st != "resume" && action_st != "boot" - && action_st != "destroy" - && action_st != "destroy-recreate" + && action_st != "delete" + && action_st != "delete-recreate" && action_st != "reboot" && action_st != "reboot-hard" && action_st != "poweroff" diff --git a/src/sunstone/public/js/opennebula.js b/src/sunstone/public/js/opennebula.js index 9a6da37b2f..a423b2d701 100644 --- a/src/sunstone/public/js/opennebula.js +++ b/src/sunstone/public/js/opennebula.js @@ -155,8 +155,8 @@ var OpenNebula = { "suspend", "resume", "boot", - "destroy", - "destroy-recreate", + "delete", + "delete-recreate", "reboot", "reboot-hard", "resched", diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 23c49c8869..97240d6393 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -853,13 +853,13 @@ var vm_buttons = { "VM.delete" : { type: "confirm", - text: tr("Destroy"), + text: tr("Delete"), layout: "vmsdelete_buttons", tip: tr("This will delete the selected VMs from the database") }, "VM.resubmit" : { type: "confirm", - text: tr("Destroy") + ' recreate', + text: tr("Delete") + ' recreate', layout: "vmsrepeat_buttons", tip: tr("This will resubmits VMs to PENDING state") }, @@ -1577,7 +1577,7 @@ function printActionsTable(vm_info) \ \ \ - \ + \ \ \ \