# Third party modules
# Own modules
-from .common import pp, to_bytes, to_utf8
+from .common import pp, to_bytes, to_utf8, to_bool
from .errors import PpError
from .obj import PpBaseObjectError, PpBaseObject
from .pdns_record import PdnsApiRrset
-__version__ = '0.4.1'
+__version__ = '0.4.2'
LOG = logging.getLogger(__name__)
self, appname=None, verbose=0, version=__version__, base_dir=None, initialized=None,
account=None, dnssec=False, id=None, kind=None, last_check=None,
masters=None, name=None, notified_serial=None, serial=None, url=None,
- rrsets=None, soa_edit=None, soa_edit_api=None):
+ rrsets=None, soa_edit=None, soa_edit_api=None, nsec3narrow=None, nsec3param=None,
+ presigned=None, api_rectify=None):
# { 'account': 'local',
# 'dnssec': False,
self._notified_serial = notified_serial
self._serial = serial
self._url = url
+ self._nsec3narrow = None
+ if nsec3narrow is not None:
+ self._nsec3narrow = to_bool(nsec3narrow)
+ self._nsec3param = None
+ if nsec3param is not None and str(nsec3param).strip() != '':
+ self._nsec3param = str(nsec3param).strip()
+ self._presigned = None
+ if presigned is not None:
+ self._presigned = to_bool(presigned)
+ self._api_rectify = None
+ if api_rectify is not None:
+ self._api_rectify = to_bool(api_rectify)
self.rrsets = []
self._soa_edit = soa_edit
"""The SOA edit property (API) of the zone object."""
return getattr(self, '_soa_edit_api', None)
+ # -----------------------------------------------------------
+ @property
+ def nsec3narrow(self):
+ """Some stuff belonging to DNSSEC."""
+ return getattr(self, '_nsec3narrow', None)
+
+ # -----------------------------------------------------------
+ @property
+ def nsec3param(self):
+ """Some stuff belonging to DNSSEC."""
+ return getattr(self, '_nsec3param', None)
+
+ # -----------------------------------------------------------
+ @property
+ def presigned(self):
+ """Some stuff belonging to PowerDNS >= 4.1."""
+ return getattr(self, '_presigned', None)
+
+ # -----------------------------------------------------------
+ @property
+ def api_rectify(self):
+ """Some stuff belonging to PowerDNS >= 4.1."""
+ return getattr(self, '_api_rectify', None)
+
# -------------------------------------------------------------------------
def as_dict(self, short=True):
"""
res['rrsets'] = []
res['soa_edit'] = self.soa_edit
res['soa_edit_api'] = self.soa_edit_api
+ res['nsec3narrow'] = self.nsec3narrow
+ res['nsec3param'] = self.nsec3param
+ res['presigned'] = self.presigned
+ res['api_rectify'] = self.api_rectify
for rrset in self.rrsets:
if isinstance(rrset, PpBaseObject):