Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Re2o
dhcp
Commits
48feb825
Commit
48feb825
authored
Jan 22, 2020
by
nanoy
Committed by
root
Jan 22, 2020
Browse files
Compatibilité 2.8
parent
0bf05dba
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
48feb825
...
...
@@ -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
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment