bundlewrap/bundles/network/metadata.py
mwiegand a3caa8481e wip
2021-06-17 01:48:34 +02:00

16 lines
510 B
Python

@metadata_reactor.provides(
'interfaces',
)
def interfaces(metadata):
return {
'interfaces': {
metadata.get('network/interface'): {
'ips': list(filter(None.__ne__, [
metadata.get('network/ipv4', None),
metadata.get('network/ipv6', None),
])),
'gateway4': metadata.get('network/gateway4', None),
'gateway6': metadata.get('network/gateway6', None),
},
}
}