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

Merge pull request #693 from duduribeiro/dnsimple-query-zones-instead-domains

Change DNSimple's Provider to query zones instead domains
This commit is contained in:
Ross McFarland
2021-04-21 10:03:37 -07:00
committed by GitHub

View File

@@ -51,8 +51,8 @@ class DnsimpleClient(object):
resp.raise_for_status()
return resp
def domain(self, name):
path = '/domains/{}'.format(name)
def zone(self, name):
path = '/zones/{}'.format(name)
return self._request('GET', path).json()
def domain_create(self, name):
@@ -442,7 +442,7 @@ class DnsimpleProvider(BaseProvider):
domain_name = desired.name[:-1]
try:
self._client.domain(domain_name)
self._client.zone(domain_name)
except DnsimpleClientNotFound:
self.log.debug('_apply: no matching zone, creating domain')
self._client.domain_create(domain_name)