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
|
@metadata_reactor
|
||||||
def get_static_allocations(metadata):
|
def get_static_allocations(metadata):
|
||||||
allocations = {}
|
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():
|
for identifier, interface in rnode.metadata.get('interfaces', {}).items():
|
||||||
if interface.get('dhcp', False):
|
if interface.get('dhcp', False):
|
||||||
allocations[rnode.name] = {
|
allocations[rnode.name] = {
|
||||||
|
|
|
@ -13,6 +13,7 @@ groups['gce'] = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'location': 'gce',
|
||||||
'nameservers': {
|
'nameservers': {
|
||||||
'8.8.8.8',
|
'8.8.8.8',
|
||||||
'8.8.4.4',
|
'8.8.4.4',
|
||||||
|
@ -33,6 +34,9 @@ groups['htz'] = {
|
||||||
'subgroups': {
|
'subgroups': {
|
||||||
'htz-cloud',
|
'htz-cloud',
|
||||||
},
|
},
|
||||||
|
'metadata': {
|
||||||
|
'location': 'htz',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
groups['htz-cloud'] = {
|
groups['htz-cloud'] = {
|
||||||
|
@ -70,6 +74,7 @@ groups['ovh'] = {
|
||||||
r"ovh\..*",
|
r"ovh\..*",
|
||||||
},
|
},
|
||||||
'metadata': {
|
'metadata': {
|
||||||
|
'location': 'ovh',
|
||||||
'users': {
|
'users': {
|
||||||
'debian': {
|
'debian': {
|
||||||
'delete': True,
|
'delete': True,
|
||||||
|
|
Loading…
Reference in a new issue