update bw to 4.3, add .provides() to metadata reactors
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
7f0fb7a6e2
commit
2d42e5f7dd
29 changed files with 158 additions and 47 deletions
|
@ -7,7 +7,9 @@ defaults = {
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'dhcpd/fixed_allocations',
|
||||
)
|
||||
def get_static_allocations(metadata):
|
||||
allocations = {}
|
||||
for rnode in repo.nodes:
|
||||
|
@ -28,7 +30,9 @@ def get_static_allocations(metadata):
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'dhcpd/listen_interfaces',
|
||||
)
|
||||
def get_listen_interfaces(metadata):
|
||||
listen_interfaces = []
|
||||
for identfier, subnet in node.metadata.get('dhcpd/subnets', {}).items():
|
||||
|
@ -41,7 +45,9 @@ def get_listen_interfaces(metadata):
|
|||
}
|
||||
|
||||
|
||||
@metadata_reactor
|
||||
@metadata_reactor.provides(
|
||||
'iptables/bundle_rules/dhcpd',
|
||||
)
|
||||
def iptables(metadata):
|
||||
iptables = set()
|
||||
for identfier, subnet in node.metadata.get('dhcpd/subnets', {}).items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue