Skip to content

Commit fda0d81

Browse files
author
Aaron Sierra
committed
dns: worldwidedns: Fix create_zone() reseller suppport
The "DYN" parameter is only defined for non-resellers: https://www.worldwidedns.net/dns_api_protocol_new_domain.asp The "ID" parameter is only defined for resellers: https://www.worldwidedns.net/dns_api_protocol_new_domain_reseller.asp
1 parent 47f9ca5 commit fda0d81

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

libcloud/dns/drivers/worldwidedns.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,12 @@ def create_zone(self, domain, type="master", ttl=None, extra=None):
330330
else:
331331
dyn = 1
332332
params = {"DOMAIN": domain, "TYPE": _type}
333-
action = "/api_dns_new_domain.asp"
334333

335-
if self.reseller_id is not None:
334+
if self.reseller_id is None:
336335
params["DYN"] = dyn
336+
action = "/api_dns_new_domain.asp"
337+
else:
338+
params["ID"] = self.reseller_id
337339
action = "/api_dns_new_domain_reseller.asp"
338340
self.connection.request(action, params=params)
339341
zone = self.get_zone(domain)

0 commit comments

Comments
 (0)