2010-12-14 00:04:23 -05:00
|
|
|
module Fog
|
2011-06-15 17:25:01 -07:00
|
|
|
module DNS
|
|
|
|
class AWS
|
2010-12-14 00:04:23 -05:00
|
|
|
class Real
|
|
|
|
|
2011-08-24 20:00:45 -05:00
|
|
|
require 'fog/aws/parsers/dns/get_change'
|
2010-12-14 00:04:23 -05:00
|
|
|
|
|
|
|
# returns the current state of a change request
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * change_id<~String>
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>:
|
|
|
|
# * 'Id'<~String>
|
|
|
|
# * 'Status'<~String>
|
|
|
|
# * 'SubmittedAt'<~String>
|
|
|
|
# * status<~Integer> - 200 when successful
|
2010-12-17 16:48:38 -08:00
|
|
|
def get_change(change_id)
|
2010-12-14 00:04:23 -05:00
|
|
|
|
|
|
|
# AWS methods return change_ids that looks like '/change/id'. Let the caller either use
|
|
|
|
# that form or just the actual id (which is what this request needs)
|
|
|
|
change_id = change_id.sub('/change/', '')
|
|
|
|
|
|
|
|
request({
|
|
|
|
:expects => 200,
|
2011-06-15 17:25:01 -07:00
|
|
|
:parser => Fog::Parsers::DNS::AWS::GetChange.new,
|
2010-12-14 00:04:23 -05:00
|
|
|
:method => 'GET',
|
|
|
|
:path => "change/#{change_id}"
|
|
|
|
})
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|