diff --git a/.dependabot/config.yml b/.dependabot/config.yml new file mode 100644 index 0000000..165af5d --- /dev/null +++ b/.dependabot/config.yml @@ -0,0 +1,6 @@ +version: 1 + +update_configs: + - package_manager: "python" + directory: "/" + update_schedule: "weekly" diff --git a/README.md b/README.md index f884557..36dc5e2 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,9 @@ We start by creating a config file to tell OctoDNS about our providers and the z ```yaml --- +manager: + max_workers: 2 + providers: config: class: octodns.provider.yaml.YamlProvider @@ -80,6 +83,8 @@ zones: Further information can be found in the `docstring` of each source and provider class. +The `max_workers` key in the `manager` section of the config enables threading to parallelize the planning portion of the sync. + Now that we have something to tell OctoDNS about our providers & zones we need to tell it about or records. We'll keep it simple for now and just create a single `A` record at the top-level of the domain. `config/example.com.yaml` diff --git a/octodns/provider/constellix.py b/octodns/provider/constellix.py index 2ca49e3..0600f80 100644 --- a/octodns/provider/constellix.py +++ b/octodns/provider/constellix.py @@ -429,8 +429,8 @@ class ConstellixProvider(BaseProvider): for record in self.zone_records(zone): if existing.name == record['name'] and \ existing._type == record['type']: - self._client.record_delete(zone.name, record['type'], - record['id']) + self._client.record_delete(zone.name, record['type'], + record['id']) def _apply(self, plan): desired = plan.desired diff --git a/octodns/provider/dnsmadeeasy.py b/octodns/provider/dnsmadeeasy.py index cc10c9a..0bf05a0 100644 --- a/octodns/provider/dnsmadeeasy.py +++ b/octodns/provider/dnsmadeeasy.py @@ -374,7 +374,7 @@ class DnsMadeEasyProvider(BaseProvider): for record in self.zone_records(zone): if existing.name == record['name'] and \ existing._type == record['type']: - self._client.record_delete(zone.name, record['id']) + self._client.record_delete(zone.name, record['id']) def _apply(self, plan): desired = plan.desired diff --git a/octodns/provider/ovh.py b/octodns/provider/ovh.py index 17aff8d..8a3d492 100644 --- a/octodns/provider/ovh.py +++ b/octodns/provider/ovh.py @@ -323,7 +323,7 @@ class OvhProvider(BaseProvider): 'n': lambda _: True, 'g': lambda _: True} - splitted = value.split('\\;') + splitted = [v for v in value.split('\\;') if v] found_key = False for splitted_value in splitted: sub_split = [x.strip() for x in splitted_value.split("=", 1)] diff --git a/requirements-dev.txt b/requirements-dev.txt index d9888b8..3ad1b04 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,8 @@ coverage mock nose -pycodestyle==2.4.0 -pyflakes==1.6.0 +pycodestyle==2.5.0 +pyflakes==2.1.1 readme_renderer[md]==24.0 requests_mock -twine==1.13.0 +twine==1.15.0 diff --git a/requirements.txt b/requirements.txt index 6a26ad3..93d8567 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,26 +1,26 @@ -PyYaml==4.2b1 -azure-common==1.1.23 +PyYaml==5.3 +azure-common==1.1.24 azure-mgmt-dns==3.0.0 -boto3==1.7.5 -botocore==1.10.5 -dnspython==1.15.0 -docutils==0.14 +boto3==1.11.0 +botocore==1.14.0 +dnspython==1.16.0 +docutils==0.16 dyn==1.8.1 edgegrid-python==1.1.1 futures==3.2.0; python_version < '3.0' -google-cloud-core==0.28.1 -google-cloud-dns==0.29.0 -ipaddress==1.0.22 -jmespath==0.9.3 +google-cloud-core==1.1.0 +google-cloud-dns==0.31.0 +ipaddress==1.0.23 +jmespath==0.9.4 msrestazure==0.6.2 -natsort==5.5.0 +natsort==6.2.0 ns1-python==0.13.0 -ovh==0.4.8 +ovh==0.5.0 pycountry-convert==0.7.2 pycountry==19.8.18 -python-dateutil==2.6.1 +python-dateutil==2.8.1 requests==2.22.0 -s3transfer==0.1.13 -setuptools==40.3.0 -six==1.12.0 +s3transfer==0.3.0 +setuptools==44.0.0 +six==1.13.0 transip==2.0.0 diff --git a/setup.py b/setup.py index 4f28232..c56aa82 100644 --- a/setup.py +++ b/setup.py @@ -73,8 +73,7 @@ setup( 'natsort>=5.5.0', 'pycountry>=19.8.18', 'pycountry-convert>=0.7.2', - # botocore doesn't like >=2.7.0 for some reason - 'python-dateutil>=2.6.0,<2.7.0', + 'python-dateutil>=2.8.1', 'requests>=2.20.0' ], license='MIT', diff --git a/tests/test_octodns_provider_azuredns.py b/tests/test_octodns_provider_azuredns.py index 920c502..1769cef 100644 --- a/tests/test_octodns_provider_azuredns.py +++ b/tests/test_octodns_provider_azuredns.py @@ -321,7 +321,7 @@ class Test_ParseAzureType(TestCase): ['AAAA', 'Microsoft.Network/dnszones/AAAA'], ['NS', 'Microsoft.Network/dnszones/NS'], ['MX', 'Microsoft.Network/dnszones/MX']]: - self.assertEquals(expected, _parse_azure_type(test)) + self.assertEquals(expected, _parse_azure_type(test)) class Test_CheckEndswithDot(TestCase): diff --git a/tests/test_octodns_provider_route53.py b/tests/test_octodns_provider_route53.py index 7691804..60da3b8 100644 --- a/tests/test_octodns_provider_route53.py +++ b/tests/test_octodns_provider_route53.py @@ -1930,9 +1930,8 @@ class TestRoute53Provider(TestCase): provider = Route53Provider('test', 'abc', '123', client_max_attempts=42) # NOTE: this will break if boto ever changes the impl details... - self.assertEquals(43, provider._conn.meta.events - ._unique_id_handlers['retry-config-route53'] - ['handler']._checker.__dict__['_max_attempts']) + self.assertEquals(42, provider._conn._client_config + .retries['max_attempts']) def test_data_for_dynamic(self): provider = Route53Provider('test', 'abc', '123') diff --git a/tests/zones/invalid.zone. b/tests/zones/invalid.zone. index c814af6..04748a1 100644 --- a/tests/zones/invalid.zone. +++ b/tests/zones/invalid.zone. @@ -1,5 +1,5 @@ $ORIGIN invalid.zone. -@ IN SOA ns1.invalid.zone. root.invalid.zone. ( +@ 3600 IN SOA ns1.invalid.zone. root.invalid.zone. ( 2018071501 ; Serial 3600 ; Refresh (1 hour) 600 ; Retry (10 minutes) diff --git a/tests/zones/unit.tests. b/tests/zones/unit.tests. index 95828ad..0305e05 100644 --- a/tests/zones/unit.tests. +++ b/tests/zones/unit.tests. @@ -1,5 +1,5 @@ $ORIGIN unit.tests. -@ IN SOA ns1.unit.tests. root.unit.tests. ( +@ 3600 IN SOA ns1.unit.tests. root.unit.tests. ( 2018071501 ; Serial 3600 ; Refresh (1 hour) 600 ; Retry (10 minutes)