from .pdns_record import PdnsSoaData
-__version__ = '0.9.2'
+__version__ = '0.9.3'
LOG = logging.getLogger(__name__)
# =============================================================================
result['ordername'] = ''
else:
result['ordername'] = ''
+ if result['type'] in ('NS', 'MX'):
+ result['content'] = RE_DOT_AT_END.sub('', result['content'])
+ elif result['type'] == 'SOA':
+ soa = PdnsSoaData.init_from_data(
+ result['content'], appname=self.appname,
+ verbose=self.verbose, base_dir=self.base_dir)
+ soa.primary = RE_DOT_AT_END.sub('', soa.primary)
+ soa.email = RE_DOT_AT_END.sub('', soa.email)
+ result['content'] = soa.data
if not self.simulate:
tgt_cursor.execute(tgt_sql, result)
LOG.info("Imported {} records.".format(i))
'ns3.pp-dns.com.',
'ns4.pp-dns.com.',
)
- mail_addr = 'hostmaster.pixelpark.net.'
+ mail_addr = 'hostmaster.pixelpark.net'
LOG.info("Creating zone {z!r} for AS network {n!r} ...".format(
z=zone_name, n=net_addr))
"Did not found Domain Id of zone {!r}.".format(zone_name))
LOG.info("Using Id of zone {z!r}: {i}.".format(z=zone_name, i=domain_id))
- ns_used = RE_DOT_AT_END.sub('.', nameservers[0])
+ ns_used = RE_DOT_AT_END.sub('', nameservers[0])
soa = PdnsSoaData(
primary=ns_used, email=mail_addr, serial=serial,
refresh=refresh, retry=retry, expire=expire, ttl=ttl,