|
|
|
@ -59,27 +59,27 @@ class _TypeBaseFilter(_FilterProcessor): |
|
|
|
class TypeAllowlistFilter(_TypeBaseFilter, AllowsMixin): |
|
|
|
'''Only manage records of the specified type(s). |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-a-and-aaaa: |
|
|
|
class: octodns.processor.filter.TypeAllowlistFilter |
|
|
|
allowlist: |
|
|
|
- A |
|
|
|
- AAAA |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-a-and-aaaa |
|
|
|
targets: |
|
|
|
- ns1 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-a-and-aaaa: |
|
|
|
class: octodns.processor.filter.TypeAllowlistFilter |
|
|
|
allowlist: |
|
|
|
- A |
|
|
|
- AAAA |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-a-and-aaaa |
|
|
|
targets: |
|
|
|
- ns1 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, allowlist, **kwargs): |
|
|
|
@ -89,26 +89,26 @@ class TypeAllowlistFilter(_TypeBaseFilter, AllowsMixin): |
|
|
|
class TypeRejectlistFilter(_TypeBaseFilter, RejectsMixin): |
|
|
|
'''Ignore records of the specified type(s). |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
ignore-cnames: |
|
|
|
class: octodns.processor.filter.TypeRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
- CNAME |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- ignore-cnames |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
ignore-cnames: |
|
|
|
class: octodns.processor.filter.TypeRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
- CNAME |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- ignore-cnames |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, rejectlist, **kwargs): |
|
|
|
@ -146,33 +146,33 @@ class _NameBaseFilter(_FilterProcessor): |
|
|
|
class NameAllowlistFilter(_NameBaseFilter, AllowsMixin): |
|
|
|
'''Only manage records with names that match the provider patterns |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-these: |
|
|
|
class: octodns.processor.filter.NameAllowlistFilter |
|
|
|
allowlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-these: |
|
|
|
class: octodns.processor.filter.NameAllowlistFilter |
|
|
|
allowlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, allowlist, **kwargs): |
|
|
|
@ -182,33 +182,33 @@ class NameAllowlistFilter(_NameBaseFilter, AllowsMixin): |
|
|
|
class NameRejectlistFilter(_NameBaseFilter, RejectsMixin): |
|
|
|
'''Reject managing records with names that match the provider patterns |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
not-these: |
|
|
|
class: octodns.processor.filter.NameRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- not-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
not-these: |
|
|
|
class: octodns.processor.filter.NameRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- not-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, rejectlist, **kwargs): |
|
|
|
@ -255,33 +255,33 @@ class _ValueBaseFilter(_FilterProcessor): |
|
|
|
class ValueAllowlistFilter(_ValueBaseFilter, AllowsMixin): |
|
|
|
'''Only manage records with values that match the provider patterns |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-these: |
|
|
|
class: octodns.processor.filter.ValueAllowlistFilter |
|
|
|
allowlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-these: |
|
|
|
class: octodns.processor.filter.ValueAllowlistFilter |
|
|
|
allowlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, allowlist, **kwargs): |
|
|
|
@ -292,33 +292,33 @@ class ValueAllowlistFilter(_ValueBaseFilter, AllowsMixin): |
|
|
|
class ValueRejectlistFilter(_ValueBaseFilter, RejectsMixin): |
|
|
|
'''Reject managing records with names that match the provider patterns |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
not-these: |
|
|
|
class: octodns.processor.filter.ValueRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- not-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
not-these: |
|
|
|
class: octodns.processor.filter.ValueRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
# exact string match |
|
|
|
- www |
|
|
|
# contains/substring match |
|
|
|
- /substring/ |
|
|
|
# regex pattern match |
|
|
|
- /some-pattern-\\d\\+/ |
|
|
|
# regex - anchored so has to match start to end |
|
|
|
- /^start-.+-end$/ |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- not-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, rejectlist, **kwargs): |
|
|
|
@ -356,27 +356,27 @@ class _NetworkValueBaseFilter(BaseProcessor): |
|
|
|
|
|
|
|
|
|
|
|
class NetworkValueAllowlistFilter(_NetworkValueBaseFilter, AllowsMixin): |
|
|
|
'''Only manage A and AAAA records with values that match the provider patterns |
|
|
|
All other types will be left as-is. |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-these: |
|
|
|
class: octodns.processor.filter.NetworkValueAllowlistFilter |
|
|
|
allowlist: |
|
|
|
- 127.0.0.1/32 |
|
|
|
- 192.168.0.0/16 |
|
|
|
- fd00::/8 |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
'''Only manage A and AAAA records with values that match the provider |
|
|
|
patterns All other types will be left as-is. |
|
|
|
|
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
only-these: |
|
|
|
class: octodns.processor.filter.NetworkValueAllowlistFilter |
|
|
|
allowlist: |
|
|
|
- 127.0.0.1/32 |
|
|
|
- 192.168.0.0/16 |
|
|
|
- fd00::/8 |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- only-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, allowlist): |
|
|
|
@ -384,27 +384,27 @@ class NetworkValueAllowlistFilter(_NetworkValueBaseFilter, AllowsMixin): |
|
|
|
|
|
|
|
|
|
|
|
class NetworkValueRejectlistFilter(_NetworkValueBaseFilter, RejectsMixin): |
|
|
|
'''Reject managing A and AAAA records with value matching a that match the provider patterns |
|
|
|
All other types will be left as-is. |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
not-these: |
|
|
|
class: octodns.processor.filter.NetworkValueRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
- 127.0.0.1/32 |
|
|
|
- 192.168.0.0/16 |
|
|
|
- fd00::/8 |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- not-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
'''Reject managing A and AAAA records with value matching a that match the |
|
|
|
provider patterns All other types will be left as-is. |
|
|
|
|
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
not-these: |
|
|
|
class: octodns.processor.filter.NetworkValueRejectlistFilter |
|
|
|
rejectlist: |
|
|
|
- 127.0.0.1/32 |
|
|
|
- 192.168.0.0/16 |
|
|
|
- fd00::/8 |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- not-these |
|
|
|
targets: |
|
|
|
- route53 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, rejectlist): |
|
|
|
@ -414,20 +414,20 @@ class NetworkValueRejectlistFilter(_NetworkValueBaseFilter, RejectsMixin): |
|
|
|
class IgnoreRootNsFilter(BaseProcessor): |
|
|
|
'''Do not manage Root NS Records. |
|
|
|
|
|
|
|
Example usage: |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
no-root-ns: |
|
|
|
class: octodns.processor.filter.IgnoreRootNsFilter |
|
|
|
processors: |
|
|
|
no-root-ns: |
|
|
|
class: octodns.processor.filter.IgnoreRootNsFilter |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- no-root-ns |
|
|
|
targets: |
|
|
|
- ns1 |
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- no-root-ns |
|
|
|
targets: |
|
|
|
- ns1 |
|
|
|
''' |
|
|
|
|
|
|
|
def _process(self, zone, *args, **kwargs): |
|
|
|
@ -444,25 +444,25 @@ class IgnoreRootNsFilter(BaseProcessor): |
|
|
|
class ExcludeRootNsChanges(BaseProcessor): |
|
|
|
'''Do not allow root NS record changes |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
exclude-root-ns-changes: |
|
|
|
class: octodns.processor.filter.ExcludeRootNsChanges |
|
|
|
# If true an a change for a root NS is seen an error will be thrown. If |
|
|
|
# false a warning will be printed and the change will be removed from |
|
|
|
# the plan. |
|
|
|
# (default: true) |
|
|
|
error: true |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- exclude-root-ns-changes |
|
|
|
targets: |
|
|
|
- ns1 |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
exclude-root-ns-changes: |
|
|
|
class: octodns.processor.filter.ExcludeRootNsChanges |
|
|
|
# If true an a change for a root NS is seen an error will be thrown. |
|
|
|
# If false a warning will be printed and the change will be removed |
|
|
|
# from the plan. |
|
|
|
# (default: true) |
|
|
|
error: true |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- exclude-root-ns-changes |
|
|
|
targets: |
|
|
|
- ns1 |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, error=True): |
|
|
|
@ -492,28 +492,28 @@ class ExcludeRootNsChanges(BaseProcessor): |
|
|
|
class ZoneNameFilter(_FilterProcessor): |
|
|
|
'''Filter or error on record names that contain the zone name |
|
|
|
|
|
|
|
Example usage: |
|
|
|
|
|
|
|
processors: |
|
|
|
zone-name: |
|
|
|
class: octodns.processor.filter.ZoneNameFilter |
|
|
|
# If true a ValidationError will be throw when such records are |
|
|
|
# encouterd, if false the records will just be ignored/omitted. |
|
|
|
# (default: true) |
|
|
|
# error: True |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- zone-name |
|
|
|
targets: |
|
|
|
- azure |
|
|
|
Example usage:: |
|
|
|
|
|
|
|
processors: |
|
|
|
zone-name: |
|
|
|
class: octodns.processor.filter.ZoneNameFilter |
|
|
|
# If true a ValidationError will be throw when such records are |
|
|
|
# encouterd, if false the records will just be ignored/omitted. |
|
|
|
# (default: true) |
|
|
|
# error: True |
|
|
|
# Optional param that can be set to False to leave the target zone |
|
|
|
# alone, thus allowing deletion of existing records |
|
|
|
# (default: true) |
|
|
|
# include_target: True |
|
|
|
|
|
|
|
zones: |
|
|
|
exxampled.com.: |
|
|
|
sources: |
|
|
|
- config |
|
|
|
processors: |
|
|
|
- zone-name |
|
|
|
targets: |
|
|
|
- azure |
|
|
|
''' |
|
|
|
|
|
|
|
def __init__(self, name, error=True, **kwargs): |
|
|
|
|