Browse Source

Merge branch 'master' into yaml-supports-fixes

pull/924/head
Ross McFarland 3 years ago
committed by GitHub
parent
commit
9fc7e20531
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 41 additions and 0 deletions
  1. +41
    -0
      octodns/processor/filter.py

+ 41
- 0
octodns/processor/filter.py 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)


Loading…
Cancel
Save