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
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
requires :identity
|
connection.delete_record(zone.domain, identity)
|
||||||
connection.delete_record(identity)
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -37,8 +36,8 @@ module Fog
|
||||||
options = {}
|
options = {}
|
||||||
options[:prio] = priority if priority
|
options[:prio] = priority if priority
|
||||||
options[:ttl] = ttl if ttl
|
options[:ttl] = ttl if ttl
|
||||||
connection.create_record(zone.id, name, type, ip, options)
|
data = connection.create_record(zone.domain, name, type, ip, options)
|
||||||
merge_attributes(data.body)
|
merge_attributes(data.body["record"])
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ module Fog
|
||||||
|
|
||||||
class Zone < Fog::Model
|
class Zone < Fog::Model
|
||||||
|
|
||||||
identity :id
|
identity :id, :aliases => "name"
|
||||||
|
|
||||||
attribute :domain, :aliases => "name"
|
attribute :domain, :aliases => "name"
|
||||||
attribute :created_at
|
attribute :created_at
|
||||||
attribute :updated_at
|
attribute :updated_at
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ module Fog
|
||||||
|
|
||||||
def save
|
def save
|
||||||
requires :domain
|
requires :domain
|
||||||
data = connection.create_domain(domain).body
|
data = connection.create_domain(domain).body["domain"]
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue