mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[dynect|dns] Don't use address as different records have different arguments, just send rdata. Remove value. Add CNAME test.
This commit is contained in:
parent
1053dc7e34
commit
53bc5e3236
2 changed files with 8 additions and 7 deletions
|
|
@ -13,7 +13,6 @@ module Fog
|
|||
attribute :serial_style
|
||||
attribute :ttl
|
||||
attribute :type, :aliases => 'record_type'
|
||||
attribute :value
|
||||
|
||||
def destroy
|
||||
requires :identity, :name, :type, :zone
|
||||
|
|
@ -22,14 +21,14 @@ module Fog
|
|||
end
|
||||
|
||||
def save
|
||||
requires :name, :type, :value, :zone
|
||||
requires :name, :type, :rdata, :zone
|
||||
|
||||
options = {
|
||||
:ttl => ttl
|
||||
}
|
||||
options.delete_if {|key, value| value.nil?}
|
||||
|
||||
data = connection.post_record(type, zone.identity, name, {'address' => value}, options).body['data']
|
||||
data = connection.post_record(type, zone.identity, name, rdata, options).body['data']
|
||||
# avoid overwriting zone object with zone string
|
||||
data = data.reject {|key, value| key == 'zone'}
|
||||
merge_attributes(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue