lib/beaker/hypervisor/abs.rb in beaker-abs-0.4.0 vs lib/beaker/hypervisor/abs.rb in beaker-abs-0.5.0
- old
+ new
@@ -48,19 +48,21 @@
# }
@resource_hosts.each do |resource_host|
type = resource_host['type']
type2hosts[type] ||= []
type2hosts[type] << resource_host['hostname']
+ type2hosts[type] << resource_host['ip']
end
# for each host, get a vm for that template type
@hosts.each do |host|
template = host['template']
raise ArgumentError.new("Failed to provision host '#{host.hostname}' because its 'template' is missing.") if template.nil?
if provisioned_hosts = type2hosts[template]
host['vmhostname'] = provisioned_hosts.shift
+ host['ip'] = provisioned_hosts.shift
else
raise ArgumentError.new("Failed to provision host '#{host.hostname}', no template of type '#{host['template']}' was provided.")
end
end
if Beaker::Hypervisor.respond_to?(:set_ssh_connection_preference)