Browse Source

Add User-Agent header to Dyn monitors

pull/35/head
Ross McFarland 9 years ago
parent
commit
1aae060f6d
2 changed files with 4 additions and 2 deletions
  1. +1
    -0
      octodns/provider/dyn.py
  2. +3
    -2
      tests/test_octodns_provider_dyn.py

+ 1
- 0
octodns/provider/dyn.py View File

@ -450,6 +450,7 @@ class DynProvider(BaseProvider):
monitor = DSFMonitor(fqdn, protocol='HTTPS', response_count=2, monitor = DSFMonitor(fqdn, protocol='HTTPS', response_count=2,
probe_interval=60, retries=2, port=443, probe_interval=60, retries=2, port=443,
active='Y', host=fqdn[:-1], timeout=10, active='Y', host=fqdn[:-1], timeout=10,
header='User-Agent: Dyn Monitor',
path='/_dns') path='/_dns')
self._traffic_director_monitors[fqdn] = monitor self._traffic_director_monitors[fqdn] = monitor
return monitor return monitor


+ 3
- 2
tests/test_octodns_provider_dyn.py View File

@ -533,7 +533,7 @@ class TestDynProviderGeo(TestCase):
'notifier': '', 'notifier': '',
'options': { 'options': {
'expected': '', 'expected': '',
'header': '',
'header': 'User-Agent: Dyn Monitor',
'host': 'unit.tests', 'host': 'unit.tests',
'path': '/_dns', 'path': '/_dns',
'port': '443', 'port': '443',
@ -649,7 +649,7 @@ class TestDynProviderGeo(TestCase):
u'notifier': u'', u'notifier': u'',
u'options': { u'options': {
u'expected': u'', u'expected': u'',
u'header': u'',
'header': 'User-Agent: Dyn Monitor',
u'host': u'geo.unit.tests.', u'host': u'geo.unit.tests.',
u'path': u'/_dns', u'path': u'/_dns',
u'port': u'443', u'port': u'443',
@ -684,6 +684,7 @@ class TestDynProviderGeo(TestCase):
'options': { 'options': {
'path': u'/_dns', 'path': u'/_dns',
'host': u'geo.unit.tests', 'host': u'geo.unit.tests',
'header': 'User-Agent: Dyn Monitor',
'port': 443, 'port': 443,
'timeout': 10 'timeout': 10
} }


Loading…
Cancel
Save