enable regen
This commit is contained in:
parent
2e7cac5001
commit
f44fae7c55
4 changed files with 5 additions and 5 deletions
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
README.md
Normal file → Executable file
0
README.md
Normal file → Executable file
0
config.ini.example
Normal file → Executable file
0
config.ini.example
Normal file → Executable file
10
main.py
10
main.py
|
@ -43,8 +43,8 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
|
|||
client_hostname = socket.gethostname().split('.', 1)[0]
|
||||
|
||||
for service in api_client.list("services/regen"):
|
||||
#if service['hostname'] == client_hostname and \
|
||||
# service['service_name'] == 'dhcp' and \
|
||||
# service['need_regen']:
|
||||
regen_dhcp(api_client)
|
||||
api_client.patch(service['api_url'], data={'need_regen': False})
|
||||
if service['hostname'] == client_hostname and \
|
||||
service['service_name'] == 'dhcp' and \
|
||||
service['need_regen']:
|
||||
regen_dhcp(api_client)
|
||||
api_client.patch(service['api_url'], data={'need_regen': False})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue