From 2a4aab64675446e13de8c0e4d0ff08a2a83d9b15 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 27 Mar 2016 20:07:57 -0700 Subject: [PATCH 1/5] add support for rage4 provider. --- lexicon/providers/rage4.py | 139 ++++++++++++++++++ .../test_Provider_authenticate.yaml | 27 ++++ ...ate_with_unmanaged_domain_should_fail.yaml | 28 ++++ ...ord_for_A_with_valid_name_and_content.yaml | 51 +++++++ ...for_CNAME_with_valid_name_and_content.yaml | 51 +++++++ ...rd_for_TXT_with_fqdn_name_and_content.yaml | 51 +++++++ ...rd_for_TXT_with_full_name_and_content.yaml | 51 +++++++ ...d_for_TXT_with_valid_name_and_content.yaml | 51 +++++++ ...record_by_filter_should_remove_record.yaml | 123 ++++++++++++++++ ...r_with_fqdn_name_should_remove_record.yaml | 123 ++++++++++++++++ ...r_with_full_name_should_remove_record.yaml | 123 ++++++++++++++++ ...rd_by_identifier_should_remove_record.yaml | 123 ++++++++++++++++ ...fqdn_name_filter_should_return_record.yaml | 75 ++++++++++ ...full_name_filter_should_return_record.yaml | 75 ++++++++++ ...with_name_filter_should_return_record.yaml | 75 ++++++++++ ...rds_with_no_arguments_should_list_all.yaml | 52 +++++++ ...ng_update_record_should_modify_record.yaml | 99 +++++++++++++ ...d_with_fqdn_name_should_modify_record.yaml | 99 +++++++++++++ ...d_with_full_name_should_modify_record.yaml | 115 +++++++++++++++ tests/providers/test_rage4.py | 20 +++ 20 files changed, 1551 insertions(+) create mode 100644 lexicon/providers/rage4.py create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml create mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml create mode 100644 tests/providers/test_rage4.py diff --git a/lexicon/providers/rage4.py b/lexicon/providers/rage4.py new file mode 100644 index 000000000..9a6ed78e3 --- /dev/null +++ b/lexicon/providers/rage4.py @@ -0,0 +1,139 @@ +from base import Provider as BaseProvider +import requests +import json + +class Provider(BaseProvider): + + def __init__(self, options, provider_options={}): + super(Provider, self).__init__(options) + self.domain_id = None + self.api_endpoint = provider_options.get('api_endpoint') or 'https://rage4.com/rapi' + + def authenticate(self): + + payload = self._get('/getdomainbyname/', {'name': self.options['domain']}) + + if not payload['id']: + raise StandardError('No domain found') + + self.domain_id = payload['id'] + + # Create record. If record already exists with the same content, do nothing' + def create_record(self, type, name, content): + record = { + 'id': self.domain_id, + 'name': self._clean_name(name), + 'content': content, + 'type': type + } + payload = {} + try: + payload = self._post('/createrecord/',{},record) + except requests.exceptions.HTTPError, e: + if e.response.status_code == 400: + payload = {} + + # http 400 is ok here, because the record probably already exists + print 'create_record: {0}'.format(payload['status']) + return payload['status'] + + # List all records. Return an empty list if no records found + # type, name and content are used to filter records. + # If possible filter during the query, otherwise filter after response is received. + def list_records(self, type=None, name=None, content=None): + filter = { + 'id': self.domain_id + } + if name: + filter['name'] = self._clean_name(name) + payload = self._get('/getrecords/', filter) + + records = [] + for record in payload: + processed_record = { + 'type': record['type'], + 'name': record['name'], + 'ttl': record['ttl'], + 'content': record['content'], + 'id': record['id'] + } + records.append(processed_record) + + + print 'list_records: {0}'.format(records) + return records + + # Create or update a record. + def update_record(self, identifier, type=None, name=None, content=None): + + data = { + 'id': identifier + } + + if name: + data['name'] = self._clean_name(name) + if content: + data['content'] = content + # if type: + # raise 'Type updating is not supported by this provider.' + + payload = self._put('/updaterecord/', {}, data) + + print 'update_record: {0}'.format(payload['status']) + return payload['status'] + + # Delete an existing record. + # If record does not exist, do nothing. + def delete_record(self, identifier=None, type=None, name=None, content=None): + if not identifier: + records = self.list_records(type, name, content) + print records + if len(records) == 1: + identifier = records[0]['id'] + else: + raise StandardError('Record identifier could not be found.') + payload = self._post('/deleterecord/', {'id': identifier}) + + # is always True at this point, if a non 200 response is returned an error is raised. + print 'delete_record: {0}'.format(payload['status']) + return payload['status'] + + + # Helpers + + # record names can be in a variety of formats: relative (sub), full (sub.example.com), and fqdn (sub.example.com.) + # Rage4 handles full record names, so we need to make sure we clean up all user specified record_names before + # submitting them + def _clean_name(self, record_name): + record_name = record_name.rstrip('.') # strip trailing period from fqdn if present + #check if the record_name is fully specified + if not record_name.endswith(self.options['domain']): + record_name = "{0}.{1}".format(record_name, self.options['domain']) + return record_name + + def _get(self, url='/', query_params={}): + return self._request('GET', url, query_params=query_params) + + def _post(self, url='/', data={}, query_params={}): + return self._request('POST', url, data=data, query_params=query_params) + + def _put(self, url='/', data={}, query_params={}): + return self._request('PUT', url, data=data, query_params=query_params) + + def _delete(self, url='/', query_params={}): + return self._request('DELETE', url, query_params=query_params) + + def _request(self, action='GET', url='/', data={}, query_params={}): + + default_headers = { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + } + default_auth = requests.auth.HTTPBasicAuth(self.options['auth_username'], self.options['auth_token']) + + r = requests.request(action, self.api_endpoint + url, params=query_params, + data=json.dumps(data), + headers=default_headers, + auth=default_auth) + r.raise_for_status() # if the request fails for any reason, throw an error. + return r.json() diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml new file mode 100644 index 000000000..dee09c7f6 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml @@ -0,0 +1,27 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:15:11 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml new file mode 100644 index 000000000..b4a6d7469 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=thisisadomainidonotown.com + response: + body: {string: !!python/unicode '{"status":false,"id":0,"error":"Unable to fetch + the item or API access not allowed"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['84'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:14:17 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml new file mode 100644 index 000000000..890d2b551 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:16:39 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=127.0.0.1&type=A&id=57039&name=localhost.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952199,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:15:49 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml new file mode 100644 index 000000000..eab441efb --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:15:45 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=docs.example.com&type=CNAME&id=57039&name=docs.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952201,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:16:45 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml new file mode 100644 index 000000000..905bbdf8d --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:16:39 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.www.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952205,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:16:43 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml new file mode 100644 index 000000000..0b0f0095e --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:17:34 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.subdomain.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952207,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:17:38 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml new file mode 100644 index 000000000..f1c5dfa3b --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml @@ -0,0 +1,51 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:16:41 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952203,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:15:51 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml new file mode 100644 index 000000000..b8c562e97 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:19 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952439,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:02:28 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952439,"name":"delete.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['349'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:25 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1952439}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1952439,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:02:35 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:31 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml new file mode 100644 index 000000000..3aa3d40d5 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:46 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952441,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:04 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952441,"name":"delete.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:07 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1952441}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1952441,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:12 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:04:09 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml new file mode 100644 index 000000000..e4de19006 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:02:53 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfull.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952443,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:59 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfull.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952443,"name":"delete.testfull.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:04:03 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1952443}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1952443,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:13 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfull.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:16 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml new file mode 100644 index 000000000..14cf7a1b9 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml @@ -0,0 +1,123 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:02:48 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952437,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:01:57 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952437,"name":"delete.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['349'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:02:54 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{"id": 1952437}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['15'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/deleterecord/ + response: + body: {string: !!python/unicode '{"status":true,"id":1952437,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:02:03 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + response: + body: {string: !!python/unicode '[]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['2'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 03:03:01 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml new file mode 100644 index 000000000..b6b8b7f1a --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:25:52 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952223,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:25:00 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952223,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['349'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:25:03 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml new file mode 100644 index 000000000..72d322475 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:23:51 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.fulltest.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952219,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:24:48 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.fulltest.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952219,"name":"random.fulltest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['353'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:23:56 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml new file mode 100644 index 000000000..a7ae54486 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:24:22 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952217,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:24:27 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952217,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['349'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:24:30 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml new file mode 100644 index 000000000..fb1fca111 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:23:30 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039 + response: + body: {string: !!python/unicode '[{"id":1952177,"name":"capsulecd.com","content":"ns1.r4ns.com","type":"NS","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952179,"name":"capsulecd.com","content":"ns2.r4ns.net","type":"NS","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952181,"name":"capsulecd.com","content":"ns1.r4ns.com + lexicon.mailinator.com 1459131867 10800 3600 604800 3600","type":"SOA","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952217,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['1406'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:23:33 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml new file mode 100644 index 000000000..e55cfde6b --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:32:35 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952259,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:33:33 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952259,"name":"orig.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['347'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:32:42 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: PUT + uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1952259&name=updated.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952259,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:33:06 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml new file mode 100644 index 000000000..7db0769ba --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:36:42 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952273,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:36:46 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952273,"name":"orig.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['351'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:35:55 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: PUT + uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1952273&name=updated.testfqdn.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952273,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:35:59 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + transfer-encoding: [chunked] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml new file mode 100644 index 000000000..1cd92aaa7 --- /dev/null +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml @@ -0,0 +1,115 @@ +interactions: +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com + response: + body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['157'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:35:48 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: POST + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.test.capsulecd.com + response: + body: {string: !!python/unicode '{"status":true,"id":1952275,"error":""}'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['39'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:35:53 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: GET + uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.test.capsulecd.com + response: + body: {string: !!python/unicode '[{"id":1952275,"name":"orig.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + headers: + access-control-allow-origin: ['*'] + cache-control: ['private, s-maxage=0'] + content-length: ['347'] + content-type: [text/plain; charset=utf-8] + date: ['Mon, 28 Mar 2016 02:36:51 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 200, message: OK} +- request: + body: '{}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['2'] + Content-Type: [application/json] + User-Agent: [python-requests/2.9.1] + method: PUT + uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1952275&name=updated.test.capsulecd.com + response: + body: {string: !!python/unicode "\r\n\ + \r\n\r\n\r\n405 -\ + \ HTTP verb used to access this page is not allowed.\r\n\r\n\r\n\r\n

