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

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({