from .cfg_app import PpCfgAppError, PpConfigApplication
-__version__ = '0.8.8'
+__version__ = '0.8.9'
LOG = logging.getLogger(__name__)
# =============================================================================
i += 1
dom_id = result['id']
self.domain_ids[dom_id] = result['name']
- if self.is_local(result['name']):
+ if self.is_local_domain(result['name']):
LOG.debug("Setting zone {!r} to a local only zone.".format(result['name']))
cur_account = result['account']
if cur_account is None:
from .pdns_zone import PdnsApiZone
from .pdns_record import PdnsApiRecord, PdnsSoaData, PdnsApiRrset
-__version__ = '0.6.2'
+__version__ = '0.6.3'
LOG = logging.getLogger(__name__)
_LIBRARY_NAME = "pp-pdns-api-client"
ns_ttl = None
if not new_ttl:
cur_rrset = zone.get_ns_rrset(for_zone=for_zone)
- ns_ttl = cur_rrset.ttl
+ if cur_rrset:
+ ns_ttl = cur_rrset.ttl
+ else:
+ soa = zone.get_soa()
+ ns_ttl = soa.ttl
+ del soa
else:
ns_ttl = int(new_ttl)
+ if ns_ttl <= 0:
+ ns_ttl = 3600
LOG.debug("TTL for NS records: {}.".format(ns_ttl))
rrset_name = zone.name.lower()
from .pdns_zone import PdnsApiZone
from .pdns_record import compare_rrsets
-__version__ = '0.2.6'
+__version__ = '0.2.7'
LOG = logging.getLogger(__name__)
new_nameservers = []
hm_address = self.address_hostmaster_public
- is_local = self.is_local(zone_name)
+ is_local = self.is_local_domain(zone_name)
if is_local:
LOG.debug("Using local nameservers for substituting.")
LOG.debug("Update SOA of zone is not necessary.".format(zone_name))
LOG.info("Setting nameservers for zone {!r} ...".format(zone_name))
- comment = "Update NS entries on great NS- and SOA-Migration."
- if not self.set_nameservers(zone, new_nameservers, comment=comment, do_serial=False):
+ if not self.set_nameservers(zone, new_nameservers, do_serial=False):
return False
zone_parts = zone_name.split('.')
z=zone_name, t=top_zone_name))
top_zone = self.get_api_zone(top_zone_name)
return self.set_nameservers(
- top_zone, new_nameservers, zone_name, comment=comment, do_serial=False)
+ top_zone, new_nameservers, zone_name, do_serial=False)
else:
LOG.debug("Top zone {!r} is not in our responsibility.".format(top_zone_name))
return True