from .pdns_zone import PdnsApiZone
from .pdns_record import compare_rrsets
-__version__ = '0.4.1'
+__version__ = '0.4.2'
LOG = logging.getLogger(__name__)
LOG.info("Show all information about zone {} from PowerDNS environment {!r}.".format(
zout, self.environment))
-
- path = "/servers/{}/zones/{}".format(self.api_servername, zone_name)
- try:
- json_response = self.perform_request(path)
- except (PDNSApiNotFoundError, PDNSApiValidationError) as e:
- LOG.error("The given zone {} was not found.".format(zout))
- return False
- if self.verbose > 2:
- LOG.debug("Got a response:\n{}".format(pp(json_response)))
-
- zone = PdnsApiZone.init_from_dict(
- json_response, appname=self.appname, verbose=self.verbose, base_dir=self. base_dir)
- if self.verbose > 2:
- LOG.debug("Zone object:\n{}".format(pp(zone.as_dict())))
+ zone = self.get_api_zone(zone_name)
msg = "All information about zone {}:".format(zout)
print("\n{}".format(msg))