1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Add a zones.find(substring) method to return only zones whose

name matches that substring.

http://docs.rackspace.com/cdns/api/v1.0/cdns-devguide/content/list_domains.html
This commit is contained in:
H. Wade Minter 2013-01-28 13:15:56 -05:00
parent a67198e885
commit 989acc71ba

View file

@ -13,6 +13,15 @@ module Fog
data = service.list_domains.body['domains']
load(data)
end
# Returns all domains containing the given substring. Still limited
# by the 100-domain pagination limit. Returns an empty array if
# no matches.
def find(substring)
clear
data = service.list_domains(:name => substring).body['domains']
load(data)
end
def get(zone_id)
if zone_id.nil? or zone_id.to_s.empty?