|
|
|
@ -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) |
|
|
|
|