1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

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

This commit is contained in:
Ross McFarland
2020-12-03 18:12:16 -08:00
parent e4d6084b4c
commit 95d9ffc221
2 changed files with 3 additions and 3 deletions

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:

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)