1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

New feature: IGNORE_TARGET. Rename INGORE to IGNORE_NAME (#806)

This commit is contained in:
Mike Cochrane
2020-08-19 03:14:34 +12:00
committed by GitHub
parent f88c60a8f3
commit 960dc66bd2
13 changed files with 397 additions and 202 deletions

View File

@ -58,7 +58,8 @@ function newDomain(name, registrar) {
dnsProviders: {},
defaultTTL: 0,
nameservers: [],
ignored_labels: [],
ignored_names: [],
ignored_targets: [],
};
}
@ -494,11 +495,25 @@ function format_tt(transform_table) {
// IGNORE(name)
function IGNORE(name) {
// deprecated, use IGNORE_NAME
return IGNORE_NAME(name);
}
// IGNORE_NAME(name)
function IGNORE_NAME(name) {
return function(d) {
d.ignored_labels.push(name);
d.ignored_names.push(name);
};
}
// IGNORE_TARGET(target)
function IGNORE_TARGET(target, rType) {
return function(d) {
d.ignored_targets.push({pattern: target, type: rType});
};
}
// IMPORT_TRANSFORM(translation_table, domain)
var IMPORT_TRANSFORM = recordBuilder('IMPORT_TRANSFORM', {
args: [['translation_table'], ['domain'], ['ttl', _.isNumber]],