Server Error

\r\ + \n
\r\n
\r\n\ + \

405 - HTTP verb used to access this page is not allowed.

\r\n \ + \

The page you are looking for cannot be displayed because an invalid\ + \ method (HTTP verb) was used to attempt access.

\r\n
\r\ + \n
\r\n\r\n\r\n"} + headers: + access-control-allow-origin: ['*'] + allow: ['GET, HEAD, OPTIONS, TRACE'] + content-length: ['1293'] + content-type: [text/html] + date: ['Mon, 28 Mar 2016 02:36:54 GMT'] + server: [GBSHouse/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains; preload;] + x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] + x-powered-by: [Rage4] + status: {code: 405, message: Method Not Allowed} +version: 1 diff --git a/tests/providers/test_rage4.py b/tests/providers/test_rage4.py new file mode 100644 index 000000000..a1b03b516 --- /dev/null +++ b/tests/providers/test_rage4.py @@ -0,0 +1,20 @@ +# Test for one implementation of the interface +from lexicon.providers.rage4 import Provider +from integration_tests import IntegrationTests +from unittest import TestCase +import pytest + +# Hook into testing framework by inheriting unittest.TestCase and reuse +# the tests which *each and every* implementation of the interface must +# pass, by inheritance from define_tests.TheTests +class Ns1ProviderTests(TestCase, IntegrationTests): + + Provider = Provider + provider_name = 'rage4' + domain = 'capsulecd.com' + def _filter_headers(self): + return ['Authorization'] + + @pytest.mark.skip(reason="update requires type to be specified for this provider") + def test_Provider_when_calling_update_record_with_full_name_should_modify_record(self): + return \ No newline at end of file From fe295e2c2f1ceb586c683e2651da4df6acb52291 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 27 Mar 2016 20:19:05 -0700 Subject: [PATCH 2/5] removed buddydns, moved rage4 up to completed providers. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c9bec021..bce6f9bc5 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ There is an included example Dockerfile that can be used to automatically genera - [x] Create and Register a lexicon pip package. - [ ] Write documentation on supported environmental variables. - [ ] Wire up automated release packaging on PRs. -- [ ] Check for additional dns hosts with apis (from [fog](http://fog.io/about/provider_documentation.html), [dnsperf](http://www.dnsperf.com/)) +- [ ] Check for additional dns hosts with apis (from [fog](http://fog.io/about/provider_documentation.html)) ## Contributing Changes. If the DNS provider you use is not already available, please consider contributing by opening a pull request. From 7d767f6533705bb29c58ba9b7d225f8caa67d56c Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 29 Mar 2016 23:48:30 -0700 Subject: [PATCH 3/5] update rage4 with new testsuite. --- .../test_Provider_authenticate.yaml | 2 +- ...ate_with_unmanaged_domain_should_fail.yaml | 2 +- ...ord_for_A_with_valid_name_and_content.yaml | 6 +- ...for_CNAME_with_valid_name_and_content.yaml | 6 +- ...rd_for_TXT_with_fqdn_name_and_content.yaml | 8 +- ...rd_for_TXT_with_full_name_and_content.yaml | 8 +- ...d_for_TXT_with_valid_name_and_content.yaml | 6 +- ...record_by_filter_should_remove_record.yaml | 26 ++-- ...r_with_fqdn_name_should_remove_record.yaml | 18 +-- ...r_with_full_name_should_remove_record.yaml | 18 +-- ...rd_by_identifier_should_remove_record.yaml | 26 ++-- ...fqdn_name_filter_should_return_record.yaml | 16 +-- ...full_name_filter_should_return_record.yaml | 10 +- ...with_name_filter_should_return_record.yaml | 10 +- ...rds_with_no_arguments_should_list_all.yaml | 8 +- ...ng_update_record_should_modify_record.yaml | 99 --------------- ...d_with_fqdn_name_should_modify_record.yaml | 16 +-- ...d_with_full_name_should_modify_record.yaml | 115 ------------------ tests/providers/test_rage4.py | 6 +- 19 files changed, 98 insertions(+), 308 deletions(-) delete mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml delete mode 100644 tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml index dee09c7f6..70c680d8a 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:15:11 GMT'] + date: ['Wed, 30 Mar 2016 06:39:15 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml index b4a6d7469..ecc9e8dbd 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_authenticate_with_unmanaged_domain_should_fail.yaml @@ -18,7 +18,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['84'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:14:17 GMT'] + date: ['Wed, 30 Mar 2016 06:39:16 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml index 890d2b551..2e9f489c5 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:16:39 GMT'] + date: ['Wed, 30 Mar 2016 06:39:23 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=127.0.0.1&type=A&id=57039&name=localhost.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952199,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954621,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:15:49 GMT'] + date: ['Wed, 30 Mar 2016 06:39:43 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml index eab441efb..157f8ba77 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:15:45 GMT'] + date: ['Wed, 30 Mar 2016 06:39:24 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=docs.example.com&type=CNAME&id=57039&name=docs.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952201,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954623,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:16:45 GMT'] + date: ['Wed, 30 Mar 2016 06:39:38 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml index 905bbdf8d..e86a7e586 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:16:39 GMT'] + date: ['Wed, 30 Mar 2016 06:39:18 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -33,15 +33,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.www.capsulecd.com + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.fqdn.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952205,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954625,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:16:43 GMT'] + date: ['Wed, 30 Mar 2016 06:39:45 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml index 0b0f0095e..48be6989d 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:17:34 GMT'] + date: ['Wed, 30 Mar 2016 06:39:25 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -33,15 +33,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.subdomain.capsulecd.com + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.full.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952207,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954627,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:17:38 GMT'] + date: ['Wed, 30 Mar 2016 06:39:39 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml index f1c5dfa3b..2de5cd25e 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:16:41 GMT'] + date: ['Wed, 30 Mar 2016 06:39:20 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=_acme-challenge.test.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952203,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954629,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:15:51 GMT'] + date: ['Wed, 30 Mar 2016 06:39:47 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml index b8c562e97..dfa2f2ba0 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_should_remove_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:19 GMT'] + date: ['Wed, 30 Mar 2016 06:39:27 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -33,15 +33,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.test.capsulecd.com + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfilt.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952439,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954631,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:02:28 GMT'] + date: ['Wed, 30 Mar 2016 06:39:42 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -57,22 +57,22 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfilt.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952439,"name":"delete.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954631,"name":"delete.testfilt.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] - content-length: ['349'] + content-length: ['353'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:25 GMT'] + date: ['Wed, 30 Mar 2016 06:39:59 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] x-powered-by: [Rage4] status: {code: 200, message: OK} - request: - body: '{"id": 1952439}' + body: '{"id": 1954631}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -83,13 +83,13 @@ interactions: method: POST uri: https://rage4.com/rapi/deleterecord/ response: - body: {string: !!python/unicode '{"status":true,"id":1952439,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954631,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:02:35 GMT'] + date: ['Wed, 30 Mar 2016 06:40:08 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -105,7 +105,7 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfilt.capsulecd.com response: body: {string: !!python/unicode '[]'} headers: @@ -113,7 +113,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['2'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:31 GMT'] + date: ['Wed, 30 Mar 2016 06:40:17 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml index 3aa3d40d5..a773c79a6 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:46 GMT'] + date: ['Wed, 30 Mar 2016 06:39:21 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfqdn.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952441,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954633,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:04 GMT'] + date: ['Wed, 30 Mar 2016 06:39:48 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -59,20 +59,20 @@ interactions: method: GET uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfqdn.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952441,"name":"delete.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954633,"name":"delete.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['353'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:07 GMT'] + date: ['Wed, 30 Mar 2016 06:39:54 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] x-powered-by: [Rage4] status: {code: 200, message: OK} - request: - body: '{"id": 1952441}' + body: '{"id": 1954633}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -83,13 +83,13 @@ interactions: method: POST uri: https://rage4.com/rapi/deleterecord/ response: - body: {string: !!python/unicode '{"status":true,"id":1952441,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954633,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:12 GMT'] + date: ['Wed, 30 Mar 2016 06:40:03 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -113,7 +113,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['2'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:04:09 GMT'] + date: ['Wed, 30 Mar 2016 06:40:11 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml index e4de19006..688fddf81 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:02:53 GMT'] + date: ['Wed, 30 Mar 2016 06:39:28 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testfull.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952443,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954635,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:59 GMT'] + date: ['Wed, 30 Mar 2016 06:39:50 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -59,20 +59,20 @@ interactions: method: GET uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testfull.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952443,"name":"delete.testfull.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954635,"name":"delete.testfull.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['353'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:04:03 GMT'] + date: ['Wed, 30 Mar 2016 06:40:01 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] x-powered-by: [Rage4] status: {code: 200, message: OK} - request: - body: '{"id": 1952443}' + body: '{"id": 1954635}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -83,13 +83,13 @@ interactions: method: POST uri: https://rage4.com/rapi/deleterecord/ response: - body: {string: !!python/unicode '{"status":true,"id":1952443,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954635,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:13 GMT'] + date: ['Wed, 30 Mar 2016 06:40:10 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -113,7 +113,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['2'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:16 GMT'] + date: ['Wed, 30 Mar 2016 06:40:18 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml index 14cf7a1b9..bd5dce294 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_delete_record_by_identifier_should_remove_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:02:48 GMT'] + date: ['Wed, 30 Mar 2016 06:39:23 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -33,15 +33,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.test.capsulecd.com + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=delete.testid.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952437,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954637,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:01:57 GMT'] + date: ['Wed, 30 Mar 2016 06:39:45 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -57,22 +57,22 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testid.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952437,"name":"delete.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954637,"name":"delete.testid.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] - content-length: ['349'] + content-length: ['351'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:02:54 GMT'] + date: ['Wed, 30 Mar 2016 06:39:56 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] x-powered-by: [Rage4] status: {code: 200, message: OK} - request: - body: '{"id": 1952437}' + body: '{"id": 1954637}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -83,13 +83,13 @@ interactions: method: POST uri: https://rage4.com/rapi/deleterecord/ response: - body: {string: !!python/unicode '{"status":true,"id":1952437,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954637,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:02:03 GMT'] + date: ['Wed, 30 Mar 2016 06:40:05 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -105,7 +105,7 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.test.capsulecd.com + uri: https://rage4.com/rapi/getrecords/?id=57039&name=delete.testid.capsulecd.com response: body: {string: !!python/unicode '[]'} headers: @@ -113,7 +113,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['2'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 03:03:01 GMT'] + date: ['Wed, 30 Mar 2016 06:40:13 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml index b6b8b7f1a..6c091439f 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:25:52 GMT'] + date: ['Wed, 30 Mar 2016 06:39:30 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -33,15 +33,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.test.capsulecd.com + uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.fqdntest.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952223,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954639,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:25:00 GMT'] + date: ['Wed, 30 Mar 2016 06:39:52 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -57,15 +57,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.test.capsulecd.com + uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.fqdntest.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952223,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954639,"name":"random.fqdntest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] - content-length: ['349'] + content-length: ['353'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:25:03 GMT'] + date: ['Wed, 30 Mar 2016 06:40:03 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml index 72d322475..d61785c5a 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:23:51 GMT'] + date: ['Wed, 30 Mar 2016 06:39:25 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.fulltest.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952219,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954641,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:24:48 GMT'] + date: ['Wed, 30 Mar 2016 06:39:47 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -59,13 +59,13 @@ interactions: method: GET uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.fulltest.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952219,"name":"random.fulltest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954641,"name":"random.fulltest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['353'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:23:56 GMT'] + date: ['Wed, 30 Mar 2016 06:39:57 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml index a7ae54486..e14b394af 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_name_filter_should_return_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:24:22 GMT'] + date: ['Wed, 30 Mar 2016 06:39:31 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=random.test.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952217,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954643,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:24:27 GMT'] + date: ['Wed, 30 Mar 2016 06:39:54 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -59,13 +59,13 @@ interactions: method: GET uri: https://rage4.com/rapi/getrecords/?id=57039&name=random.test.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952217,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954643,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['349'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:24:30 GMT'] + date: ['Wed, 30 Mar 2016 06:40:04 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml index fb1fca111..5286ef04f 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_list_records_with_no_arguments_should_list_all.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:23:30 GMT'] + date: ['Wed, 30 Mar 2016 06:39:26 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -36,13 +36,13 @@ interactions: uri: https://rage4.com/rapi/getrecords/?id=57039 response: body: {string: !!python/unicode '[{"id":1952177,"name":"capsulecd.com","content":"ns1.r4ns.com","type":"NS","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952179,"name":"capsulecd.com","content":"ns2.r4ns.net","type":"NS","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952181,"name":"capsulecd.com","content":"ns1.r4ns.com - lexicon.mailinator.com 1459131867 10800 3600 604800 3600","type":"SOA","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1952217,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + lexicon.mailinator.com 1459319994 10800 3600 604800 3600","type":"SOA","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954621,"name":"localhost.capsulecd.com","content":"127.0.0.1","type":"A","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954623,"name":"docs.capsulecd.com","content":"docs.example.com","type":"CNAME","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954625,"name":"_acme-challenge.fqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954627,"name":"_acme-challenge.full.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954629,"name":"_acme-challenge.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954631,"name":"delete.testfilt.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954633,"name":"delete.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954635,"name":"delete.testfull.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954637,"name":"delete.testid.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954639,"name":"random.fqdntest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954641,"name":"random.fulltest.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null},{"id":1954643,"name":"random.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] - content-length: ['1406'] + content-length: ['5271'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:23:33 GMT'] + date: ['Wed, 30 Mar 2016 06:39:48 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml deleted file mode 100644 index e55cfde6b..000000000 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_should_modify_record.yaml +++ /dev/null @@ -1,99 +0,0 @@ -interactions: -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: GET - uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com - response: - body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['157'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:32:35 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.test.capsulecd.com - response: - body: {string: !!python/unicode '{"status":true,"id":1952259,"error":""}'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['39'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:33:33 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.test.capsulecd.com - response: - body: {string: !!python/unicode '[{"id":1952259,"name":"orig.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['347'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:32:42 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: PUT - uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1952259&name=updated.test.capsulecd.com - response: - body: {string: !!python/unicode '{"status":true,"id":1952259,"error":""}'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['39'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:33:06 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - transfer-encoding: [chunked] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml index 7db0769ba..1e7a64399 100644 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml +++ b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml @@ -17,7 +17,7 @@ interactions: cache-control: ['private, s-maxage=0'] content-length: ['157'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:36:42 GMT'] + date: ['Wed, 30 Mar 2016 06:39:27 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -35,13 +35,13 @@ interactions: method: POST uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.testfqdn.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952273,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954647,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:36:46 GMT'] + date: ['Wed, 30 Mar 2016 06:39:50 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -59,13 +59,13 @@ interactions: method: GET uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.testfqdn.capsulecd.com response: - body: {string: !!python/unicode '[{"id":1952273,"name":"orig.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} + body: {string: !!python/unicode '[{"id":1954647,"name":"orig.testfqdn.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['351'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:35:55 GMT'] + date: ['Wed, 30 Mar 2016 06:39:59 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] @@ -81,15 +81,15 @@ interactions: Content-Type: [application/json] User-Agent: [python-requests/2.9.1] method: PUT - uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1952273&name=updated.testfqdn.capsulecd.com + uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1954647&name=updated.testfqdn.capsulecd.com response: - body: {string: !!python/unicode '{"status":true,"id":1952273,"error":""}'} + body: {string: !!python/unicode '{"status":true,"id":1954647,"error":""}'} headers: access-control-allow-origin: ['*'] cache-control: ['private, s-maxage=0'] content-length: ['39'] content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:35:59 GMT'] + date: ['Wed, 30 Mar 2016 06:40:07 GMT'] server: [GBSHouse/2.0] strict-transport-security: [max-age=31536000; includeSubDomains; preload;] transfer-encoding: [chunked] diff --git a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml deleted file mode 100644 index 1cd92aaa7..000000000 --- a/tests/fixtures/cassettes/rage4/IntegrationTests/test_Provider_when_calling_update_record_with_full_name_should_modify_record.yaml +++ /dev/null @@ -1,115 +0,0 @@ -interactions: -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: GET - uri: https://rage4.com/rapi/getdomainbyname/?name=capsulecd.com - response: - body: {string: !!python/unicode '{"id":57039,"name":"capsulecd.com","owner_email":"lexicon@mailinator.com","type":0,"subnet_mask":0,"default_ns1":"ns1.r4ns.com","default_ns2":"ns2.r4ns.net"}'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['157'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:35:48 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: POST - uri: https://rage4.com/rapi/createrecord/?content=challengetoken&type=TXT&id=57039&name=orig.test.capsulecd.com - response: - body: {string: !!python/unicode '{"status":true,"id":1952275,"error":""}'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['39'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:35:53 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: GET - uri: https://rage4.com/rapi/getrecords/?id=57039&name=orig.test.capsulecd.com - response: - body: {string: !!python/unicode '[{"id":1952275,"name":"orig.test.capsulecd.com","content":"challengetoken","type":"TXT","ttl":3600,"priority":1,"domain_id":57039,"geo_region_id":0,"geo_lat":0.0,"geo_long":0.0,"failover_enabled":false,"failover_active":false,"failover_content":null,"failover_withdraw":false,"webhook_id":-1,"is_active":true,"udp_limit":false,"description":null}]'} - headers: - access-control-allow-origin: ['*'] - cache-control: ['private, s-maxage=0'] - content-length: ['347'] - content-type: [text/plain; charset=utf-8] - date: ['Mon, 28 Mar 2016 02:36:51 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['2'] - Content-Type: [application/json] - User-Agent: [python-requests/2.9.1] - method: PUT - uri: https://rage4.com/rapi/updaterecord/?content=challengetoken&id=1952275&name=updated.test.capsulecd.com - response: - body: {string: !!python/unicode "\r\n\ - \r\n\r\n\r\n405 -\ - \ HTTP verb used to access this page is not allowed.\r\n\r\n\r\n\r\n

Server Error

\r\ - \n
\r\n
\r\n\ - \

405 - HTTP verb used to access this page is not allowed.

\r\n \ - \

The page you are looking for cannot be displayed because an invalid\ - \ method (HTTP verb) was used to attempt access.

\r\n
\r\ - \n
\r\n\r\n\r\n"} - headers: - access-control-allow-origin: ['*'] - allow: ['GET, HEAD, OPTIONS, TRACE'] - content-length: ['1293'] - content-type: [text/html] - date: ['Mon, 28 Mar 2016 02:36:54 GMT'] - server: [GBSHouse/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains; preload;] - x-frame-options: ['ALLOW-FROM https://www.google.com/maps/d/embed?mid=zuJ4aNyO7vT4.kxxuYpgxSxwo'] - x-powered-by: [Rage4] - status: {code: 405, message: Method Not Allowed} -version: 1 diff --git a/tests/providers/test_rage4.py b/tests/providers/test_rage4.py index a1b03b516..736eb1aec 100644 --- a/tests/providers/test_rage4.py +++ b/tests/providers/test_rage4.py @@ -7,7 +7,7 @@ # Hook into testing framework by inheriting unittest.TestCase and reuse # the tests which *each and every* implementation of the interface must # pass, by inheritance from define_tests.TheTests -class Ns1ProviderTests(TestCase, IntegrationTests): +class Rage4ProviderTests(TestCase, IntegrationTests): Provider = Provider provider_name = 'rage4' @@ -17,4 +17,8 @@ def _filter_headers(self): @pytest.mark.skip(reason="update requires type to be specified for this provider") def test_Provider_when_calling_update_record_with_full_name_should_modify_record(self): + return + + @pytest.mark.skip(reason="update requires type to be specified for this provider") + def test_Provider_when_calling_update_record_should_modify_record(self): return \ No newline at end of file From 6b1421a1decbb7d118d0bcf32e9e163b625befd6 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 29 Mar 2016 23:50:52 -0700 Subject: [PATCH 4/5] update with dnsperf link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bce6f9bc5..3c9bec021 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ There is an included example Dockerfile that can be used to automatically genera - [x] Create and Register a lexicon pip package. - [ ] Write documentation on supported environmental variables. - [ ] Wire up automated release packaging on PRs. -- [ ] Check for additional dns hosts with apis (from [fog](http://fog.io/about/provider_documentation.html)) +- [ ] Check for additional dns hosts with apis (from [fog](http://fog.io/about/provider_documentation.html), [dnsperf](http://www.dnsperf.com/)) ## Contributing Changes. If the DNS provider you use is not already available, please consider contributing by opening a pull request. From 1c76cf0405f4aae7a7edefff4b0c967334b6fcde Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 29 Mar 2016 23:51:35 -0700 Subject: [PATCH 5/5] move rage4 into supported providers list. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c9bec021..4fd42cc38 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ The current supported providers are: - EasyDNS ([docs](http://docs.sandbox.rest.easydns.net/)) - NS1 ([docs](https://ns1.com/api/)) - PointHQ ([docs](https://pointhq.com/api/docs)) +- Rage4 ([docs](https://gbshouse.uservoice.com/knowledgebase/articles/109834-rage4-dns-developers-api)) + Potential providers are as follows. If you would like to contribute one, please open a pull request. @@ -38,7 +40,6 @@ Potential providers are as follows. If you would like to contribute one, please - OnApp DNS ([docs](https://docs.onapp.com/display/3api/DNS+Zones)) - PowerDNS ([docs](https://doc.powerdns.com/md/httpapi/api_spec/)) - Rackspace ([docs](https://developer.rackspace.com/docs/cloud-dns/v1/developer-guide/)) -- Rage4 ([docs](https://gbshouse.uservoice.com/knowledgebase/articles/109834-rage4-dns-developers-api)) - Transip ([docs](https://www.transip.nl/transip/api/)) - UltraDNS ([docs](https://restapi.ultradns.com/v1/docs)) - Yandex ([docs](https://tech.yandex.com/domain/doc/reference/dns-add-docpage/))