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:
parent
a67198e885
commit
989acc71ba
1 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,15 @@ module Fog
|
||||||
load(data)
|
load(data)
|
||||||
end
|
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)
|
def get(zone_id)
|
||||||
if zone_id.nil? or zone_id.to_s.empty?
|
if zone_id.nil? or zone_id.to_s.empty?
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue