From: Frank Brehm Date: Thu, 18 Jan 2018 13:09:35 +0000 (+0100) Subject: Minor changes because of inserting the reverse IPv6 zone X-Git-Tag: 0.1.2~13 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=49c742a4b475de15e7efd22a4ef7d30c54b896f0;p=pixelpark%2Fadmin-tools.git Minor changes because of inserting the reverse IPv6 zone --- diff --git a/pp_lib/import_pdnsdata.py b/pp_lib/import_pdnsdata.py index e54c34a..8686c99 100644 --- a/pp_lib/import_pdnsdata.py +++ b/pp_lib/import_pdnsdata.py @@ -30,12 +30,13 @@ import pymysql # Own modules from .common import pp, to_bool, to_str +from .common import RE_DOT_AT_END from .cfg_app import PpCfgAppError, PpConfigApplication from .pdns_record import PdnsSoaData -__version__ = '0.9.1' +__version__ = '0.9.2' LOG = logging.getLogger(__name__) # ============================================================================= @@ -1469,8 +1470,9 @@ class ImportPdnsdataApp(PpConfigApplication): "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]) soa = PdnsSoaData( - primary=nameservers[0], email=mail_addr, serial=serial, + primary=ns_used, email=mail_addr, serial=serial, refresh=refresh, retry=retry, expire=expire, ttl=ttl, appname=self.appname, verbose=self.verbose, base_dir=self.base_dir, ) @@ -1504,8 +1506,9 @@ class ImportPdnsdataApp(PpConfigApplication): %(change_date)s, %(disabled)s, '', %(auth)s) ''').strip() for ns in nameservers: + ns_used = RE_DOT_AT_END.sub('', ns) data = { - 'domain_id': domain_id, 'name': zone_name, 'content': ns, + 'domain_id': domain_id, 'name': zone_name, 'content': ns_used, 'ttl': ttl, 'change_date': change_date, 'disabled': False, 'auth': True, } if self.verbose > 1: