mirror of
https://github.com/thegeeklab/corenetworks.git
synced 2024-11-25 06:20:39 +00:00
ensure CNAME records could not mixed with other types using the same name
This commit is contained in:
parent
e3dce0340f
commit
a332423c45
@ -1,6 +1,2 @@
|
|||||||
* ENHANCEMENT
|
|
||||||
* make `ttl` mandatory for add function
|
|
||||||
* add `requests` to requirements
|
|
||||||
* BUGFIX
|
* BUGFIX
|
||||||
* update (delete + create) records with different `ttl` to prevent duplicate entries
|
* extend the workaround to ensure CNAME records could not mixed with other types using the same name
|
||||||
* add a workaround to prevent CNAME creation if a record with the same name already exists
|
|
||||||
|
@ -211,6 +211,7 @@ class CoreNetworks():
|
|||||||
|
|
||||||
records = self.records(zone, params={"name": params["name"]})
|
records = self.records(zone, params={"name": params["name"]})
|
||||||
for r in records:
|
for r in records:
|
||||||
|
if params["type"] == "CNAME" or r["type"] == "CNAME":
|
||||||
raise CorenetworksError(
|
raise CorenetworksError(
|
||||||
"A record with the same name already exist ({name}). "
|
"A record with the same name already exist ({name}). "
|
||||||
"CNAME records cannot use the same name with other records.".format(
|
"CNAME records cannot use the same name with other records.".format(
|
||||||
|
Loading…
Reference in New Issue
Block a user