Browse Source

Tell the processor when it's being called in a target context

pull/637/head
Ross McFarland 5 years ago
parent
commit
95d9ffc221
No known key found for this signature in database GPG Key ID: 61C10C4FC8FE4A89
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      octodns/processors/filters.py
  2. +1
    -1
      octodns/provider/base.py

+ 2
- 2
octodns/processors/filters.py View File

@ -14,7 +14,7 @@ class TypeAllowlistFilter(BaseProcessor):
super(TypeAllowlistFilter, self).__init__(name)
self.allowlist = allowlist
def process(self, zone):
def process(self, zone, target=False):
ret = self._create_zone(zone)
for record in zone.records:
if record._type in self.allowlist:
@ -29,7 +29,7 @@ class TypeRejectlistFilter(BaseProcessor):
super(TypeRejectlistFilter, self).__init__(name)
self.rejectlist = rejectlist
def process(self, zone):
def process(self, zone, target=False):
ret = self._create_zone(zone)
for record in zone.records:
if record._type not in self.rejectlist:


+ 1
- 1
octodns/provider/base.py View File

@ -56,7 +56,7 @@ class BaseProvider(BaseSource):
'exists', self.id)
for processor in processors:
existing = processor.process(existing)
existing = processor.process(existing, target=True)
# compute the changes at the zone/record level
changes = existing.changes(desired, self)


Loading…
Cancel
Save