mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Add INCLUDE statement to include records from other domains (#1219)
This commit is contained in:
12
pkg/js/parse_tests/039-include.js
Normal file
12
pkg/js/parse_tests/039-include.js
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
var REG = NewRegistrar("Third-Party","NONE");
|
||||
var CF = NewDnsProvider("Cloudflare", "CLOUDFLAREAPI");
|
||||
|
||||
D("foo.com!external",REG,DnsProvider(CF),
|
||||
A("@","1.2.3.4")
|
||||
);
|
||||
|
||||
D("foo.com!internal",REG,DnsProvider(CF),
|
||||
INCLUDE("foo.com!external"),
|
||||
A("local","127.0.0.1")
|
||||
);
|
||||
49
pkg/js/parse_tests/039-include.json
Normal file
49
pkg/js/parse_tests/039-include.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"registrars": [
|
||||
{
|
||||
"name": "Third-Party",
|
||||
"type": "NONE"
|
||||
}
|
||||
],
|
||||
"dns_providers": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com!external",
|
||||
"registrar": "Third-Party",
|
||||
"dnsProviders": {
|
||||
"Cloudflare": -1
|
||||
},
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "foo.com!internal",
|
||||
"registrar": "Third-Party",
|
||||
"dnsProviders": {
|
||||
"Cloudflare": -1
|
||||
},
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4"
|
||||
},
|
||||
{
|
||||
"type": "A",
|
||||
"name": "local",
|
||||
"target": "127.0.0.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user