Skip to content

Commit

Permalink
Merge pull request #42 from squintfox/skip-unsupported-record
Browse files Browse the repository at this point in the history
Skip unsupported record
  • Loading branch information
ross authored Jan 26, 2024
2 parents 0244e13 + c088098 commit 6ec921d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Enable support for root level NS records (`SUPPORTS_ROOT_NS=true`)
* Enable support for wildcard zone lookups (list_zones())

* Skip unsupported dynamic record type "Directional Pool"

## v0.0.2 - 2022-10-10 - APIs gonna break

Expand Down
10 changes: 10 additions & 0 deletions octodns_ultra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ def populate(self, zone, target=False, lenient=False):
name = zone.hostname_from_fqdn(record['ownerName'])
if record['rrtype'] == 'SOA (6)':
continue
if (
record['rrtype'] == 'A (1)'
and record.get('profile', {}).get('@context')
== 'http://schemas.ultradns.com/DirPool.jsonschema'
):
self.log.warning(
'populate: ignoring record with unsupported type, %s [Directional Pool (Dynamic)]',
name,
)
continue
try:
_type = self.RECORDS_TO_TYPE[record['rrtype']]
except KeyError:
Expand Down
42 changes: 42 additions & 0 deletions tests/fixtures/ultra-records-page-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,48 @@
"rdata": [
"v=spf1 -all"
]
},
{
"ownerName": "dirpool.octodns1.test.",
"profile": {
"@context": "http://schemas.ultradns.com/DirPool.jsonschema",
"description": "dirpool.octodns1.test",
"ignoreECS": false,
"rdataInfo": [
{
"allNonConfigured": true,
"ttl": 600,
"type": "A"
},
{
"geoInfo": {
"codes": [
"CA"
],
"name": "xxx"
},
"ttl": 86400,
"type": "SF"
},
{
"geoInfo": {
"codes": [
"ASI",
"OCN"
],
"name": "yyy"
},
"ttl": 86400,
"type": "SF"
}
]
},
"rdata": [
"127.0.0.1",
"xxxrecord.octodns1.test.",
"yyyrecord.octodns1.test."
],
"rrtype": "A (1)"
}
],
"resultInfo": {
Expand Down

0 comments on commit 6ec921d

Please sign in to comment.