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

DOCS: Clarify IPv6 variables are strings (#1775)

Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
This commit is contained in:
Tom Limoncelli
2022-10-27 16:16:37 -04:00
committed by GitHub
parent ab026c31cd
commit 490db87ce6
2 changed files with 21 additions and 2 deletions

View File

@ -6,8 +6,6 @@ parameters:
Converts an IPv4 address from string to an integer. This allows performing mathematical operations with the IP address.
This does not accept IPv6 addresses. (PRs gladly accepted.)
{% capture example %}
```js
var addrA = IP('1.2.3.4')
@ -17,3 +15,18 @@ var addrB = addrA + 1
{% endcapture %}
{% include example.html content=example %}
NOTE: `IP()` does not accept IPv6 addresses (PRs gladly accepted!). IPv6 addresses are simply strings:
{% capture example2 %}
```js
// IPv4 Var
var addrA1 = IP("1.2.3.4");
var addrA2 = "1.2.3.4";
// IPv6 Var
var addrAAAA = "0:0:0:0:0:0:0:0";
```
{% endcapture %}
{% include example.html content=example2 %}

View File

@ -53,6 +53,12 @@ D('example.com', REG, DnsProvider('R53'),
)
```
NOTE: The `IP()` function doesn't currently support IPv6 (PRs welcome!). IPv6 addresses are strings.
```js
var addrAAAA = "0:0:0:0:0:0:0:0";
```
## Variables to swap active Data Center
```js