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

[stormondemand|dns] Add Reverse APIs

This commit is contained in:
Eric Wong 2013-05-23 15:30:23 +08:00
parent 0db9f4a3dc
commit 37574c2e8d
4 changed files with 59 additions and 0 deletions

View file

@ -16,6 +16,7 @@ module Fog
collection :domains
model :record
collection :records
model :reverse
request_path 'fog/storm_on_demand/requests/dns'
request :list_domains
@ -29,6 +30,9 @@ module Fog
request :create_record_region
request :delete_record_region
request :update_record_region
request :delete_reverse
request :update_reverse
class Mock

View file

@ -0,0 +1,23 @@
require 'fog/core/model'
module Fog
module DNS
class StormOnDemand
class Reverse < Fog::Model
def initialize(attributes={})
super
end
def destroy(options)
service.delete_reverse(options).body
end
def update(options)
service.update_reverse(options).body
end
end
end
end
end

View file

@ -0,0 +1,16 @@
module Fog
module DNS
class StormOnDemand
class Real
def delete_reverse(options={})
request(
:path => '/Network/DNS/Reverse/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_reverse(options={})
request(
:path => '/Network/DNS/Reverse/update',
:body => Fog::JSON.encode(:params => options)
)
end
end
end
end
end