mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
Feature #3654: Remove boot action from oca, cli & sunstone
This commit is contained in:
parent
aab0fe213f
commit
f919242634
@ -125,27 +125,16 @@ digraph OpenNebula {
|
||||
poweroff -> boot_poweroff [label="resume"];
|
||||
boot_poweroff -> running [style="dashed", color="blue"];
|
||||
|
||||
unknown -> boot_unknown [label="resume"];
|
||||
boot_unknown -> running [style="dashed", color="blue"];
|
||||
|
||||
|
||||
# delete
|
||||
ANY -> done [label="delete"];
|
||||
|
||||
# resubmit
|
||||
"ANY \\ {suspended,poweroff,done}" -> pending [label="delete --recreate"];
|
||||
|
||||
# boot
|
||||
boot -> boot [label="boot"];
|
||||
boot_suspended -> boot_suspended [label="boot"];
|
||||
boot_stopped -> boot_stopped [label="boot"];
|
||||
boot_poweroff -> boot_poweroff [label="boot"];
|
||||
boot_undeploy -> boot_undeploy [label="boot"];
|
||||
boot_migrate -> boot_migrate [label="boot"];
|
||||
|
||||
unknown -> boot_unknown [label="boot"];
|
||||
boot_unknown -> boot_unknown [label="boot"];
|
||||
boot_unknown -> running [style="dashed", color="blue"];
|
||||
|
||||
boot_failure -> boot [label="recover"];
|
||||
boot_migrate_failure -> boot_migrate [label="recover"];
|
||||
|
||||
# reboot
|
||||
running -> running [label="reboot"];
|
||||
|
||||
@ -184,6 +173,9 @@ digraph OpenNebula {
|
||||
suspended -> suspended [label="disk-snapshot-cancel"]
|
||||
|
||||
# failures and misc.
|
||||
boot_failure -> boot [label="recover"];
|
||||
boot_migrate_failure -> boot_migrate [label="recover"];
|
||||
|
||||
epilog_stop -> epilog_stop_failure [label=" ", style="dotted", color="red"];
|
||||
epilog_stop_failure -> epilog_stop [label="recover"];
|
||||
|
||||
|
@ -475,23 +475,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
end
|
||||
end
|
||||
|
||||
boot_desc = <<-EOT.unindent
|
||||
Boots the given VM.
|
||||
|
||||
States: UNKNOWN, BOOT
|
||||
EOT
|
||||
|
||||
command :boot, boot_desc, [:range,:vmid_list],
|
||||
:options => [OneVMHelper::SCHEDULE] do
|
||||
if (!options[:schedule].nil?)
|
||||
helper.schedule_actions(args[0], options, @comm_name)
|
||||
else
|
||||
helper.perform_actions(args[0],options,"booting") do |vm|
|
||||
vm.boot
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
stop_desc = <<-EOT.unindent
|
||||
Stops a running VM. The VM state is saved and transferred back to the
|
||||
front-end along with the disk files
|
||||
@ -533,7 +516,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
resume_desc = <<-EOT.unindent
|
||||
Resumes the execution of the a saved VM
|
||||
|
||||
States: STOPPED, SUSPENDED, UNDEPLOYED, POWEROFF
|
||||
States: STOPPED, SUSPENDED, UNDEPLOYED, POWEROFF, UNKNOWN
|
||||
EOT
|
||||
|
||||
command :resume, resume_desc, [:range,:vmid_list],
|
||||
@ -865,6 +848,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
deprecated_command(:livemigrate, 'migrate --live')
|
||||
deprecated_command(:cancel, 'shutdown --hard')
|
||||
deprecated_command(:reset, 'reboot --hard')
|
||||
deprecated_command(:restart, 'boot')
|
||||
deprecated_command(:restart, 'recover --retry')
|
||||
deprecated_command(:boot, 'recover --retry')
|
||||
deprecated_command(:resubmit, 'delete --recreate')
|
||||
end
|
||||
|
@ -560,7 +560,6 @@ public class VirtualMachine extends PoolElement{
|
||||
* <li>{@link VirtualMachine#suspend()}</li>
|
||||
* <li>{@link VirtualMachine#resume()}</li>
|
||||
* <li>{@link VirtualMachine#delete(boolean)}</li>
|
||||
* <li>{@link VirtualMachine#boot()}</li>
|
||||
* <li>{@link VirtualMachine#poweroff()}</li>
|
||||
* <li>{@link VirtualMachine#resched()}</li>
|
||||
* <li>{@link VirtualMachine#unresched()}</li>
|
||||
@ -569,7 +568,7 @@ public class VirtualMachine extends PoolElement{
|
||||
*
|
||||
* @param action The action name to be performed, can be:<br/>
|
||||
* "shutdown", "hold", "release", "stop", "shutdown-hard", "suspend",
|
||||
* "resume", "boot", "delete", "delete-recreate", "reboot", "resched",
|
||||
* "resume", "delete", "delete-recreate", "reboot", "resched",
|
||||
* "unresched", "reboot-hard", "poweroff", "undeploy", "undeploy-hard"
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
@ -1048,15 +1047,6 @@ public class VirtualMachine extends PoolElement{
|
||||
return action(actionSt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces a re-deployment of a VM in UNKNOWN or BOOT states.
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse boot()
|
||||
{
|
||||
return action("boot");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the re-scheduling flag for the VM
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
@ -1238,17 +1228,6 @@ public class VirtualMachine extends PoolElement{
|
||||
return action("resubmit");
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces a re-deployment of a VM in UNKNOWN or BOOT states.
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*
|
||||
* @deprecated Replaced by {@link #boot}
|
||||
*/
|
||||
@Deprecated public OneResponse restart()
|
||||
{
|
||||
return action("restart");
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a live migration of the virtual machine to the
|
||||
* target host (hid).
|
||||
|
@ -403,13 +403,6 @@ module OpenNebula
|
||||
delete(recreate)
|
||||
end
|
||||
|
||||
# Forces a re-deployment of a VM in UNKNOWN or BOOT state
|
||||
def boot
|
||||
action('boot')
|
||||
end
|
||||
|
||||
alias_method :restart, :boot
|
||||
|
||||
# @deprecated use {#delete} instead
|
||||
def resubmit
|
||||
action('delete-recreate')
|
||||
|
@ -436,7 +436,6 @@ int VirtualMachineXML::parse_action_name(string& action_st)
|
||||
&& action_st != "stop"
|
||||
&& action_st != "suspend"
|
||||
&& action_st != "resume"
|
||||
&& action_st != "boot"
|
||||
&& action_st != "delete"
|
||||
&& action_st != "delete-recreate"
|
||||
&& action_st != "reboot"
|
||||
|
@ -177,7 +177,6 @@ tabs:
|
||||
VM.resume: true
|
||||
VM.stop: true
|
||||
VM.recover: true
|
||||
VM.boot: true
|
||||
VM.reboot: true
|
||||
VM.reboot_hard: true
|
||||
VM.poweroff: true
|
||||
|
@ -177,7 +177,6 @@ tabs:
|
||||
VM.resume: true
|
||||
VM.stop: true
|
||||
VM.recover: true
|
||||
VM.boot: true
|
||||
VM.reboot: true
|
||||
VM.reboot_hard: true
|
||||
VM.poweroff: true
|
||||
|
@ -178,7 +178,6 @@ tabs:
|
||||
VM.resume: true
|
||||
VM.stop: true
|
||||
VM.recover: false
|
||||
VM.boot: true
|
||||
VM.reboot: true
|
||||
VM.reboot_hard: true
|
||||
VM.poweroff: true
|
||||
|
@ -53,7 +53,6 @@ module OpenNebulaJSON
|
||||
when "release" then self.release
|
||||
when "stop" then self.stop
|
||||
when "suspend" then self.suspend
|
||||
when "restart" then self.restart
|
||||
when "reset" then self.reset
|
||||
when "saveas" then self.save_as(action_hash['params'])
|
||||
when "disk_snapshot_cancel" then self.disk_snapshot_cancel(action_hash['params'])
|
||||
|
@ -1066,9 +1066,6 @@ var OpenNebula = {
|
||||
"resume": function(params){
|
||||
OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"resume");
|
||||
},
|
||||
"restart": function(params){
|
||||
OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"restart");
|
||||
},
|
||||
"resubmit": function(params){
|
||||
OpenNebula.Action.simple_action(params,OpenNebula.VM.resource,"resubmit");
|
||||
},
|
||||
|
@ -83,7 +83,7 @@ var lcm_state_actions = {
|
||||
1: //OpenNebula.VM.lcm_state.PROLOG:
|
||||
[],
|
||||
2: //OpenNebula.VM.lcm_state.BOOT:
|
||||
["VM.boot"],
|
||||
[],
|
||||
3: //OpenNebula.VM.lcm_state.RUNNING:
|
||||
["VM.shutdown", "VM.shutdown_hard", "VM.stop", "VM.suspend", "VM.reboot", "VM.reboot_hard", "VM.resched", "VM.unresched", "VM.poweroff", "VM.poweroff_hard", "VM.undeploy", "VM.undeploy_hard", "VM.migrate", "VM.migrate_live", "VM.attachdisk", "VM.detachdisk", "VM.attachnic", "VM.detachnic", "VM.saveas", "VM.disk_snapshot_cancel"],
|
||||
4: //OpenNebula.VM.lcm_state.MIGRATE:
|
||||
@ -111,19 +111,19 @@ var lcm_state_actions = {
|
||||
15: //OpenNebula.VM.lcm_state.CLEANUP_RESUBMIT:
|
||||
[],
|
||||
16: //OpenNebula.VM.lcm_state.UNKNOWN:
|
||||
["VM.shutdown", "VM.shutdown_hard", "VM.boot", "VM.resched", "VM.unresched", "VM.poweroff", "VM.poweroff_hard", "VM.undeploy", "VM.undeploy_hard", "VM.migrate", "VM.migrate_live", "VM.disk_snapshot_cancel"],
|
||||
["VM.shutdown", "VM.shutdown_hard", "VM.resched", "VM.unresched", "VM.poweroff", "VM.poweroff_hard", "VM.undeploy", "VM.undeploy_hard", "VM.migrate", "VM.migrate_live", "VM.disk_snapshot_cancel", "VM.resume"],
|
||||
17: //OpenNebula.VM.lcm_state.HOTPLUG:
|
||||
[],
|
||||
18: //OpenNebula.VM.lcm_state.SHUTDOWN_POWEROFF:
|
||||
[],
|
||||
19: //OpenNebula.VM.lcm_state.BOOT_UNKNOWN:
|
||||
["VM.boot"],
|
||||
[],
|
||||
20: //OpenNebula.VM.lcm_state.BOOT_POWEROFF:
|
||||
["VM.boot"],
|
||||
[],
|
||||
21: //OpenNebula.VM.lcm_state.BOOT_SUSPENDED:
|
||||
["VM.boot"],
|
||||
[],
|
||||
22: //OpenNebula.VM.lcm_state.BOOT_STOPPED:
|
||||
["VM.boot"],
|
||||
[],
|
||||
23: //OpenNebula.VM.lcm_state.CLEANUP_DELETE:
|
||||
[],
|
||||
24: //OpenNebula.VM.lcm_state.HOTPLUG_SNAPSHOT:
|
||||
@ -143,13 +143,13 @@ var lcm_state_actions = {
|
||||
31: //OpenNebula.VM.lcm_state.PROLOG_UNDEPLOY:
|
||||
[],
|
||||
32: //OpenNebula.VM.lcm_state.BOOT_UNDEPLOY:
|
||||
["VM.boot"],
|
||||
[],
|
||||
33: //OpenNebula.VM.lcm_state.HOTPLUG_PROLOG_POWEROFF:
|
||||
[],
|
||||
34: //OpenNebula.VM.lcm_state.HOTPLUG_EPILOG_POWEROFF:
|
||||
[],
|
||||
35: //OpenNebula.VM.lcm_state.BOOT_MIGRATE:
|
||||
["VM.boot"],
|
||||
[],
|
||||
36: //OpenNebula.VM.lcm_state.BOOT_FAILURE:
|
||||
[],
|
||||
37: //OpenNebula.VM.lcm_state.BOOT_MIGRATE_FAILURE:
|
||||
@ -471,15 +471,6 @@ var vm_actions = {
|
||||
notify: true
|
||||
},
|
||||
|
||||
"VM.boot" : {
|
||||
type: "multiple",
|
||||
call: OpenNebula.VM.restart,
|
||||
callback: vmShow,
|
||||
elements: vmElements,
|
||||
error: onError,
|
||||
notify: true
|
||||
},
|
||||
|
||||
"VM.reboot_hard" : {
|
||||
type: "multiple",
|
||||
call: OpenNebula.VM.reset,
|
||||
@ -970,13 +961,6 @@ var vm_buttons = {
|
||||
tip: tr("This will stop selected VMs"),
|
||||
custom_classes : "state-dependent"
|
||||
},
|
||||
"VM.boot" : {
|
||||
type: "action",
|
||||
text: tr("Boot"),
|
||||
layout: "vmsplanification_buttons",
|
||||
tip: tr("This will force the hypervisor boot action of VMs stuck in UNKNOWN or BOOT state"),
|
||||
custom_classes : "state-dependent"
|
||||
},
|
||||
"VM.reboot" : {
|
||||
type: "action",
|
||||
text: tr("Reboot"),
|
||||
@ -1750,7 +1734,6 @@ function printActionsTable(vm_info)
|
||||
<option value="stop">' + tr("stop") + '</option>\
|
||||
<option value="suspend">' + tr("suspend") + '</option>\
|
||||
<option value="resume">' + tr("resume") + '</option>\
|
||||
<option value="boot">' + tr("boot") + '</option>\
|
||||
<option value="delete">' + tr("delete") + '</option>\
|
||||
<option value="delete-recreate">' + tr("delete-recreate") + '</option>\
|
||||
<option value="reboot">' + tr("reboot") + '</option>\
|
||||
|
Loading…
Reference in New Issue
Block a user