mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Merge pull request #364 from Its-Alex/fix-digital-ocean-unsupported-records
Prevent digital ocean provider to crash if records type is not supported
This commit is contained in:
@@ -223,6 +223,10 @@ class DigitalOceanProvider(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)
|
||||
|
11
tests/fixtures/digitalocean-page-1.json
vendored
11
tests/fixtures/digitalocean-page-1.json
vendored
@@ -1,5 +1,16 @@
|
||||
{
|
||||
"domain_records": [{
|
||||
"id": null,
|
||||
"type": "SOA",
|
||||
"name": "@",
|
||||
"data": null,
|
||||
"priority": null,
|
||||
"port": null,
|
||||
"ttl": null,
|
||||
"weight": null,
|
||||
"flags": null,
|
||||
"tag": null
|
||||
}, {
|
||||
"id": 11189874,
|
||||
"type": "NS",
|
||||
"name": "@",
|
||||
|
Reference in New Issue
Block a user