mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Fix for wrong onegroup behaviour
This commit is contained in:
1 parent
5ca3a0f7d4
commit
972ba67a8a
1 file changed
+7
-2
+7
-2
@@ -92,7 +92,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
|
||||
EOT
|
||||
|
||||
command :create, create_desc, [:file, :group_name], :options =>
|
||||
command :create, create_desc, [:file, :group_name, nil], :options =>
|
||||
OpenNebulaHelper::GROUP_OPTIONS do
|
||||
|
||||
if args[0] && !options.empty?
|
||||
@@ -101,6 +101,11 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
next -1
|
||||
end
|
||||
|
||||
if !args[0] && options.empty?
|
||||
STDERR.puts "Please use either a template, just a group name or command arguments"
|
||||
next -1
|
||||
end
|
||||
|
||||
if options && options[:admin_user]
|
||||
if !options[:admin_passwd]
|
||||
STDERR.puts "Admin user needs password"
|
||||
@@ -116,7 +121,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
|
||||
options[:user] = admin_user
|
||||
end
|
||||
|
||||
if File.exists?(args[0])
|
||||
if args[0] && File.exists?(args[0])
|
||||
hashed_template = helper.parse_template(File.open(args[0]).read)
|
||||
helper.create_complete_resource(hashed_template)
|
||||
elsif !options.empty?
|
||||
|
||||
Reference in new issue
Block a user