From ca802006533d9b087be8eae061e239ba438b72ed Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Thu, 21 Mar 2019 21:44:10 -0700 Subject: [PATCH] add supports check to DNSMadeEasy Provider --- octodns/provider/dnsmadeeasy.py | 4 ++++ tests/fixtures/dnsmadeeasy-records.json | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/octodns/provider/dnsmadeeasy.py b/octodns/provider/dnsmadeeasy.py index 4889b89..cc10c9a 100644 --- a/octodns/provider/dnsmadeeasy.py +++ b/octodns/provider/dnsmadeeasy.py @@ -265,6 +265,10 @@ class DnsMadeEasyProvider(BaseProvider): values = defaultdict(lambda: defaultdict(list)) for record in self.zone_records(zone): _type = record['type'] + if _type not in self.SUPPORTS: + self.log.warning('populate: skipping unsupported %s record', + _type) + continue values[record['name']][record['type']].append(record) before = len(zone.records) diff --git a/tests/fixtures/dnsmadeeasy-records.json b/tests/fixtures/dnsmadeeasy-records.json index e03e0b5..4d3ba64 100644 --- a/tests/fixtures/dnsmadeeasy-records.json +++ b/tests/fixtures/dnsmadeeasy-records.json @@ -335,6 +335,24 @@ "value": "aname", "id": 11189896, "type": "ANAME" - }], + }, { + "failover": false, + "monitor": false, + "sourceId": 123123, + "dynamicDns": false, + "failed": false, + "gtdLocation": "DEFAULT", + "hardLink": true, + "ttl": 1800, + "source": 1, + "name": "unsupported", + "value": "https://redirect.unit.tests", + "id": 11189897, + "title": "Unsupported Record", + "keywords": "unsupported", + "redirectType": "Standard - 302", + "description": "unsupported record", + "type": "HTTPRED" + }], "page": 0 }