mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #1797: cli and ruby oca restart -> boot
This commit is contained in:
parent
28dae143b5
commit
9dd1baacee
@ -398,19 +398,19 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
end
|
||||
end
|
||||
|
||||
restart_desc = <<-EOT.unindent
|
||||
boot_desc = <<-EOT.unindent
|
||||
Boots the given VM.
|
||||
|
||||
States: UNKNOWN, BOOT, POWEROFF
|
||||
EOT
|
||||
|
||||
command :restart, restart_desc, [:range,:vmid_list],
|
||||
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,"restarting") do |vm|
|
||||
vm.restart
|
||||
helper.perform_actions(args[0],options,"booting") do |vm|
|
||||
vm.boot
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -293,10 +293,12 @@ module OpenNebula
|
||||
end
|
||||
|
||||
# Forces a re-deployment of a VM in UNKNOWN or BOOT state
|
||||
def restart
|
||||
action('restart')
|
||||
def boot
|
||||
action('boot')
|
||||
end
|
||||
|
||||
alias_method :restart, :boot
|
||||
|
||||
# Resubmits a VM to PENDING state
|
||||
def resubmit
|
||||
action('resubmit')
|
||||
|
Loading…
x
Reference in New Issue
Block a user