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

Feature #1030: Fix onetemplate when no name is provided

(cherry picked from commit 1cd6406dc587b9e2ffa1d82cd52e3e5bb76f8ef5)
This commit is contained in:
Hector Sanjuan 2012-02-09 18:57:47 +01:00 committed by Ruben S. Montero
parent 63f5a989e3
commit c8f9e86b48

View File

@ -110,7 +110,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do
number = options[:multiple] || 1
number.times do |i|
exit_code=helper.perform_action(args[0],options,"instantiated") do |t|
name = options[:vm_name].gsub("%i",i.to_s)
name = options[:vm_name]
name = name.gsub("%i",i.to_s) if name
res = t.instantiate(name)
if !OpenNebula.is_error?(res)