mirror of
https://github.com/thegeeklab/corenetworks.git
synced 2024-11-14 16:50: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
|
||||
* update (delete + create) records with different `ttl` to prevent duplicate entries
|
||||
* add a workaround to prevent CNAME creation if a record with the same name already exists
|
||||
* extend the workaround to ensure CNAME records could not mixed with other types using the same name
|
||||
|
@ -209,8 +209,9 @@ class CoreNetworks():
|
||||
if params["name"] == "@":
|
||||
raise CorenetworksError("CNAME records are not allowed for the zone itself.")
|
||||
|
||||
records = self.records(zone, params={"name": params["name"]})
|
||||
for r in records:
|
||||
records = self.records(zone, params={"name": params["name"]})
|
||||
for r in records:
|
||||
if params["type"] == "CNAME" or r["type"] == "CNAME":
|
||||
raise CorenetworksError(
|
||||
"A record with the same name already exist ({name}). "
|
||||
"CNAME records cannot use the same name with other records.".format(
|
||||
|
Loading…
Reference in New Issue
Block a user