mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1540 from brianhartsock/master
[rackspace|dns] fix issue with zones.find when no links are provided
This commit is contained in:
commit
eb72f17cce
1 changed files with 10 additions and 8 deletions
|
@ -32,14 +32,16 @@ module Fog
|
||||||
subset = dup.all
|
subset = dup.all
|
||||||
|
|
||||||
subset.each_zone_this_page {|f| yield f}
|
subset.each_zone_this_page {|f| yield f}
|
||||||
while !body['links'].select{|l| l['rel'] == 'next'}.empty?
|
if body.has_key?('links')
|
||||||
url = body['links'].select{|l| l['rel'] == 'next'}.first['href']
|
while !body['links'].select{|l| l['rel'] == 'next'}.empty?
|
||||||
query = url.match(/\?(.+)/)
|
url = body['links'].select{|l| l['rel'] == 'next'}.first['href']
|
||||||
parsed = CGI.parse($1)
|
query = url.match(/\?(.+)/)
|
||||||
|
parsed = CGI.parse($1)
|
||||||
body = service.list_domains(:offset => parsed['offset'], :limit => parsed['limit']).body
|
|
||||||
subset = dup.all(:offset => parsed['offset'], :limit => parsed['limit'])
|
body = service.list_domains(:offset => parsed['offset'], :limit => parsed['limit']).body
|
||||||
subset.each_zone_this_page {|f| yield f}
|
subset = dup.all(:offset => parsed['offset'], :limit => parsed['limit'])
|
||||||
|
subset.each_zone_this_page {|f| yield f}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue