Browse Source

Merge pull request #737 from meghashyamps/ignore-non-octo-managed-monitors

skip monitors that are not managed by OctoDNS
pull/739/head
Ross McFarland 5 years ago
committed by GitHub
parent
commit
c5f023dca8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions
  1. +2
    -0
      octodns/provider/ns1.py
  2. +12
    -0
      tests/test_octodns_provider_ns1.py

+ 2
- 0
octodns/provider/ns1.py View File

@ -849,6 +849,8 @@ class Ns1Provider(BaseProvider):
for monitor in self._client.monitors.values():
data = self._parse_notes(monitor['notes'])
if not data:
continue
if expected_host == data['host'] and \
expected_type == data['type']:
# This monitor does not belong to this record


+ 12
- 0
tests/test_octodns_provider_ns1.py View File

@ -659,6 +659,18 @@ class TestNs1ProviderDynamic(TestCase):
},
'four': monitor_four,
'five': monitor_five,
'six': {
'config': {
'host': '10.10.10.10',
},
'notes': 'non-conforming notes',
},
'seven': {
'config': {
'host': '11.11.11.11',
},
'notes': None,
},
}
# Would match, but won't get there b/c it's not dynamic


Loading…
Cancel
Save