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:
parent
d8f7c9efbf
commit
0db9f4a3dc
5 changed files with 67 additions and 0 deletions
|
@ -26,6 +26,9 @@ module Fog
|
||||||
request :get_record
|
request :get_record
|
||||||
request :list_records
|
request :list_records
|
||||||
request :update_record
|
request :update_record
|
||||||
|
request :create_record_region
|
||||||
|
request :delete_record_region
|
||||||
|
request :update_record_region
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,22 @@ module Fog
|
||||||
true
|
true
|
||||||
end
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
16
lib/fog/storm_on_demand/requests/dns/create_record_region.rb
Normal file
16
lib/fog/storm_on_demand/requests/dns/create_record_region.rb
Normal 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
|
16
lib/fog/storm_on_demand/requests/dns/delete_record_region.rb
Normal file
16
lib/fog/storm_on_demand/requests/dns/delete_record_region.rb
Normal 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
|
16
lib/fog/storm_on_demand/requests/dns/update_record_region.rb
Normal file
16
lib/fog/storm_on_demand/requests/dns/update_record_region.rb
Normal 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
|
Loading…
Reference in a new issue