Idempotent Dynect calls. ✌️

This commit is contained in:
Dylan Egan 2012-05-28 16:20:29 +02:00
parent 6a2c9dafe7
commit a57bea24ff
5 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,7 @@ module Fog
def delete_record(type, zone, fqdn, record_id)
request(
:expects => 200,
:idempotent => true,
:method => :delete,
:path => ["#{type.to_s.upcase}Record", zone, fqdn, record_id].join('/')
)

View File

@ -14,6 +14,7 @@ module Fog
requested_fqdn = options['fqdn'] || options[:fqdn]
request(
:expects => 200,
:idempotent => true,
:method => :get,
:path => ['NodeList', zone, requested_fqdn].compact.join('/')
)

View File

@ -15,6 +15,7 @@ module Fog
def get_record(type, zone, fqdn, options = {})
request(
:expects => 200,
:idempotent => true,
:method => :get,
:path => ["#{type.to_s.upcase}Record", zone, fqdn, options['record_id']].compact.join('/')
)

View File

@ -12,6 +12,7 @@ module Fog
def get_zone(options = {})
request(
:expects => 200,
:idempotent => true,
:method => :get,
:path => ['Zone', options['zone']].compact.join('/')
)

View File

@ -6,6 +6,7 @@ module Fog
def post_session
request(
:expects => 200,
:idempotent => true,
:method => :post,
:path => "Session",
:body => Fog::JSON.encode({