diff --git a/lexicon/providers/vultr.py b/lexicon/providers/vultr.py index 6276ab823..d7cd51da1 100644 --- a/lexicon/providers/vultr.py +++ b/lexicon/providers/vultr.py @@ -1,6 +1,7 @@ """Module provider for Vultr""" from __future__ import absolute_import +import json import logging import requests @@ -23,85 +24,117 @@ class Provider(BaseProvider): def __init__(self, config): super(Provider, self).__init__(config) self.domain_id = None - self.api_endpoint = "https://api.vultr.com/v1" + self.api_endpoint = "https://api.vultr.com/v2" def _authenticate(self): - payload = self._get("/dns/list") + payload = self._get("/domains") - if not [item for item in payload if item["domain"] == self.domain]: - raise Exception("No domain found") + for domain in payload["domains"]: + if domain["domain"] == self.domain: + self.domain_id = self.domain + return - self.domain_id = self.domain + while payload["meta"]["links"]["next"] != "": + query_params = {"cursor": payload["meta"]["links"]["next"]} + payload = self._get("/domains", query_params=query_params) - # Create record. If record already exists with the same content, do nothing' + for domain in payload["domains"]: + if domain["domain"] == self.domain: + self.domain_id = self.domain + return + raise Exception("Domain not found") + + # Create record. If record already exists with the same content, do nothing def _create_record(self, rtype, name, content): + records = self._list_records(rtype, name, content) + if len(records) != 0: + LOGGER.debug("create_record (already exists): %s", records[0]["id"]) + return True + record = { "type": rtype, - "domain": self.domain_id, "name": self._relative_name(name), + "data": self._add_quotes(rtype, content), "priority": 0, } - if rtype == "TXT": - record["data"] = f'"{content}"' - else: - record["data"] = content if self._get_lexicon_option("ttl"): record["ttl"] = self._get_lexicon_option("ttl") - self._post("/dns/create_record", record) - LOGGER.debug("create_record: %s", True) + result = self._post(f"/domains/{self.domain_id}/records", record) + LOGGER.debug("create_record: %s", result["record"]["id"]) return True # List all records. Return an empty list if no records found # type, name and content are used to filter records. # If possible filter during the query, otherwise filter after response is received. def _list_records(self, rtype=None, name=None, content=None): - payload = self._get("/dns/records", {"domain": self.domain_id}) + url = f"/domains/{self.domain_id}/records" + + payload = self._get(url) + unprocessed_records = payload["records"] + + while payload["meta"]["links"]["next"] != "": + query_params = {"cursor": payload["meta"]["links"]["next"]} + payload = self._get(url, query_params=query_params) + unprocessed_records.extend(payload["records"]) + records = [] - for record in payload: - processed_record = { - "type": record["type"], - "name": f"{record['name']}.{self.domain_id}", - "ttl": record.get("ttl", self._get_lexicon_option("ttl")), - "content": record["data"], - "id": record["RECORDID"], - } - processed_record = self._clean_TXT_record(processed_record) - records.append(processed_record) + for record in unprocessed_records: + records.append(self._process_record(record)) if rtype: - records = [record for record in records if record["type"] == rtype] + records = [rec for rec in records if rec["type"] == rtype] if name: - records = [ - record for record in records if record["name"] == self._full_name(name) - ] + records = [rec for rec in records if rec["name"] == self._full_name(name)] if content: - records = [record for record in records if record["content"] == content] + records = [rec for rec in records if rec["content"] == content] LOGGER.debug("list_records: %s", records) return records - # Create or update a record. + # Update a record. Identifier must be specified. def _update_record(self, identifier, rtype=None, name=None, content=None): + record = None + if not identifier: + records = self._list_records(rtype, name) + + if not records: + raise Exception( + f"No record(s) found for arguments: identifer={identifier}, rtype={rtype}, name={name}" + ) + if len(records) > 1: + LOGGER.warning( + "Multiple records have been found for given parameters. " + "Only first one will be updated (id: %s)", + records[0]["id"], + ) + + record = records[0] + identifier = record["id"] + + url = f"/domains/{self.domain_id}/records/{identifier}" + if not record: + record = self._get(url)["record"] + record = self._process_record(record) + + new_record = {} - data = { - "domain": self.domain_id, - "RECORDID": identifier, - "ttl": self._get_lexicon_option("ttl"), - } - # if rtype: - # data['type'] = rtype if name: - data["name"] = self._relative_name(name) + name = self._relative_name(name) + if name != record["name"]: + new_record["name"] = name + if content: - if rtype == "TXT": - data["data"] = f'"{content}"' - else: - data["data"] = content + content = self._add_quotes(record["type"], content) + if content != record["content"]: + new_record["data"] = content - self._post("/dns/update_record", data) + if new_record == {}: + LOGGER.debug("update_record (nothing to do): %s", True) + return True + self._patch(url, new_record) LOGGER.debug("update_record: %s", True) return True @@ -116,40 +149,55 @@ def _delete_record(self, identifier=None, rtype=None, name=None, content=None): delete_record_id.append(identifier) LOGGER.debug("delete_records: %s", delete_record_id) - for record_id in delete_record_id: - data = {"domain": self.domain_id, "RECORDID": record_id} - self._post("/dns/delete_record", data) + try: + self._delete(f"/domains/{self.domain_id}/records/{record_id}") + except requests.HTTPError as e: + if e.response.status_code != 404: + raise # is always True at this point, if a non 200 response is returned an error is raised. LOGGER.debug("delete_record: %s", True) return True # Helpers - def _request(self, action="GET", url="/", data=None, query_params=None): - if data is None: - data = {} - if query_params is None: - query_params = {} - - default_headers = { + headers = { "Accept": "application/json", - # 'Content-Type': 'application/json', - "API-Key": self._get_provider_option("auth_token"), + "Authorization": "Bearer " + self._get_provider_option("auth_token"), } + if data is not None: + headers["Content-Type"] = "application/json" + data = json.dumps(data) + response = requests.request( action, self.api_endpoint + url, params=query_params, data=data, - headers=default_headers, + headers=headers, ) # if the request fails for any reason, throw an error. response.raise_for_status() - if action in ("DELETE", "PUT", "POST"): - # vultr handles succss/failure via HTTP Codes, Only GET returns a response. - return response.text + if response.status_code == 204: + return None + return response.json() + + @staticmethod + def _add_quotes(rtype, content): + if rtype == "TXT": + return f'"{content}"' + return content + + def _process_record(self, record): + processed_record = { + "type": record["type"], + "name": self._full_name(record["name"]), + "ttl": record["ttl"], + "content": record["data"], + "id": record["id"], + } + return self._clean_TXT_record(processed_record) diff --git a/lexicon/tests/providers/test_vultr.py b/lexicon/tests/providers/test_vultr.py index d4c4866ac..0507cb9ca 100644 --- a/lexicon/tests/providers/test_vultr.py +++ b/lexicon/tests/providers/test_vultr.py @@ -1,27 +1,17 @@ """Integration tests for Vultr""" from unittest import TestCase -import pytest - -from lexicon.tests.providers.integration_tests import IntegrationTestsV1 +from lexicon.tests.providers.integration_tests import IntegrationTestsV2 # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # pass, by inheritance from define_tests.TheTests -# TODO: migrate to IntegrationTestsV2 and its extended test suite -class VultrProviderTests(TestCase, IntegrationTestsV1): +class VultrProviderTests(TestCase, IntegrationTestsV2): """TestCase for Vultr""" provider_name = "vultr" - domain = "capsulecd.com" + domain = "lexicon-test.eu" def _filter_headers(self): - return ["API-Key"] - - # TODO: enable the skipped tests - @pytest.mark.skip(reason="new test, missing recording") - def test_provider_when_calling_update_record_should_modify_record_name_specified( - self, - ): - return + return ["Authorization"] diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate.yaml index 3209e7b46..83489ef85 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate.yaml @@ -1,29 +1,46 @@ interactions: - request: - body: '{}' + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Wed, 13 Apr 2016 23:22:33 GMT'] - expires: ['Wed, 13 Apr 2016 23:22:32 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:21 GMT + Expires: + - Sat, 27 Mar 2021 09:41:20 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml index 3209e7b46..83489ef85 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml @@ -1,29 +1,46 @@ interactions: - request: - body: '{}' + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Wed, 13 Apr 2016 23:22:33 GMT'] - expires: ['Wed, 13 Apr 2016 23:22:32 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:21 GMT + Expires: + - Sat, 27 Mar 2021 09:41:20 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml index b55f5993d..6f31bc6a4 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml @@ -2,51 +2,136 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:15 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:14 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:22 GMT + Expires: + - Sat, 27 Mar 2021 09:41:21 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=127.0.0.1&domain=capsulecd.com&type=A&name=localhost + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300}],"meta":{"total":5,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:22 GMT + Expires: + - Sat, 27 Mar 2021 09:41:21 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '640' + status: + code: 200 + message: OK +- request: + body: '{"type": "A", "name": "localhost", "data": "127.0.0.1", "priority": 0, + "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['68'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '83' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:09:18 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:17 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:23 GMT + Expires: + - Sat, 27 Mar 2021 09:41:22 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml index efd684fc0..9f6849207 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml @@ -2,51 +2,136 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:16 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:15 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:24 GMT + Expires: + - Sat, 27 Mar 2021 09:41:23 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=docs.example.com&domain=capsulecd.com&type=CNAME&name=docs + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600}],"meta":{"total":6,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:24 GMT + Expires: + - Sat, 27 Mar 2021 09:41:23 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '759' + status: + code: 200 + message: OK +- request: + body: '{"type": "CNAME", "name": "docs", "data": "docs.example.com", "priority": + 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['74'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '89' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:09:19 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:18 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:25 GMT + Expires: + - Sat, 27 Mar 2021 09:41:24 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml index ae50cdfd8..8c828e352 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml @@ -2,51 +2,136 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:05:25 GMT'] - expires: ['Thu, 14 Apr 2016 00:05:24 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:25 GMT + Expires: + - Sat, 27 Mar 2021 09:41:24 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=_acme-challenge.fqdn + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600}],"meta":{"total":7,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:26 GMT + Expires: + - Sat, 27 Mar 2021 09:41:25 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '884' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.fqdn", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['92'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:05:28 GMT'] - expires: ['Thu, 14 Apr 2016 00:05:27 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:27 GMT + Expires: + - Sat, 27 Mar 2021 09:41:26 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml index c2e0c20d7..cb1fba789 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml @@ -2,51 +2,136 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:05:25 GMT'] - expires: ['Thu, 14 Apr 2016 00:05:24 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:27 GMT + Expires: + - Sat, 27 Mar 2021 09:41:26 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=_acme-challenge.full + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":8,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:28 GMT + Expires: + - Sat, 27 Mar 2021 09:41:27 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1025' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.full", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['92'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:05:29 GMT'] - expires: ['Thu, 14 Apr 2016 00:05:28 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:29 GMT + Expires: + - Sat, 27 Mar 2021 09:41:28 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml index 3f5d9ad87..5d5d62a6d 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml @@ -2,51 +2,136 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:05:25 GMT'] - expires: ['Thu, 14 Apr 2016 00:05:24 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:29 GMT + Expires: + - Sat, 27 Mar 2021 09:41:28 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=_acme-challenge.test + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":9,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:30 GMT + Expires: + - Sat, 27 Mar 2021 09:41:29 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1166' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.test", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['92'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:05:30 GMT'] - expires: ['Thu, 14 Apr 2016 00:05:29 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:31 GMT + Expires: + - Sat, 27 Mar 2021 09:41:30 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml new file mode 100644 index 000000000..fe791eed1 --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml @@ -0,0 +1,228 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:31 GMT + Expires: + - Sat, 27 Mar 2021 09:41:30 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":10,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:32 GMT + Expires: + - Sat, 27 Mar 2021 09:41:31 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1308' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.createrecordset", "data": "\"challengetoken1\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '117' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:33 GMT + Expires: + - Sat, 27 Mar 2021 09:41:32 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600}],"meta":{"total":11,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:34 GMT + Expires: + - Sat, 27 Mar 2021 09:41:33 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1461' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.createrecordset", "data": "\"challengetoken2\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '117' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:34 GMT + Expires: + - Sat, 27 Mar 2021 09:41:33 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml new file mode 100644 index 000000000..d88e7fe52 --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml @@ -0,0 +1,225 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:35 GMT + Expires: + - Sat, 27 Mar 2021 09:41:34 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":12,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:35 GMT + Expires: + - Sat, 27 Mar 2021 09:41:34 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1614' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.noop", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:37 GMT + Expires: + - Sat, 27 Mar 2021 09:41:36 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:37 GMT + Expires: + - Sat, 27 Mar 2021 09:41:36 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:38 GMT + Expires: + - Sat, 27 Mar 2021 09:41:37 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml index a0bbfb64e..29ce5aae3 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml @@ -2,123 +2,266 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:25 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:24 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:40 GMT + Expires: + - Sat, 27 Mar 2021 09:41:39 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=delete.testfilt + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['87'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:40 GMT + Expires: + - Sat, 27 Mar 2021 09:41:39 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "delete.testfilt", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"71f65833-a70c-475e-8b25-bc8527b3e864","type":"TXT","name":"delete.testfilt","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:29 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:28 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:41 GMT + Expires: + - Sat, 27 Mar 2021 09:41:40 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testfilt","data":"\"challengetoken\"","priority":0,"RECORDID":2051719},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"71f65833-a70c-475e-8b25-bc8527b3e864","type":"TXT","name":"delete.testfilt","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['973'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:30 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:29 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:42 GMT + Expires: + - Sat, 27 Mar 2021 09:41:41 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1891' + status: + code: 200 + message: OK - request: - body: RECORDID=2051719&domain=capsulecd.com + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['37'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/delete_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/71f65833-a70c-475e-8b25-bc8527b3e864 response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:36 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:35 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:41:42 GMT + Expires: + - Sat, 27 Mar 2021 09:41:41 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051720},{"type":"TXT","name":"delete.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051721},{"type":"TXT","name":"delete.testid","data":"\"challengetoken\"","priority":0,"RECORDID":2051722},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['1171'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:37 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:36 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:43 GMT + Expires: + - Sat, 27 Mar 2021 09:41:42 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml index be88f7a97..9f5b3b7ba 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml @@ -2,123 +2,266 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:26 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:25 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:44 GMT + Expires: + - Sat, 27 Mar 2021 09:41:43 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=delete.testfqdn + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['87'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:44 GMT + Expires: + - Sat, 27 Mar 2021 09:41:43 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "delete.testfqdn", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"86d1de2f-6e09-4608-8cb3-af6b38093051","type":"TXT","name":"delete.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:30 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:29 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:45 GMT + Expires: + - Sat, 27 Mar 2021 09:41:44 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testfilt","data":"\"challengetoken\"","priority":0,"RECORDID":2051719},{"type":"TXT","name":"delete.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051720},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"86d1de2f-6e09-4608-8cb3-af6b38093051","type":"TXT","name":"delete.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['1073'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:31 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:30 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:45 GMT + Expires: + - Sat, 27 Mar 2021 09:41:44 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1891' + status: + code: 200 + message: OK - request: - body: RECORDID=2051720&domain=capsulecd.com + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['37'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/delete_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/86d1de2f-6e09-4608-8cb3-af6b38093051 response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:38 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:37 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:41:46 GMT + Expires: + - Sat, 27 Mar 2021 09:41:45 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051721},{"type":"TXT","name":"delete.testid","data":"\"challengetoken\"","priority":0,"RECORDID":2051722},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['1071'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:38 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:37 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:46 GMT + Expires: + - Sat, 27 Mar 2021 09:41:45 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml index 15cdd658a..6c93af467 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml @@ -2,123 +2,266 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:26 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:25 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:47 GMT + Expires: + - Sat, 27 Mar 2021 09:41:46 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=delete.testfull + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['87'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:48 GMT + Expires: + - Sat, 27 Mar 2021 09:41:47 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "delete.testfull", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"2f57237b-08c4-453e-9e5e-4f91878111cb","type":"TXT","name":"delete.testfull","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:32 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:31 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:48 GMT + Expires: + - Sat, 27 Mar 2021 09:41:47 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testfilt","data":"\"challengetoken\"","priority":0,"RECORDID":2051719},{"type":"TXT","name":"delete.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051720},{"type":"TXT","name":"delete.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051721},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"2f57237b-08c4-453e-9e5e-4f91878111cb","type":"TXT","name":"delete.testfull","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['1173'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:32 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:31 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:49 GMT + Expires: + - Sat, 27 Mar 2021 09:41:48 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1891' + status: + code: 200 + message: OK - request: - body: RECORDID=2051721&domain=capsulecd.com + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['37'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/delete_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/2f57237b-08c4-453e-9e5e-4f91878111cb response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:39 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:38 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:41:50 GMT + Expires: + - Sat, 27 Mar 2021 09:41:49 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testid","data":"\"challengetoken\"","priority":0,"RECORDID":2051722},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['971'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:40 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:39 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:50 GMT + Expires: + - Sat, 27 Mar 2021 09:41:49 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml index 0b704bafb..5d640035b 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml @@ -2,123 +2,266 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:27 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:26 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:51 GMT + Expires: + - Sat, 27 Mar 2021 09:41:50 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=delete.testid + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['85'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:51 GMT + Expires: + - Sat, 27 Mar 2021 09:41:50 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "delete.testid", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"347aa6bd-bb75-49db-9468-ccb23101025f","type":"TXT","name":"delete.testid","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:33 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:32 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:52 GMT + Expires: + - Sat, 27 Mar 2021 09:41:51 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"delete.testfilt","data":"\"challengetoken\"","priority":0,"RECORDID":2051719},{"type":"TXT","name":"delete.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051720},{"type":"TXT","name":"delete.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051721},{"type":"TXT","name":"delete.testid","data":"\"challengetoken\"","priority":0,"RECORDID":2051722},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"347aa6bd-bb75-49db-9468-ccb23101025f","type":"TXT","name":"delete.testid","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['1271'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:34 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:33 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:52 GMT + Expires: + - Sat, 27 Mar 2021 09:41:51 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1889' + status: + code: 200 + message: OK - request: - body: RECORDID=2051722&domain=capsulecd.com + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['37'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/delete_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/347aa6bd-bb75-49db-9468-ccb23101025f response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:41 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:40 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:41:53 GMT + Expires: + - Sat, 27 Mar 2021 09:41:52 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['873'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:42 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:41 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:54 GMT + Expires: + - Sat, 27 Mar 2021 09:41:53 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml new file mode 100644 index 000000000..17e20f71d --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml @@ -0,0 +1,358 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:54 GMT + Expires: + - Sat, 27 Mar 2021 09:41:53 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":13,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:55 GMT + Expires: + - Sat, 27 Mar 2021 09:41:54 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1755' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.deleterecordinset", "data": "\"challengetoken1\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '119' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"efb329c0-5f83-4fc2-8365-6890b650ee45","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken1\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:56 GMT + Expires: + - Sat, 27 Mar 2021 09:41:55 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"efb329c0-5f83-4fc2-8365-6890b650ee45","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken1\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:57 GMT + Expires: + - Sat, 27 Mar 2021 09:41:56 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1910' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.deleterecordinset", "data": "\"challengetoken2\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '119' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:57 GMT + Expires: + - Sat, 27 Mar 2021 09:41:56 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"efb329c0-5f83-4fc2-8365-6890b650ee45","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":15,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:58 GMT + Expires: + - Sat, 27 Mar 2021 09:41:57 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2065' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/efb329c0-5f83-4fc2-8365-6890b650ee45 + response: + body: + string: '' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:41:59 GMT + Expires: + - Sat, 27 Mar 2021 09:41:58 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:41:59 GMT + Expires: + - Sat, 27 Mar 2021 09:41:58 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1910' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml new file mode 100644 index 000000000..15107eb85 --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml @@ -0,0 +1,400 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:00 GMT + Expires: + - Sat, 27 Mar 2021 09:41:59 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:01 GMT + Expires: + - Sat, 27 Mar 2021 09:42:00 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1910' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.deleterecordset", "data": "\"challengetoken1\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '117' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"cbe5b006-8182-437c-a22d-7d672eedd24b","type":"TXT","name":"_acme-challenge.deleterecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:02 GMT + Expires: + - Sat, 27 Mar 2021 09:42:01 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"cbe5b006-8182-437c-a22d-7d672eedd24b","type":"TXT","name":"_acme-challenge.deleterecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600}],"meta":{"total":15,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:02 GMT + Expires: + - Sat, 27 Mar 2021 09:42:01 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2063' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.deleterecordset", "data": "\"challengetoken2\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '117' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"8f8a1020-50e5-4245-a4df-e0b586972526","type":"TXT","name":"_acme-challenge.deleterecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:03 GMT + Expires: + - Sat, 27 Mar 2021 09:42:02 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"cbe5b006-8182-437c-a22d-7d672eedd24b","type":"TXT","name":"_acme-challenge.deleterecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"8f8a1020-50e5-4245-a4df-e0b586972526","type":"TXT","name":"_acme-challenge.deleterecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":16,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:04 GMT + Expires: + - Sat, 27 Mar 2021 09:42:03 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2216' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/cbe5b006-8182-437c-a22d-7d672eedd24b + response: + body: + string: '' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:42:04 GMT + Expires: + - Sat, 27 Mar 2021 09:42:03 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.25.1 + method: DELETE + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/8f8a1020-50e5-4245-a4df-e0b586972526 + response: + body: + string: '' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:42:05 GMT + Expires: + - Sat, 27 Mar 2021 09:42:04 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:05 GMT + Expires: + - Sat, 27 Mar 2021 09:42:04 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1910' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml index 8eaa208e1..7bf1a207d 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml @@ -2,75 +2,180 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Sat, 30 Jul 2016 21:23:16 GMT'] - expires: ['Sat, 30 Jul 2016 21:23:15 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:06 GMT + Expires: + - Sat, 27 Mar 2021 09:42:05 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: domain=capsulecd.com&name=ttl.fqdn&type=TXT&priority=0&ttl=3600&data=%22ttlshouldbe3600%22 + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":14,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:07 GMT + Expires: + - Sat, 27 Mar 2021 09:42:06 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '1910' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "ttl.fqdn", "data": "\"ttlshouldbe3600\"", "priority": + 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['90'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '94' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Sat, 30 Jul 2016 21:23:18 GMT'] - expires: ['Sat, 30 Jul 2016 21:23:17 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:07 GMT + Expires: + - Sat, 27 Mar 2021 09:42:06 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670,"ttl":300},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671,"ttl":300},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680,"ttl":300},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681,"ttl":300},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682,"ttl":300},{"type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"RECORDID":2452603,"ttl":3600},{"type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716,"ttl":300},{"type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717,"ttl":300},{"type":"TXT","name":"updated.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718,"ttl":300},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668,"ttl":300}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600}],"meta":{"total":15,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['1068'] - content-type: [application/json] - date: ['Sat, 30 Jul 2016 21:23:19 GMT'] - expires: ['Sat, 30 Jul 2016 21:23:18 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:08 GMT + Expires: + - Sat, 27 Mar 2021 09:42:07 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2040' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml new file mode 100644 index 000000000..db2ec6f7d --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:09 GMT + Expires: + - Sat, 27 Mar 2021 09:42:08 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600}],"meta":{"total":15,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:09 GMT + Expires: + - Sat, 27 Mar 2021 09:42:08 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2040' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.listrecordset", "data": "\"challengetoken1\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '115' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:10 GMT + Expires: + - Sat, 27 Mar 2021 09:42:09 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600}],"meta":{"total":16,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:11 GMT + Expires: + - Sat, 27 Mar 2021 09:42:10 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2191' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "_acme-challenge.listrecordset", "data": "\"challengetoken2\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '115' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:11 GMT + Expires: + - Sat, 27 Mar 2021 09:42:10 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":17,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:12 GMT + Expires: + - Sat, 27 Mar 2021 09:42:11 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2342' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml index 4fa437536..2de1463d2 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml @@ -2,75 +2,180 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:31 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:30 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:12 GMT + Expires: + - Sat, 27 Mar 2021 09:42:11 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=random.fqdntest + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600}],"meta":{"total":17,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:13 GMT + Expires: + - Sat, 27 Mar 2021 09:42:12 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2342' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "random.fqdntest", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['87'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:09:35 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:34 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:14 GMT + Expires: + - Sat, 27 Mar 2021 09:42:13 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":18,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['378'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:35 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:34 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:15 GMT + Expires: + - Sat, 27 Mar 2021 09:42:14 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2478' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml index ab61ae1b8..bc85b9303 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml @@ -2,75 +2,180 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:32 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:31 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:15 GMT + Expires: + - Sat, 27 Mar 2021 09:42:14 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=random.fulltest + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":18,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:16 GMT + Expires: + - Sat, 27 Mar 2021 09:42:15 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2478' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "random.fulltest", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['87'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:09:36 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:35 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:16 GMT + Expires: + - Sat, 27 Mar 2021 09:42:15 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":19,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['478'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:37 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:36 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:17 GMT + Expires: + - Sat, 27 Mar 2021 09:42:16 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2614' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml new file mode 100644 index 000000000..5400be046 --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml @@ -0,0 +1,90 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:18 GMT + Expires: + - Sat, 27 Mar 2021 09:42:17 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":19,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:19 GMT + Expires: + - Sat, 27 Mar 2021 09:42:18 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2614' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml index 76b4bc935..942a8106e 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml @@ -2,75 +2,180 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:32 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:31 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:19 GMT + Expires: + - Sat, 27 Mar 2021 09:42:18 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=random.test + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":19,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:20 GMT + Expires: + - Sat, 27 Mar 2021 09:42:19 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2614' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "random.test", "data": "\"challengetoken\"", "priority": + 0, "ttl": 3600}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['83'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '96' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:09:38 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:37 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:20 GMT + Expires: + - Sat, 27 Mar 2021 09:42:19 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":20,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['574'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:39 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:38 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:21 GMT + Expires: + - Sat, 27 Mar 2021 09:42:20 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2746' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml index 95723b634..d77d43df6 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml @@ -2,49 +2,89 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:33 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:32 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:22 GMT + Expires: + - Sat, 27 Mar 2021 09:42:21 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":20,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['574'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:09:39 GMT'] - expires: ['Thu, 14 Apr 2016 00:09:38 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:22 GMT + Expires: + - Sat, 27 Mar 2021 09:42:21 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2746' + status: + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml index e7fedee2e..c7353cc2c 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml @@ -2,99 +2,268 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:05 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:04 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:23 GMT + Expires: + - Sat, 27 Mar 2021 09:42:22 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=orig.test + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":20,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['81'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:23 GMT + Expires: + - Sat, 27 Mar 2021 09:42:22 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2746' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "orig.test", "data": "\"challengetoken\"", "priority": + 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '94' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"orig.test","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:08 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:07 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:24 GMT + Expires: + - Sat, 27 Mar 2021 09:42:23 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"orig.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"orig.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":21,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['668'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:09 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:08 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:25 GMT + Expires: + - Sat, 27 Mar 2021 09:42:24 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2876' + status: + code: 200 + message: OK - request: - body: RECORDID=2051716&domain=capsulecd.com&data=%22challengetoken%22&name=updated.test&ttl=300 + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['89'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/update_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/514d261a-092a-471b-a554-349dcf3d74f6 + response: + body: + string: '{"record":{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"orig.test","data":"\"challengetoken\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:25 GMT + Expires: + - Sat, 27 Mar 2021 09:42:24 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '140' + status: + code: 200 + message: OK +- request: + body: '{"name": "updated.test", "data": "\"challengetoken\""}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '54' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: PATCH + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/514d261a-092a-471b-a554-349dcf3d74f6 response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:14 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:13 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:42:26 GMT + Expires: + - Sat, 27 Mar 2021 09:42:25 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml new file mode 100644 index 000000000..79fdd518e --- /dev/null +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml @@ -0,0 +1,225 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains + response: + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:26 GMT + Expires: + - Sat, 27 Mar 2021 09:42:25 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":21,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:27 GMT + Expires: + - Sat, 27 Mar 2021 09:42:26 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '2879' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "orig.nameonly.test", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: POST + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"record":{"id":"c45fdd13-8bdb-48bc-b0ea-028bec31b224","type":"TXT","name":"orig.nameonly.test","data":"\"challengetoken\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:28 GMT + Expires: + - Sat, 27 Mar 2021 09:42:27 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"c45fdd13-8bdb-48bc-b0ea-028bec31b224","type":"TXT","name":"orig.nameonly.test","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":22,"links":{"next":"","prev":""}}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:29 GMT + Expires: + - Sat, 27 Mar 2021 09:42:28 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '3018' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.nameonly.test", "data": "\"updated\""}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '53' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: PATCH + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/c45fdd13-8bdb-48bc-b0ea-028bec31b224 + response: + body: + string: '' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:42:29 GMT + Expires: + - Sat, 27 Mar 2021 09:42:28 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml index 29e3ed311..d21c5172f 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -2,99 +2,268 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:06 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:05 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:30 GMT + Expires: + - Sat, 27 Mar 2021 09:42:29 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=orig.testfqdn + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"c45fdd13-8bdb-48bc-b0ea-028bec31b224","type":"TXT","name":"orig.nameonly.test","data":"\"updated\"","priority":0,"ttl":3600}],"meta":{"total":22,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['85'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:30 GMT + Expires: + - Sat, 27 Mar 2021 09:42:29 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '3011' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "orig.testfqdn", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"8a369ab7-6247-4193-ae6e-9d8ed4c8865b","type":"TXT","name":"orig.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:10 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:09 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:31 GMT + Expires: + - Sat, 27 Mar 2021 09:42:30 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"orig.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"orig.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"c45fdd13-8bdb-48bc-b0ea-028bec31b224","type":"TXT","name":"orig.nameonly.test","data":"\"updated\"","priority":0,"ttl":3600},{"id":"8a369ab7-6247-4193-ae6e-9d8ed4c8865b","type":"TXT","name":"orig.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":23,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['766'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:10 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:09 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:31 GMT + Expires: + - Sat, 27 Mar 2021 09:42:30 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '3145' + status: + code: 200 + message: OK - request: - body: RECORDID=2051717&domain=capsulecd.com&data=%22challengetoken%22&name=updated.testfqdn&ttl=300 + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['93'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/update_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/8a369ab7-6247-4193-ae6e-9d8ed4c8865b + response: + body: + string: '{"record":{"id":"8a369ab7-6247-4193-ae6e-9d8ed4c8865b","type":"TXT","name":"orig.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:32 GMT + Expires: + - Sat, 27 Mar 2021 09:42:31 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '144' + status: + code: 200 + message: OK +- request: + body: '{"name": "updated.testfqdn", "data": "\"challengetoken\""}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '58' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: PATCH + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/8a369ab7-6247-4193-ae6e-9d8ed4c8865b response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:15 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:14 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:42:33 GMT + Expires: + - Sat, 27 Mar 2021 09:42:32 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content version: 1 diff --git a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml index acb0b1d2f..ca1c949fc 100644 --- a/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml +++ b/tests/fixtures/cassettes/vultr/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml @@ -2,99 +2,268 @@ interactions: - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/list + uri: https://api.vultr.com/v2/domains response: - body: {string: !!python/unicode '[{"domain":"capsulecd.com","date_created":"2016-04-13 - 19:03:44"}]'} + body: + string: '{"domains":[{"domain":"lexicon-test.eu","date_created":"2021-03-27T09:40:29+00:00"},{"domain":"sielski.be","date_created":"2020-09-13T18:19:59+00:00"}],"meta":{"total":2,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['65'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:06 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:05 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:33 GMT + Expires: + - Sat, 27 Mar 2021 09:42:32 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '201' + status: + code: 200 + message: OK - request: - body: priority=0&data=%22challengetoken%22&domain=capsulecd.com&type=TXT&name=orig.testfull + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records + response: + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"c45fdd13-8bdb-48bc-b0ea-028bec31b224","type":"TXT","name":"orig.nameonly.test","data":"\"updated\"","priority":0,"ttl":3600},{"id":"8a369ab7-6247-4193-ae6e-9d8ed4c8865b","type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":23,"links":{"next":"","prev":""}}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['85'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:34 GMT + Expires: + - Sat, 27 Mar 2021 09:42:33 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '3148' + status: + code: 200 + message: OK +- request: + body: '{"type": "TXT", "name": "orig.testfull", "data": "\"challengetoken\"", + "priority": 0, "ttl": 3600}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 method: POST - uri: https://api.vultr.com/v1/dns/create_record + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode ''} + body: + string: '{"record":{"id":"d8736b71-4bcf-4325-bfe3-45a820adc63a","type":"TXT","name":"orig.testfull","data":"\"challengetoken\"","priority":0,"ttl":3600}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:11 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:10 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:34 GMT + Expires: + - Sat, 27 Mar 2021 09:42:33 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python-requests/2.9.1] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 method: GET - uri: https://api.vultr.com/v1/dns/records?domain=capsulecd.com + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records response: - body: {string: !!python/unicode '[{"type":"A","name":"localhost","data":"127.0.0.1","priority":0,"RECORDID":2051670},{"type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"RECORDID":2051671},{"type":"TXT","name":"orig.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051716},{"type":"TXT","name":"orig.testfqdn","data":"\"challengetoken\"","priority":0,"RECORDID":2051717},{"type":"TXT","name":"orig.testfull","data":"\"challengetoken\"","priority":0,"RECORDID":2051718},{"type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"RECORDID":2051680},{"type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"RECORDID":2051681},{"type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"RECORDID":2051682},{"type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"RECORDID":2051668}]'} + body: + string: '{"records":[{"id":"727732b8-d5bb-48d2-a7dc-0d9244aac37b","type":"NS","name":"","data":"ns1.vultr.com","priority":-1,"ttl":300},{"id":"598e95b7-0a10-4bc4-a0a9-478ff7fa480c","type":"NS","name":"","data":"ns2.vultr.com","priority":-1,"ttl":300},{"id":"53feecb3-f006-4182-ab9c-f654a3b96e0f","type":"A","name":"","data":"127.0.0.1","priority":-1,"ttl":300},{"id":"401e8910-51dd-4f33-9345-cc089c501e35","type":"CNAME","name":"*","data":"lexicon-test.eu","priority":-1,"ttl":300},{"id":"6cd3c3fb-0aee-457e-929b-4729e5c8e6e0","type":"MX","name":"","data":"lexicon-test.eu","priority":10,"ttl":300},{"id":"b4ec45d4-8bf8-4aad-a189-4f5a4ac8567b","type":"A","name":"localhost","data":"127.0.0.1","priority":0,"ttl":3600},{"id":"a15297f8-4050-41e5-8b6f-e31fca44ba9b","type":"CNAME","name":"docs","data":"docs.example.com","priority":0,"ttl":3600},{"id":"28493b0a-7f99-4558-aaea-c0f05f57a667","type":"TXT","name":"_acme-challenge.fqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4223f638-f044-40d5-a0b8-35af206f7841","type":"TXT","name":"_acme-challenge.full","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"aec99a3a-4d32-4ddf-ba1a-034b7696a91c","type":"TXT","name":"_acme-challenge.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"4f8a8f10-7819-4e4d-8916-a0ca3e5a15ff","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"61535d4a-e7a6-429d-80d7-c37cfca4b883","type":"TXT","name":"_acme-challenge.createrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"f3ad8ddf-86dd-436e-939b-2723b565e36c","type":"TXT","name":"_acme-challenge.noop","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"9ffdb722-a92d-423f-a842-95072bde3f35","type":"TXT","name":"_acme-challenge.deleterecordinset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"8b4240e4-13b8-4afe-91cd-00b80cb47459","type":"TXT","name":"ttl.fqdn","data":"\"ttlshouldbe3600\"","priority":0,"ttl":3600},{"id":"5ab50b67-c53a-41fd-87bd-6af46311a1cb","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken1\"","priority":0,"ttl":3600},{"id":"c5b2c0a4-590f-46d6-ac18-d710b8cdce1e","type":"TXT","name":"_acme-challenge.listrecordset","data":"\"challengetoken2\"","priority":0,"ttl":3600},{"id":"809deb75-26eb-4936-8116-f1cef414962a","type":"TXT","name":"random.fqdntest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"88ac1b13-00a8-449e-8a09-dfd5596c06ce","type":"TXT","name":"random.fulltest","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"f0b1e837-2135-4be6-bbbb-0f14981f1d8f","type":"TXT","name":"random.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"514d261a-092a-471b-a554-349dcf3d74f6","type":"TXT","name":"updated.test","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"c45fdd13-8bdb-48bc-b0ea-028bec31b224","type":"TXT","name":"orig.nameonly.test","data":"\"updated\"","priority":0,"ttl":3600},{"id":"8a369ab7-6247-4193-ae6e-9d8ed4c8865b","type":"TXT","name":"updated.testfqdn","data":"\"challengetoken\"","priority":0,"ttl":3600},{"id":"d8736b71-4bcf-4325-bfe3-45a820adc63a","type":"TXT","name":"orig.testfull","data":"\"challengetoken\"","priority":0,"ttl":3600}],"meta":{"total":24,"links":{"next":"","prev":""}}}' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['864'] - content-type: [application/json] - date: ['Thu, 14 Apr 2016 00:26:12 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:11 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:35 GMT + Expires: + - Sat, 27 Mar 2021 09:42:34 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '3282' + status: + code: 200 + message: OK - request: - body: RECORDID=2051718&domain=capsulecd.com&data=%22challengetoken%22&name=updated.testfull&ttl=300 + body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['93'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://api.vultr.com/v1/dns/update_record + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.25.1 + method: GET + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/d8736b71-4bcf-4325-bfe3-45a820adc63a + response: + body: + string: '{"record":{"id":"d8736b71-4bcf-4325-bfe3-45a820adc63a","type":"TXT","name":"orig.testfull","data":"\"challengetoken\"","priority":0,"ttl":3600}}' + headers: + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Sat, 27 Mar 2021 09:42:36 GMT + Expires: + - Sat, 27 Mar 2021 09:42:35 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + content-length: + - '144' + status: + code: 200 + message: OK +- request: + body: '{"name": "updated.testfull", "data": "\"challengetoken\""}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '58' + Content-Type: + - application/json + User-Agent: + - python-requests/2.25.1 + method: PATCH + uri: https://api.vultr.com/v2/domains/lexicon-test.eu/records/d8736b71-4bcf-4325-bfe3-45a820adc63a response: - body: {string: !!python/unicode ''} + body: + string: '' headers: - cache-control: [no-cache] - connection: [keep-alive] - content-length: ['0'] - content-type: [text/html; charset=UTF-8] - date: ['Thu, 14 Apr 2016 00:26:16 GMT'] - expires: ['Thu, 14 Apr 2016 00:26:15 GMT'] - server: [nginx] - strict-transport-security: [max-age=31536000] - transfer-encoding: [chunked] - x-content-type-options: [nosniff] - x-frame-options: [DENY] - status: {code: 200, message: OK} + Cache-Control: + - no-cache + Connection: + - keep-alive + Content-Type: + - text/html; charset=UTF-8 + Date: + - Sat, 27 Mar 2021 09:42:36 GMT + Expires: + - Sat, 27 Mar 2021 09:42:35 GMT + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Robots-Tag: + - noindex,noarchive + status: + code: 204 + message: No Content version: 1