lib/cloudstack-cli/option_resolver.rb in cloudstack-cli-1.5.1 vs lib/cloudstack-cli/option_resolver.rb in cloudstack-cli-1.5.2

- old
+ new

@@ -107,22 +107,23 @@ project_id: options[:project_id] ) if options[:ip_network_list] options[:ip_network_list].each do |item| unless network = available_networks.find { |n| n['name'] == item["name"] } - say "Error: Network '#{name}' not found.", :red + say "Error: Network '#{item["name"]}' not found.", :red exit 1 end item.delete("name") - network_list << {networkid: network["id"]}.merge(item) # rescue nil + network_list << {networkid: network["id"]}.merge(item) end end network_list.compact! if network_list.empty? say "Error: IP network list can't be empty.", :red exit 1 end options[:ip_to_network_list] = network_list + [:network_ids, :ip_address].each { |k| options.delete(k) } options end def resolve_iso if options[:iso]