whitespace
This commit is contained in:
parent
c55b465c2f
commit
2d77fa8d10
1 changed files with 4 additions and 5 deletions
|
@ -1,8 +1,7 @@
|
||||||
from ipaddress import ip_interface
|
from ipaddress import ip_interface
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
'network': {
|
'network': {},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +10,7 @@ defaults = {
|
||||||
)
|
)
|
||||||
def units(metadata):
|
def units(metadata):
|
||||||
units = {}
|
units = {}
|
||||||
|
|
||||||
for type, network in metadata.get('network').items():
|
for type, network in metadata.get('network').items():
|
||||||
units[f'{type}.network'] = {
|
units[f'{type}.network'] = {
|
||||||
'Match': {
|
'Match': {
|
||||||
|
@ -22,7 +21,7 @@ def units(metadata):
|
||||||
'IPv6AcceptRA': 'no',
|
'IPv6AcceptRA': 'no',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in [4, 6]:
|
for i in [4, 6]:
|
||||||
if network.get(f'ipv{i}', None):
|
if network.get(f'ipv{i}', None):
|
||||||
units[f'{type}.network'].update({
|
units[f'{type}.network'].update({
|
||||||
|
@ -38,7 +37,7 @@ def units(metadata):
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'systemd': {
|
'systemd': {
|
||||||
'units': units,
|
'units': units,
|
||||||
|
|
Loading…
Reference in a new issue