1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-30 22:50:10 +03:00

Feature #3471: Change the onedvc create command to accept a name

This commit is contained in:
Carlos Martín 2015-01-23 17:21:22 +01:00
parent 09a7409303
commit f80025329d

View File

@ -117,15 +117,10 @@ cmd=CommandParser::CmdParser.new(ARGV) do
Creates a new VDC
EOT
command :create, create_desc, :file do
command :create, create_desc, :name do
helper.create_resource(options) do |vdc|
begin
template = File.read(args[0])
vdc.allocate(template)
rescue => e
STDERR.puts e.message
exit -1
end
template = "NAME = \"#{args[0]}\""
vdc.allocate(template)
end
end