From bd436d94fcd315c60227e0463de2fcd80db9de7a Mon Sep 17 00:00:00 2001 From: Kilian Evang Date: Fri, 6 Dec 2024 17:48:47 +0100 Subject: [PATCH] Add support for IONOS (#2127) * Support for IONOS (WIP) * Added link to IONOS API documentation to README * Updated provider doc * IONOS: implemented create, update, delete * IONOS: made integration tests pass * IONOS: added integration tests * IONOS: added cassette * IONOS: added to CODEOWNERS * Default an environment variable --------- Co-authored-by: Adrien Ferrand --- CODEOWNERS | 1 + README.rst | 37 +- docs/providers/arvancloud.rst | 2 +- docs/providers/ionos.rst | 2 + docs/providers_options.rst | 3 + src/lexicon/_private/providers/ionos.py | 99 ++++ .../test_provider_authenticate.yaml | 60 +++ ...ate_with_unmanaged_domain_should_fail.yaml | 60 +++ ...ord_for_A_with_valid_name_and_content.yaml | 124 +++++ ...for_CNAME_with_valid_name_and_content.yaml | 124 +++++ ...rd_for_TXT_with_fqdn_name_and_content.yaml | 124 +++++ ...rd_for_TXT_with_full_name_and_content.yaml | 124 +++++ ...d_for_TXT_with_valid_name_and_content.yaml | 124 +++++ ...ltiple_times_should_create_record_set.yaml | 188 ++++++++ ...with_duplicate_records_should_be_noop.yaml | 251 ++++++++++ ...record_by_filter_should_remove_record.yaml | 307 +++++++++++++ ...r_with_fqdn_name_should_remove_record.yaml | 307 +++++++++++++ ...r_with_full_name_should_remove_record.yaml | 307 +++++++++++++ ...rd_by_identifier_should_remove_record.yaml | 307 +++++++++++++ ...content_should_leave_others_untouched.yaml | 371 +++++++++++++++ ...ecord_with_record_set_name_remove_all.yaml | 428 ++++++++++++++++++ ...alling_list_records_after_setting_ttl.yaml | 187 ++++++++ ...ist_records_should_handle_record_sets.yaml | 251 ++++++++++ ...fqdn_name_filter_should_return_record.yaml | 187 ++++++++ ...full_name_filter_should_return_record.yaml | 187 ++++++++ ...h_invalid_filter_should_be_empty_list.yaml | 123 +++++ ...with_name_filter_should_return_record.yaml | 187 ++++++++ ...rds_with_no_arguments_should_list_all.yaml | 140 ++++++ ...ng_update_record_should_modify_record.yaml | 308 +++++++++++++ ...d_should_modify_record_name_specified.yaml | 365 +++++++++++++++ ...d_with_fqdn_name_should_modify_record.yaml | 308 +++++++++++++ ...d_with_full_name_should_modify_record.yaml | 308 +++++++++++++ tests/providers/test_ionos.py | 47 ++ 33 files changed, 5930 insertions(+), 18 deletions(-) create mode 100644 docs/providers/ionos.rst create mode 100644 src/lexicon/_private/providers/ionos.py create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml create mode 100644 tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml create mode 100644 tests/providers/test_ionos.py diff --git a/CODEOWNERS b/CODEOWNERS index 793c3596c..f8b73429e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -50,6 +50,7 @@ lexicon/providers/hover.py @bkanuka lexicon/providers/infomaniak.py @l3o-pold lexicon/providers/internetbs.py @edausq lexicon/providers/inwx.py @lociii +lexicon/providers/ionos.py @texttheater lexicon/providers/joker.py @adferrand lexicon/providers/linode.py @trinopoty lexicon/providers/linode4.py @trinopoty diff --git a/README.rst b/README.rst index f90018b7f..ae0d0f899 100644 --- a/README.rst +++ b/README.rst @@ -75,39 +75,41 @@ The current supported providers are: .. tag: providers-table-begin +-----------------+-----------------+-----------------+-----------------+-----------------+ -| aliyun_ | aurora_ | azure_ | cloudflare_ | cloudns_ | +| aliyun_ | arvancloud_ | aurora_ | azure_ | cloudflare_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| cloudxns_ | conoha_ | constellix_ | ddns_ | digitalocean_ | +| cloudns_ | cloudxns_ | conoha_ | constellix_ | ddns_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| dinahosting_ | directadmin_ | dnsimple_ | dnsmadeeasy_ | dnspark_ | +| digitalocean_ | dinahosting_ | directadmin_ | dnsimple_ | dnsmadeeasy_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| dnspod_ | dnsservices_ | dreamhost_ | duckdns_ | dynu_ | +| dnspark_ | dnspod_ | dnsservices_ | dreamhost_ | duckdns_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| easydns_ | easyname_ | euserv_ | exoscale_ | flexibleengine_ | +| dynu_ | easydns_ | easyname_ | euserv_ | exoscale_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| gandi_ | gehirn_ | glesys_ | godaddy_ | googleclouddns_ | +| flexibleengine_ | gandi_ | gehirn_ | glesys_ | godaddy_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| gransy_ | gratisdns_ | henet_ | hetzner_ | hostingde_ | +| googleclouddns_ | gransy_ | gratisdns_ | henet_ | hetzner_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| hover_ | infoblox_ | infomaniak_ | internetbs_ | inwx_ | +| hostingde_ | hover_ | infoblox_ | infomaniak_ | internetbs_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| joker_ | linode_ | linode4_ | localzone_ | luadns_ | +| inwx_ | ionos_ | joker_ | linode_ | linode4_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| memset_ | misaka_ | mythicbeasts_ | namecheap_ | namecom_ | +| localzone_ | luadns_ | memset_ | misaka_ | mythicbeasts_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| namesilo_ | netcup_ | nfsn_ | njalla_ | nsone_ | +| namecheap_ | namecom_ | namesilo_ | netcup_ | nfsn_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| oci_ | onapp_ | online_ | ovh_ | plesk_ | +| njalla_ | nsone_ | oci_ | onapp_ | online_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| pointhq_ | porkbun_ | powerdns_ | qcloud_ | rackspace_ | +| ovh_ | plesk_ | pointhq_ | porkbun_ | powerdns_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| rage4_ | rcodezero_ | route53_ | safedns_ | sakuracloud_ | +| qcloud_ | rackspace_ | rage4_ | rcodezero_ | route53_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| softlayer_ | timeweb_ | transip_ | ultradns_ | valuedomain_ | +| safedns_ | sakuracloud_ | softlayer_ | timeweb_ | transip_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| vercel_ | vultr_ | webgo_ | wedos_ | yandex_ | +| ultradns_ | valuedomain_ | vercel_ | vultr_ | webgo_ | +-----------------+-----------------+-----------------+-----------------+-----------------+ -| yandexcloud_ | zeit_ | zilore_ | zonomi_ | | +| wedos_ | yandex_ | yandexcloud_ | zeit_ | zilore_ | ++-----------------+-----------------+-----------------+-----------------+-----------------+ +| zonomi_ | | | | | +-----------------+-----------------+-----------------+-----------------+-----------------+ .. tag: providers-table-end @@ -153,6 +155,7 @@ The current supported providers are: .. _infomaniak: https://www.infomaniak.com .. _internetbs: https://internetbs.net/resellerregistrardomainnameapi .. _inwx: https://www.inwx.de/en/offer/api +.. _ionos: https://developer.hosting.ionos.de/docs/dns .. _joker: https://joker.com/faq/index.php?action=show&cat=39 .. _linode: https://www.linode.com/api/dns .. _linode4: https://developers.linode.com/api/docs/v4#tag/domains diff --git a/docs/providers/arvancloud.rst b/docs/providers/arvancloud.rst index f91aa3ad8..2c0ee8573 100644 --- a/docs/providers/arvancloud.rst +++ b/docs/providers/arvancloud.rst @@ -1,2 +1,2 @@ arvancloud - * ``auth_token`` Specify api key for authentication + * ``auth_token`` Specify key for authentication (api key) diff --git a/docs/providers/ionos.rst b/docs/providers/ionos.rst new file mode 100644 index 000000000..56e635e48 --- /dev/null +++ b/docs/providers/ionos.rst @@ -0,0 +1,2 @@ +ionos + * ``api_key`` Ionos api key: public prefix + period + key proper diff --git a/docs/providers_options.rst b/docs/providers_options.rst index 5e7444b5e..d154a6908 100644 --- a/docs/providers_options.rst +++ b/docs/providers_options.rst @@ -134,6 +134,9 @@ List of options .. _inwx: .. include:: providers/inwx.rst +.. _ionos: +.. include:: providers/ionos.rst + .. _joker: .. include:: providers/joker.rst diff --git a/src/lexicon/_private/providers/ionos.py b/src/lexicon/_private/providers/ionos.py new file mode 100644 index 000000000..6fe087aaf --- /dev/null +++ b/src/lexicon/_private/providers/ionos.py @@ -0,0 +1,99 @@ +import requests + +from lexicon.interfaces import Provider as BaseProvider + + +_ZONES_API = 'https://api.hosting.ionos.com/dns/v1/zones' + + +class Provider(BaseProvider): + + @staticmethod + def get_nameservers(): + return ['ui-dns.com', 'ui-dns.org', 'ui-dns.de', 'ui-dns.biz'] + + @staticmethod + def configure_parser(parser): + parser.add_argument( + '--api-key', + required=True, + help='IONOS api key: public prefix + period + key proper', + ) + + def authenticate(self): + zones = self._get(_ZONES_API) + for zone in zones: + if zone['name'] == self.domain: + self.domain_id = zone['id'] + return + raise Exception('domain not found: ' + self.domain) + + def create_record(self, rtype, name, content): + self._post( + _ZONES_API + '/' + self.domain_id + '/records', + data=[{ + 'name': self._full_name(name), + 'type': rtype, + 'content': content, + 'ttl': self._get_lexicon_option('ttl'), + 'prio': 0, + 'disabled': False, + }], + ) + return True + + def list_records(self, rtype=None, name=None, content=None): + query_params = {} + if rtype: + query_params['recordType'] = rtype + if name: + query_params['recordName'] = self._full_name(name) + data = self._get(_ZONES_API + '/' + self.domain_id, query_params) + records = data['records'] + records = [{ + 'type': r['type'], + 'name': r['name'], + 'ttl': r['ttl'], + 'content': r['content'], + 'id': r['id'], + } for r in records] + for record in records: + self._clean_TXT_record(record) + if content: + records = [r for r in records if r['content'] == content] + return records + + def update_record(self, identifier, rtype, name, content): + self.delete_record(identifier, rtype, name, None) + return self.create_record(rtype, name, content) + + def delete_record(self, identifier=None, rtype=None, name=None, content=None): + if identifier: + identifiers = [identifier] + else: + identifiers = [ + r['id'] + for r in self.list_records(rtype, name, content) + ] + for identifier in identifiers: + self._delete( + _ZONES_API + '/' + self.domain_id + '/records/' + identifier + ) + return True + + def _request(self, action='GET', url='/', data=None, query_params=None): + response = requests.request( + action, + url, + params=query_params, + json=data, + headers={ + 'accept': 'application/json', + 'x-api-key': self._get_provider_option('api_key'), + }, + ) + response.raise_for_status() + try: + return response.json() + except requests.exceptions.JSONDecodeError: + return True diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate.yaml new file mode 100644 index 000000000..ed5fd5e73 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:42 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml new file mode 100644 index 000000000..b4cb896a4 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:42 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml new file mode 100644 index 000000000..59fb2793e --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml @@ -0,0 +1,124 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:42 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '9' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "localhost.example.com", "type": "A", "content": "127.0.0.1", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '119' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "localhost.example.com", "rootName": "example.com", "type": + "A", "content": "127.0.0.1", "changeDate": "2024-11-28T13:45:43.504Z", "ttl": + 3600, "disabled": false, "id": "bf559199-4628-e782-da0d-c972363cb4c5"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '212' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:43 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '492' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml new file mode 100644 index 000000000..3051f9d64 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml @@ -0,0 +1,124 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:43 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '9' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "docs.example.com", "type": "CNAME", "content": "docs.example.com", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '125' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "docs.example.com", "rootName": "example.com", "type": "CNAME", + "content": "docs.example.com", "changeDate": "2024-11-28T13:45:44.156Z", "ttl": + 3600, "disabled": false, "id": "fd1f2ba0-591a-b282-2039-b53c77a13b48"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '218' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:44 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '412' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml new file mode 100644 index 000000000..b12fb0d2c --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml @@ -0,0 +1,124 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:44 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.fqdn.example.com", "type": "TXT", "content": + "challengetoken", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.fqdn.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:44.889Z", + "ttl": 3600, "disabled": false, "id": "14e12ccb-fbf2-e59a-53aa-0829ec24ce44"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:44 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '438' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml new file mode 100644 index 000000000..4d4adea08 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml @@ -0,0 +1,124 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:45 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.full.example.com", "type": "TXT", "content": + "challengetoken", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.full.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:45.575Z", + "ttl": 3600, "disabled": false, "id": "25cac7ed-f22a-58f0-6eed-c015fde6efab"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:45 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '416' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml new file mode 100644 index 000000000..ed3a12647 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml @@ -0,0 +1,124 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:45 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.test.example.com", "type": "TXT", "content": + "challengetoken", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.test.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:46.187Z", + "ttl": 3600, "disabled": false, "id": "4498566b-2b14-53e3-4d5e-f8aa47831288"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:46 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '5' + x-kong-upstream-latency: + - '413' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml new file mode 100644 index 000000000..6b582fe8e --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml @@ -0,0 +1,188 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:46 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.createrecordset.example.com", "type": "TXT", + "content": "challengetoken1", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.createrecordset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken1\"", "changeDate": + "2024-11-28T13:45:46.825Z", "ttl": 3600, "disabled": false, "id": "77ae0333-f3df-b09a-cc61-8ca9e984f802"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '246' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:46 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '437' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: '[{"name": "_acme-challenge.createrecordset.example.com", "type": "TXT", + "content": "challengetoken2", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.createrecordset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken2\"", "changeDate": + "2024-11-28T13:45:47.433Z", "ttl": 3600, "disabled": false, "id": "bba28203-3caa-0aab-6842-594747e6c502"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '246' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:47 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '420' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml new file mode 100644 index 000000000..42d759084 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml @@ -0,0 +1,251 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:47 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '6' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.noop.example.com", "type": "TXT", "content": + "challengetoken", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.noop.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:48.186Z", + "ttl": 3600, "disabled": false, "id": "918bd3bc-d556-dc4f-2cae-612bff02a2af"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:48 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '434' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: '[{"name": "_acme-challenge.noop.example.com", "type": "TXT", "content": + "challengetoken", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.noop.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:48.756Z", + "ttl": 3600, "disabled": false, "id": "964bbba4-2e34-beef-173d-0af9f4344bb5"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:48 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '417' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=_acme-challenge.noop.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"_acme-challenge.noop.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:48.756Z","ttl":3600,"disabled":false,"id":"964bbba4-2e34-beef-173d-0af9f4344bb5"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '331' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:48 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '27' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml new file mode 100644 index 000000000..ca9d21d83 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml @@ -0,0 +1,307 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:49 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '9' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "delete.testfilt.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "delete.testfilt.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:49.531Z", + "ttl": 3600, "disabled": false, "id": "e7798539-6263-6c06-daaa-b7cc2dc48d2e"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:49 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '470' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testfilt.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"delete.testfilt.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:49.531Z","ttl":3600,"disabled":false,"id":"e7798539-6263-6c06-daaa-b7cc2dc48d2e"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '326' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:49 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '28' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/e7798539-6263-6c06-daaa-b7cc2dc48d2e + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:45:50 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '403' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testfilt.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:50 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '29' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml new file mode 100644 index 000000000..3a010ffb0 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml @@ -0,0 +1,307 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:50 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '6' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "delete.testfqdn.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "delete.testfqdn.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:50.964Z", + "ttl": 3600, "disabled": false, "id": "602f696a-99d4-18c2-47bf-11f4a1e9dffb"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:50 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '479' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testfqdn.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"delete.testfqdn.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:50.964Z","ttl":3600,"disabled":false,"id":"602f696a-99d4-18c2-47bf-11f4a1e9dffb"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '326' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:51 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '32' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/602f696a-99d4-18c2-47bf-11f4a1e9dffb + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:45:51 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '479' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testfqdn.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:51 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '33' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml new file mode 100644 index 000000000..d79d6c436 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml @@ -0,0 +1,307 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:51 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '7' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "delete.testfull.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "delete.testfull.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:52.421Z", + "ttl": 3600, "disabled": false, "id": "12d6c1df-16ec-6822-8219-cb2701d44c40"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:52 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '430' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testfull.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"delete.testfull.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:52.421Z","ttl":3600,"disabled":false,"id":"12d6c1df-16ec-6822-8219-cb2701d44c40"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '326' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:52 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '27' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/12d6c1df-16ec-6822-8219-cb2701d44c40 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:45:53 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '406' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testfull.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:53 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '36' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml new file mode 100644 index 000000000..78d6d7c27 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml @@ -0,0 +1,307 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:53 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '7' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "delete.testid.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "delete.testid.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:45:54.008Z", + "ttl": 3600, "disabled": false, "id": "5a5c0daa-a3c4-b806-ead0-a7a0cac4b295"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '227' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:54 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '504' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testid.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"delete.testid.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:54.008Z","ttl":3600,"disabled":false,"id":"5a5c0daa-a3c4-b806-ead0-a7a0cac4b295"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:54 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '26' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/5a5c0daa-a3c4-b806-ead0-a7a0cac4b295 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:45:54 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '406' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=delete.testid.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:54 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '29' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml new file mode 100644 index 000000000..62c86dc7b --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml @@ -0,0 +1,371 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:55 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.deleterecordinset.example.com", "type": "TXT", + "content": "challengetoken1", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '151' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.deleterecordinset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken1\"", "changeDate": + "2024-11-28T13:45:55.649Z", "ttl": 3600, "disabled": false, "id": "435178fa-53f2-8e66-34f4-3cff1a94e89f"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:55 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '2' + x-kong-upstream-latency: + - '527' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: '[{"name": "_acme-challenge.deleterecordinset.example.com", "type": "TXT", + "content": "challengetoken2", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '151' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.deleterecordinset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken2\"", "changeDate": + "2024-11-28T13:45:56.301Z", "ttl": 3600, "disabled": false, "id": "ce0c11d4-791b-aabe-dbbe-33ca862ed470"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:56 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '477' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=_acme-challenge.deleterecordinset.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"_acme-challenge.deleterecordinset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken1\"","changeDate":"2024-11-28T13:45:55.649Z","ttl":3600,"disabled":false,"id":"435178fa-53f2-8e66-34f4-3cff1a94e89f"},{"name":"_acme-challenge.deleterecordinset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:45:56.301Z","ttl":3600,"disabled":false,"id":"ce0c11d4-791b-aabe-dbbe-33ca862ed470"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '592' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:56 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '33' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/435178fa-53f2-8e66-34f4-3cff1a94e89f + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:45:57 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '567' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=_acme-challenge.deleterecordinset.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"_acme-challenge.deleterecordinset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:45:56.301Z","ttl":3600,"disabled":false,"id":"ce0c11d4-791b-aabe-dbbe-33ca862ed470"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '345' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:57 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '29' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml new file mode 100644 index 000000000..b1df181d9 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml @@ -0,0 +1,428 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:57 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '8' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.deleterecordset.example.com", "type": "TXT", + "content": "challengetoken1", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.deleterecordset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken1\"", "changeDate": + "2024-11-28T13:45:58.046Z", "ttl": 3600, "disabled": false, "id": "75057244-ed87-ac2c-9004-be9410cfb0a6"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '246' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:58 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '647' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: '[{"name": "_acme-challenge.deleterecordset.example.com", "type": "TXT", + "content": "challengetoken2", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.deleterecordset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken2\"", "changeDate": + "2024-11-28T13:45:58.611Z", "ttl": 3600, "disabled": false, "id": "66ccffbb-6e7d-1f60-d228-c9207a686eff"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '246' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:58 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '422' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=_acme-challenge.deleterecordset.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"_acme-challenge.deleterecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken1\"","changeDate":"2024-11-28T13:45:58.046Z","ttl":3600,"disabled":false,"id":"75057244-ed87-ac2c-9004-be9410cfb0a6"},{"name":"_acme-challenge.deleterecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:45:58.611Z","ttl":3600,"disabled":false,"id":"66ccffbb-6e7d-1f60-d228-c9207a686eff"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '588' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:45:58 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '25' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/75057244-ed87-ac2c-9004-be9410cfb0a6 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:45:59 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '514' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/66ccffbb-6e7d-1f60-d228-c9207a686eff + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:46:00 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '426' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=_acme-challenge.deleterecordset.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:00 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '29' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml new file mode 100644 index 000000000..bee2fa8a8 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_after_setting_ttl.yaml @@ -0,0 +1,187 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:00 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '6' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "ttl.fqdn.example.com", "type": "TXT", "content": "ttlshouldbe3600", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '126' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "ttl.fqdn.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"ttlshouldbe3600\"", "changeDate": "2024-11-28T13:46:00.870Z", + "ttl": 3600, "disabled": false, "id": "96d52e8d-13b6-80f5-adb7-489fde879f70"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '223' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:00 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '412' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=ttl.fqdn.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"ttl.fqdn.example.com","rootName":"example.com","type":"TXT","content":"\"ttlshouldbe3600\"","changeDate":"2024-11-28T13:46:00.870Z","ttl":3600,"disabled":false,"id":"96d52e8d-13b6-80f5-adb7-489fde879f70"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '320' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:01 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '34' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml new file mode 100644 index 000000000..0227453a2 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml @@ -0,0 +1,251 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:01 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '4' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "_acme-challenge.listrecordset.example.com", "type": "TXT", "content": + "challengetoken1", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '147' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.listrecordset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken1\"", "changeDate": + "2024-11-28T13:46:01.866Z", "ttl": 3600, "disabled": false, "id": "ba499350-c2e3-a30f-f736-055d930dd2be"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '244' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:01 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '488' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: '[{"name": "_acme-challenge.listrecordset.example.com", "type": "TXT", "content": + "challengetoken2", "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '147' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "_acme-challenge.listrecordset.example.com", "rootName": + "example.com", "type": "TXT", "content": "\"challengetoken2\"", "changeDate": + "2024-11-28T13:46:02.911Z", "ttl": 3600, "disabled": false, "id": "ac45f184-a14c-b6fe-ccce-1f990d684f0b"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '244' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:02 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '834' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=_acme-challenge.listrecordset.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"_acme-challenge.listrecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken1\"","changeDate":"2024-11-28T13:46:01.866Z","ttl":3600,"disabled":false,"id":"ba499350-c2e3-a30f-f736-055d930dd2be"},{"name":"_acme-challenge.listrecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:46:02.911Z","ttl":3600,"disabled":false,"id":"ac45f184-a14c-b6fe-ccce-1f990d684f0b"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '584' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:03 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '25' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml new file mode 100644 index 000000000..c6b04b079 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml @@ -0,0 +1,187 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:03 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '6' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "random.fqdntest.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "random.fqdntest.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:03.891Z", + "ttl": 3600, "disabled": false, "id": "6ee95c00-3625-36fa-677f-651b18b91f05"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:03 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '527' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=random.fqdntest.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"random.fqdntest.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:03.891Z","ttl":3600,"disabled":false,"id":"6ee95c00-3625-36fa-677f-651b18b91f05"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '326' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:04 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '34' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml new file mode 100644 index 000000000..4b92381fb --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml @@ -0,0 +1,187 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:04 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '9' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "random.fulltest.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '132' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "random.fulltest.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:04.684Z", + "ttl": 3600, "disabled": false, "id": "5e281ca4-d0ca-2cd5-f513-328c4294d3d7"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '229' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:04 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '425' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=random.fulltest.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"random.fulltest.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:04.684Z","ttl":3600,"disabled":false,"id":"5e281ca4-d0ca-2cd5-f513-328c4294d3d7"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '326' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:04 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '34' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml new file mode 100644 index 000000000..9e6fb8136 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:04 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '7' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=filter.thisdoesnotexist.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:05 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '37' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml new file mode 100644 index 000000000..24735e6f4 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml @@ -0,0 +1,187 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:05 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "random.test.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "random.test.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:05.637Z", + "ttl": 3600, "disabled": false, "id": "e0be5b2f-4bc0-379d-354e-fd54d5b21342"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '225' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:05 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '428' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=random.test.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"random.test.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:05.637Z","ttl":3600,"disabled":false,"id":"e0be5b2f-4bc0-379d-354e-fd54d5b21342"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '322' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:05 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '27' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml new file mode 100644 index 000000000..4282c923b --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml @@ -0,0 +1,140 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:05 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49 + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"www.twitter-archive.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2023-05-27T08:12:19.681Z","ttl":3600,"disabled":false,"id":"5547121a-92cf-7df9-d4d5-16aea2db416d"},{"name":"twitter-archive.example.com","rootName":"example.com","type":"MX","content":"mx00.ionos.de","changeDate":"2023-05-27T08:12:19.789Z","ttl":3600,"prio":10,"disabled":false,"id":"4ac9d329-9de5-f0cf-c59b-42d8708e5ecc"},{"name":"twitter-archive.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2023-05-27T08:12:19.685Z","ttl":3600,"disabled":false,"id":"e48b7555-ad0d-d39d-8fd1-7ec173a03c52"},{"name":"twitter-archive.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2023-05-27T08:12:19.687Z","ttl":3600,"disabled":false,"id":"dda30efc-1fff-5a98-778f-1974512b2e5d"},{"name":"www.twitter-archive.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2023-05-27T08:12:19.689Z","ttl":3600,"disabled":false,"id":"53f60f0f-9ec8-d523-9166-481ee3752727"},{"name":"twitter-archive.example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + include:_spf-eu.ionos.com ~all\"","changeDate":"2023-05-27T08:12:19.791Z","ttl":3600,"disabled":false,"id":"c494dfe2-701a-6e07-5d5a-2889ad61ac2c"},{"name":"twitter-archive.example.com","rootName":"example.com","type":"MX","content":"mx01.ionos.de","changeDate":"2023-05-27T08:12:19.793Z","ttl":3600,"prio":10,"disabled":false,"id":"917c98fb-1b7e-ebd2-5a31-7448d732c18a"},{"name":"autodiscover.twitter-archive.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.ionos.info","changeDate":"2023-05-27T08:12:19.794Z","ttl":3600,"disabled":false,"id":"f5e0b705-ec04-a2b4-a78a-91bb61442fb0"},{"name":"mail._domainkey.nextcloud.example.com","rootName":"example.com","type":"TXT","content":"\"v=DKIM1; + h=sha256; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDB89viEQWS9uOkfpMZd9zZc6Yu3L8D9uI6fUSCi+s2A6OIMVNDRqDQ3lCXGC7LDRUCTtbnfiyhZA5AxlArz4lMLnja/lmq2SNOAwPAWhb5jMHgn3aGOMk/VJaCoMkQ2uf6vXCTMkQJEEWkvEbSaSuHLKkqGmguxA4Il6WngesGgwIDAQAB\"","changeDate":"2024-11-20T07:55:58.200Z","ttl":3600,"disabled":false,"id":"66a5a3bd-a55f-2c71-4189-4d6cbdc3f3ad"},{"name":"_dmarc.nextcloud.example.com","rootName":"example.com","type":"TXT","content":"\"v=DMARC1; + p=none\"","changeDate":"2024-11-20T07:55:58.863Z","ttl":3600,"disabled":false,"id":"5c43538d-b3cb-e014-942b-44044ebde42a"},{"name":"_dmarc.roundcube.example.com","rootName":"example.com","type":"TXT","content":"\"v=DMARC1; + p=none\"","changeDate":"2024-11-20T07:56:58.690Z","ttl":3600,"disabled":false,"id":"3c3900e8-4671-9028-6101-f0c09875350c"},{"name":"mail._domainkey.roundcube.example.com","rootName":"example.com","type":"TXT","content":"\"v=DKIM1; + h=sha256; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDZdF4ApnyMrtJOzLYa/YaI2Upn0jVRpgKrnJdHqEw9/WnoVW7kXkvAUAJcxsr/6FBYcm/kSd3NDGYPBFaVnavPT+pIzxdvxpH0vHyLgI++WISQ/brrKG6NuuWNKKVZ8CeDjsIdERiQr1hblUuXAkaEznS+2/1vN5p3kLVer4thXwIDAQAB\"","changeDate":"2024-11-20T07:56:58.092Z","ttl":3600,"disabled":false,"id":"76c3b948-58c1-677e-f3e7-3f1a369858be"},{"name":"bachlang.example.com","rootName":"example.com","type":"MX","content":"mx01.ionos.de","changeDate":"2024-10-27T10:40:21.524Z","ttl":3600,"prio":10,"disabled":false,"id":"f77111e4-6f7a-94bf-68ea-518921d2151b"},{"name":"s42582890._domainkey.bachlang.example.com","rootName":"example.com","type":"CNAME","content":"s42582890.dkim.ionos.com","changeDate":"2024-10-27T10:40:21.528Z","ttl":3600,"disabled":false,"id":"9dedd86c-f3f3-bf60-b037-abe88964d073"},{"name":"s1-ionos._domainkey.bachlang.example.com","rootName":"example.com","type":"CNAME","content":"s1.dkim.ionos.com","changeDate":"2024-10-27T10:40:21.531Z","ttl":3600,"disabled":false,"id":"881c5c3a-aab5-29f7-ba81-6bb467a6f91f"},{"name":"s2-ionos._domainkey.bachlang.example.com","rootName":"example.com","type":"CNAME","content":"s2.dkim.ionos.com","changeDate":"2024-10-27T10:40:21.534Z","ttl":3600,"disabled":false,"id":"2fda42e9-e5ff-2f3f-4127-a4973cd35add"},{"name":"bachlang.example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + include:_spf-eu.ionos.com ~all\"","changeDate":"2024-10-27T10:40:21.537Z","ttl":3600,"disabled":false,"id":"31c25804-b523-7fd6-5da8-31c78e3be2d2"},{"name":"autodiscover.bachlang.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.ionos.info","changeDate":"2024-10-27T10:40:21.540Z","ttl":3600,"disabled":false,"id":"e4db975d-c6e5-20c8-0577-1ea216c26d5b"},{"name":"bachlang.example.com","rootName":"example.com","type":"MX","content":"mx00.ionos.de","changeDate":"2024-10-27T10:40:21.543Z","ttl":3600,"prio":10,"disabled":false,"id":"a04762d8-2841-ef30-dea5-921dca389b32"},{"name":"www.bachlang.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2024-10-27T10:40:21.413Z","ttl":3600,"disabled":false,"id":"928fd5ce-345d-79d2-5c2a-8befd8486f84"},{"name":"bachlang.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2024-10-27T10:40:21.418Z","ttl":3600,"disabled":false,"id":"52dd7ca8-d00d-73da-f1ec-6d62f577da17"},{"name":"bachlang.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2024-10-27T10:40:21.421Z","ttl":3600,"disabled":false,"id":"8600ef97-c5b8-77d9-1ece-9fc1982dad29"},{"name":"www.bachlang.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2024-10-27T10:40:21.424Z","ttl":3600,"disabled":false,"id":"05d0394e-347c-fe42-0de5-d558b904308a"},{"name":"ke-mi.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.900Z","ttl":3600,"disabled":false,"id":"7c0f23f2-6d82-4a27-0149-dbfc22b0d009"},{"name":"tierchen.example.com","rootName":"example.com","type":"MX","content":"mx01.kundenserver.de","changeDate":"2021-03-31T09:05:53.901Z","ttl":3600,"prio":10,"disabled":false,"id":"98fdea79-3fe0-dbc1-4f5b-ba1a18d98a6c"},{"name":"lehrer.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.903Z","ttl":3600,"disabled":false,"id":"e2c80661-24fd-893a-7617-f6dbccc6a317"},{"name":"verben.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.904Z","ttl":3600,"disabled":false,"id":"fc518892-2552-2a4a-6629-975dbc3b3d14"},{"name":"tweetnest.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.907Z","ttl":3600,"disabled":false,"id":"858dc0ff-e589-e347-c20b-15efb9ad7af8"},{"name":"example.com","rootName":"example.com","type":"NS","content":"ns1088.ui-dns.org","changeDate":"2021-03-31T09:05:53.908Z","ttl":86400,"disabled":false,"id":"5d751efd-a0c2-c40c-c549-ab06107f9176"},{"name":"www.puzzler.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.909Z","ttl":3600,"disabled":false,"id":"e1a4945b-2e18-5198-7285-a8e2803b45ae"},{"name":"www.lehrer.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.910Z","ttl":3600,"disabled":false,"id":"e6c3794b-a88a-cfe8-b101-f8d37cfcca7b"},{"name":"www.verben.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.913Z","ttl":3600,"disabled":false,"id":"06c91da3-e444-263e-42a5-c306b785c4ef"},{"name":"example.com","rootName":"example.com","type":"NS","content":"ns1100.ui-dns.com","changeDate":"2021-03-31T09:05:53.914Z","ttl":86400,"disabled":false,"id":"6cf240a4-39d2-ea84-2a25-3046d346ff7f"},{"name":"example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.915Z","ttl":3600,"disabled":false,"id":"85a5a596-e479-036d-4c20-53eeba0d64f0"},{"name":"lehrer.example.com","rootName":"example.com","type":"MX","content":"mx00.kundenserver.de","changeDate":"2021-03-31T09:05:53.916Z","ttl":3600,"prio":10,"disabled":false,"id":"8aca31e1-16fb-10f8-f061-24eccae8e446"},{"name":"puzzler.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.917Z","ttl":3600,"disabled":false,"id":"201e7e70-8140-0dc7-12a6-74de645dff08"},{"name":"verben.example.com","rootName":"example.com","type":"MX","content":"mx00.kundenserver.de","changeDate":"2021-03-31T09:05:53.918Z","ttl":3600,"prio":10,"disabled":false,"id":"6197cf0f-66d2-7066-06c1-6101477a63dc"},{"name":"www.labenz.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.919Z","ttl":3600,"disabled":false,"id":"008f9450-a496-6382-8579-e11fd519f213"},{"name":"verben.example.com","rootName":"example.com","type":"MX","content":"mx01.kundenserver.de","changeDate":"2021-03-31T09:05:53.920Z","ttl":3600,"prio":10,"disabled":false,"id":"3aaf3a09-f8ed-6156-327f-0dda7aa35427"},{"name":"tierchen.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.921Z","ttl":3600,"disabled":false,"id":"54966e28-300e-1b90-db52-a78596feb130"},{"name":"_domainconnect.example.com","rootName":"example.com","type":"CNAME","content":"_domainconnect.1and1.com","changeDate":"2021-03-31T09:05:53.922Z","ttl":3600,"disabled":false,"id":"efa8fcea-7256-a0d2-b624-294f97b37c5a"},{"name":"autodiscover.tierchen.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.1and1.info","changeDate":"2021-03-31T09:05:53.923Z","ttl":3600,"disabled":false,"id":"b08110d0-cbd8-afb4-94f0-cde400a27b4c"},{"name":"lehrer.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.925Z","ttl":3600,"disabled":false,"id":"90b6df6f-c3bf-fada-a4c8-b8af7f2d5473"},{"name":"autodiscover.lehrer.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.1and1.info","changeDate":"2021-03-31T09:05:53.925Z","ttl":3600,"disabled":false,"id":"697a586c-df1c-b496-9575-69ecfabef2ad"},{"name":"example.com","rootName":"example.com","type":"NS","content":"ns1062.ui-dns.de","changeDate":"2021-03-31T09:05:53.927Z","ttl":86400,"disabled":false,"id":"32157774-18d6-5ca0-a90a-b626810cb913"},{"name":"www.ke-mi.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.928Z","ttl":3600,"disabled":false,"id":"1447e0ed-4f0a-843b-44a0-47c1b5d71094"},{"name":"labenz.example.com","rootName":"example.com","type":"MX","content":"mx00.kundenserver.de","changeDate":"2021-03-31T09:05:53.930Z","ttl":3600,"prio":10,"disabled":false,"id":"60162671-ad87-47b2-588a-6c2311589a14"},{"name":"puzzler.example.com","rootName":"example.com","type":"MX","content":"mx00.kundenserver.de","changeDate":"2021-03-31T09:05:53.931Z","ttl":3600,"prio":10,"disabled":false,"id":"b18ff95c-b8d8-e55c-2634-e7d022897398"},{"name":"tweetnest.example.com","rootName":"example.com","type":"MX","content":"mx01.kundenserver.de","changeDate":"2021-03-31T09:05:53.932Z","ttl":3600,"prio":10,"disabled":false,"id":"b82ebd94-dc94-188f-805e-2cd56d2bafd9"},{"name":"verben.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.933Z","ttl":3600,"disabled":false,"id":"79455ee7-9047-d355-1f36-7a7ff0ea71fc"},{"name":"www.verben.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.934Z","ttl":3600,"disabled":false,"id":"699e2578-a70d-b438-c30d-35d193cb53a1"},{"name":"example.com","rootName":"example.com","type":"NS","content":"ns1092.ui-dns.biz","changeDate":"2021-03-31T09:05:53.935Z","ttl":86400,"disabled":false,"id":"a74e869e-54d9-6d47-9c91-5b96cb02bbe0"},{"name":"autodiscover.tweetnest.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.1and1.info","changeDate":"2021-03-31T09:05:53.936Z","ttl":3600,"disabled":false,"id":"3a92e7ad-a270-a057-6af3-9a2bfe4d6c33"},{"name":"www.tweetnest.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.937Z","ttl":3600,"disabled":false,"id":"166f4a21-33c9-2b15-aec3-56bd038fa973"},{"name":"www.lehrer.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.938Z","ttl":3600,"disabled":false,"id":"c2059ad9-d2d6-34e2-0455-b6e34f465ac7"},{"name":"labenz.example.com","rootName":"example.com","type":"MX","content":"mx01.kundenserver.de","changeDate":"2021-03-31T09:05:53.939Z","ttl":3600,"prio":10,"disabled":false,"id":"f9f864b5-5ccd-991b-6cdb-92701d2c1d82"},{"name":"lehrer.example.com","rootName":"example.com","type":"MX","content":"mx01.kundenserver.de","changeDate":"2021-03-31T09:05:53.941Z","ttl":3600,"prio":10,"disabled":false,"id":"cf8337e0-ea77-27d4-e52a-2c134bfaf1ef"},{"name":"www.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.943Z","ttl":3600,"disabled":false,"id":"f0441999-1683-2acb-6551-a1dd9a504afe"},{"name":"puzzler.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.944Z","ttl":3600,"disabled":false,"id":"3a02dd8a-e747-ad60-c3e4-d53989e321b6"},{"name":"example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.945Z","ttl":3600,"disabled":false,"id":"acaa88dd-3d46-5e5a-4efa-7eb00ca3e69a"},{"name":"tierchen.example.com","rootName":"example.com","type":"MX","content":"mx00.kundenserver.de","changeDate":"2021-03-31T09:05:53.946Z","ttl":3600,"prio":10,"disabled":false,"id":"45b1c782-0f4e-dbe0-e81d-e25b2ae0ae65"},{"name":"www.labenz.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.947Z","ttl":3600,"disabled":false,"id":"8d237d4b-7617-baac-6a8e-1be0fb412fae"},{"name":"autodiscover.ke-mi.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.ionos.info","changeDate":"2021-03-31T09:05:53.948Z","ttl":3600,"disabled":false,"id":"e18a85b2-2af3-baf3-58e3-219edc1f88a8"},{"name":"www.tierchen.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.949Z","ttl":3600,"disabled":false,"id":"39f93696-2983-7dc0-7b1d-c3fb320f05a9"},{"name":"www.tweetnest.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.950Z","ttl":3600,"disabled":false,"id":"79f868f7-7e59-6ea4-c6ce-6e1cd1e3183c"},{"name":"tierchen.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.951Z","ttl":3600,"disabled":false,"id":"d8ce1f56-773c-cbc9-f043-62efa2134ffd"},{"name":"autodiscover.verben.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.1and1.info","changeDate":"2021-03-31T09:05:53.952Z","ttl":3600,"disabled":false,"id":"d6cd395f-b1e6-8822-c0d5-7cf260a1d841"},{"name":"ke-mi.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.953Z","ttl":3600,"disabled":false,"id":"c3caea7f-27e2-aa31-2024-560c84050cb7"},{"name":"www.ke-mi.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.955Z","ttl":3600,"disabled":false,"id":"f3416f06-2b0e-03a0-b06c-46d58ad0f7e9"},{"name":"ke-mi.example.com","rootName":"example.com","type":"MX","content":"mx01.ionos.de","changeDate":"2021-03-31T09:05:53.956Z","ttl":3600,"prio":10,"disabled":false,"id":"173c1e28-79e3-875c-7ab5-af2e233a6fa8"},{"name":"puzzler.example.com","rootName":"example.com","type":"MX","content":"mx01.kundenserver.de","changeDate":"2021-03-31T09:05:53.957Z","ttl":3600,"prio":10,"disabled":false,"id":"82ac8143-1850-4ba2-c5f8-b7da1f23f642"},{"name":"www.tierchen.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.958Z","ttl":3600,"disabled":false,"id":"e6381ecb-9b71-1568-bebf-d9bd13ec8a46"},{"name":"tweetnest.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.959Z","ttl":3600,"disabled":false,"id":"b1bfe504-32c4-44ec-7573-ca517518484b"},{"name":"www.puzzler.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.960Z","ttl":3600,"disabled":false,"id":"a275876f-8770-b75a-22c3-6d86798e4459"},{"name":"tweetnest.example.com","rootName":"example.com","type":"MX","content":"mx00.kundenserver.de","changeDate":"2021-03-31T09:05:53.961Z","ttl":3600,"prio":10,"disabled":false,"id":"cd0a1dd6-c6ee-70c1-ebed-e02c0bb44484"},{"name":"autodiscover.puzzler.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.1and1.info","changeDate":"2021-03-31T09:05:53.962Z","ttl":3600,"disabled":false,"id":"65ae4ca4-7431-1b41-57b0-32dc48fc1f10"},{"name":"www.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.963Z","ttl":3600,"disabled":false,"id":"d9f33859-487c-79cf-ab06-2e6ac94c9f3e"},{"name":"autodiscover.labenz.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.1and1.info","changeDate":"2021-03-31T09:05:53.964Z","ttl":3600,"disabled":false,"id":"3c4fe20b-a92f-d3c7-9286-af9e824cf7d9"},{"name":"labenz.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2021-03-31T09:05:53.965Z","ttl":3600,"disabled":false,"id":"6f045258-6b0c-b887-e216-ac2711da690c"},{"name":"labenz.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2021-03-31T09:05:53.966Z","ttl":3600,"disabled":false,"id":"5c502782-563a-4a9c-04d9-3157cb6fe32d"},{"name":"ke-mi.example.com","rootName":"example.com","type":"MX","content":"mx00.ionos.de","changeDate":"2021-03-31T09:05:53.967Z","ttl":3600,"prio":10,"disabled":false,"id":"72a801c1-6fc5-1655-160c-085cc420ac38"},{"name":"nextcloud.example.com","rootName":"example.com","type":"MX","content":"nextcloud.example.com","changeDate":"2024-11-15T12:31:32.734Z","ttl":3600,"prio":10,"disabled":false,"id":"e5052378-02ec-be22-53bd-1b3ba827351c"},{"name":"nextcloud.example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + a mx -all\"","changeDate":"2024-11-15T12:31:51.100Z","ttl":3600,"disabled":false,"id":"c3939c70-55b4-2d47-7a0b-a1eb6f115035"},{"name":"nextcloud.example.com","rootName":"example.com","type":"CAA","content":"0 + issue \"letsencrypt.org\"","changeDate":"2024-11-15T12:34:44.978Z","ttl":3600,"disabled":false,"id":"45c177e9-e46d-e874-7db0-1ffd006463d4"},{"name":"roundcube.example.com","rootName":"example.com","type":"A","content":"88.99.80.200","changeDate":"2024-11-15T13:00:09.146Z","ttl":3600,"disabled":false,"id":"9f8f06c7-0336-b390-4a25-f449b076e7b8"},{"name":"roundcube.example.com","rootName":"example.com","type":"AAAA","content":"2a01:4f8:1c17:6867:0:0:0:1","changeDate":"2024-11-15T13:00:22.866Z","ttl":3600,"disabled":false,"id":"ea6c7a35-4fab-a68e-d6af-2e7388a3b6e8"},{"name":"roundcube.example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + a mx -all\"","changeDate":"2024-11-15T13:01:26.754Z","ttl":3600,"disabled":false,"id":"d95447c2-6397-f185-51f7-5273cbae9b9c"},{"name":"roundcube.example.com","rootName":"example.com","type":"MX","content":"roundcube.example.com","changeDate":"2024-11-15T13:01:06.948Z","ttl":3600,"prio":10,"disabled":false,"id":"11a90aa9-3e01-ed67-5814-bca0639beeaa"},{"name":"roundcube.example.com","rootName":"example.com","type":"CAA","content":"0 + issue \"letsencrypt.org\"","changeDate":"2024-11-15T13:02:34.170Z","ttl":3600,"disabled":false,"id":"b0915782-3115-65fd-0b8f-9b854303ee28"},{"name":"*.roundcube.example.com","rootName":"example.com","type":"A","content":"88.99.80.200","changeDate":"2024-11-15T13:01:52.378Z","ttl":3600,"disabled":false,"id":"6a46f0a5-81d8-211c-f14e-ba41d28acea7"},{"name":"*.roundcube.example.com","rootName":"example.com","type":"AAAA","content":"2a01:4f8:1c17:6867:0:0:0:1","changeDate":"2024-11-15T13:02:07.590Z","ttl":3600,"disabled":false,"id":"de5fb65f-ed45-0df9-2a66-4e0ca5e5bdb9"},{"name":"updated.testfull.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:41:11.577Z","ttl":3600,"disabled":false,"id":"32285786-dbe8-f9c8-b275-55284a688d47"},{"name":"orig.nameonly.test.example.com","rootName":"example.com","type":"TXT","content":"\"updated\"","changeDate":"2024-11-28T13:41:07.475Z","ttl":3600,"disabled":false,"id":"83911d47-07c7-9b9b-3a5b-3aa39a5a8f5f"},{"name":"localhost.example.com","rootName":"example.com","type":"A","content":"127.0.0.1","changeDate":"2024-11-28T13:45:43.504Z","ttl":3600,"disabled":false,"id":"bf559199-4628-e782-da0d-c972363cb4c5"},{"name":"updated.testfqdn.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:41:09.516Z","ttl":3600,"disabled":false,"id":"95482056-3f09-7222-8ff6-64e6dcbd4cbd"},{"name":"updated.test.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:41:04.873Z","ttl":3600,"disabled":false,"id":"fca94006-e307-fab6-8dc2-d1e5c76b5ab9"},{"name":"ttl.fqdn.example.com","rootName":"example.com","type":"TXT","content":"\"ttlshouldbe3600\"","changeDate":"2024-11-28T13:46:00.870Z","ttl":3600,"disabled":false,"id":"96d52e8d-13b6-80f5-adb7-489fde879f70"},{"name":"_acme-challenge.full.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:45.575Z","ttl":3600,"disabled":false,"id":"25cac7ed-f22a-58f0-6eed-c015fde6efab"},{"name":"_acme-challenge.test.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:46.187Z","ttl":3600,"disabled":false,"id":"4498566b-2b14-53e3-4d5e-f8aa47831288"},{"name":"_acme-challenge.createrecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken1\"","changeDate":"2024-11-28T13:45:46.825Z","ttl":3600,"disabled":false,"id":"77ae0333-f3df-b09a-cc61-8ca9e984f802"},{"name":"_acme-challenge.noop.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:48.756Z","ttl":3600,"disabled":false,"id":"964bbba4-2e34-beef-173d-0af9f4344bb5"},{"name":"_acme-challenge.fqdn.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:45:44.889Z","ttl":3600,"disabled":false,"id":"14e12ccb-fbf2-e59a-53aa-0829ec24ce44"},{"name":"_acme-challenge.createrecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:45:47.433Z","ttl":3600,"disabled":false,"id":"bba28203-3caa-0aab-6842-594747e6c502"},{"name":"docs.example.com","rootName":"example.com","type":"CNAME","content":"docs.example.com","changeDate":"2024-11-28T13:45:44.156Z","ttl":3600,"disabled":false,"id":"fd1f2ba0-591a-b282-2039-b53c77a13b48"},{"name":"random.test.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:05.637Z","ttl":3600,"disabled":false,"id":"e0be5b2f-4bc0-379d-354e-fd54d5b21342"},{"name":"_acme-challenge.listrecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken1\"","changeDate":"2024-11-28T13:46:01.866Z","ttl":3600,"disabled":false,"id":"ba499350-c2e3-a30f-f736-055d930dd2be"},{"name":"_acme-challenge.listrecordset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:46:02.911Z","ttl":3600,"disabled":false,"id":"ac45f184-a14c-b6fe-ccce-1f990d684f0b"},{"name":"random.fqdntest.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:03.891Z","ttl":3600,"disabled":false,"id":"6ee95c00-3625-36fa-677f-651b18b91f05"},{"name":"random.fulltest.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:04.684Z","ttl":3600,"disabled":false,"id":"5e281ca4-d0ca-2cd5-f513-328c4294d3d7"},{"name":"example.com","rootName":"example.com","type":"SOA","content":"ns1088.ui-dns.org + hostmaster.1und1.com 2017060775 28800 7200 604800 600","changeDate":"2024-11-28T13:46:05.641Z","ttl":86400,"disabled":false,"id":"60d43949-77e5-01f0-b9dc-1a678431a6e5"},{"name":"_acme-challenge.deleterecordinset.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken2\"","changeDate":"2024-11-28T13:45:56.301Z","ttl":3600,"disabled":false,"id":"ce0c11d4-791b-aabe-dbbe-33ca862ed470"},{"name":"yunohost.example.com","rootName":"example.com","type":"MX","content":"yunohost.example.com","changeDate":"2024-11-13T12:41:28.947Z","ttl":3600,"prio":10,"disabled":false,"id":"6fa71de5-8d7b-f4da-e172-afe9f5e663ec"},{"name":"yunohost.example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + a mx -all\"","changeDate":"2024-11-13T12:42:08.859Z","ttl":3600,"disabled":false,"id":"d19925fd-a872-cb5f-b250-69ff92743037"},{"name":"nextcloud.example.com","rootName":"example.com","type":"AAAA","content":"2a01:4f8:1c17:6867:0:0:0:1","changeDate":"2024-11-15T14:13:31.597Z","ttl":3600,"disabled":false,"id":"0a3b5209-c229-70f5-bd6a-76e6a3456b7c"},{"name":"nextcloud.example.com","rootName":"example.com","type":"A","content":"88.99.80.200","changeDate":"2024-11-15T14:13:21.756Z","ttl":3600,"disabled":false,"id":"b705fd9c-1e11-a492-e4b3-90c69c73f4e6"},{"name":"mail._domainkey.yunohost.example.com","rootName":"example.com","type":"TXT","content":"\"v=DKIM1; + h=sha256; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDTHq7ngVKPLd3XAB4dHjF+iyiasb065dNSEj16swNaaGw9nmpw0x/EpWg5IP53KXVyb5or41M+GZwTZb+mIFSCaTSkHvN0EIcopK4PqRzaKeyMuhXHfYMvz2T4otlUVL18qnJA8QQCylvss9CGRDwXiRX8uvq61xFwzVOqZxPoCwIDAQAB\"","changeDate":"2024-11-13T12:42:50.768Z","ttl":3600,"disabled":false,"id":"5532b14e-d5b8-883a-1300-ab021458c1f2"},{"name":"_dmarc.yunohost.example.com","rootName":"example.com","type":"TXT","content":"\"v=DMARC1; + p=none\"","changeDate":"2024-11-13T12:43:16.404Z","ttl":3600,"disabled":false,"id":"3b38012a-58ee-316c-adbe-be6794e534b3"},{"name":"*.yunohost.example.com","rootName":"example.com","type":"A","content":"88.99.80.200","changeDate":"2024-11-13T12:56:01.196Z","ttl":3600,"disabled":false,"id":"cf333add-fb29-b992-8ed6-9dea03c2ec8b"},{"name":"*.yunohost.example.com","rootName":"example.com","type":"AAAA","content":"2a01:4f8:1c17:6867:0:0:0:1","changeDate":"2024-11-13T12:54:04.861Z","ttl":3600,"disabled":false,"id":"7c22b7cf-4c4b-9c0e-ab91-c2a3941131ed"},{"name":"yunohost.example.com","rootName":"example.com","type":"AAAA","content":"2a01:4f8:1c17:6867:0:0:0:1","changeDate":"2024-11-13T12:56:31.234Z","ttl":3600,"disabled":false,"id":"32bce8d0-acfe-038e-4802-b50815df33ba"},{"name":"yunohost.example.com","rootName":"example.com","type":"A","content":"88.99.80.200","changeDate":"2024-11-13T12:59:00.529Z","ttl":3600,"disabled":false,"id":"365fd737-3c6b-5693-f1c2-c93a27e04828"},{"name":"spacekaren.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2024-04-10T13:52:23.136Z","ttl":3600,"disabled":false,"id":"bc104f4b-dc14-1178-9f0f-d201ecc1c6f4"},{"name":"spacekaren.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2024-04-10T13:52:23.138Z","ttl":3600,"disabled":false,"id":"486c15ad-b011-e0f4-a05a-2085502d5532"},{"name":"s1-ionos._domainkey.spacekaren.example.com","rootName":"example.com","type":"CNAME","content":"s1.dkim.ionos.com","changeDate":"2024-04-10T13:52:23.248Z","ttl":3600,"disabled":false,"id":"12abc04a-7706-6b4c-3b16-84e36c24a95c"},{"name":"www.spacekaren.example.com","rootName":"example.com","type":"AAAA","content":"2001:8d8:100f:f000:0:0:0:2aa","changeDate":"2024-04-10T13:52:23.140Z","ttl":3600,"disabled":false,"id":"30a70666-bc98-b53c-fc9f-9806f067738e"},{"name":"www.spacekaren.example.com","rootName":"example.com","type":"A","content":"217.160.0.11","changeDate":"2024-04-10T13:52:23.141Z","ttl":3600,"disabled":false,"id":"1da3965c-a831-1505-e5f0-b7e650ac1991"},{"name":"spacekaren.example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + include:_spf-eu.ionos.com ~all\"","changeDate":"2024-04-10T13:52:23.239Z","ttl":3600,"disabled":false,"id":"a0569061-f8a3-b506-e607-bc47daa894fa"},{"name":"autodiscover.spacekaren.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.ionos.info","changeDate":"2024-04-10T13:52:23.241Z","ttl":3600,"disabled":false,"id":"d5a705bf-0b32-259b-593f-832494a3ffec"},{"name":"spacekaren.example.com","rootName":"example.com","type":"MX","content":"mx01.ionos.de","changeDate":"2024-04-10T13:52:23.243Z","ttl":3600,"prio":10,"disabled":false,"id":"3625341d-4ae3-7dff-7c2e-c9ee2e421014"},{"name":"s2-ionos._domainkey.spacekaren.example.com","rootName":"example.com","type":"CNAME","content":"s2.dkim.ionos.com","changeDate":"2024-04-10T13:52:23.244Z","ttl":3600,"disabled":false,"id":"38b5ab7c-c04c-9360-0190-aa3ae6e687e4"},{"name":"s42582890._domainkey.spacekaren.example.com","rootName":"example.com","type":"CNAME","content":"s42582890.dkim.ionos.com","changeDate":"2024-04-10T13:52:23.246Z","ttl":3600,"disabled":false,"id":"3dd9fe19-84a8-bdc8-e00a-b40d503378c1"},{"name":"spacekaren.example.com","rootName":"example.com","type":"MX","content":"mx00.ionos.de","changeDate":"2024-04-10T13:52:23.247Z","ttl":3600,"prio":10,"disabled":false,"id":"ffd579b2-d896-d0e6-cc3a-7644b695f110"},{"name":"example.com","rootName":"example.com","type":"TXT","content":"\"v=spf1 + include:_spf-eu.ionos.com ~all\"","changeDate":"2023-06-12T22:56:29.806Z","ttl":3600,"disabled":false,"id":"36744b82-0854-8819-9fe1-31a78c722bd7"},{"name":"autodiscover.example.com","rootName":"example.com","type":"CNAME","content":"adsredir.ionos.info","changeDate":"2023-12-28T15:57:12.557Z","ttl":3600,"disabled":false,"id":"f66ff74f-390d-dc05-b162-e50ba1eb3d7f"},{"name":"s42582890._domainkey.example.com","rootName":"example.com","type":"CNAME","content":"s42582890.dkim.ionos.com","changeDate":"2023-12-28T15:57:12.559Z","ttl":3600,"disabled":false,"id":"86081b9d-0276-f61a-aadc-0ba86ad83e24"},{"name":"example.com","rootName":"example.com","type":"MX","content":"mx01.ionos.de","changeDate":"2023-12-28T15:57:12.560Z","ttl":3600,"prio":10,"disabled":false,"id":"48cf6e24-200f-3364-b8d3-e45f746edc5b"},{"name":"example.com","rootName":"example.com","type":"MX","content":"mx00.ionos.de","changeDate":"2023-12-28T15:57:12.561Z","ttl":3600,"prio":10,"disabled":false,"id":"062106b8-cea2-9da6-3bc3-16cb2a3f82fa"},{"name":"s1-ionos._domainkey.example.com","rootName":"example.com","type":"CNAME","content":"s1.dkim.ionos.com","changeDate":"2023-12-28T15:57:12.562Z","ttl":3600,"disabled":false,"id":"41db3687-6811-9ad5-5b64-12a92b8341b7"},{"name":"s2-ionos._domainkey.example.com","rootName":"example.com","type":"CNAME","content":"s2.dkim.ionos.com","changeDate":"2023-12-28T15:57:12.563Z","ttl":3600,"disabled":false,"id":"fae4b40c-db2d-8572-fc91-5e508c809dd0"},{"name":"yunohost.example.com","rootName":"example.com","type":"CAA","content":"0 + issue \"letsencrypt.org\"","changeDate":"2024-11-15T19:43:45.161Z","ttl":3600,"disabled":false,"id":"54554ef8-cfdb-1920-28c1-1585a95a3a11"},{"name":"*.nextcloud.example.com","rootName":"example.com","type":"A","content":"88.99.80.200","changeDate":"2024-11-15T19:44:40.893Z","ttl":3600,"disabled":false,"id":"5757dd3b-d268-9af8-365a-8151f21b9d5d"},{"name":"*.nextcloud.example.com","rootName":"example.com","type":"AAAA","content":"2a01:4f8:1c17:6867:0:0:0:1","changeDate":"2024-11-15T19:44:57.974Z","ttl":3600,"disabled":false,"id":"a5981fcb-1a44-a996-681a-f086ee164b2f"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '33295' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:06 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '2' + x-kong-upstream-latency: + - '42' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml new file mode 100644 index 000000000..93e610da7 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml @@ -0,0 +1,308 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:06 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '5' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "orig.test.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '126' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "orig.test.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:06.767Z", + "ttl": 3600, "disabled": false, "id": "a587d796-a6c5-af55-30ec-0e75d42f09c0"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '223' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:06 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '563' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=orig.test.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"orig.test.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:06.767Z","ttl":3600,"disabled":false,"id":"a587d796-a6c5-af55-30ec-0e75d42f09c0"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '320' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:06 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '28' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/a587d796-a6c5-af55-30ec-0e75d42f09c0 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:46:07 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '2' + x-kong-upstream-latency: + - '473' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "updated.test.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '129' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "updated.test.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:08.016Z", + "ttl": 3600, "disabled": false, "id": "b1063db7-62c7-325d-9f92-194573ba6cc9"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '226' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:08 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '416' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml new file mode 100644 index 000000000..0eee3598c --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml @@ -0,0 +1,365 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:08 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '6' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "orig.nameonly.test.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '135' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "orig.nameonly.test.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:08.981Z", + "ttl": 3600, "disabled": false, "id": "f272799a-fd6f-f197-2344-0a17e49580b7"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '232' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:09 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '618' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=orig.nameonly.test.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"orig.nameonly.test.example.com","rootName":"example.com","type":"TXT","content":"\"updated\"","changeDate":"2024-11-28T13:41:07.475Z","ttl":3600,"disabled":false,"id":"83911d47-07c7-9b9b-3a5b-3aa39a5a8f5f"},{"name":"orig.nameonly.test.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:08.981Z","ttl":3600,"disabled":false,"id":"f272799a-fd6f-f197-2344-0a17e49580b7"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '553' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:09 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '32' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/83911d47-07c7-9b9b-3a5b-3aa39a5a8f5f + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:46:09 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '427' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/f272799a-fd6f-f197-2344-0a17e49580b7 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:46:10 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '493' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "orig.nameonly.test.example.com", "type": "TXT", "content": "updated", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '128' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "orig.nameonly.test.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"updated\"", "changeDate": "2024-11-28T13:46:10.944Z", + "ttl": 3600, "disabled": false, "id": "14e26875-6b29-f008-9cfe-3ce454b51a05"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '225' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:10 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '453' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml new file mode 100644 index 000000000..98063b2a1 --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -0,0 +1,308 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:11 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '7' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "orig.testfqdn.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "orig.testfqdn.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:11.606Z", + "ttl": 3600, "disabled": false, "id": "81c22740-4a29-9f7c-10ce-a439f5231fd6"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '227' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:11 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '409' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=orig.testfqdn.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"orig.testfqdn.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:11.606Z","ttl":3600,"disabled":false,"id":"81c22740-4a29-9f7c-10ce-a439f5231fd6"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:11 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '31' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/81c22740-4a29-9f7c-10ce-a439f5231fd6 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:46:12 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '396' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "updated.testfqdn.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '133' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "updated.testfqdn.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:12.912Z", + "ttl": 3600, "disabled": false, "id": "1581e9e1-3bd3-f768-8bdb-7171afe9476b"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '230' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:12 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '503' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml new file mode 100644 index 000000000..deefb26cd --- /dev/null +++ b/tests/fixtures/cassettes/ionos/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml @@ -0,0 +1,308 @@ +interactions: +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones + response: + body: + string: '[{"name": "example.com", "id": "4c9feb47-2a4d-11ec-bda4-0a5864441f49", + "type": "NATIVE"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '582' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:13 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '1' + x-kong-upstream-latency: + - '8' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "orig.testfull.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "orig.testfull.example.com", "rootName": "example.com", "type": + "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:13.595Z", + "ttl": 3600, "disabled": false, "id": "f5f3cb6a-e799-81f2-8cbd-a35b6e58fcd5"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '227' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:13 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '486' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: GET + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49?recordType=TXT&recordName=orig.testfull.example.com + response: + body: + string: '{"name":"example.com","id":"4c9feb47-2a4d-11ec-bda4-0a5864441f49","type":"NATIVE","records":[{"name":"orig.testfull.example.com","rootName":"example.com","type":"TXT","content":"\"challengetoken\"","changeDate":"2024-11-28T13:46:13.595Z","ttl":3600,"disabled":false,"id":"f5f3cb6a-e799-81f2-8cbd-a35b6e58fcd5"}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:13 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + endpoint: + - getZone + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + server: + - nginx/1.22.1 + status-code: + - '200' + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '44' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: DELETE + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records/f5f3cb6a-e799-81f2-8cbd-a35b6e58fcd5 + response: + body: + string: '' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 28 Nov 2024 13:46:14 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '433' + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '[{"name": "updated.testfull.example.com", "type": "TXT", "content": "challengetoken", + "ttl": 3600, "prio": 0, "disabled": false}]' + headers: + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '133' + Content-Type: + - application/json + User-Agent: + - python-requests/2.32.3 + accept: + - application/json + method: POST + uri: https://api.hosting.ionos.com/dns/v1/zones/4c9feb47-2a4d-11ec-bda4-0a5864441f49/records + response: + body: + string: '[{"name": "updated.testfull.example.com", "rootName": "example.com", + "type": "TXT", "content": "\"challengetoken\"", "changeDate": "2024-11-28T13:46:14.934Z", + "ttl": 3600, "disabled": false, "id": "0d51ee59-b3c6-9c36-ce0b-c2abeea19e69"}]' + headers: + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '230' + Content-Type: + - application/json + Date: + - Thu, 28 Nov 2024 13:46:14 GMT + Keep-Alive: + - timeout=15 + cache-control: + - no-cache, no-store, max-age=0, must-revalidate + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - no-referrer + vary: + - Origin + - Access-Control-Request-Method + - Access-Control-Request-Headers + - Origin + via: + - kong/3.0.0 + x-content-type-options: + - nosniff + x-frame-options: + - DENY + x-kong-proxy-latency: + - '0' + x-kong-upstream-latency: + - '476' + x-xss-protection: + - '0' + status: + code: 201 + message: Created +version: 1 diff --git a/tests/providers/test_ionos.py b/tests/providers/test_ionos.py new file mode 100644 index 000000000..c8b14aa02 --- /dev/null +++ b/tests/providers/test_ionos.py @@ -0,0 +1,47 @@ +"""Integration tests for IONOS""" +import json +import os +from unittest import TestCase + +from 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 integration_tests.IntegrationTestsV2 +class IONOSProviderTests(TestCase, IntegrationTestsV2): + """Integration tests for IONOS provider""" + + provider_name = 'ionos' + domain = os.environ.get('LEXICON_IONOS_DOMAIN', 'example.com') + + def _filter_request(self, request): + request.uri = request.uri.replace(self.domain, 'example.com') + if request.body: + body = request.body.decode('utf-8') + body = body.replace(self.domain, 'example.com') + request.body = body.encode('utf-8') + return request + + def _filter_headers(self): + return ['x-api-key'] + + def _filter_response(self, response): + for key in ['Set-Cookie', 'x-b3-traceid']: + response['headers'].pop(key, None) + body = response['body']['string'].decode('utf-8') + try: + data = json.loads(body) + if isinstance(data, list): + data = [e for e in data if not self._is_unrelated_zone(e)] + body = json.dumps(data) + except json.JSONDecodeError: + pass + body = body.replace(self.domain, 'example.com') + response['body']['string'] = body.encode('utf-8') + return response + + def _is_unrelated_zone(self, entry): + return isinstance(entry, dict) \ + and 'name' in entry \ + and not entry['name'].endswith(self.domain)