Skip to content
Snippets Groups Projects
Commit 3b8034a4 authored by skorpy's avatar skorpy :construction_worker:
Browse files

kea.py: add v6_interfaces

parent f27597d8
No related branches found
No related tags found
No related merge requests found
Pipeline #33640 passed
......@@ -14,3 +14,13 @@ def rfc3397(domains):
map(lambda dom: chr(len(dom)) + dom, domain.strip().split('.'))
) + "\0"
return domain_list.encode('utf-8').hex()
def v6_interfaces():
interfaces = []
for domain_key, domain in __salt__['pillar.get']('domains').items():
if 'IPv6' in domain:
interfaces.append(domain_key + "-br")
for subnet in __salt__['pillar.get']('kea-dhcp:v6:subnets'):
if 'interface' in subnet:
interfaces.append(subnet.interface)
return list(set((__salt__['pillar.get']('kea-dhcp:v6:interfaces', []) + interfaces).sort()))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment