ascension

Migrate DNS zones to the GNU Name System
Log | Files | Refs | README | LICENSE

commit dcbf85209aa709001467fe154ad0a8fe05e4aef2
parent afc7b211cc79a93cd9bcd00896f5e8ecf2584d39
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  1 May 2019 13:59:47 +0200

alpha renaming for sanity

Diffstat:
Mascension/ascension.py | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/ascension/ascension.py b/ascension/ascension.py @@ -128,7 +128,7 @@ class Ascender(): logging.info("Zone %s already exists!", cls.domain) @classmethod - def get_current_serial(cls, domain, resolver=None): + def get_dns_zone_serial(cls, domain, resolver=None): """ Gets the current serial for a given zone :param domain: Domain to query for in DNS @@ -174,12 +174,11 @@ class Ascender(): return soa_record[2].serial @classmethod - def mirror_zone(cls): + def mirror_zone(cls, zoneserial=None): """ Extract necessary information from Generator """ - currentserial = int(cls.get_current_serial(cls.domain, cls.transferns)) - zoneserial = int(cls.get_zone_serial()) + currentserial = int(cls.get_dns_zone_serial(cls.domain, cls.transferns)) if zoneserial == 0: logging.info("zone does not exist yet") cls.initial_zone_transfer() @@ -511,7 +510,7 @@ class Ascender(): return (rdtype, value, label) @classmethod - def get_zone_serial(cls): + def get_gns_zone_serial(cls): """ Fetches the zones serial from GNS :returns: serial of the SOA record in GNS @@ -740,9 +739,9 @@ def main(): # Event loop for actual daemon while True: - serial = ascender.get_zone_serial() + serial = ascender.get_gns_zone_serial() ascender.initial_zone_transfer(serial) - ascender.mirror_zone() + ascender.mirror_zone(serial) ascender.bootstrap_zone() if ascender.zone is not None: ascender.add_records_to_gns()