From 322cf0c56aa00122469afdce669626b846db36a2 Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Sat, 22 Dec 2012 23:28:14 +0000 Subject: [PATCH] [dns_made_easy|dns] Updates reference to service --- lib/fog/dnsmadeeasy/models/dns/record.rb | 10 +++++----- lib/fog/dnsmadeeasy/models/dns/records.rb | 4 ++-- lib/fog/dnsmadeeasy/models/dns/zone.rb | 6 +++--- lib/fog/dnsmadeeasy/models/dns/zones.rb | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/fog/dnsmadeeasy/models/dns/record.rb b/lib/fog/dnsmadeeasy/models/dns/record.rb index a8695b4f5..d924aeb40 100644 --- a/lib/fog/dnsmadeeasy/models/dns/record.rb +++ b/lib/fog/dnsmadeeasy/models/dns/record.rb @@ -8,7 +8,7 @@ module Fog extend Fog::Deprecation deprecate :ip, :value deprecate :ip=, :value= - + identity :id attribute :name @@ -23,14 +23,14 @@ module Fog attribute :hard_link, :aliases => "hardLink" attribute :value, :aliases => "data" - + def initialize(attributes={}) self.ttl ||= 1800 super end def destroy - connection.delete_record(zone.domain, identity) + service.delete_record(zone.domain, identity) true end @@ -57,11 +57,11 @@ module Fog end if id.nil? - data = connection.create_record(zone.domain, name, type, value, options).body + data = service.create_record(zone.domain, name, type, value, options).body merge_attributes(data) else options.merge!(:name => name, :type => type, :data => value) - connection.update_record(zone.domain, id, options).body + service.update_record(zone.domain, id, options).body end true diff --git a/lib/fog/dnsmadeeasy/models/dns/records.rb b/lib/fog/dnsmadeeasy/models/dns/records.rb index 2ded4cbca..92ba0f9c4 100644 --- a/lib/fog/dnsmadeeasy/models/dns/records.rb +++ b/lib/fog/dnsmadeeasy/models/dns/records.rb @@ -13,12 +13,12 @@ module Fog def all requires :zone - data = connection.list_records(zone.identity).body + data = service.list_records(zone.identity).body load(data) end def get(record_id) - data = connection.get_record(zone.identity, record_id).body + data = service.get_record(zone.identity, record_id).body new(data) rescue Fog::Service::NotFound nil diff --git a/lib/fog/dnsmadeeasy/models/dns/zone.rb b/lib/fog/dnsmadeeasy/models/dns/zone.rb index 78143b8db..e9a44e9bc 100644 --- a/lib/fog/dnsmadeeasy/models/dns/zone.rb +++ b/lib/fog/dnsmadeeasy/models/dns/zone.rb @@ -14,7 +14,7 @@ module Fog def destroy requires :identity - connection.delete_domain(identity) + service.delete_domain(identity) true end @@ -22,14 +22,14 @@ module Fog @records ||= begin Fog::DNS::DNSMadeEasy::Records.new( :zone => self, - :connection => connection + :service => service ) end end def save requires :domain - data = connection.create_domain(domain).body + data = service.create_domain(domain).body self.identity = data['name'] merge_attributes(data) true diff --git a/lib/fog/dnsmadeeasy/models/dns/zones.rb b/lib/fog/dnsmadeeasy/models/dns/zones.rb index bdd533ee8..6377c9498 100644 --- a/lib/fog/dnsmadeeasy/models/dns/zones.rb +++ b/lib/fog/dnsmadeeasy/models/dns/zones.rb @@ -11,12 +11,12 @@ module Fog def all clear - data = connection.list_domains.body['list'].collect{|domain| {:id => domain}} + data = service.list_domains.body['list'].collect{|domain| {:id => domain}} load(data) end def get(zone_id) - data = connection.get_domain(zone_id).body + data = service.get_domain(zone_id).body data.merge!(:id => data['name']) new(data) rescue Fog::Service::NotFound