fix: Stop duplicating A and TLSA records and fix alts
This commit is contained in:
parent
f68186314b
commit
3c6829826f
21
varo.py
21
varo.py
@ -204,7 +204,7 @@ def verify_ALIAS(domain):
|
|||||||
"action": "getRecords",
|
"action": "getRecords",
|
||||||
"zone": zone,
|
"zone": zone,
|
||||||
"name": domain+"."+city_domain,
|
"name": domain+"."+city_domain,
|
||||||
"type": "ALIAS",
|
"type": "A",
|
||||||
"content": ""
|
"content": ""
|
||||||
}
|
}
|
||||||
url = "https://reg.woodburn.au/api"
|
url = "https://reg.woodburn.au/api"
|
||||||
@ -281,16 +281,15 @@ def copy_to_alts(domain):
|
|||||||
}
|
}
|
||||||
r = requests.post(url, headers=headers, json=data)
|
r = requests.post(url, headers=headers, json=data)
|
||||||
r = r.json()
|
r = r.json()
|
||||||
if 'data' not in r:
|
if 'data' in r:
|
||||||
continue
|
for record in r['data']:
|
||||||
for record in r['data']:
|
data = {
|
||||||
data = {
|
"action": "deleteRecord",
|
||||||
"action": "deleteRecord",
|
"zone": alt_zone,
|
||||||
"zone": alt_zone,
|
"record": record['uuid']
|
||||||
"record": record['uuid']
|
}
|
||||||
}
|
r = requests.post(url, headers=headers, json=data)
|
||||||
r = requests.post(url, headers=headers, json=data)
|
print(r.text)
|
||||||
print(r.text)
|
|
||||||
|
|
||||||
# Add each record to each alt
|
# Add each record to each alt
|
||||||
for record in records:
|
for record in records:
|
||||||
|
Loading…
Reference in New Issue
Block a user