|
|
@ -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, |
|
|
|