Nat 185
-
Review changes -
-
Download -
Patches
-
Plain diff
Includes:
- IPv4, IPv6, A, AAAA, and PTR in the same host record when allocating a host
- Optional CNAME record when allocating a host (passed as a list of alias name, one CNAME record is created for each)
- Support for networks as well as containers in the
oss-params.json
file.
Hosts can be allocated through ipam.new_service_host()
by passing domain name, hostname, and service type (mandatory). Optinally, you can pass either ipv4/ipv6 addresses, ipv4/ipv6 networks, or nothing. Passing nothing is considered default. In that case:
- If the service type has any container specified in the params file, networks have to be allocated before allocating hosts (through
ipam.new_service_networks()
). The mask parameter is used to create the new networks. Containers are filled up in the order that they appear in the params file. - If the service type has any network specified in the params file, those networks are used directly to allocate hosts. Networks are filled up in the order that they appear in the params file.
If you pass addresses or networks, the module will always attempt to use those, but will fail if they don't match the configuration in the params file for the service type (i.e. if you request an address or network that places outside of the configured containers/networks).
Either a non-empty list of networks
or a non-empty list of containers
is required in the params file per service type. Having both is redundant, but in that case containers take precedence. The mask
parameter is irrelevant if the service type uses networks instead of containers.
Example config:
"LO": {
"V4": {"containers": [], "networks": ["10.255.255.32/32", "10.255.255.0/28", "10.255.255.16/28"], "mask": 0},
"V6": {"containers": [], "networks": ["dead:beef::/80", "dead:beef:0:1::/80"], "mask": 0},
"domain_name": ".gso"
},
"TRUNK": {
"V4": {"containers": ["10.255.255.0/24", "10.255.254.0/24"], "networks": [], "mask": 31},
"V6": {"containers": ["dead:beef::/64", "dead:beee::/64"], "networks": [], "mask": 126},
"domain_name": ".gso"
},
Merge request reports
- latest version45b9f41e18 commits,
- version 13a00152af17 commits,
- version 12e965102419 commits,
- version 11eea085fb18 commits,
- version 1006734e5c17 commits,
- version 99db83a0116 commits,
- version 8ea0a9a9715 commits,
- version 7982d638914 commits,
- version 6551aa18c13 commits,
- version 54ce8282e12 commits,
- version 4d37aa04711 commits,
- version 363f6f34f10 commits,
- version 2378c07f29 commits,
- version 18919a6397 commits,
- Side-by-side
- Inline