roulette
This commit is contained in:
parent
4705ca5e7b
commit
095d81c113
2 changed files with 6 additions and 2 deletions
|
@ -46,10 +46,12 @@ def gen_ip_mac_set():
|
|||
"""
|
||||
api_client = Re2oAPIClient(api_hostname, api_username, api_password)
|
||||
hosts = api_client.list('dhcp/hostmacip')
|
||||
for h in hosts:
|
||||
print(h)
|
||||
content = [
|
||||
(h['ipv4'], h['mac_address'])
|
||||
for h in hosts
|
||||
if h['ipv4'] and h['mac_address']
|
||||
if 'ipv4' in h and h['ipv4'] and h['mac_address']
|
||||
]
|
||||
return NetfilterSet(
|
||||
target_content=content,
|
||||
|
|
|
@ -23,7 +23,9 @@ table inet firewall {
|
|||
type ipv4_addr
|
||||
elements = {
|
||||
10.7.0.4,
|
||||
92.242.132.24
|
||||
92.242.132.24,
|
||||
104.28.28.23,
|
||||
104.28.29.23
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue