from .pdns_zone import PdnsApiZone
from .pdns_record import compare_rrsets
-__version__ = '0.2.0'
+__version__ = '0.2.1'
LOG = logging.getLogger(__name__)
self.zone_names.append(zone.name)
for zone_name in self.zone_names:
- self.migrate_zone(zone_name)
+ migrated = self.migrate_zone(zone_name)
+ if self.oneshot and migrated:
+ break
# -------------------------------------------------------------------------
def migrate_zone(self, zone_name):
LOG.info("Migrating zone {!r} ...".format(zone_name))
+ zone = self.get_api_zone(zone_name)
+ if not zone:
+ return False
+
+ if self.is_local(zone_name):
+ LOG.debug("Using local nameservers for substituting.")
+ else:
+ LOG.debug("Using public nameservers for substituting.")
+
+ return True
# =============================================================================