from .errors import PpError
from .obj import PpBaseObjectError, PpBaseObject
-from .pdns_record import PdnsApiRrset
+from .pdns_record import PdnsApiRrset, PdnsSoaData
-__version__ = '0.4.2'
+__version__ = '0.4.3'
LOG = logging.getLogger(__name__)
return tpl.format(**params)
+ # -------------------------------------------------------------------------
+ def get_soa(self):
+
+ soa = None
+
+ for rrset in self.rrsets:
+ if rrset.type == 'SOA':
+ for record in rrset.records:
+ soa = PdnsSoaData.init_from_data(
+ data=record.content, appname=self.appname,
+ verbose=self.verbose, base_dir=self.base_dir)
+ break
+ if soa:
+ break
+
+ return soa
+
# =============================================================================
if __name__ == "__main__":