enable regen

This commit is contained in:
Charlie Jacomme 2018-08-08 19:16:03 +02:00
parent 2e7cac5001
commit f44fae7c55
4 changed files with 5 additions and 5 deletions

0
.gitignore vendored Normal file → Executable file
View file

0
README.md Normal file → Executable file
View file

0
config.ini.example Normal file → Executable file
View file

View file

@ -43,8 +43,8 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
client_hostname = socket.gethostname().split('.', 1)[0] client_hostname = socket.gethostname().split('.', 1)[0]
for service in api_client.list("services/regen"): for service in api_client.list("services/regen"):
#if service['hostname'] == client_hostname and \ if service['hostname'] == client_hostname and \
# service['service_name'] == 'dhcp' and \ service['service_name'] == 'dhcp' and \
# service['need_regen']: service['need_regen']:
regen_dhcp(api_client) regen_dhcp(api_client)
api_client.patch(service['api_url'], data={'need_regen': False}) api_client.patch(service['api_url'], data={'need_regen': False})