1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Feature #1112: Fix optional cluster argument in onehost create

This commit is contained in:
Carlos Martín 2012-02-29 16:05:46 +01:00
parent 6ee5900bf6
commit c81ed13e6b

View File

@ -63,7 +63,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
command :create, create_desc, :hostname, :im_mad, :vmm_mad,
:vnm_mad, [:clusterid, nil] do
helper.create_resource(options) do |host|
if args[4]
if args.size == 4
host.allocate(args[0], args[1], args[2], args[3])
else
host.allocate(args[0], args[1], args[2], args[3], args[4].to_i)