From 135f826b7ee580b607bf1c258405d7c2b79fb820 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 27 Apr 2019 15:08:09 -0700 Subject: [PATCH 01/15] Add OverridingYamlProvider and tests --- octodns/provider/yaml.py | 60 ++++++++++++++++++++++-- tests/config/override/dynamic.tests.yaml | 13 +++++ tests/test_octodns_provider_yaml.py | 37 ++++++++++++++- 3 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 tests/config/override/dynamic.tests.yaml diff --git a/octodns/provider/yaml.py b/octodns/provider/yaml.py index 966e96e..aa04528 100644 --- a/octodns/provider/yaml.py +++ b/octodns/provider/yaml.py @@ -47,7 +47,7 @@ class YamlProvider(BaseProvider): self.default_ttl = default_ttl self.enforce_order = enforce_order - def _populate_from_file(self, filename, zone, lenient): + def _populate_from_file(self, filename, zone, lenient, replace=False): with open(filename, 'r') as fh: yaml_data = safe_load(fh, enforce_order=self.enforce_order) if yaml_data: @@ -59,9 +59,10 @@ class YamlProvider(BaseProvider): d['ttl'] = self.default_ttl record = Record.new(zone, name, d, source=self, lenient=lenient) - zone.add_record(record, lenient=lenient) - self.log.debug( - '_populate_from_file: successfully loaded "%s"', filename) + zone.add_record(record, lenient=lenient, + replace=replace) + self.log.debug('_populate_from_file: successfully loaded "%s"', + filename) def populate(self, zone, target=False, lenient=False): self.log.debug('populate: name=%s, target=%s, lenient=%s', zone.name, @@ -211,3 +212,54 @@ class SplitYamlProvider(YamlProvider): self.log.debug('_apply: writing catchall filename=%s', filename) with open(filename, 'w') as fh: safe_dump(catchall, fh) + + +class OverridingYamlProvider(YamlProvider): + ''' + Provider that builds on YamlProvider to allow overriding specific records. + + Works identically to YamlProvider with the additional behavior of loading + data from a second zonefile in override_directory if it exists. Records in + this second file will override (replace) those previously seen in the + primary. Records that do not exist in the primary will just be added. There + is currently no mechinism to remove records from the primary zone. + + config: + class: octodns.provider.yaml.OverridingYamlProvider + # The location of yaml config files (required) + directory: ./config + # The location of overriding yaml config files (required) + override_directory: ./config + # The ttl to use for records when not specified in the data + # (optional, default 3600) + default_ttl: 3600 + # Whether or not to enforce sorting order on the yaml config + # (optional, default True) + enforce_order: True + ''' + + def __init__(self, id, directory, override_directory, *args, **kwargs): + super(OverridingYamlProvider, self).__init__(id, directory, *args, + **kwargs) + self.override_directory = override_directory + + def populate(self, zone, target=False, lenient=False): + self.log.debug('populate: name=%s, target=%s, lenient=%s', zone.name, + target, lenient) + + if target: + # When acting as a target we ignore any existing records so that we + # create a completely new copy + return False + + before = len(zone.records) + filename = join(self.directory, '{}yaml'.format(zone.name)) + self._populate_from_file(filename, zone, lenient) + + filename = join(self.override_directory, '{}yaml'.format(zone.name)) + if isfile(filename): + self._populate_from_file(filename, zone, lenient, replace=True) + + self.log.info('populate: found %s records, exists=False', + len(zone.records) - before) + return False diff --git a/tests/config/override/dynamic.tests.yaml b/tests/config/override/dynamic.tests.yaml new file mode 100644 index 0000000..d79e092 --- /dev/null +++ b/tests/config/override/dynamic.tests.yaml @@ -0,0 +1,13 @@ +--- +# Replace 'a' with a generic record +a: + type: A + values: + - 4.4.4.4 + - 5.5.5.5 +# Add another record +added: + type: A + values: + - 6.6.6.6 + - 7.7.7.7 diff --git a/tests/test_octodns_provider_yaml.py b/tests/test_octodns_provider_yaml.py index d5d5e37..123f9b2 100644 --- a/tests/test_octodns_provider_yaml.py +++ b/tests/test_octodns_provider_yaml.py @@ -14,7 +14,7 @@ from yaml.constructor import ConstructorError from octodns.record import Create from octodns.provider.base import Plan from octodns.provider.yaml import _list_all_yaml_files, \ - SplitYamlProvider, YamlProvider + OverridingYamlProvider, SplitYamlProvider, YamlProvider from octodns.zone import SubzoneRecordException, Zone from helpers import TemporaryDirectory @@ -372,3 +372,38 @@ class TestSplitYamlProvider(TestCase): source.populate(zone) self.assertEquals('Record www.sub.unit.tests. is under a managed ' 'subzone', ctx.exception.message) + + +class TestOverridingYamlProvider(TestCase): + + def test_provider(self): + config = join(dirname(__file__), 'config') + override_config = join(dirname(__file__), 'config', 'override') + source = OverridingYamlProvider('test', config, override_config) + + zone = Zone('unit.tests.', []) + dynamic_zone = Zone('dynamic.tests.', []) + + # With target we don't add anything (same as base) + source.populate(zone, target=source) + self.assertEquals(0, len(zone.records)) + + # without it we see everything + source.populate(zone) + self.assertEquals(18, len(zone.records)) + + # Load the dynamic records + source.populate(dynamic_zone) + + got = {r.name: r for r in dynamic_zone.records} + # We see both the base and override files, 1 extra record + self.assertEquals(6, len(got)) + + # 'a' was replaced with a generic record + self.assertEquals({ + 'ttl': 3600, + 'values': ['4.4.4.4', '5.5.5.5'] + }, got['a'].data) + + # And we have a new override + self.assertTrue('added' in got) From a078ec9d3134535c56d437edd2098d5f996385b3 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Mon, 6 Jan 2020 14:16:47 -0800 Subject: [PATCH 02/15] Move to populate_should_replace rather then OverridingYamlProvider --- octodns/provider/yaml.py | 136 ++++++++++++++++------------ tests/test_octodns_provider_yaml.py | 42 ++++----- 2 files changed, 99 insertions(+), 79 deletions(-) diff --git a/octodns/provider/yaml.py b/octodns/provider/yaml.py index aa04528..a010084 100644 --- a/octodns/provider/yaml.py +++ b/octodns/provider/yaml.py @@ -28,7 +28,78 @@ class YamlProvider(BaseProvider): default_ttl: 3600 # Whether or not to enforce sorting order on the yaml config # (optional, default True) - enforce_order: True + enforce_order: true + # Whether duplicate records should replace rather than error + # (optiona, default False) + populate_should_replace: false + + Overriding values can be accomplished using multiple yaml providers in the + `sources` list where subsequent providers have `populate_should_replace` + set to `true`. An example use of this would be a zone that you want to push + to external DNS providers and internally, but you want to modify some of + the records in the internal version. + + config/octodns.com.yaml + --- + other: + type: A + values: + - 192.30.252.115 + - 192.30.252.116 + www: + type: A + values: + - 192.30.252.113 + - 192.30.252.114 + + + internal/octodns.com.yaml + --- + 'www': + type: A + values: + - 10.0.0.12 + - 10.0.0.13 + + external.yaml + --- + providers: + config: + class: octodns.provider.yaml.YamlProvider + directory: ./config + + zones: + + octodns.com.: + sources: + - config + targets: + - route53 + + internal.yaml + --- + providers: + config: + class: octodns.provider.yaml.YamlProvider + directory: ./config + + internal: + class: octodns.provider.yaml.YamlProvider + directory: ./internal + + zones: + + octodns.com.: + sources: + - config + - internal + targets: + - pdns + + You can then sync our records eternally with `--config-file=external.yaml` + and internally (with the custom overrides) with + `--config-file=internal.yaml` + ''' SUPPORTS_GEO = True SUPPORTS_DYNAMIC = True @@ -36,18 +107,20 @@ class YamlProvider(BaseProvider): 'PTR', 'SSHFP', 'SPF', 'SRV', 'TXT')) def __init__(self, id, directory, default_ttl=3600, enforce_order=True, - *args, **kwargs): + populate_should_replace=False, *args, **kwargs): self.log = logging.getLogger('{}[{}]'.format( self.__class__.__name__, id)) self.log.debug('__init__: id=%s, directory=%s, default_ttl=%d, ' - 'enforce_order=%d', id, directory, default_ttl, - enforce_order) + 'enforce_order=%d, populate_should_replace=%d', + id, directory, default_ttl, enforce_order, + populate_should_replace) super(YamlProvider, self).__init__(id, *args, **kwargs) self.directory = directory self.default_ttl = default_ttl self.enforce_order = enforce_order + self.populate_should_replace = populate_should_replace - def _populate_from_file(self, filename, zone, lenient, replace=False): + def _populate_from_file(self, filename, zone, lenient): with open(filename, 'r') as fh: yaml_data = safe_load(fh, enforce_order=self.enforce_order) if yaml_data: @@ -60,7 +133,7 @@ class YamlProvider(BaseProvider): record = Record.new(zone, name, d, source=self, lenient=lenient) zone.add_record(record, lenient=lenient, - replace=replace) + replace=self.populate_should_replace) self.log.debug('_populate_from_file: successfully loaded "%s"', filename) @@ -212,54 +285,3 @@ class SplitYamlProvider(YamlProvider): self.log.debug('_apply: writing catchall filename=%s', filename) with open(filename, 'w') as fh: safe_dump(catchall, fh) - - -class OverridingYamlProvider(YamlProvider): - ''' - Provider that builds on YamlProvider to allow overriding specific records. - - Works identically to YamlProvider with the additional behavior of loading - data from a second zonefile in override_directory if it exists. Records in - this second file will override (replace) those previously seen in the - primary. Records that do not exist in the primary will just be added. There - is currently no mechinism to remove records from the primary zone. - - config: - class: octodns.provider.yaml.OverridingYamlProvider - # The location of yaml config files (required) - directory: ./config - # The location of overriding yaml config files (required) - override_directory: ./config - # The ttl to use for records when not specified in the data - # (optional, default 3600) - default_ttl: 3600 - # Whether or not to enforce sorting order on the yaml config - # (optional, default True) - enforce_order: True - ''' - - def __init__(self, id, directory, override_directory, *args, **kwargs): - super(OverridingYamlProvider, self).__init__(id, directory, *args, - **kwargs) - self.override_directory = override_directory - - def populate(self, zone, target=False, lenient=False): - self.log.debug('populate: name=%s, target=%s, lenient=%s', zone.name, - target, lenient) - - if target: - # When acting as a target we ignore any existing records so that we - # create a completely new copy - return False - - before = len(zone.records) - filename = join(self.directory, '{}yaml'.format(zone.name)) - self._populate_from_file(filename, zone, lenient) - - filename = join(self.override_directory, '{}yaml'.format(zone.name)) - if isfile(filename): - self._populate_from_file(filename, zone, lenient, replace=True) - - self.log.info('populate: found %s records, exists=False', - len(zone.records) - before) - return False diff --git a/tests/test_octodns_provider_yaml.py b/tests/test_octodns_provider_yaml.py index 0efcee9..f858c05 100644 --- a/tests/test_octodns_provider_yaml.py +++ b/tests/test_octodns_provider_yaml.py @@ -15,7 +15,7 @@ from yaml.constructor import ConstructorError from octodns.record import Create from octodns.provider.base import Plan from octodns.provider.yaml import _list_all_yaml_files, \ - OverridingYamlProvider, SplitYamlProvider, YamlProvider + SplitYamlProvider, YamlProvider from octodns.zone import SubzoneRecordException, Zone from helpers import TemporaryDirectory @@ -377,31 +377,29 @@ class TestOverridingYamlProvider(TestCase): def test_provider(self): config = join(dirname(__file__), 'config') override_config = join(dirname(__file__), 'config', 'override') - source = OverridingYamlProvider('test', config, override_config) - - zone = Zone('unit.tests.', []) - dynamic_zone = Zone('dynamic.tests.', []) - - # With target we don't add anything (same as base) - source.populate(zone, target=source) - self.assertEquals(0, len(zone.records)) - - # without it we see everything - source.populate(zone) - self.assertEquals(18, len(zone.records)) - - # Load the dynamic records - source.populate(dynamic_zone) - - got = {r.name: r for r in dynamic_zone.records} - # We see both the base and override files, 1 extra record + base = YamlProvider('base', config, populate_should_replace=False) + override = YamlProvider('test', override_config, + populate_should_replace=True) + + zone = Zone('dynamic.tests.', []) + + # Load the base, should see the 5 records + base.populate(zone) + got = {r.name: r for r in zone.records} + self.assertEquals(5, len(got)) + # We get the "dynamic" A from the bae config + self.assertTrue('dynamic' in got['a'].data) + # No added + self.assertFalse('added' in got) + + # Load the overrides, should replace one and add 1 + override.populate(zone) + got = {r.name: r for r in zone.records} self.assertEquals(6, len(got)) - # 'a' was replaced with a generic record self.assertEquals({ 'ttl': 3600, 'values': ['4.4.4.4', '5.5.5.5'] }, got['a'].data) - - # And we have a new override + # And we have the new one self.assertTrue('added' in got) From f1cc392bc41bddd24f480a1178ccd50ab15019b5 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Thu, 9 Jan 2020 07:41:30 -0800 Subject: [PATCH 03/15] Include populate_should_replace in yaml example. --- octodns/provider/yaml.py | 1 + 1 file changed, 1 insertion(+) diff --git a/octodns/provider/yaml.py b/octodns/provider/yaml.py index a010084..10add5a 100644 --- a/octodns/provider/yaml.py +++ b/octodns/provider/yaml.py @@ -86,6 +86,7 @@ class YamlProvider(BaseProvider): internal: class: octodns.provider.yaml.YamlProvider directory: ./internal + populate_should_replace: true zones: From df6ad6b1f06af7ba907f0a3c3751e8339d8df973 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2020 08:33:27 +0000 Subject: [PATCH 04/15] Bump s3transfer from 0.3.0 to 0.3.1 Bumps [s3transfer](https://github.com/boto/s3transfer) from 0.3.0 to 0.3.1. - [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.0...0.3.1) 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 93d8567..3a2aadf 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.0 +s3transfer==0.3.1 setuptools==44.0.0 six==1.13.0 transip==2.0.0 From e3123be32e88f7aef640c1dab8a1b38da0c835b6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2020 14:55:53 +0000 Subject: [PATCH 05/15] Bump boto3 from 1.11.0 to 1.11.6 Bumps [boto3](https://github.com/boto/boto3) from 1.11.0 to 1.11.6. - [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.0...1.11.6) 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 3a2aadf..bc75da0 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.0 +boto3==1.11.6 botocore==1.14.0 dnspython==1.16.0 docutils==0.16 From ba57724e1b51e5aee0467c8bd1c0fc395d2948d3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2020 14:59:48 +0000 Subject: [PATCH 06/15] Bump google-cloud-core from 1.1.0 to 1.2.0 Bumps [google-cloud-core](https://github.com/GoogleCloudPlatform/google-cloud-python) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/GoogleCloudPlatform/google-cloud-python/releases) - [Changelog](https://github.com/googleapis/google-cloud-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/GoogleCloudPlatform/google-cloud-python/compare/kms-1.1.0...kms-1.2.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 bc75da0..2f35502 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ docutils==0.16 dyn==1.8.1 edgegrid-python==1.1.1 futures==3.2.0; python_version < '3.0' -google-cloud-core==1.1.0 +google-cloud-core==1.2.0 google-cloud-dns==0.31.0 ipaddress==1.0.23 jmespath==0.9.4 From 2da3c7d8014609235fc69c04267061ac652da5b6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2020 15:27:46 +0000 Subject: [PATCH 07/15] Bump six from 1.13.0 to 1.14.0 Bumps [six](https://github.com/benjaminp/six) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/benjaminp/six/releases) - [Changelog](https://github.com/benjaminp/six/blob/master/CHANGES) - [Commits](https://github.com/benjaminp/six/compare/1.13.0...1.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 2f35502..6f5ab04 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,5 +22,5 @@ python-dateutil==2.8.1 requests==2.22.0 s3transfer==0.3.1 setuptools==44.0.0 -six==1.13.0 +six==1.14.0 transip==2.0.0 From 3a8d8e4627fcd4e8d00ca500287b0b1a6d7cbe24 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2020 15:32:15 +0000 Subject: [PATCH 08/15] Bump botocore from 1.14.0 to 1.14.6 Bumps [botocore](https://github.com/boto/botocore) from 1.14.0 to 1.14.6. - [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.0...1.14.6) 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 6f5ab04..4f7f349 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.6 -botocore==1.14.0 +botocore==1.14.6 dnspython==1.16.0 docutils==0.16 dyn==1.8.1 From 01ec880f830935ab5f31903d8ad250351bb1e4b8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Jan 2020 16:44:20 +0100 Subject: [PATCH 09/15] Add CAA record type for ovh provider --- octodns/provider/ovh.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/octodns/provider/ovh.py b/octodns/provider/ovh.py index 8a3d492..182639c 100644 --- a/octodns/provider/ovh.py +++ b/octodns/provider/ovh.py @@ -40,8 +40,8 @@ class OvhProvider(BaseProvider): # This variable is also used in populate method to filter which OVH record # types are supported by octodns - SUPPORTS = set(('A', 'AAAA', 'CNAME', 'DKIM', 'MX', 'NAPTR', 'NS', 'PTR', - 'SPF', 'SRV', 'SSHFP', 'TXT')) + SUPPORTS = set(('A', 'AAAA', 'CAA', 'CNAME', 'DKIM', 'MX', 'NAPTR', 'NS', + 'PTR', 'SPF', 'SRV', 'SSHFP', 'TXT')) def __init__(self, id, endpoint, application_key, application_secret, consumer_key, *args, **kwargs): @@ -139,6 +139,22 @@ class OvhProvider(BaseProvider): 'value': record['target'] } + @staticmethod + def _data_for_CAA(_type, records): + values = [] + for record in records: + flags, tag, value = record['target'].split(' ', 2) + values.append({ + 'flags': flags, + 'tag': tag, + 'value': value[1:-1] + }) + return { + 'ttl': records[0]['ttl'], + 'type': _type, + 'values': values + } + @staticmethod def _data_for_MX(_type, records): values = [] @@ -244,6 +260,16 @@ class OvhProvider(BaseProvider): 'fieldType': record._type } + @staticmethod + def _params_for_CAA(record): + for value in record.values: + yield { + 'target': '%d %s "%s"' % (value.flags, value.tag, value.value), + 'subDomain': record.name, + 'ttl': record.ttl, + 'fieldType': record._type + } + @staticmethod def _params_for_MX(record): for value in record.values: From 65840cfbed35b4bc2feedc974810dc2e3c9551f7 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Jan 2020 16:45:13 +0100 Subject: [PATCH 10/15] Add test for ovh caa record coverage --- tests/test_octodns_provider_ovh.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/test_octodns_provider_ovh.py b/tests/test_octodns_provider_ovh.py index 924591f..3da4276 100644 --- a/tests/test_octodns_provider_ovh.py +++ b/tests/test_octodns_provider_ovh.py @@ -279,6 +279,24 @@ class TestOvhProvider(TestCase): 'id': 18 }) + # CAA + api_record.append({ + 'fieldType': 'CAA', + 'ttl': 1600, + 'target': '0 issue "ca.unit.tests"', + 'subDomain': 'caa', + 'id': 19 + }) + expected.add(Record.new(zone, 'caa', { + 'ttl': 1600, + 'type': 'CAA', + 'values': [{ + 'flags': 0, + 'tag': 'issue', + 'value': 'ca.unit.tests' + }] + })) + valid_dkim = [valid_dkim_key, 'v=DKIM1 \\; %s' % valid_dkim_key, 'h=sha256 \\; %s' % valid_dkim_key, @@ -404,6 +422,9 @@ class TestOvhProvider(TestCase): call('/domain/zone/unit.tests/record', fieldType='SRV', subDomain='_srv._tcp', target='40 50 60 foo-2.unit.tests.', ttl=800), + call('/domain/zone/unit.tests/record', fieldType='CAA', + subDomain='caa', target='0 issue "ca.unit.tests"', + ttl=1600), call('/domain/zone/unit.tests/record', fieldType='DKIM', subDomain='dkim', target='p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxLaG' From e13d23dc80ff091f3adbc995d94f631dec64d751 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Jan 2020 17:09:13 +0100 Subject: [PATCH 11/15] Use python3-friendly syntax --- octodns/provider/ovh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/octodns/provider/ovh.py b/octodns/provider/ovh.py index 182639c..54f62ac 100644 --- a/octodns/provider/ovh.py +++ b/octodns/provider/ovh.py @@ -264,7 +264,8 @@ class OvhProvider(BaseProvider): def _params_for_CAA(record): for value in record.values: yield { - 'target': '%d %s "%s"' % (value.flags, value.tag, value.value), + 'target': '{} {} "{}"'.format(value.flags, value.tag, + value.value), 'subDomain': record.name, 'ttl': record.ttl, 'fieldType': record._type From fe490636e594a682de8af530bb3098b0bf40136d Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Jan 2020 17:48:13 +0100 Subject: [PATCH 12/15] Modify Readme: add CAA for ovh provider --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36dc5e2..6127234 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ The above command pulled the existing data out of Route53 and placed the results | [GoogleCloudProvider](/octodns/provider/googlecloud.py) | google-cloud-dns | A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SPF, SRV, TXT | No | | | [MythicBeastsProvider](/octodns/provider/mythicbeasts.py) | Mythic Beasts | A, AAAA, ALIAS, CNAME, MX, NS, SRV, SSHFP, CAA, TXT | No | | | [Ns1Provider](/octodns/provider/ns1.py) | ns1-python | All | Yes | No CNAME support, missing `NA` geo target | -| [OVH](/octodns/provider/ovh.py) | ovh | A, AAAA, CNAME, MX, NAPTR, NS, PTR, SPF, SRV, SSHFP, TXT, DKIM | No | | +| [OVH](/octodns/provider/ovh.py) | ovh | A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SPF, SRV, SSHFP, TXT, DKIM | No | | | [PowerDnsProvider](/octodns/provider/powerdns.py) | | All | No | | | [Rackspace](/octodns/provider/rackspace.py) | | A, AAAA, ALIAS, CNAME, MX, NS, PTR, SPF, TXT | No | | | [Route53](/octodns/provider/route53.py) | boto3 | A, AAAA, CAA, CNAME, MX, NAPTR, NS, PTR, SPF, SRV, TXT | Both | CNAME health checks don't support a Host header | From a319453e7e9dcce3874adf5637a1d1d55522d8d9 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 08:28:30 +0000 Subject: [PATCH 13/15] Bump s3transfer from 0.3.1 to 0.3.2 Bumps [s3transfer](https://github.com/boto/s3transfer) from 0.3.1 to 0.3.2. - [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.1...0.3.2) 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 4f7f349..167307a 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.1 +s3transfer==0.3.2 setuptools==44.0.0 six==1.14.0 transip==2.0.0 From e12ac1930dac4e9b23ad31f82eb5abef610a93eb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 13:51:45 +0000 Subject: [PATCH 14/15] Bump botocore from 1.14.6 to 1.14.9 Bumps [botocore](https://github.com/boto/botocore) from 1.14.6 to 1.14.9. - [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.6...1.14.9) 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 167307a..7f1cd83 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.6 -botocore==1.14.6 +botocore==1.14.9 dnspython==1.16.0 docutils==0.16 dyn==1.8.1 From 160578fcf1caf7f150c685c899654dace4caa1f6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 14:17:08 +0000 Subject: [PATCH 15/15] Bump boto3 from 1.11.6 to 1.11.9 Bumps [boto3](https://github.com/boto/boto3) from 1.11.6 to 1.11.9. - [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.6...1.11.9) 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 7f1cd83..42e3ca1 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.6 +boto3==1.11.9 botocore==1.14.9 dnspython==1.16.0 docutils==0.16