Browse Source

Remove redundant code and use rdata_text

pull/1132/head
Nullreff 2 years ago
parent
commit
7a5512f601
2 changed files with 4 additions and 10 deletions
  1. +2
    -2
      README.md
  2. +2
    -8
      octodns/processor/filter.py

+ 2
- 2
README.md View File

@ -335,8 +335,8 @@ Similar to providers, but can only serve to populate records into a zone, cannot
| [MetaProcessor](/octodns/processor/meta.py) | Adds a special meta record with timing, UUID, providers, and/or version to aid in debugging and monitoring. |
| [NameAllowlistFilter](/octodns/processor/filter.py) | Filter that ONLY manages records that match specified naming patterns, all others will be ignored |
| [NameRejectlistFilter](/octodns/processor/filter.py) | Filter that INGORES records that match specified naming patterns, all others will be managed |
| [ValueAllowlistFilter](/octodns/processor/filter.py) | Filter that ONLY manages records that match specified value patterns, all others will be ignored |
| [ValueRejectlistFilter](/octodns/processor/filter.py) | Filter that INGORES records that match specified value patterns, all others will be managed |
| [ValueAllowlistFilter](/octodns/processor/filter.py) | Filter that ONLY manages records that match specified value patterns based on `rdata_text`, all others will be ignored |
| [ValueRejectlistFilter](/octodns/processor/filter.py) | Filter that INGORES records that match specified value patterns based on `rdata_text`, all others will be managed |
| [OwnershipProcessor](/octodns/processor/ownership.py) | Processor that implements ownership in octoDNS so that it can manage only the records in a zone in sources and will ignore all others. |
| [SpfDnsLookupProcessor](/octodns/processor/spf.py) | Processor that checks SPF values for violations of DNS query limits |
| [TtlRestrictionFilter](/octodns/processor/restrict.py) | Processor that restricts the allow TTL values to a specified range or list of specific values |


+ 2
- 8
octodns/processor/filter.py View File

@ -232,9 +232,9 @@ class _ValueBaseFilter(_FilterProcessor):
for record in zone.records:
values = []
if hasattr(record, 'values'):
values = [str(value) for value in record.values]
values = [value.rdata_text for value in record.values]
else:
values = [str(record.value)]
values = [record.value.rdata_text]
if any(value in self.exact for value in values):
self.matches(zone, record)
@ -280,9 +280,6 @@ class ValueAllowlistFilter(_ValueBaseFilter, AllowsMixin):
- route53
'''
def __init__(self, name, allowlist):
super().__init__(name, allowlist)
class ValueRejectlistFilter(_ValueBaseFilter, RejectsMixin):
'''Reject managing records with names that match the provider patterns
@ -316,9 +313,6 @@ class ValueRejectlistFilter(_ValueBaseFilter, RejectsMixin):
- route53
'''
def __init__(self, name, rejectlist):
super().__init__(name, rejectlist)
class _NetworkValueBaseFilter(BaseProcessor):
def __init__(self, name, _list):


Loading…
Cancel
Save