aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Fincham <michael@hotplate.co.nz>2018-07-24 17:07:38 +1200
committerGitHub <noreply@github.com>2018-07-24 17:07:38 +1200
commit762519a25bfcff369c4928582d7ad5b0b8213065 (patch)
tree8b29b31cab49adebde28eb296068b870a3362cc7
parent6b5aed6952268837775bc27f8dce755022b3e66b (diff)
downloadPowerDNS-CLI-762519a25bfcff369c4928582d7ad5b0b8213065.tar.gz
PowerDNS-CLI-762519a25bfcff369c4928582d7ad5b0b8213065.tar.bz2
PowerDNS-CLI-762519a25bfcff369c4928582d7ad5b0b8213065.zip
Switch to HTTPSHEADmaster
-rwxr-xr-xpdns.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pdns.py b/pdns.py
index 3bde88a..3645f70 100755
--- a/pdns.py
+++ b/pdns.py
@@ -121,7 +121,7 @@ class PDNSControl(object):
"nameservers": []
}
- zone_check_uri = ("http://%s:%s/api/v1/servers/localhost/zones/%s"
+ zone_check_uri = ("https://%s:%s/api/v1/servers/localhost/zones/%s"
% (self.args.apihost, self.args.apiport, self.args.zone))
logger.debug("sending GET request to %s" % zone_check_uri)
zone_check = requests.get(zone_check_uri, headers=self.headers)
@@ -258,7 +258,7 @@ class PDNSControl(object):
try:
def_web_port = os.environ['WEB_PORT']
except KeyError:
- def_web_port = '8081'
+ def_web_port = '443'
parser = argparse.ArgumentParser(description='PDNS Controls...')
parser.add_argument('action', help='Define action to take',
@@ -302,19 +302,19 @@ class PDNSControl(object):
self.headers = {'X-API-Key': self.args.apikey}
if (self.args.action == "add_zone" or (self.args.action == "query_zone" and
self.args.zone is None)):
- self.uri = ("http://%s:%s/api/v1/servers/localhost/zones"
+ self.uri = ("https://%s:%s/api/v1/servers/localhost/zones"
% (self.args.apihost, self.args.apiport))
elif self.args.action == "add_record" \
or self.args.action == "delete_record" \
or self.args.action == "delete_zone" \
or self.args.action == "query_zone":
- self.uri = ("http://%s:%s/api/v1/servers/localhost/zones/%s"
+ self.uri = ("https://%s:%s/api/v1/servers/localhost/zones/%s"
% (self.args.apihost, self.args.apiport, self.args.zone))
elif self.args.action == "query_config":
- self.uri = ("http://%s:%s/api/v1/servers/localhost/config"
+ self.uri = ("https://%s:%s/api/v1/servers/localhost/config"
% (self.args.apihost, self.args.apiport))
elif self.args.action == "query_stats":
- self.uri = ("http://%s:%s/api/v1/servers/localhost/statistics"
+ self.uri = ("https://%s:%s/api/v1/servers/localhost/statistics"
% (self.args.apihost, self.args.apiport))
if __name__ == '__main__':