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

Add doc for processor.filter.*

This commit is contained in:
Ross McFarland
2022-08-27 16:29:00 -07:00
parent 82be4834fb
commit a3e90ca4ac

View File

@@ -13,6 +13,27 @@ from .base import BaseProcessor
class TypeAllowlistFilter(BaseProcessor):
'''Only manage records of the specified type(s).
Example usage:
processors:
only-a-and-aaaa:
class: octodns.processor.filter.TypeRejectlistFilter
rejectlist:
- A
- AAAA
zones:
exxampled.com.:
sources:
- config
processors:
- only-a-and-aaaa
targets:
- ns1
'''
def __init__(self, name, allowlist):
super(TypeAllowlistFilter, self).__init__(name)
self.allowlist = set(allowlist)
@@ -29,6 +50,26 @@ class TypeAllowlistFilter(BaseProcessor):
class TypeRejectlistFilter(BaseProcessor):
'''Ignore records of the specified type(s).
Example usage:
processors:
ignore-cnames:
class: octodns.processor.filter.TypeRejectlistFilter
rejectlist:
- CNAME
zones:
exxampled.com.:
sources:
- config
processors:
- ignore-cnames
targets:
- route53
'''
def __init__(self, name, rejectlist):
super(TypeRejectlistFilter, self).__init__(name)
self.rejectlist = set(rejectlist)