mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
remove commented code and update API version
This commit is contained in:
parent
caabdff6d4
commit
25b69f8289
2 changed files with 3 additions and 14 deletions
|
@ -70,7 +70,7 @@ module Fog
|
|||
@path = options[:path] || '/REST'
|
||||
@persistent = options[:persistent] || false
|
||||
@scheme = options[:scheme] || 'https'
|
||||
@version = options[:version] || '2.3.1'
|
||||
@version = options[:version] || '3.5.2'
|
||||
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
|
||||
end
|
||||
|
||||
|
@ -85,7 +85,7 @@ module Fog
|
|||
|
||||
params[:headers] ||= {}
|
||||
params[:headers]['Content-Type'] = 'application/json'
|
||||
#params[:headers]['API-Version'] = @version
|
||||
params[:headers]['API-Version'] = @version
|
||||
params[:headers]['Auth-Token'] = auth_token unless params[:path] == 'Session'
|
||||
params[:path] = "#{@path}/#{params[:path]}" unless params[:path] =~ %r{^#{Regexp.escape(@path)}/}
|
||||
|
||||
|
|
|
@ -15,21 +15,10 @@ module Fog
|
|||
requires :zone
|
||||
data = []
|
||||
service.get_all_records(zone.domain, options).body['data'].each do |url|
|
||||
(_, r, t, z, fqdn, id) = url.split('/')
|
||||
(_, _, t, _, fqdn, id) = url.split('/')
|
||||
type = t.gsub(/Record$/, '')
|
||||
record = service.get_record(type, zone.domain, fqdn, 'record_id' => id).body['data']
|
||||
|
||||
# data in format ['/REST/xRecord/domain/fqdn/identity]
|
||||
#records.map! do |record|
|
||||
# tokens = record.split('/')
|
||||
# {
|
||||
# :identity => tokens.last,
|
||||
# :fqdn => fqdn,
|
||||
# :type => tokens[2][0...-6] # everything before 'Record'
|
||||
# }
|
||||
#end
|
||||
#
|
||||
#data.concat(records)
|
||||
data << {
|
||||
:identity => record['record_id'],
|
||||
:fqdn => record['fqdn'],
|
||||
|
|
Loading…
Reference in a new issue