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

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 commit is contained in:
Patrick McKenzie 2011-11-08 13:11:08 +09:00
parent 7ba6df8f14
commit 426815d01d
2 changed files with 13 additions and 10 deletions

View file

@ -12,9 +12,13 @@ module Fog
def end_element(name)
case name
when 'zone-id', 'ttl'
when 'zone-id'
@record["zone_id"] = value.to_i
when 'record-type'
@record["record_type"] = value
when 'ttl'
@record[name] = value.to_i
when 'record-type', 'name', 'data', 'active', 'aux'
when 'name', 'data', 'active', 'aux'
@record[name] = value
when 'record'
@response['records'] << @record

View file

@ -10,14 +10,13 @@ module Fog
# ==== Returns
# * response<~Excon::Response>:
# * body<~Array>:
# * '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
# * '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
def get_records
request(
:expects => 200,