From 9c43c92339eaa0996fba256a9c92a538d49fac3c Mon Sep 17 00:00:00 2001 From: Basir Jamil Date: Thu, 6 Jun 2019 18:52:55 -0400 Subject: [PATCH] json parse --- octodns/provider/fastdns.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/octodns/provider/fastdns.py b/octodns/provider/fastdns.py index a58fbe5..7f50cb1 100644 --- a/octodns/provider/fastdns.py +++ b/octodns/provider/fastdns.py @@ -6,10 +6,10 @@ from __future__ import absolute_import, division, print_function, \ unicode_literals ## octodns specfic imports: -from os.path import expanduser import requests from akamai.edgegrid import EdgeGridAuth from urlparse import urljoin +import json import logging @@ -65,12 +65,13 @@ class AkamaiProvider(BaseProvider): self._dns_client = AkamaiClient(client_secret, host, access_token, client_token) - - #self._authenticate(client_secret, host, access_token, client_token) self._zone_records = {} + + + def _authenticate(self, client_secret, host, access_token, client_token): ## generate edgegrid @@ -95,7 +96,11 @@ class AkamaiProvider(BaseProvider): result = self._dns_client.getZone(zone_name) - print(result) + + print "\n\n" + print json.dumps(result, indent=4, separators=(',', ': ')) + print "\n\n" + return