From 693815b484a2e60820c4715bf5e635e7c8f38c7a Mon Sep 17 00:00:00 2001 From: Patrick McKenzie Date: Tue, 8 Nov 2011 13:15:40 +0900 Subject: [PATCH] Revert "Slicehost uses record-type and zone-id for their API, which messes with Fog internals, so changing these to record_type and zone_id in the parser." This reverts commit 32ad91a777f0b482eb2b9d329d3009ad46b22293. --- lib/fog/slicehost/parsers/dns/get_records.rb | 8 ++------ lib/fog/slicehost/requests/dns/get_records.rb | 15 ++++++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/fog/slicehost/parsers/dns/get_records.rb b/lib/fog/slicehost/parsers/dns/get_records.rb index b170f8aee..fb18aef32 100644 --- a/lib/fog/slicehost/parsers/dns/get_records.rb +++ b/lib/fog/slicehost/parsers/dns/get_records.rb @@ -12,13 +12,9 @@ module Fog def end_element(name) case name - when 'zone-id' - @record["zone_id"] = value.to_i - when 'record-type' - @record["record_type"] = value - when 'ttl' + when 'zone-id', 'ttl' @record[name] = value.to_i - when 'name', 'data', 'active', 'aux' + when 'record-type', 'name', 'data', 'active', 'aux' @record[name] = value when 'record' @response['records'] << @record diff --git a/lib/fog/slicehost/requests/dns/get_records.rb b/lib/fog/slicehost/requests/dns/get_records.rb index c774e61bc..b56c6687e 100644 --- a/lib/fog/slicehost/requests/dns/get_records.rb +++ b/lib/fog/slicehost/requests/dns/get_records.rb @@ -10,13 +10,14 @@ module Fog # ==== Returns # * response<~Excon::Response>: # * body<~Array>: - # * 'name'<~String> - Record NAME field (e.g. "example.org." or "www") - # * 'data'<~String> - Data contained by the record (e.g. an IP address, for A records) - # * 'record-type'<~String> - Type of record (A, CNAME, TXT, etc) - # * 'aux'<~String> - Aux data for the record, for those types which have it (e.g. TXT) - # * 'zone-id'<~Integer> - zone ID to which this record belongs - # * 'active'<~String> - whether this record is active in the Slicehost DNS (Y for yes, N for no) - # * 'ttl'<~Integer> - TTL in seconds + # * 'addresses'<~Array> - Ip addresses for the slice + # * 'backup-id'<~Integer> - Id of backup slice was booted from + # * 'flavor_id'<~Integer> - Id of flavor slice was booted from + # * 'id'<~Integer> - Id of the slice + # * 'image-id'<~Integer> - Id of image slice was booted from + # * 'name'<~String> - Name of the slice + # * 'progress'<~Integer> - Progress of current action, in percentage + # * 'status'<~String> - Current status of the slice def get_records request( :expects => 200,