Revision 728d0435 src/cli/onevm
src/cli/onevm | ||
---|---|---|
319 | 319 |
end |
320 | 320 |
end |
321 | 321 |
|
322 |
shutdown_save_desc = <<-EOT.unindent
|
|
322 |
undeploy_desc = <<-EOT.unindent
|
|
323 | 323 |
Shuts down the given VM. The VM is saved in the system Datastore. |
324 | 324 |
|
325 | 325 |
With --hard it unplugs the VM. |
... | ... | |
327 | 327 |
States: RUNNING |
328 | 328 |
EOT |
329 | 329 |
|
330 |
command :"shutdown-save", shutdown_save_desc, [:range,:vmid_list],
|
|
330 |
command :undeploy, undeploy_desc, [:range,:vmid_list],
|
|
331 | 331 |
:options => [OneVMHelper::SCHEDULE, OneVMHelper::HARD] do |
332 | 332 |
|
333 |
command_name='shutdown-save'
|
|
333 |
command_name='undeploy'
|
|
334 | 334 |
command_name<<'-hard' if options[:hard] |
335 | 335 |
|
336 | 336 |
if (!options[:schedule].nil?) |
337 | 337 |
helper.schedule_actions(args[0], options, command_name) |
338 | 338 |
else |
339 | 339 |
helper.perform_actions(args[0],options,"shutting down") do |vm| |
340 |
vm.shutdown_save(options[:hard]==true)
|
|
340 |
vm.undeploy(options[:hard]==true)
|
|
341 | 341 |
end |
342 | 342 |
end |
343 | 343 |
end |
Also available in: Unified diff