bundles/dhcpd: remove hardcoded group in metadata reactor get_static_allocations()
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-15 13:23:24 +01:00
parent c597244a9d
commit 9df5cb1f16
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 9 additions and 1 deletions

View file

@ -10,7 +10,10 @@ defaults = {
@metadata_reactor
def get_static_allocations(metadata):
allocations = {}
for rnode in repo.nodes_in_group('home'):
for rnode in repo.nodes:
if rnode.metadata.get('location', '') != metadata.get('location', ''):
continue
for identifier, interface in rnode.metadata.get('interfaces', {}).items():
if interface.get('dhcp', False):
allocations[rnode.name] = {

View file

@ -13,6 +13,7 @@ groups['gce'] = {
},
},
},
'location': 'gce',
'nameservers': {
'8.8.8.8',
'8.8.4.4',
@ -33,6 +34,9 @@ groups['htz'] = {
'subgroups': {
'htz-cloud',
},
'metadata': {
'location': 'htz',
},
}
groups['htz-cloud'] = {
@ -70,6 +74,7 @@ groups['ovh'] = {
r"ovh\..*",
},
'metadata': {
'location': 'ovh',
'users': {
'debian': {
'delete': True,