diff -Nru lexicon-2.7.0/debian/changelog lexicon-2.7.0/debian/changelog --- lexicon-2.7.0/debian/changelog 2018-08-12 18:38:44.000000000 +0000 +++ lexicon-2.7.0/debian/changelog 2019-04-29 09:20:43.000000000 +0000 @@ -1,3 +1,11 @@ +lexicon (2.7.0-1ubuntu0.1) cosmic; urgency=medium + + [ Adrien Ferrand ] + * Fix dnsimple provider to create records (LP: #1825049). + * Disable route53 provider tests, since VCRpy cassettes are not working anymore (LP: #1825049). + + -- Robie Basak Mon, 29 Apr 2019 10:20:43 +0100 + lexicon (2.7.0-1) unstable; urgency=medium * New upstream version 2.7.0 (Closes: #905450) diff -Nru lexicon-2.7.0/debian/control lexicon-2.7.0/debian/control --- lexicon-2.7.0/debian/control 2018-08-12 18:38:44.000000000 +0000 +++ lexicon-2.7.0/debian/control 2019-04-29 09:20:43.000000000 +0000 @@ -1,5 +1,6 @@ Source: lexicon -Maintainer: Ana Custura +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ana Custura Uploaders: Debian Python Modules Team Section: python Priority: optional diff -Nru lexicon-2.7.0/debian/patches/disable-route53-tests.patch lexicon-2.7.0/debian/patches/disable-route53-tests.patch --- lexicon-2.7.0/debian/patches/disable-route53-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ lexicon-2.7.0/debian/patches/disable-route53-tests.patch 2019-04-29 09:20:43.000000000 +0000 @@ -0,0 +1,106 @@ +From: Adrien Ferrand +Subject: Disable route53 provider tests VCRpy cassettes since they are not valid anymore + +* tests/providers/test_route53.py: remove route53 tests, boto recordings no longer work. + +Origin: upstream, https://github.com/AnalogJ/lexicon/commit/9bae768ea91719ffa845350565f977ca86914d95 +Bug: https://github.com/AnalogJ/lexicon/pull/285 +diff --git a/tests/providers/test_route53.py b/tests/providers/test_route53.py +index 3d537ba..509b7e8 100644 +--- a/tests/providers/test_route53.py ++++ b/tests/providers/test_route53.py +@@ -1,46 +1,46 @@ +-"""Test for route53 implementation of the interface.""" +-import unittest +-import pytest +-from lexicon.providers.route53 import Provider +-from integration_tests import IntegrationTests, provider_vcr +- +-class Route53ProviderTests(unittest.TestCase, IntegrationTests): +- """Route53 Proivder Tests.""" +- +- Provider = Provider +- provider_name = 'route53' +- domain = 'capsulecd.com' +- +- def _filter_headers(self): +- """Sensitive headers to be filtered.""" +- return ['Authorization'] +- +- def test_Provider_authenticate_private_zone_only(self): +- with provider_vcr.use_cassette(super(Route53ProviderTests, self)._cassette_path('IntegrationTests/test_Provider_authenticate.yaml'), filter_headers=super(Route53ProviderTests, self)._filter_headers(), filter_query_parameters=super(Route53ProviderTests, self)._filter_query_parameters(), filter_post_data_parameters=super(Route53ProviderTests, self)._filter_post_data_parameters()): +- options = super(Route53ProviderTests, self)._test_options() +- options['private_zone'] = 'true' +- provider = self.Provider(options, super(Route53ProviderTests, self)._test_engine_overrides()) +- with pytest.raises(Exception): +- provider.authenticate() +- +- def test_Provider_authenticate_private_zone_false(self): +- with provider_vcr.use_cassette(super(Route53ProviderTests, self)._cassette_path('IntegrationTests/test_Provider_authenticate.yaml'), filter_headers=super(Route53ProviderTests, self)._filter_headers(), filter_query_parameters=super(Route53ProviderTests, self)._filter_query_parameters(), filter_post_data_parameters=super(Route53ProviderTests, self)._filter_post_data_parameters()): +- options = super(Route53ProviderTests, self)._test_options() +- options['private_zone'] = 'false' +- provider = self.Provider(options, super(Route53ProviderTests, self)._test_engine_overrides()) +- provider.authenticate() +- assert provider.domain_id is not None +- +- @pytest.mark.skip(reason="route 53 dns records don't have ids") +- def test_Provider_when_calling_delete_record_by_identifier_should_remove_record(self): +- return +- +- # TODO: the following skipped suite and fixtures should be enabled +- @pytest.mark.skip(reason="new test, missing recording") +- def test_Provider_when_calling_update_record_should_modify_record_name_specified(self): +- return +- +- @pytest.fixture(autouse=True) +- def skip_suite(self, request): +- if request.node.get_marker('ext_suite_1'): +- pytest.skip('Skipping extended suite') +\ No newline at end of file ++# """Test for route53 implementation of the interface.""" ++# import unittest ++# import pytest ++# from lexicon.providers.route53 import Provider ++# from integration_tests import IntegrationTests, provider_vcr ++# ++# class Route53ProviderTests(unittest.TestCase, IntegrationTests): ++# """Route53 Proivder Tests.""" ++# ++# Provider = Provider ++# provider_name = 'route53' ++# domain = 'capsulecd.com' ++# ++# def _filter_headers(self): ++# """Sensitive headers to be filtered.""" ++# return ['Authorization'] ++# ++# def test_Provider_authenticate_private_zone_only(self): ++# with provider_vcr.use_cassette(super(Route53ProviderTests, self)._cassette_path('IntegrationTests/test_Provider_authenticate.yaml'), filter_headers=super(Route53ProviderTests, self)._filter_headers(), filter_query_parameters=super(Route53ProviderTests, self)._filter_query_parameters(), filter_post_data_parameters=super(Route53ProviderTests, self)._filter_post_data_parameters()): ++# options = super(Route53ProviderTests, self)._test_options() ++# options['private_zone'] = 'true' ++# provider = self.Provider(options, super(Route53ProviderTests, self)._test_engine_overrides()) ++# with pytest.raises(Exception): ++# provider.authenticate() ++# ++# def test_Provider_authenticate_private_zone_false(self): ++# with provider_vcr.use_cassette(super(Route53ProviderTests, self)._cassette_path('IntegrationTests/test_Provider_authenticate.yaml'), filter_headers=super(Route53ProviderTests, self)._filter_headers(), filter_query_parameters=super(Route53ProviderTests, self)._filter_query_parameters(), filter_post_data_parameters=super(Route53ProviderTests, self)._filter_post_data_parameters()): ++# options = super(Route53ProviderTests, self)._test_options() ++# options['private_zone'] = 'false' ++# provider = self.Provider(options, super(Route53ProviderTests, self)._test_engine_overrides()) ++# provider.authenticate() ++# assert provider.domain_id is not None ++# ++# @pytest.mark.skip(reason="route 53 dns records don't have ids") ++# def test_Provider_when_calling_delete_record_by_identifier_should_remove_record(self): ++# return ++# ++# # TODO: the following skipped suite and fixtures should be enabled ++# @pytest.mark.skip(reason="new test, missing recording") ++# def test_Provider_when_calling_update_record_should_modify_record_name_specified(self): ++# return ++# ++# @pytest.fixture(autouse=True) ++# def skip_suite(self, request): ++# if request.node.get_marker('ext_suite_1'): ++# pytest.skip('Skipping extended suite') +\ No newline at end of file diff -Nru lexicon-2.7.0/debian/patches/fix-dnsimple.patch lexicon-2.7.0/debian/patches/fix-dnsimple.patch --- lexicon-2.7.0/debian/patches/fix-dnsimple.patch 1970-01-01 00:00:00.000000000 +0000 +++ lexicon-2.7.0/debian/patches/fix-dnsimple.patch 2019-04-29 09:20:43.000000000 +0000 @@ -0,0 +1,126 @@ +diff --git a/lexicon/providers/dnsimple.py b/lexicon/providers/dnsimple.py +index 598ff35..1d6bc1f 100644 +--- a/lexicon/providers/dnsimple.py ++++ b/lexicon/providers/dnsimple.py +@@ -61,7 +61,7 @@ class Provider(BaseProvider): + if self.options.get('regions'): + record['regions'] = self.options.get('regions') + +- payload = self._post('{0}/zones/{1}/records'.format(self.account_id, self.options.get('domain')), record) ++ payload = self._post('/{0}/zones/{1}/records'.format(self.account_id, self.options.get('domain')), record) + + logger.debug('create_record: %s', 'id' in payload) + return 'id' in payload +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml +index fa087fd..17e46a8 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502887,"zone_id":"lexicontest.us","parent_id":null,"name":"delete.testfilt","content":"challengetoken","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:19Z","updated_at":"2018-07-09T05:38:19Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml +index 631a7a0..3079a06 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502888,"zone_id":"lexicontest.us","parent_id":null,"name":"delete.testfqdn","content":"challengetoken","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:24Z","updated_at":"2018-07-09T05:38:24Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml +index 43b5a83..f6b7a5e 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502889,"zone_id":"lexicontest.us","parent_id":null,"name":"delete.testfull","content":"challengetoken","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:30Z","updated_at":"2018-07-09T05:38:30Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml +index 862767c..46c7af2 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502890,"zone_id":"lexicontest.us","parent_id":null,"name":"delete.testid","content":"challengetoken","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:35Z","updated_at":"2018-07-09T05:38:35Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml +index 0a21ac0..81d917c 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml +@@ -113,7 +113,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502891,"zone_id":"lexicontest.us","parent_id":null,"name":"_acme-challenge.deleterecordinset","content":"challengetoken1","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:40Z","updated_at":"2018-07-09T05:38:40Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_name_remove_all.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_name_remove_all.yaml +index d41f818..7322893 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_name_remove_all.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_delete_record_with_record_set_name_remove_all.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502892,"zone_id":"lexicontest.us","parent_id":null,"name":"_acme-challenge.deleterecordset","content":"challengetoken1","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:46Z","updated_at":"2018-07-09T05:38:46Z"}}'} + headers: +@@ -180,7 +180,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502893,"zone_id":"lexicontest.us","parent_id":null,"name":"_acme-challenge.deleterecordset","content":"challengetoken2","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:38:48Z","updated_at":"2018-07-09T05:38:48Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml +index 95e06ac..85b01d1 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502895,"zone_id":"lexicontest.us","parent_id":null,"name":"orig.testfqdn","content":"challengetoken","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:46:57Z","updated_at":"2018-07-09T05:46:57Z"}}'} + headers: +diff --git a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml +index 399d812..f0b440d 100644 +--- a/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml ++++ b/tests/fixtures/cassettes/dnsimple/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml +@@ -112,7 +112,7 @@ interactions: + Content-Type: [application/json] + User-Agent: [python-requests/2.19.1] + method: POST +- uri: https://api.sandbox.dnsimple.com/v2731/zones/lexicontest.us/records ++ uri: https://api.sandbox.dnsimple.com/v2/731/zones/lexicontest.us/records + response: + body: {string: '{"data":{"id":502896,"zone_id":"lexicontest.us","parent_id":null,"name":"orig.testfull","content":"challengetoken","ttl":3600,"priority":null,"type":"TXT","regions":["global"],"system_record":false,"created_at":"2018-07-09T05:47:01Z","updated_at":"2018-07-09T05:47:01Z"}}'} + headers: diff -Nru lexicon-2.7.0/debian/patches/series lexicon-2.7.0/debian/patches/series --- lexicon-2.7.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ lexicon-2.7.0/debian/patches/series 2019-04-29 09:20:43.000000000 +0000 @@ -0,0 +1,2 @@ +fix-dnsimple.patch +disable-route53-tests.patch