mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Base support for managing root NS records
* Zone object no longer treats them special, some tests needed adjusting b/c of this, some provider's tests may also need adjusting, though they should not plan changes since they won't (yet) have SUPPORTS_ROOT_NS * _process_desired_zone filters and warns when not supported * YamlProvider supports them * TinyDnsBaseSource supports them
This commit is contained in:
@@ -24,12 +24,6 @@ class InvalidNodeException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def _is_eligible(record):
|
||||
# Should this record be considered when computing changes
|
||||
# We ignore all top-level NS records
|
||||
return record._type != 'NS' or record.name != ''
|
||||
|
||||
|
||||
class Zone(object):
|
||||
log = getLogger('Zone')
|
||||
|
||||
@@ -118,7 +112,7 @@ class Zone(object):
|
||||
changes = []
|
||||
|
||||
# Find diffs & removes
|
||||
for record in filter(_is_eligible, self.records):
|
||||
for record in self.records:
|
||||
if record.ignored:
|
||||
continue
|
||||
elif len(record.included) > 0 and \
|
||||
@@ -168,7 +162,7 @@ class Zone(object):
|
||||
# Find additions, things that are in desired, but missing in ourselves.
|
||||
# This uses set math and our special __hash__ and __cmp__ functions as
|
||||
# well
|
||||
for record in filter(_is_eligible, desired.records - self.records):
|
||||
for record in desired.records - self.records:
|
||||
if record.ignored:
|
||||
continue
|
||||
elif len(record.included) > 0 and \
|
||||
|
||||
Reference in New Issue
Block a user