Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for value-domain.com #1018

Merged
merged 8 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ lexicon/providers/softlayer.py @adherzog
lexicon/providers/subreg.py @oldium
lexicon/providers/transip.py @LordGaav @yorickvP
lexicon/providers/ultradns.py @abligh
lexicon/providers/valuedomain.py @wak109
lexicon/providers/vercel.py @adferrand
lexicon/providers/vultr.py @analogj
lexicon/providers/yandex.py @kharkevich
Expand Down
500 changes: 500 additions & 0 deletions lexicon/providers/valuedomain.py

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions lexicon/tests/providers/test_valuedomain.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Test for valuedomain implementation of the interface."""
from unittest import TestCase
from lexicon.tests.providers.integration_tests import IntegrationTestsV2

# Hook into testing framework by inheriting unittest.TestCase and reuse
# the tests which *each and every* implementation of the interface must
# pass, by inheritance from integration_tests.IntegrationTests


class ValueDomainProviderTests(TestCase, IntegrationTestsV2):
"""Integration tests for value-domain provider"""
provider_name = 'valuedomain'
domain = 'canadian-wisteria.net'

def _filter_post_data_parameters(self):
return ['login_token']

def _filter_headers(self):
return ['Authorization']

def _filter_query_parameters(self):
return ['secret_key']

def _filter_response(self, response):
"""See `IntegrationTests._filter_response` for more information on how
to filter the provider response."""
return response
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
interactions:
- request:
body: null
headers:
Cache-Control:
- no-cache, no-store
Connection:
- close
Host:
- api.value-domain.com
User-Agent:
- curl/7.74.0
method: GET
uri: https://api.value-domain.com/v1/domains
response:
body:
string: '{"paging":{"max":1,"limit":10,"page":1},"results":[{"domainid":2623680,"domainname":"canadian-wisteria.net","registrar":"ENOM","expirationdate":"2023-10-13","autorenew":0,"autorenew_all":0,"autorenew_domain":0}],"request_id":"202111151919435616150311570V","request":{"path":"\/v1\/domains","method":"GET","params":[]}}'
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 6ae7be2bec87e23f-SIN
Connection:
- close
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Nov 2021 10:19:43 GMT
Expect-CT:
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server:
- cloudflare
Set-Cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
Strict-Transport-Security:
- max-age=15552000; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443";
ma=86400
set-cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
interactions:
- request:
body: null
headers:
Cache-Control:
- no-cache, no-store
Connection:
- close
Host:
- api.value-domain.com
User-Agent:
- curl/7.74.0
method: GET
uri: https://api.value-domain.com/v1/domains
response:
body:
string: '{"paging":{"max":1,"limit":10,"page":1},"results":[{"domainid":2623680,"domainname":"canadian-wisteria.net","registrar":"ENOM","expirationdate":"2023-10-13","autorenew":0,"autorenew_all":0,"autorenew_domain":0}],"request_id":"202111151919448202180311570V","request":{"path":"\/v1\/domains","method":"GET","params":[]}}'
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 6ae7be2f79406bab-SIN
Connection:
- close
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Nov 2021 10:19:44 GMT
Expect-CT:
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server:
- cloudflare
Set-Cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
Strict-Transport-Security:
- max-age=15552000; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443";
ma=86400
set-cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
interactions:
- request:
body: null
headers:
Cache-Control:
- no-cache, no-store
Connection:
- close
Host:
- api.value-domain.com
User-Agent:
- curl/7.74.0
method: GET
uri: https://api.value-domain.com/v1/domains
response:
body:
string: '{"paging":{"max":1,"limit":10,"page":1},"results":[{"domainid":2623680,"domainname":"canadian-wisteria.net","registrar":"ENOM","expirationdate":"2023-10-13","autorenew":0,"autorenew_all":0,"autorenew_domain":0}],"request_id":"202111151919444420590311570V","request":{"path":"\/v1\/domains","method":"GET","params":[]}}'
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 6ae7be330c89d9cc-SIN
Connection:
- close
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Nov 2021 10:19:44 GMT
Expect-CT:
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server:
- cloudflare
Set-Cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
Strict-Transport-Security:
- max-age=15552000; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443";
ma=86400
set-cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
status:
code: 200
message: OK
- request:
body: null
headers:
Cache-Control:
- no-cache, no-store
Connection:
- close
Host:
- api.value-domain.com
User-Agent:
- curl/7.74.0
method: GET
uri: https://api.value-domain.com/v1/domains/canadian-wisteria.net/dns
response:
body:
string: '{"results":{"domainid":2623680,"domainname":"canadian-wisteria.net","ns_type":"valuedomain1","records":"a
* 60.71.198.145\na localhost 127.0.0.1\ncname docs docs.example.com\ntxt _acme-challenge.fqdn
challengetoken\ntxt _acme-challenge.full challengetoken\ntxt _acme-challenge.test
challengetoken\ntxt _acme-challenge.createrecordset challengetoken1\ntxt _acme-challenge.createrecordset
challengetoken2\ntxt _acme-challenge.noop challengetoken\ntxt _acme-challenge.deleterecordinset
challengetoken2\ntxt _acme-challenge.listrecordset challengetoken1\ntxt _acme-challenge.listrecordset
challengetoken2\ntxt random.fqdntest challengetoken\ntxt random.fulltest challengetoken\ntxt
random.test challengetoken\ntxt updated.test challengetoken\ntxt orig.nameonly.test
challengetoken\ntxt updated.testfqdn challengetoken\ntxt updated.testfull
challengetoken\ntxt updated.test challengetoken\ntxt updated.testfqdn challengetoken\ntxt
updated.testfull challengetoken","ttl":"600"},"request_id":"202111151919457279030311570V","request":{"path":"\/v1\/domains\/canadian-wisteria.net\/dns","method":"GET","params":[]}}'
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 6ae7be3729024dbc-SIN
Connection:
- close
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Nov 2021 10:19:45 GMT
Expect-CT:
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server:
- cloudflare
Set-Cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
Strict-Transport-Security:
- max-age=15552000; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443";
ma=86400
set-cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
interactions:
- request:
body: null
headers:
Cache-Control:
- no-cache, no-store
Connection:
- close
Host:
- api.value-domain.com
User-Agent:
- curl/7.74.0
method: GET
uri: https://api.value-domain.com/v1/domains
response:
body:
string: '{"paging":{"max":1,"limit":10,"page":1},"results":[{"domainid":2623680,"domainname":"canadian-wisteria.net","registrar":"ENOM","expirationdate":"2023-10-13","autorenew":0,"autorenew_all":0,"autorenew_domain":0}],"request_id":"202111151919459952360311570V","request":{"path":"\/v1\/domains","method":"GET","params":[]}}'
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 6ae7be3b2f094b98-SIN
Connection:
- close
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Nov 2021 10:19:46 GMT
Expect-CT:
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server:
- cloudflare
Set-Cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
Strict-Transport-Security:
- max-age=15552000; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443";
ma=86400
set-cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
status:
code: 200
message: OK
- request:
body: null
headers:
Cache-Control:
- no-cache, no-store
Connection:
- close
Host:
- api.value-domain.com
User-Agent:
- curl/7.74.0
method: GET
uri: https://api.value-domain.com/v1/domains/canadian-wisteria.net/dns
response:
body:
string: '{"results":{"domainid":2623680,"domainname":"canadian-wisteria.net","ns_type":"valuedomain1","records":"a
* 60.71.198.145\na localhost 127.0.0.1\ncname docs docs.example.com\ntxt _acme-challenge.fqdn
challengetoken\ntxt _acme-challenge.full challengetoken\ntxt _acme-challenge.test
challengetoken\ntxt _acme-challenge.createrecordset challengetoken1\ntxt _acme-challenge.createrecordset
challengetoken2\ntxt _acme-challenge.noop challengetoken\ntxt _acme-challenge.deleterecordinset
challengetoken2\ntxt _acme-challenge.listrecordset challengetoken1\ntxt _acme-challenge.listrecordset
challengetoken2\ntxt random.fqdntest challengetoken\ntxt random.fulltest challengetoken\ntxt
random.test challengetoken\ntxt updated.test challengetoken\ntxt orig.nameonly.test
challengetoken\ntxt updated.testfqdn challengetoken\ntxt updated.testfull
challengetoken\ntxt updated.test challengetoken\ntxt updated.testfqdn challengetoken\ntxt
updated.testfull challengetoken","ttl":"600"},"request_id":"202111151919467316210311570V","request":{"path":"\/v1\/domains\/canadian-wisteria.net\/dns","method":"GET","params":[]}}'
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 6ae7be3ebe5649d8-SIN
Connection:
- close
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 15 Nov 2021 10:19:46 GMT
Expect-CT:
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server:
- cloudflare
Set-Cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
Strict-Transport-Security:
- max-age=15552000; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
alt-svc:
- h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443";
ma=86400
set-cookie:
- u=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- s=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None; secure
- ss=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; SameSite=None;
secure
status:
code: 200
message: OK
version: 1
Loading