diff --git a/lib/fog/libvirt/models/compute/server.rb b/lib/fog/libvirt/models/compute/server.rb index 9dd8c1e..1776879 100644 --- a/lib/fog/libvirt/models/compute/server.rb +++ b/lib/fog/libvirt/models/compute/server.rb @@ -266,7 +266,7 @@ def addresses(service_arg=service, options={}) ip_address = nil nic = self.nics.find {|nic| nic.mac==mac} if !nic.nil? - Fog::Compute[:libvirt].networks.all.each do |net| + service.networks.all.each do |net| if net.name == nic.network leases = net.dhcp_leases(mac, 0) # Assume the lease expiring last is the current IP address