diff --git a/CODEOWNERS b/CODEOWNERS index 2d2cecc7c..85e54709a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -21,6 +21,7 @@ lexicon/providers/cloudns.py @ppmathis lexicon/providers/cloudxns.py @zh99998 lexicon/providers/conoha.py @kaz lexicon/providers/constellix.py @pmkane +lexicon/providers/corenetworks.py @masinad lexicon/providers/ddns.py @trinity-1686a lexicon/providers/digitalocean.py @analogj @foxwoods369 lexicon/providers/dinahosting.py @iperurena diff --git a/lexicon/providers/corenetworks.py b/lexicon/providers/corenetworks.py new file mode 100644 index 000000000..aa392c583 --- /dev/null +++ b/lexicon/providers/corenetworks.py @@ -0,0 +1,326 @@ +"""Module provider for Core Networks""" +from __future__ import absolute_import +import json +import hashlib +import logging +import time +import os +import tempfile + +import requests +from lexicon.providers.base import Provider as BaseProvider +from contextlib import contextmanager + +CorenetworksLog = logging.getLogger(__name__) +fh = logging.FileHandler('corenetworks.debug.log') +fh.setLevel(logging.DEBUG) +CorenetworksLog.addHandler(fh) +#CorenetworksLog.setLevel(logging.DEBUG) + +NAMESERVER_DOMAINS = ['core-networks.de', 'core-networks.eu', 'core-networks.com'] + +def provider_parser(subparser): + """Configure provider parser for Core Networks""" + subparser.add_argument( + "--auth-username", help="Specify login for authentication") + subparser.add_argument( + "--auth-password", help="Specify password for authentication") +# subparser.add_argument( +# "--auth-file", help="Specify location for authentication file. If this contains a valid token it will be used. Otherwise --auth-username and --auth-password are necessary. Defaults to ~/corenetworks_auth.json if ~ is writable by lexicon, otherwise $TMP/corenetworks_auth.json. In most cases you don't need to specify it as it will be used by default before acquiring a new token from the provider. The token has a lifetime of 1 hour after which it must be re-issued using the credentials. The most common use-case would be to consistently set this to some secure location where only lexicon has access. Might be deprecated in the future.") + +class _CommitTrigger: + def __init__(self): + self._need_commit = False + + @property + def need_commit(self): + return self._need_commit + + @need_commit.setter + def need_commit(self, set_need_commit): + CorenetworksLog.debug("Entering need.commit(set_need_commit = %s)" % set_need_commit) + self._need_commit = set_need_commit + + +class Provider(BaseProvider): + @contextmanager + def ensure_commit(self): + commit_trigger = _CommitTrigger() + try: + CorenetworksLog.info("Still working.") + yield commit_trigger + finally: + if commit_trigger.need_commit: + CorenetworksLog.info("Finalizing commits.") + self._post("/dnszones/{0}/records/commit".format(self.domain)) + + """Provider class for Core Networks""" + def __init__(self, config): + CorenetworksLog.info("Initialising class Provider") + super(Provider, self).__init__(config) + self.domain_id = None # zone name + self.account_id = None # unused? + self.token = None # provided by service after auth + self.expiry = None # token expiry time, calculated after auth + self.auth_file = { 'token': None, 'expiry': None } + # Core Networks enforces a limit on the amount of logins per minute. + # As the token is valid for 1 hour it's sensible to store it for + # later usage. + if os.path.exists(os.path.expanduser("~")) and os.path.expanduser("~") != '': + path = os.path.expanduser("~") + else: + path = tempfile.gettempdir() +# self.auth_file_path = self._get_provider_option('auth_file') or (path+'/corenetworks_auth.json') + self.auth_file_path = (path+'/corenetworks_auth.json') + self.api_endpoint = 'https://beta.api.core-networks.de' + + def _authenticate(self): + """Authenticate by either providing stored access token or + acquiring and storing token. This method will query the + list of zones and store them for later use. If the requested + domain is not in the list of zones it will raise an exception. + Ref: https://beta.api.core-networks.de/doc/#functon_auth_token""" + CorenetworksLog.debug("Entering _authenticate, requesting domain %s" % self.domain) + self._retrieve_auth_file() + CorenetworksLog.info("Value of self.auth_file: %s" % self.auth_file) + if 'token' in self.auth_file: + self.token = self.auth_file['token'] + self.expiry = self.auth_file['expiry'] + + # Fetch new auth token if expiry is less than 60 seconds away + # as it can be we have to wait up to 60 seconds because of + # provider rate limiting. + if self.expiry-time.time() < 60: + self._get_token() + else: + self._get_token() + + CorenetworksLog.info("self.expiry is %s" % self.expiry) + # Store zones for saving one API call + self.zones = self._list_zones() + + #Check if requested zone is in zones list + zone = next((zone for zone in self.zones if zone["name"] == self.domain), None) + if not zone: + raise Exception('No domain found like %s.' % self.domain) + else: + self.domain_id = zone['name'] + return True + + + def _list_records(self, rtype=None, name=None, content=None): + """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. + Ref: https://beta.api.core-networks.de/doc/#functon_dnszones_records""" + CorenetworksLog.debug("Entering _list_records") + zone = next((zone for zone in self.zones if zone["name"] == self.domain), None) + if not zone: + raise Exception('Domain not found') + query_params = {} + if rtype: + query_params['type'] = rtype + if name: + query_params['name'] = self._relative_name(name) + if content: + query_params['data'] = content + payload = self._get("/dnszones/{0}/records/".format(self.domain), query_params) + for record in payload: + record['content'] = record.pop('data') + record['name'] = self._full_name(record['name']) + # Core Networks' API does not provide unique IDs for each record + # so we generate them ourselves. + record['id'] = self._make_identifier( rtype = record['type'], name = record['name'], content = record['content'] ) + return payload + + def _create_record(self, rtype, name, content): + """Creates a record. If record already exists with the same content, do nothing.""" + CorenetworksLog.debug("Entering _create_record") + + # Check for existence of record. + existing_records = self._list_records(rtype, name, content) + new_record_id = self._make_identifier(rtype, self._full_name(name), content) + record = next((r for r in existing_records if r["id"] == new_record_id), None) + # Nothing to do if true. + if record: + return True + + with self.ensure_commit() as commit_trigger: + data = { + 'name': self._relative_name(name), + 'data': content, + 'type': rtype + } + if self._get_lexicon_option('ttl'): + data['ttl'] = self._get_lexicon_option('ttl') + # Bug reported by chkpnt. If ttl is less than 60s the API throws a "415 Client Error: Unsupported Media Type" + if data['ttl'] < 60: + data['ttl'] = 60 + if self._get_lexicon_option('priority'): + data['priority'] = self._get_lexicon_option('priority') + + payload = self._post("/dnszones/{0}/records/".format(self.domain), data) + # Changes to the zone need to be committed. + # https://beta.api.core-networks.de/doc/#functon_dnszones_commit +# self.modified = True + commit_trigger.need_commit = True + + return new_record_id + + def _update_record(self, identifier, rtype=None, name=None, content=None): + """Updates a record. Core Networks neither supports updating a record nor is able to reliably identify a record + after a change. The best we can do is to identify the record by ourselves, fetch its data, delete it and + re-create it.""" + CorenetworksLog.debug("Entering _update_record") + if identifier is not None: + # Check for existence of record + existing_records = self._list_records(rtype) + record = next((r for r in existing_records if r["id"] == identifier), None) + if not record: + return True + if rtype: + record['type'] = rtype + if name: + record['name'] = self._relative_name(name) + if content: + record['content'] = content + if self._delete_record(identifier): + new_id = self._create_record(rtype = record['type'], name = record['name'], content = record['content']) + return new_id + else: + records = self._list_records( rtype=rtype, name=self._relative_name(name) ) + if len(records) > 0: + if len(records) > 1: + CorenetworksLog.warning("Found %s records, will only update the first record in search result list." % len(records)) + record = records[0] + return self._update_record( record['id'], rtype, name, content ) + else: + return True + return False + + def _delete_record(self, identifier=None, rtype=None, name=None, content=None): + """Delete an existing record. + If record does not exist, do nothing. + Ref: https://beta.api.core-networks.de/doc/#functon_dnszones_records_delete""" + CorenetworksLog.debug("Entering _delete_record") + with self.ensure_commit() as commit_trigger: + if identifier is not None: + # Check for existence of record + existing_records = self._list_records( rtype, name, content ) + record = next((r for r in existing_records if r["id"] == identifier), None) + if not record: + return True + data = { + 'name': self._relative_name(record['name']), + 'data': record['content'], + 'type': record['type'] + } + payload = self._post("/dnszones/{0}/records/delete".format(self.domain), data) + # Changes to the zone need to be committed. + # https://beta.api.core-networks.de/doc/#functon_dnszones_commit + commit_trigger.need_commit = True + else: + records = self._list_records( rtype, name, content) + if len(records) > 0: + for record in records: + self._delete_record(identifier = record['id'], rtype = record['type'], name = record['name'], content = record['content'] ) + else: + return True + return True + + # Helpers + + def _request(self, action='GET', url='/', data=None, query_params=None): + CorenetworksLog.debug("Entering _request") + if data is None: + data = {} + if query_params is None: + query_params = {} + + CorenetworksLog.info( "url: %s with data %s and query_params %s" % ( url, str(data), str(query_params) ) ) + default_headers = {} + + if self.token: + default_headers['Authorization'] = "Bearer {0}".format(self.token) + + response = requests.request(action, + self.api_endpoint + url, + params=query_params, + data=json.dumps(data), + headers=default_headers, + ) + # if the request fails for any reason, throw an error. + response.raise_for_status() + if response.text and response.json() is None: + raise Exception('No data returned') + + return response.json() if response.text else None + + def _list_zones(self): + """List existing zones. + Ref: https://beta.api.core-networks.de/doc/#functon_dnszones""" + CorenetworksLog.debug("Entering _list_zones") + return self._get('/dnszones/') + + def _make_identifier(self, rtype, name, content): + return hashlib.sha1('/'.join([ rtype, name, content ]).encode('utf-8')).hexdigest() + + def _retrieve_auth_file(self): + """Retrieve token and zones from json file""" + # I guess the correct way would be multiple nested checks for + # existence of path, checking if path is a file, checking if + # file is readable and so on, and each one with corresponding + # exceptions. + if(os.path.exists(self.auth_file_path) and os.path.isfile(self.auth_file_path)): + try: + auth = open(self.auth_file_path, "r") + if auth.mode == "r": + self.auth_file = json.loads(auth.read()) + auth.close() + return True + else: + auth.close() + return False + except FileNotFoundError as e: + CorenetworksLog.info("No stored authentication found: %s. Acquiring token via API call." % os.strerror(e.errno)) + self._get_token() + return True + else: + self._get_token() + return True + + def _commit_auth_file(self): + """Store authentication into json file.""" + try: + auth = open(self.auth_file_path, "w") + if auth.mode == "w": + content = json.dumps(self.auth_file) + auth.write(content) + os.chmod(self.auth_file_path, 0o600) + return True + else: + return False + except IOError as e: + CorenetworksLog.warning("Could not write authentication file: %s" % os.strerror(e.errno)) + finally: + auth.close() + + def _get_token(self): + """Request new token via API call""" + CorenetworksLog.debug("Entering _get_token.") + if self._get_provider_option('auth_username') == None or self._get_provider_option('auth_password') == None: + raise Exception("No valid authentication mechanism found") + else: + data = { + 'login' : self._get_provider_option('auth_username'), + 'password': self._get_provider_option('auth_password') + } + payload = self._post('/auth/token', data = data) + self.token = payload['token'] + self.expiry = payload['expires'] + time.time() + + # Prepare auth file and commit changes + self.auth_file['token'] = self.token + self.auth_file['expiry'] = self.expiry + self._commit_auth_file() + diff --git a/lexicon/tests/providers/test_corenetworks.py b/lexicon/tests/providers/test_corenetworks.py new file mode 100644 index 000000000..92c97eca4 --- /dev/null +++ b/lexicon/tests/providers/test_corenetworks.py @@ -0,0 +1,37 @@ +# Test for one implementation of the interface +from unittest import TestCase + +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 +class CorenetworksProviderTests(TestCase, IntegrationTestsV2): + """Integration tests for Core Networks provider + shell environment requires + * LEXICON_CORENETWORKS_AUTH_USERNAME + * LEXICON_CORENETWORKS_AUTH_PASSWORD + * LEXICON_CORENETWORKS_API_ENDPOINT""" + provider_name = 'corenetworks' + domain = 'fluchtkapsel.de' +# endpoint = 'https://beta.api.core-networks.de' + + def _filter_post_data_parameters(self): + return ['login', 'password'] + + def _filter_headers(self): + return ['Authorization'] + + def _filter_query_parameters(self): + return ['secret_key'] + + def _filter_response(self, response): + """See `IntegrationTests._filter_response` for more information on how + to filter the provider response.""" + return response + +# def _test_parameters_overrides(self): +# return { +# 'api_endpoint': 'https://beta.api.core-networks.de', +# } diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_authenticate.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_authenticate.yaml new file mode 100644 index 000000000..42fd3a614 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_authenticate.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:31:58 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml new file mode 100644 index 000000000..42fd3a614 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:31:58 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml new file mode 100644 index 000000000..0b7c7dfc5 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml @@ -0,0 +1,166 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:31:58 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=127.0.0.1&name=localhost&type=A + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "localhost", "data": "127.0.0.1", "type": "A", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml new file mode 100644 index 000000000..902051591 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml @@ -0,0 +1,166 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=docs.example.com&name=docs&type=CNAME + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "docs", "data": "docs.example.com", "type": "CNAME", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '74' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:31:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml new file mode 100644 index 000000000..b532149ea --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml @@ -0,0 +1,167 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=_acme-challenge.fqdn&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.fqdn", "data": "challengetoken", "type": "TXT", + "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '86' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:05 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml new file mode 100644 index 000000000..1055307d2 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml @@ -0,0 +1,167 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=_acme-challenge.full&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.full", "data": "challengetoken", "type": "TXT", + "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '86' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml new file mode 100644 index 000000000..aa18c67ab --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml @@ -0,0 +1,167 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=_acme-challenge.test&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.test", "data": "challengetoken", "type": "TXT", + "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '86' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml new file mode 100644 index 000000000..f43d6386d --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml @@ -0,0 +1,288 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.createrecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.createrecordset", "data": "challengetoken1", + "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken2&name=_acme-challenge.createrecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.createrecordset", "data": "challengetoken2", + "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml new file mode 100644 index 000000000..b5f005462 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml @@ -0,0 +1,255 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=_acme-challenge.noop&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.noop", "data": "challengetoken", "type": "TXT", + "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '86' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=_acme-challenge.noop&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '83' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=_acme-challenge.noop&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '83' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml new file mode 100644 index 000000000..b143120d6 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml @@ -0,0 +1,373 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfilt&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testfilt", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfilt&type=TXT + response: + body: + string: '[{"name":"delete.testfilt","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfilt&type=TXT + response: + body: + string: '[{"name":"delete.testfilt","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testfilt", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, close + Date: + - Wed, 30 Mar 2022 18:32:40 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=delete.testfilt&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml new file mode 100644 index 000000000..d27173c20 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml @@ -0,0 +1,375 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfqdn&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testfqdn", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfqdn&type=TXT + response: + body: + string: '[{"name":"delete.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:50 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfqdn&type=TXT + response: + body: + string: '[{"name":"delete.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:50 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testfqdn", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:50 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:50 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=delete.testfqdn&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml new file mode 100644 index 000000000..72a3c88bc --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml @@ -0,0 +1,375 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfull&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testfull", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfull&type=TXT + response: + body: + string: '[{"name":"delete.testfull","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testfull&type=TXT + response: + body: + string: '[{"name":"delete.testfull","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:32:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testfull", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:32:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=delete.testfull&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml new file mode 100644 index 000000000..4bd09a0e9 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml @@ -0,0 +1,381 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=delete.testid&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testid", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '79' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=delete.testid&type=TXT + response: + body: + string: '[{"name":"delete.testid","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '76' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '[{"name":"@","ttl":"1800","type":"SOA","data":"ns1.core-networks.de. + hostmaster.core-networks.de. 2022033040 28800 7200 604800 1800"},{"name":"localhost","ttl":"3600","type":"A","data":"127.0.0.1"},{"name":"coturn","ttl":"3600","type":"CNAME","data":"jitsi.fluchtkapsel.de."},{"name":"docs","ttl":"3600","type":"CNAME","data":"docs.example.com"},{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"delete.testid","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"@","ttl":"86400","type":"NS","data":"ns1.core-networks.de."},{"name":"@","ttl":"86400","type":"NS","data":"ns2.core-networks.eu."},{"name":"@","ttl":"86400","type":"NS","data":"ns3.core-networks.com."},{"name":"*","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"@","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"jabber","ttl":"1800","type":"A","data":"5.189.134.50"},{"name":"mail","ttl":"300","type":"A","data":"173.249.25.97"},{"name":"*","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"mail","ttl":"300","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"300","type":"MX","data":"10 + fluchtkapsel.de."},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"bbb","ttl":"1800","type":"A","data":"148.251.246.242"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; + p=quarantine; sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; + ruf=mailto:masin.aldujaili@googlemail.com; !5k; rf=afrf; pct=100; ri=86400;\""},{"name":"persephone","ttl":"1800","type":"A","data":"202.61.199.186"},{"name":"persephone","ttl":"1800","type":"AAAA","data":"2a03:4000:59:b32::1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:10 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2431' + status: + code: 200 + message: OK +- request: + body: '{"name": "delete.testid", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '66' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:10 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:10 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=delete.testid&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml new file mode 100644 index 000000000..bc1021217 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml @@ -0,0 +1,497 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.deleterecordinset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordinset", "data": "challengetoken1", + "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:15 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken2&name=_acme-challenge.deleterecordinset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordinset", "data": "challengetoken2", + "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '100' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.deleterecordinset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '97' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.deleterecordinset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '97' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordinset", "data": "challengetoken1", + "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '87' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=_acme-challenge.deleterecordinset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '97' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml new file mode 100644 index 000000000..dc972c7d6 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml @@ -0,0 +1,618 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.deleterecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordset", "data": "challengetoken1", + "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:30 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken2&name=_acme-challenge.deleterecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordset", "data": "challengetoken2", + "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '98' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=_acme-challenge.deleterecordset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.deleterecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.deleterecordset","ttl":"3600","type":"TXT","data":"challengetoken2"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '189' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.deleterecordset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.deleterecordset","ttl":"3600","type":"TXT","data":"challengetoken1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '95' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordset", "data": "challengetoken1", + "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '85' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken2&name=_acme-challenge.deleterecordset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.deleterecordset","ttl":"3600","type":"TXT","data":"challengetoken2"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '95' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.deleterecordset", "data": "challengetoken2", + "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '85' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:45 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=_acme-challenge.deleterecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml new file mode 100644 index 000000000..16023562a --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml @@ -0,0 +1,210 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=ttlshouldbe3600&name=ttl.fqdn&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "ttl.fqdn", "data": "ttlshouldbe3600", "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '75' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=ttl.fqdn&type=TXT + response: + body: + string: '[{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '72' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml new file mode 100644 index 000000000..a45b4f728 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml @@ -0,0 +1,332 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken1&name=_acme-challenge.listrecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.listrecordset", "data": "challengetoken1", "type": + "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '96' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken2&name=_acme-challenge.listrecordset&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:33:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "_acme-challenge.listrecordset", "data": "challengetoken2", "type": + "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '96' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:33:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=_acme-challenge.listrecordset&type=TXT + response: + body: + string: '[{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '185' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml new file mode 100644 index 000000000..7350618e0 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml @@ -0,0 +1,211 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=random.fqdntest&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "random.fqdntest", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=random.fqdntest&type=TXT + response: + body: + string: '[{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml new file mode 100644 index 000000000..a963a721e --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml @@ -0,0 +1,211 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=random.fulltest&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:10 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "random.fulltest", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '81' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:10 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:10 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=random.fulltest&type=TXT + response: + body: + string: '[{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '78' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml new file mode 100644 index 000000000..50494aba2 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml @@ -0,0 +1,90 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=filter.thisdoesnotexist&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml new file mode 100644 index 000000000..1afe5df96 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml @@ -0,0 +1,211 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=random.test&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "random.test", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '77' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:15 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:15 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=random.test&type=TXT + response: + body: + string: '[{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '74' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml new file mode 100644 index 000000000..a1de4617a --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '[{"name":"@","ttl":"1800","type":"SOA","data":"ns1.core-networks.de. + hostmaster.core-networks.de. 2022033054 28800 7200 604800 1800"},{"name":"localhost","ttl":"3600","type":"A","data":"127.0.0.1"},{"name":"coturn","ttl":"3600","type":"CNAME","data":"jitsi.fluchtkapsel.de."},{"name":"docs","ttl":"3600","type":"CNAME","data":"docs.example.com"},{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"@","ttl":"86400","type":"NS","data":"ns1.core-networks.de."},{"name":"@","ttl":"86400","type":"NS","data":"ns2.core-networks.eu."},{"name":"@","ttl":"86400","type":"NS","data":"ns3.core-networks.com."},{"name":"*","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"@","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"jabber","ttl":"1800","type":"A","data":"5.189.134.50"},{"name":"mail","ttl":"300","type":"A","data":"173.249.25.97"},{"name":"*","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"mail","ttl":"300","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"300","type":"MX","data":"10 + fluchtkapsel.de."},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"bbb","ttl":"1800","type":"A","data":"148.251.246.242"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; + p=quarantine; sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; + ruf=mailto:masin.aldujaili@googlemail.com; !5k; rf=afrf; pct=100; ri=86400;\""},{"name":"persephone","ttl":"1800","type":"A","data":"202.61.199.186"},{"name":"persephone","ttl":"1800","type":"AAAA","data":"2a03:4000:59:b32::1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2934' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml new file mode 100644 index 000000000..da1d22d3e --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml @@ -0,0 +1,505 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=orig.test&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:19 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.test", "data": "challengetoken", "type": "TXT", "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '75' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:20 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:20 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=orig.test&type=TXT + response: + body: + string: '[{"name":"orig.test","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '72' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?type=TXT + response: + body: + string: '[{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; p=quarantine; + sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; ruf=mailto:masin.aldujaili@googlemail.com; + !5k; rf=afrf; pct=100; ri=86400;\""}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '1707' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '[{"name":"@","ttl":"1800","type":"SOA","data":"ns1.core-networks.de. + hostmaster.core-networks.de. 2022033055 28800 7200 604800 1800"},{"name":"localhost","ttl":"3600","type":"A","data":"127.0.0.1"},{"name":"coturn","ttl":"3600","type":"CNAME","data":"jitsi.fluchtkapsel.de."},{"name":"docs","ttl":"3600","type":"CNAME","data":"docs.example.com"},{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"@","ttl":"86400","type":"NS","data":"ns1.core-networks.de."},{"name":"@","ttl":"86400","type":"NS","data":"ns2.core-networks.eu."},{"name":"@","ttl":"86400","type":"NS","data":"ns3.core-networks.com."},{"name":"*","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"@","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"jabber","ttl":"1800","type":"A","data":"5.189.134.50"},{"name":"mail","ttl":"300","type":"A","data":"173.249.25.97"},{"name":"*","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"mail","ttl":"300","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"300","type":"MX","data":"10 + fluchtkapsel.de."},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"bbb","ttl":"1800","type":"A","data":"148.251.246.242"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; + p=quarantine; sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; + ruf=mailto:masin.aldujaili@googlemail.com; !5k; rf=afrf; pct=100; ri=86400;\""},{"name":"persephone","ttl":"1800","type":"A","data":"202.61.199.186"},{"name":"persephone","ttl":"1800","type":"AAAA","data":"2a03:4000:59:b32::1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:24 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '3005' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.test", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '62' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:25 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:25 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=updated.test&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "updated.test", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '78' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:29 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml new file mode 100644 index 000000000..b286c002b --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml @@ -0,0 +1,506 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=orig.nameonly.test&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.nameonly.test", "data": "challengetoken", "type": "TXT", + "ttl": 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '84' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:34 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=orig.nameonly.test&type=TXT + response: + body: + string: '[{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '81' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?type=TXT + response: + body: + string: '[{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"updated.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; p=quarantine; + sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; ruf=mailto:masin.aldujaili@googlemail.com; + !5k; rf=afrf; pct=100; ri=86400;\""}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '1790' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '[{"name":"@","ttl":"1800","type":"SOA","data":"ns1.core-networks.de. + hostmaster.core-networks.de. 2022033058 28800 7200 604800 1800"},{"name":"localhost","ttl":"3600","type":"A","data":"127.0.0.1"},{"name":"coturn","ttl":"3600","type":"CNAME","data":"jitsi.fluchtkapsel.de."},{"name":"docs","ttl":"3600","type":"CNAME","data":"docs.example.com"},{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"updated.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"@","ttl":"86400","type":"NS","data":"ns1.core-networks.de."},{"name":"@","ttl":"86400","type":"NS","data":"ns2.core-networks.eu."},{"name":"@","ttl":"86400","type":"NS","data":"ns3.core-networks.com."},{"name":"*","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"@","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"jabber","ttl":"1800","type":"A","data":"5.189.134.50"},{"name":"mail","ttl":"300","type":"A","data":"173.249.25.97"},{"name":"*","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"mail","ttl":"300","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"300","type":"MX","data":"10 + fluchtkapsel.de."},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"bbb","ttl":"1800","type":"A","data":"148.251.246.242"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; + p=quarantine; sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; + ruf=mailto:masin.aldujaili@googlemail.com; !5k; rf=afrf; pct=100; ri=86400;\""},{"name":"persephone","ttl":"1800","type":"A","data":"202.61.199.186"},{"name":"persephone","ttl":"1800","type":"AAAA","data":"2a03:4000:59:b32::1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '3088' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.nameonly.test", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '71' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:39 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=updated&name=orig.nameonly.test&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.nameonly.test", "data": "updated", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '77' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:44 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml new file mode 100644 index 000000000..5498ed715 --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -0,0 +1,506 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=orig.testfqdn&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.testfqdn", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '79' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:49 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:50 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=orig.testfqdn&type=TXT + response: + body: + string: '[{"name":"orig.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:54 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '76' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?type=TXT + response: + body: + string: '[{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"updated"},{"name":"updated.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; p=quarantine; + sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; ruf=mailto:masin.aldujaili@googlemail.com; + !5k; rf=afrf; pct=100; ri=86400;\""}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '1858' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '[{"name":"@","ttl":"1800","type":"SOA","data":"ns1.core-networks.de. + hostmaster.core-networks.de. 2022033061 28800 7200 604800 1800"},{"name":"localhost","ttl":"3600","type":"A","data":"127.0.0.1"},{"name":"coturn","ttl":"3600","type":"CNAME","data":"jitsi.fluchtkapsel.de."},{"name":"docs","ttl":"3600","type":"CNAME","data":"docs.example.com"},{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"updated"},{"name":"updated.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"@","ttl":"86400","type":"NS","data":"ns1.core-networks.de."},{"name":"@","ttl":"86400","type":"NS","data":"ns2.core-networks.eu."},{"name":"@","ttl":"86400","type":"NS","data":"ns3.core-networks.com."},{"name":"*","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"@","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"jabber","ttl":"1800","type":"A","data":"5.189.134.50"},{"name":"mail","ttl":"300","type":"A","data":"173.249.25.97"},{"name":"*","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"mail","ttl":"300","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"300","type":"MX","data":"10 + fluchtkapsel.de."},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"bbb","ttl":"1800","type":"A","data":"148.251.246.242"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; + p=quarantine; sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; + ruf=mailto:masin.aldujaili@googlemail.com; !5k; rf=afrf; pct=100; ri=86400;\""},{"name":"persephone","ttl":"1800","type":"A","data":"202.61.199.186"},{"name":"persephone","ttl":"1800","type":"AAAA","data":"2a03:4000:59:b32::1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '3156' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.testfqdn", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '66' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:55 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=updated.testfqdn&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:34:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "updated.testfqdn", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '82' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:34:59 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml new file mode 100644 index 000000000..1ca11123d --- /dev/null +++ b/tests/fixtures/cassettes/corenetworks/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml @@ -0,0 +1,506 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/ + response: + body: + string: '[{"name":"fluchtkapsel.de","type":"master"},{"name":"larp-bb.de","type":"master"},{"name":"wiedner.berlin","type":"master"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:35:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '124' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=orig.testfull&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:35:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.testfull", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '79' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:35:04 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:35:05 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?name=orig.testfull&type=TXT + response: + body: + string: '[{"name":"orig.testfull","ttl":"3600","type":"TXT","data":"challengetoken"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:35:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '76' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?type=TXT + response: + body: + string: '[{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.testfull","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"updated.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"updated"},{"name":"updated.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; p=quarantine; + sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; ruf=mailto:masin.aldujaili@googlemail.com; + !5k; rf=afrf; pct=100; ri=86400;\""}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:35:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '1936' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '[{"name":"@","ttl":"1800","type":"SOA","data":"ns1.core-networks.de. + hostmaster.core-networks.de. 2022033064 28800 7200 604800 1800"},{"name":"localhost","ttl":"3600","type":"A","data":"127.0.0.1"},{"name":"coturn","ttl":"3600","type":"CNAME","data":"jitsi.fluchtkapsel.de."},{"name":"docs","ttl":"3600","type":"CNAME","data":"docs.example.com"},{"name":"_acme-challenge.full","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.fqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"_acme-challenge.noop","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.createrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"ttl.fqdn","ttl":"3600","type":"TXT","data":"ttlshouldbe3600"},{"name":"_acme-challenge.deleterecordinset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken1"},{"name":"random.fqdntest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"_acme-challenge.listrecordset","ttl":"3600","type":"TXT","data":"challengetoken2"},{"name":"random.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.testfull","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"updated.testfqdn","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"orig.nameonly.test","ttl":"3600","type":"TXT","data":"updated"},{"name":"updated.test","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"random.fulltest","ttl":"3600","type":"TXT","data":"challengetoken"},{"name":"@","ttl":"86400","type":"NS","data":"ns1.core-networks.de."},{"name":"@","ttl":"86400","type":"NS","data":"ns2.core-networks.eu."},{"name":"@","ttl":"86400","type":"NS","data":"ns3.core-networks.com."},{"name":"*","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"@","ttl":"1800","type":"A","data":"173.249.25.97"},{"name":"jabber","ttl":"1800","type":"A","data":"5.189.134.50"},{"name":"mail","ttl":"300","type":"A","data":"173.249.25.97"},{"name":"*","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"1800","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"mail","ttl":"300","type":"AAAA","data":"2a02:c207:3002:9455::1"},{"name":"@","ttl":"300","type":"MX","data":"10 + fluchtkapsel.de."},{"name":"2021060201._domainkey","ttl":"1800","type":"TXT","data":"( + \"v=DKIM1; k=rsa; \" \"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+1AiJrDiWduuYGgcCfVoaZV8WYw4HjFxxDvLrfJIJ\/94Tnaj3M0CQXER5Be5WSQVI2+FIW2wZYacPYdfdydfwVDBjvUG5w6ieWnO3UlbsiQ7zmOo7UlP2PAFBfTfD2\/VUBNPe1HaRO9a+wUUbKDyKH+fQISP21JeO8HuikzfUawIDAQAB\" + ) ;"},{"name":"bbb","ttl":"1800","type":"A","data":"148.251.246.242"},{"name":"_dmarc","ttl":"3600","type":"TXT","data":"\"v=DMARC1; + p=quarantine; sp=quarantine; rua=mailto:masin.aldujaili@googlemail.com; !5m; + ruf=mailto:masin.aldujaili@googlemail.com; !5k; rf=afrf; pct=100; ri=86400;\""},{"name":"persephone","ttl":"1800","type":"A","data":"202.61.199.186"},{"name":"persephone","ttl":"1800","type":"AAAA","data":"2a03:4000:59:b32::1"}]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:35:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '3234' + status: + code: 200 + message: OK +- request: + body: '{"name": "orig.testfull", "data": "challengetoken", "type": "TXT"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '66' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/delete + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:35:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:35:09 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: GET + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/?data=challengetoken&name=updated.testfull&type=TXT + response: + body: + string: '[]' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 30 Mar 2022 18:35:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + Vary: + - Accept-Encoding + content-length: + - '2' + status: + code: 200 + message: OK +- request: + body: '{"name": "updated.testfull", "data": "challengetoken", "type": "TXT", "ttl": + 3600}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '82' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/ + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:35:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + User-Agent: + - python-requests/2.27.1 + method: POST + uri: https://beta.api.core-networks.de/dnszones/fluchtkapsel.de/records/commit + response: + body: + string: '' + headers: + Cache-Control: + - no-cache, no-store, must-revalidate + Connection: + - Upgrade, Keep-Alive + Date: + - Wed, 30 Mar 2022 18:35:14 GMT + Expires: + - '0' + Keep-Alive: + - timeout=1, max=100 + Pragma: + - no-cache + Server: + - Apache + Upgrade: + - h2,h2c + status: + code: 204 + message: No Content +version: 1