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
979accb4
Commit
979accb4
authored
Jun 27, 2018
by
jacomme
Browse files
stupid charlie, stupid
parent
e167047f
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.py
View file @
979accb4
...
...
@@ -14,7 +14,7 @@ api_username = config.get('Re2o', 'username')
def
regen_dhcp
(
api_client
):
host_mac_ip
=
{}
for
hmi
in
api_client
.
view
(
"dhcp/hostmacip/"
)
[
'results'
]
:
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'
],
...
...
@@ -42,7 +42,7 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
client_hostname
=
socket
.
gethostname
().
split
(
'.'
,
1
)[
0
]
for
service
in
api_client
.
view
(
"services/regen"
)
[
'results'
]
:
for
service
in
api_client
.
list
(
"services/regen"
):
#if service['hostname'] == client_hostname and \
# service['service_name'] == 'dhcp' and \
# service['need_regen']:
...
...
Write
Preview
Markdown
is supported
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