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:
parent
0db9f4a3dc
commit
37574c2e8d
4 changed files with 59 additions and 0 deletions
|
@ -16,6 +16,7 @@ module Fog
|
||||||
collection :domains
|
collection :domains
|
||||||
model :record
|
model :record
|
||||||
collection :records
|
collection :records
|
||||||
|
model :reverse
|
||||||
|
|
||||||
request_path 'fog/storm_on_demand/requests/dns'
|
request_path 'fog/storm_on_demand/requests/dns'
|
||||||
request :list_domains
|
request :list_domains
|
||||||
|
@ -30,6 +31,9 @@ module Fog
|
||||||
request :delete_record_region
|
request :delete_record_region
|
||||||
request :update_record_region
|
request :update_record_region
|
||||||
|
|
||||||
|
request :delete_reverse
|
||||||
|
request :update_reverse
|
||||||
|
|
||||||
class Mock
|
class Mock
|
||||||
|
|
||||||
def self.data
|
def self.data
|
||||||
|
|
23
lib/fog/storm_on_demand/models/dns/reverse.rb
Normal file
23
lib/fog/storm_on_demand/models/dns/reverse.rb
Normal 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
|
16
lib/fog/storm_on_demand/requests/dns/delete_reverse.rb
Normal file
16
lib/fog/storm_on_demand/requests/dns/delete_reverse.rb
Normal 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
|
16
lib/fog/storm_on_demand/requests/dns/update_reverse.rb
Normal file
16
lib/fog/storm_on_demand/requests/dns/update_reverse.rb
Normal 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
|
Loading…
Reference in a new issue