Project

General

Profile

Actions

Refactor #17880

closed

DNS CNAME parameters methods are swapped

Added by Guilherme Maluf Balzana over 7 years ago. Updated about 7 years ago.

Status:
Rejected
Priority:
Normal
Category:
DNS
Target version:
-
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

All DNS methods uses fqdn parameters as the target of the action and the second argument as the attribute that will be set to that target, e.g.

modules/dns_common/dns_common.rb


def a_record_conflicts(fqdn, ip)
...
end

def create_a_record(fqdn, ip) 
...
end

def ptr_record_conflicts(fqdn, ip)
...
end

CNAME methods does the opposite, using attribute(fqdn alias) as the first argument and target(fqdn) as a second argument

modules/dns_common/dns_common.rb

def create_cname_record(fqdn, value)
...
end

def cname_record_conflicts(fqdn, target)
...
end

fqdn here actually means the alias we want to attribute to target

CNAME implementation is only used in dnscmd provider and I imagine that just a few make use of it.
Those which use this API would not have their aliases been set to their hosts.
Probably the provider would raise an error saying the fqdn is been use by an existing entry or the CNAME doesn't exist.


Related issues 2 (1 open1 closed)

Related to Smart Proxy - Refactor #18398: Use consistent naming of parameters in the DNS modulesReady For TestingEwoud Kohl van Wijngaarden02/04/2017Actions
Blocked by Smart Proxy - Feature #17879: Add DNS CNAME entry for nsupdateResolvedGuilherme Maluf Balzana12/29/2016Actions
Actions

Also available in: Atom PDF