Commit 48feb825 authored by nanoy's avatar nanoy Committed by root
Browse files

Compatibilité 2.8

parent 0bf05dba
......@@ -29,11 +29,12 @@ def regen_dhcp(api_client):
host_mac_ip = {}
for hmi in api_client.list("dhcp/hostmacip/"):
if hmi['extension'] not in host_mac_ip.keys():
host_mac_ip[hmi['extension']] = []
host_mac_ip[hmi['extension']].append((hmi['hostname'],
hmi['mac_address'],
hmi['ipv4']))
if 'ipv4' in hmi:
if hmi['extension'] not in host_mac_ip.keys():
host_mac_ip[hmi['extension']] = []
host_mac_ip[hmi['extension']].append((hmi['hostname'],
hmi['mac_address'],
hmi['ipv4']))
template = ("host {hostname}{extension} {{\n"
" hardware ethernet {mac_address};\n"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment