mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|dns] Allow both Ruby and AWS style names for alias.
It was not possible to delete AWS DNS Alias Records because retrieved records use CamelCase for alias target keys and change_resource_records required ruby style names. It now accepts both.
This commit is contained in:
parent
09d52dac8d
commit
446870d8a6
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,10 @@ module Fog
|
|||
|
||||
alias_target_tag = ''
|
||||
if change_item[:alias_target]
|
||||
alias_target_tag += %Q{<AliasTarget><HostedZoneId>#{change_item[:alias_target][:hosted_zone_id]}</HostedZoneId><DNSName>#{change_item[:alias_target][:dns_name]}</DNSName></AliasTarget>}
|
||||
# Accept either underscore or camel case for hash keys.
|
||||
hosted_zone_id = change_item[:alias_target][:hosted_zone_id] || change_item[:alias_target][:HostedZoneId]
|
||||
dns_name = change_item[:alias_target][:dns_name] || change_item[:alias_target][:DNSName]
|
||||
alias_target_tag += %Q{<AliasTarget><HostedZoneId>#{hosted_zone_id}</HostedZoneId><DNSName>#{dns_name}</DNSName></AliasTarget>}
|
||||
end
|
||||
|
||||
change_tags = %Q{<Change>#{action_tag}<ResourceRecordSet>#{name_tag}#{type_tag}#{ttl_tag}#{resource_tag}#{alias_target_tag}</ResourceRecordSet></Change>}
|
||||
|
|
Loading…
Reference in a new issue