bundles/dhcpd: remove hardcoded group in metadata reactor get_static_allocations()
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
c597244a9d
commit
9df5cb1f16
2 changed files with 9 additions and 1 deletions
|
@ -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] = {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue