lib/vagrant-vcloudair/action/build_vapp.rb in vagrant-vcloudair-0.5.0 vs lib/vagrant-vcloudair/action/build_vapp.rb in vagrant-vcloudair-0.5.1
- old
+ new
@@ -22,14 +22,17 @@
if cfg.ip_dns.nil?
dns_address1 = '8.8.8.8'
dns_address2 = '8.8.4.4'
else
dns_address1 = NetAddr::CIDR.create(cfg.ip_dns.shift).base
- dns_address2 = NetAddr::CIDR.create(cfg.ip_dns.shift).base
+ unless cfg.ip_dns.empty?
+ dns_address2 = NetAddr::CIDR.create(cfg.ip_dns.shift).base
+ end
end
if !cfg.ip_subnet.nil?
@logger.debug("Input address: #{cfg.ip_subnet}")
+ cidr = NetAddr::CIDR.create(cfg.ip_subnet)
range_addresses = cidr.range(0)
@logger.debug("Range: #{range_addresses}")