mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
model hacking working towards passing tests
This commit is contained in:
parent
37af71d76a
commit
7a9d709398
2 changed files with 6 additions and 7 deletions
|
@ -23,8 +23,7 @@ module Fog
|
|||
end
|
||||
|
||||
def destroy
|
||||
requires :identity
|
||||
connection.delete_record(identity)
|
||||
connection.delete_record(zone.domain, identity)
|
||||
true
|
||||
end
|
||||
|
||||
|
@ -37,8 +36,8 @@ module Fog
|
|||
options = {}
|
||||
options[:prio] = priority if priority
|
||||
options[:ttl] = ttl if ttl
|
||||
connection.create_record(zone.id, name, type, ip, options)
|
||||
merge_attributes(data.body)
|
||||
data = connection.create_record(zone.domain, name, type, ip, options)
|
||||
merge_attributes(data.body["record"])
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ module Fog
|
|||
|
||||
class Zone < Fog::Model
|
||||
|
||||
identity :id
|
||||
identity :id, :aliases => "name"
|
||||
|
||||
attribute :domain, :aliases => "name"
|
||||
attribute :domain, :aliases => "name"
|
||||
attribute :created_at
|
||||
attribute :updated_at
|
||||
|
||||
|
@ -39,7 +39,7 @@ module Fog
|
|||
|
||||
def save
|
||||
requires :domain
|
||||
data = connection.create_domain(domain).body
|
||||
data = connection.create_domain(domain).body["domain"]
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue