New api handling, and typos
This commit is contained in:
parent
4e04cfb8be
commit
8e70bc5ece
2 changed files with 4 additions and 3 deletions
5
main.py
Normal file → Executable file
5
main.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import socket
|
import socket
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -124,7 +125,7 @@ def write_dns_files(api_client):
|
||||||
|
|
||||||
cname_records = "\n".join(
|
cname_records = "\n".join(
|
||||||
template_cname.format(hostname=x['hostname'],
|
template_cname.format(hostname=x['hostname'],
|
||||||
alias=x['alias']+extension=x['extension'])
|
alias=x['alias'],extension=x['extension'])
|
||||||
for x in zone['cname_records']
|
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]
|
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 \
|
# if service['hostname'] == client_hostname and \
|
||||||
# service['service_name'] == 'dns' and \
|
# service['service_name'] == 'dns' and \
|
||||||
# service['need_regen']:
|
# service['need_regen']:
|
||||||
|
|
2
re2oapi
2
re2oapi
|
@ -1 +1 @@
|
||||||
Subproject commit 5b4523c797bffb90c998d5b424548756baa0c1d2
|
Subproject commit b0885f7b84245fa22ccb1b91c00d03675c1cfafc
|
Loading…
Add table
Add a link
Reference in a new issue