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:
@@ -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:
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user