mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
allowing multiple newBase ips (#1)
* allowing multiple newBase ips * generate * only bundle helpers * generate change
This commit is contained in:
12
js/parse_tests/006-transforms.js
Normal file
12
js/parse_tests/006-transforms.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var REG = NewRegistrar("Third-Party","NONE");
|
||||
var CF = NewDSP("Cloudflare", "CLOUDFLAREAPI")
|
||||
|
||||
var TRANSFORM_INT = [
|
||||
{low: "0.0.0.0", high: "1.1.1.1", newBase: "2.2.2.2" },
|
||||
{low: "1.1.1.1", high: IP("2.2.2.2"), newBase: ["3.3.3.3","4.4.4.4",IP("5.5.5.5")]} ,
|
||||
{low: "1.1.1.1", high: IP("2.2.2.2"), newIP: ["3.3.3.3","4.4.4.4",IP("5.5.5.5")]}
|
||||
]
|
||||
|
||||
D("foo.com",REG,CF,
|
||||
A("@","1.2.3.4",{transform: TRANSFORM_INT})
|
||||
);
|
34
js/parse_tests/006-transforms.json
Normal file
34
js/parse_tests/006-transforms.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"registrars": [
|
||||
{
|
||||
"name": "Third-Party",
|
||||
"type": "NONE"
|
||||
}
|
||||
],
|
||||
"dns_service_providers": [
|
||||
{
|
||||
"name": "Cloudflare",
|
||||
"type": "CLOUDFLAREAPI"
|
||||
}
|
||||
],
|
||||
"domains": [
|
||||
{
|
||||
"name": "foo.com",
|
||||
"registrar": "Third-Party",
|
||||
"dsps": [
|
||||
"Cloudflare"
|
||||
],
|
||||
"records": [
|
||||
{
|
||||
"type": "A",
|
||||
"name": "@",
|
||||
"target": "1.2.3.4",
|
||||
"meta": {
|
||||
"transform": "0.0.0.0 ~ 1.1.1.1 ~ 2.2.2.2 ~ ; 1.1.1.1 ~ 2.2.2.2 ~ 3.3.3.3,4.4.4.4,5.5.5.5 ~ ; 1.1.1.1 ~ 2.2.2.2 ~ ~ 3.3.3.3,4.4.4.4,5.5.5.5"
|
||||
}
|
||||
}
|
||||
],
|
||||
"keepunknown": false
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user