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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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. 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 %} {% capture example %}
```js ```js
var addrA = IP('1.2.3.4') var addrA = IP('1.2.3.4')
@ -17,3 +15,18 @@ var addrB = addrA + 1
{% endcapture %} {% endcapture %}
{% include example.html content=example %} {% 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 ## Variables to swap active Data Center
```js ```js