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

[dreamhost|dns] remove connection deprecation notices

This commit is contained in:
Sergio Rubio 2013-01-19 23:39:33 +01:00
parent 782b935a9b
commit 705cf8e2d8
2 changed files with 5 additions and 5 deletions

View file

@ -16,14 +16,14 @@ module Fog
attribute :comment
def destroy
connection.delete_record(name, type, value)
service.delete_record(name, type, value)
true
end
def save
requires :name, :type, :value
data = connection.create_record(name, type, value, comment)
data = service.create_record(name, type, value, comment)
true
end

View file

@ -12,15 +12,15 @@ module Fog
def all(filter = {})
clear
if filter[:zone]
data = connection.list_records.body['data'].find_all { |r| r['zone'] == filter[:zone] }
data = service.list_records.body['data'].find_all { |r| r['zone'] == filter[:zone] }
else
data = connection.list_records.body['data']
data = service.list_records.body['data']
end
load(data)
end
def get(record_name)
data = connection.get_record(record_name).body['data'].find { |r| r['record'] == record_name }
data = service.get_record(record_name).body['data'].find { |r| r['record'] == record_name }
new(data)
rescue Excon::Errors::NotFound
nil