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

[stormondemand|dns] add record region APIs

This commit is contained in:
Eric Wong 2013-05-23 15:14:15 +08:00
parent d8f7c9efbf
commit 0db9f4a3dc
5 changed files with 67 additions and 0 deletions

View file

@ -26,6 +26,9 @@ module Fog
request :get_record
request :list_records
request :update_record
request :create_record_region
request :delete_record_region
request :update_record_region
class Mock

View file

@ -41,6 +41,22 @@ module Fog
true
end
def create_region(options)
requires :identity
service.create_record_region({:record_id => identity}.merge!(options))
true
end
def delete_region(options)
requires :identity
service.delete_record_region({:record_id => identity}.merge!(options))
end
def update_region(options)
requires :identity
service.update_record_region({:record_id => identity}.merge!(options))
end
end
end

View file

@ -0,0 +1,16 @@
module Fog
module DNS
class StormOnDemand
class Real
def create_record_region(options={})
request(
:path => '/Network/DNS/Record/Region/create',
:body => Fog::JSON.encode(:params => options)
)
end
end
end
end
end

View file

@ -0,0 +1,16 @@
module Fog
module DNS
class StormOnDemand
class Real
def delete_record_region(options={})
request(
:path => '/Network/DNS/Record/Region/delete',
:body => Fog::JSON.encode(:params => options)
)
end
end
end
end
end

View file

@ -0,0 +1,16 @@
module Fog
module DNS
class StormOnDemand
class Real
def update_record_region(options={})
request(
:path => '/Network/DNS/Record/Region/update',
:body => Fog::JSON.encode(:params => options)
)
end
end
end
end
end