bundlewrap/libs/dns.py
mwiegand 82d76f776b wip
2021-07-02 18:59:23 +02:00

13 lines
405 B
Python

def get_a_records(metadata):
return {
'A': [
str(ip_interface(network['ipv4']).ip)
for network in metadata.get('network').values()
if 'ipv4' in network
],
'AAAA': [
str(ip_interface(network['ipv6']).ip)
for network in metadata.get('network').values()
if 'ipv6' in network
],
}