1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Fixes for cloudflare CAA support

This commit is contained in:
Ross McFarland
2017-09-06 12:08:08 -07:00
parent a0975e4f29
commit a558fde6df
2 changed files with 12 additions and 11 deletions

View File

@@ -107,11 +107,8 @@ class CloudflareProvider(BaseProvider):
def _data_for_CAA(self, _type, records):
values = []
for r in records:
values.append({
'flags': r['flags'],
'tag': r['tag'],
'value': r['content'],
})
data = r['data']
values.append(data)
return {
'ttl': records[0]['ttl'],
'type': _type,
@@ -214,9 +211,11 @@ class CloudflareProvider(BaseProvider):
def _contents_for_CAA(self, record):
for value in record.values:
yield {
'flags': value.flags,
'tag': value.tag,
'value': value.value,
'data': {
'flags': value.flags,
'tag': value.tag,
'value': value.value,
}
}
def _contents_for_TXT(self, record):

View File

@@ -123,9 +123,11 @@
"id": "fc223b34cd5611334422ab3322997667",
"type": "CAA",
"name": "unit.tests",
"content": "ca.unit.tests",
"flags": 0,
"tag": "issue",
"data": {
"flags": 0,
"tag": "issue",
"value": "ca.unit.tests"
},
"proxiable": false,
"proxied": false,
"ttl": 3600,