From 3a3a11c9dc882259a9e64f0774a9dc5209322e37 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 08:42:32 +0000 Subject: [PATCH 1/8] Bump boto3 from 1.11.9 to 1.11.13 Bumps [boto3](https://github.com/boto/boto3) from 1.11.9 to 1.11.13. - [Release notes](https://github.com/boto/boto3/releases) - [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst) - [Commits](https://github.com/boto/boto3/compare/1.11.9...1.11.13) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eadad34..7169ecf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ PyYaml==5.3 azure-common==1.1.24 azure-mgmt-dns==3.0.0 -boto3==1.11.9 +boto3==1.11.13 botocore==1.14.9 dnspython==1.16.0 docutils==0.16 From c20f380bc39a72aa73ad6cb17c7e2e70265f5c43 Mon Sep 17 00:00:00 2001 From: John Lane Date: Mon, 10 Feb 2020 16:18:59 +0000 Subject: [PATCH 2/8] Support DNSimple sandbox An optional parameter 'sandbox' can be used to select the base URL for the Sandbox API (see https://developer.dnsimple.com/sandbox ). --- octodns/provider/dnsimple.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/octodns/provider/dnsimple.py b/octodns/provider/dnsimple.py index e3b0a20..bdb276e 100644 --- a/octodns/provider/dnsimple.py +++ b/octodns/provider/dnsimple.py @@ -30,13 +30,16 @@ class DnsimpleClientUnauthorized(DnsimpleClientException): class DnsimpleClient(object): - BASE = 'https://api.dnsimple.com/v2/' - def __init__(self, token, account): + def __init__(self, token, account, sandbox): self.account = account sess = Session() sess.headers.update({'Authorization': 'Bearer {}'.format(token)}) self._sess = sess + if sandbox: + self.BASE = 'https://api.sandbox.dnsimple.com/v2/' + else: + self.BASE = 'https://api.dnsimple.com/v2/' def _request(self, method, path, params=None, data=None): url = '{}{}{}'.format(self.BASE, self.account, path) @@ -89,17 +92,19 @@ class DnsimpleProvider(BaseProvider): token: letmein # Your account number (required) account: 42 + # Use sandbox (optional) + sandbox: true ''' SUPPORTS_GEO = False SUPPORTS_DYNAMIC = False SUPPORTS = set(('A', 'AAAA', 'ALIAS', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SPF', 'SRV', 'SSHFP', 'TXT')) - def __init__(self, id, token, account, *args, **kwargs): + def __init__(self, id, token, account, sandbox=False, *args, **kwargs): self.log = logging.getLogger('DnsimpleProvider[{}]'.format(id)) self.log.debug('__init__: id=%s, token=***, account=%s', id, account) super(DnsimpleProvider, self).__init__(id, *args, **kwargs) - self._client = DnsimpleClient(token, account) + self._client = DnsimpleClient(token, account, sandbox) self._zone_records = {} From 2d09a01c74994e5cdadbe7b3a9a720c26ab26893 Mon Sep 17 00:00:00 2001 From: John Lane Date: Mon, 10 Feb 2020 16:28:43 +0000 Subject: [PATCH 3/8] Tests for DNSimple sandbox --- tests/test_octodns_provider_dnsimple.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_octodns_provider_dnsimple.py b/tests/test_octodns_provider_dnsimple.py index e3a9b8d..2b0781a 100644 --- a/tests/test_octodns_provider_dnsimple.py +++ b/tests/test_octodns_provider_dnsimple.py @@ -38,6 +38,10 @@ class TestDnsimpleProvider(TestCase): break def test_populate(self): + + # Sandbox + provider = DnsimpleProvider('test', 'token', 42, 'true') + provider = DnsimpleProvider('test', 'token', 42) # Bad auth From 3d871a5bad15f699fe0ce0d51c6c2536c9eec8a4 Mon Sep 17 00:00:00 2001 From: John Lane Date: Mon, 10 Feb 2020 17:14:57 +0000 Subject: [PATCH 4/8] Improve test; downcase instance variable --- octodns/provider/dnsimple.py | 6 +++--- tests/test_octodns_provider_dnsimple.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/octodns/provider/dnsimple.py b/octodns/provider/dnsimple.py index bdb276e..f83098e 100644 --- a/octodns/provider/dnsimple.py +++ b/octodns/provider/dnsimple.py @@ -37,12 +37,12 @@ class DnsimpleClient(object): sess.headers.update({'Authorization': 'Bearer {}'.format(token)}) self._sess = sess if sandbox: - self.BASE = 'https://api.sandbox.dnsimple.com/v2/' + self.base = 'https://api.sandbox.dnsimple.com/v2/' else: - self.BASE = 'https://api.dnsimple.com/v2/' + self.base = 'https://api.dnsimple.com/v2/' def _request(self, method, path, params=None, data=None): - url = '{}{}{}'.format(self.BASE, self.account, path) + url = '{}{}{}'.format(self.base, self.account, path) resp = self._sess.request(method, url, params=params, json=data) if resp.status_code == 401: raise DnsimpleClientUnauthorized() diff --git a/tests/test_octodns_provider_dnsimple.py b/tests/test_octodns_provider_dnsimple.py index 2b0781a..975cb26 100644 --- a/tests/test_octodns_provider_dnsimple.py +++ b/tests/test_octodns_provider_dnsimple.py @@ -41,6 +41,7 @@ class TestDnsimpleProvider(TestCase): # Sandbox provider = DnsimpleProvider('test', 'token', 42, 'true') + self.assertTrue('sandbox' in provider._client.base) provider = DnsimpleProvider('test', 'token', 42) From b16f54d0842acf0001685dbf21c0f00819da7b7c Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 10 Feb 2020 09:18:52 -0800 Subject: [PATCH 5/8] Makes sure !sandbox on a normal provider. --- tests/test_octodns_provider_dnsimple.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_octodns_provider_dnsimple.py b/tests/test_octodns_provider_dnsimple.py index 975cb26..b918962 100644 --- a/tests/test_octodns_provider_dnsimple.py +++ b/tests/test_octodns_provider_dnsimple.py @@ -44,6 +44,7 @@ class TestDnsimpleProvider(TestCase): self.assertTrue('sandbox' in provider._client.base) provider = DnsimpleProvider('test', 'token', 42) + self.assertFalse('sandbox' in provider._client.base) # Bad auth with requests_mock() as mock: From 43fe6fd28924212a70f5bda13d0c2e658b23e738 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 17:31:02 +0000 Subject: [PATCH 6/8] Bump s3transfer from 0.3.2 to 0.3.3 Bumps [s3transfer](https://github.com/boto/s3transfer) from 0.3.2 to 0.3.3. - [Release notes](https://github.com/boto/s3transfer/releases) - [Changelog](https://github.com/boto/s3transfer/blob/develop/CHANGELOG.rst) - [Commits](https://github.com/boto/s3transfer/compare/0.3.2...0.3.3) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7169ecf..37b5273 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ pycountry-convert==0.7.2 pycountry==19.8.18 python-dateutil==2.8.1 requests==2.22.0 -s3transfer==0.3.2 +s3transfer==0.3.3 setuptools==44.0.0 six==1.14.0 transip==2.0.0 From a821394a245b6895879b648167be863e02c9fb14 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 17:34:09 +0000 Subject: [PATCH 7/8] Bump ns1-python from 0.13.0 to 0.14.0 Bumps [ns1-python](https://github.com/ns1/ns1-python) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/ns1/ns1-python/releases) - [Changelog](https://github.com/ns1/ns1-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/ns1/ns1-python/compare/v0.13.0...v0.14.0) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 37b5273..e51cb0c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ ipaddress==1.0.23 jmespath==0.9.4 msrestazure==0.6.2 natsort==6.2.1 -ns1-python==0.13.0 +ns1-python==0.14.0 ovh==0.5.0 pycountry-convert==0.7.2 pycountry==19.8.18 From a7ca048f01e797f8c86522bca337af93f1eddfbc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 17:34:13 +0000 Subject: [PATCH 8/8] Bump botocore from 1.14.9 to 1.14.13 Bumps [botocore](https://github.com/boto/botocore) from 1.14.9 to 1.14.13. - [Release notes](https://github.com/boto/botocore/releases) - [Changelog](https://github.com/boto/botocore/blob/develop/CHANGELOG.rst) - [Commits](https://github.com/boto/botocore/compare/1.14.9...1.14.13) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 37b5273..b4537f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ PyYaml==5.3 azure-common==1.1.24 azure-mgmt-dns==3.0.0 boto3==1.11.13 -botocore==1.14.9 +botocore==1.14.13 dnspython==1.16.0 docutils==0.16 dyn==1.8.1