lib/chef/sugar/rackspace/ip.rb in chef-sugar-rackspace-0.0.3 vs lib/chef/sugar/rackspace/ip.rb in chef-sugar-rackspace-0.0.4
- old
+ new
@@ -19,11 +19,11 @@
else
net = networks[label]
end
## Return the first ip address in ips
- return net['ips'].pop['ip']
+ return net['ips'].first['ip']
end
def best_rackspace_ip_for(node, other)
begin
## Fail early if either node has no cloud networks
@@ -35,10 +35,10 @@
ip = nil
node_clnet.each_key do |node_label|
other_clnet.each_key do |other_label|
if node_label == other_label
- ip = other_clnet[node_label]['ips'].pop['ip']
+ ip = other_clnet[node_label]['ips'].first['ip']
end
end
end
# Couldn't locate a matching cloud network, falling through