mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
Feature #1103: Add hold param to ruby & java oca, and cli.
onetemplate instantiate needs to be done also
This commit is contained in:
1 parent
cec1f87689
commit
8d8da16758
4 files changed
+33
-6
No files matched your search
+5
-2
@@ -125,7 +125,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
EOT
|
||||
|
||||
command :create, create_desc, [:file, nil], :options =>
|
||||
[OneVMHelper::MULTIPLE]+OpenNebulaHelper::TEMPLATE_OPTIONS_VM do
|
||||
[OneVMHelper::MULTIPLE, OneVMHelper::HOLD]+
|
||||
OpenNebulaHelper::TEMPLATE_OPTIONS_VM do
|
||||
|
||||
number = options[:multiple] || 1
|
||||
exit_code = nil
|
||||
@@ -160,9 +161,11 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
exit 0
|
||||
end
|
||||
|
||||
on_hold = options[:hold] != nil
|
||||
|
||||
number.times do
|
||||
exit_code = helper.create_resource(options) do |vm|
|
||||
error = vm.allocate(template)
|
||||
error = vm.allocate(template, on_hold)
|
||||
end
|
||||
|
||||
break if exit_code == -1
|
||||
|
||||
Reference in new issue
Block a user