New api handling, and typos

This commit is contained in:
Charlie Jacomme 2018-06-27 17:07:04 +02:00
parent 4e04cfb8be
commit 8e70bc5ece
2 changed files with 4 additions and 3 deletions

5
main.py Normal file → Executable file
View file

@ -1,3 +1,4 @@
#!/usr/bin/env python3
from configparser import ConfigParser
import socket
import datetime
@ -124,7 +125,7 @@ def write_dns_files(api_client):
cname_records = "\n".join(
template_cname.format(hostname=x['hostname'],
alias=x['alias']+extension=x['extension'])
alias=x['alias'],extension=x['extension'])
for x in zone['cname_records']
)
@ -153,7 +154,7 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
client_hostname = socket.gethostname().split('.', 1)[0]
for service in api_client.list_servicesregen():
for service in api_client.view("services/regen/"):
# if service['hostname'] == client_hostname and \
# service['service_name'] == 'dns' and \
# service['need_regen']:

@ -1 +1 @@
Subproject commit 5b4523c797bffb90c998d5b424548756baa0c1d2
Subproject commit b0885f7b84245fa22ccb1b91c00d03675c1cfafc