Browse Source

Ignore records with unsupported rrtypes and log warning.

pull/646/head
Nikolay Denev 5 years ago
parent
commit
9549a0dec9
4 changed files with 18 additions and 5 deletions
  1. +6
    -1
      octodns/provider/ultra.py
  2. +1
    -1
      tests/fixtures/ultra-records-page-1.json
  3. +10
    -2
      tests/fixtures/ultra-records-page-2.json
  4. +1
    -1
      tests/fixtures/ultra-zones-page-1.json

+ 6
- 1
octodns/provider/ultra.py View File

@ -287,7 +287,12 @@ class UltraProvider(BaseProvider):
name = zone.hostname_from_fqdn(record['ownerName'])
if record['rrtype'] == 'SOA (6)':
continue
_type = self.RECORDS_TO_TYPE[record['rrtype']]
try:
_type = self.RECORDS_TO_TYPE[record['rrtype']]
except KeyError:
self.log.warning('populate: ignoring record with '
'unsupported rrtype=%s', record)
continue
values[name][_type] = record
for name, types in values.items():


+ 1
- 1
tests/fixtures/ultra-records-page-1.json View File

@ -87,7 +87,7 @@
}
],
"resultInfo": {
"totalCount": 12,
"totalCount": 13,
"offset": 0,
"returnedCount": 10
}

+ 10
- 2
tests/fixtures/ultra-records-page-2.json View File

@ -24,11 +24,19 @@
"order": "FIXED",
"description": "octodns1.test."
}
},
{
"ownerName": "octodns1.test.",
"rrtype": "APEXALIAS (65282)",
"ttl": 3600,
"rdata": [
"www.octodns1.test."
]
}
],
"resultInfo": {
"totalCount": 12,
"totalCount": 13,
"offset": 10,
"returnedCount": 2
"returnedCount": 3
}
}

+ 1
- 1
tests/fixtures/ultra-zones-page-1.json View File

@ -19,7 +19,7 @@
"dnssecStatus": "UNSIGNED",
"status": "ACTIVE",
"owner": "phelpstest",
"resourceRecordCount": 5,
"resourceRecordCount": 6,
"lastModifiedDateTime": "2020-06-19T01:05Z"
}
},


Loading…
Cancel
Save