Repository: AnalogJ/lexicon

Issue:
Dreamhost integration will break November 2nd, 2021
It looks like Dreamhost is "retiring" some of it's API calls Nov 2nd, including `domain-list_domains` which Lexicon seems to use for validating the domain during initial auth:

https://help.dreamhost.com/hc/en-us/articles/217555767-Domain-API-commands

https://github.com/AnalogJ/lexicon/blob/db82a948febee04972bb648ac59471b292c7e394/lexicon/providers/dreamhost.py#L103

They have begin sending email to anyone using the API:

> The following API commands were run on your account in the last thirty days and will no longer function after November 2nd:
> - domain-list_domains


Discussion:

Resolving patch:
diff --git a/lexicon/providers/dreamhost.py b/lexicon/providers/dreamhost.py
--- a/lexicon/providers/dreamhost.py
+++ b/lexicon/providers/dreamhost.py
@@ -100,14 +100,15 @@ def _record_to_dreamhost_record(record):
 
     def _authenticate(self):
         self.domain_id = None
-        payload = self._get("domain-list_domains")
+        payload = self._get("dns-list_records")
         data = payload.get("data", None)
         if data is None:
             raise AuthenticationError("Domain not found")
 
-        for domain in data:
-            if domain.get("domain", "") == self.domain:
+        for record in data:
+            if record.get("record", "") == self.domain and record.get("type", "") in ["A", "AAAA"]:
                 self.domain_id = self.domain
+                break
         if self.domain_id is None:
             raise AuthenticationError("Domain not found")
 


Test patch:
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_authenticate_with_unmanaged_domain_should_fail.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_A_with_valid_name_and_content.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com","AXFR_IPS":"none","TTL_SEC":0,"DOMAINID":1047330,"SOA_EMAIL":"trinopoty@hotmail.com","EXPIRE_SEC":0,"RETRY_SEC":0,"STATUS":1,"DESCRIPTION":"","LPM_DISPLAYGROUP":"","REFRESH_SEC":0,"MASTER_IPS":"","TYPE":"master"}],"ERRORARRAY":[]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_CNAME_with_valid_name_and_content.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com","AXFR_IPS":"none","TTL_SEC":0,"DOMAINID":1047330,"SOA_EMAIL":"trinopoty@hotmail.com","EXPIRE_SEC":0,"RETRY_SEC":0,"STATUS":1,"DESCRIPTION":"","LPM_DISPLAYGROUP":"","REFRESH_SEC":0,"MASTER_IPS":"","TYPE":"master"}],"ERRORARRAY":[]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_fqdn_name_and_content.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com","AXFR_IPS":"none","TTL_SEC":0,"DOMAINID":1047330,"SOA_EMAIL":"trinopoty@hotmail.com","EXPIRE_SEC":0,"RETRY_SEC":0,"STATUS":1,"DESCRIPTION":"","LPM_DISPLAYGROUP":"","REFRESH_SEC":0,"MASTER_IPS":"","TYPE":"master"}],"ERRORARRAY":[]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_full_name_and_content.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com","AXFR_IPS":"none","TTL_SEC":0,"DOMAINID":1047330,"SOA_EMAIL":"trinopoty@hotmail.com","EXPIRE_SEC":0,"RETRY_SEC":0,"STATUS":1,"DESCRIPTION":"","LPM_DISPLAYGROUP":"","REFRESH_SEC":0,"MASTER_IPS":"","TYPE":"master"}],"ERRORARRAY":[]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_for_TXT_with_valid_name_and_content.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com","AXFR_IPS":"none","TTL_SEC":0,"DOMAINID":1047330,"SOA_EMAIL":"trinopoty@hotmail.com","EXPIRE_SEC":0,"RETRY_SEC":0,"STATUS":1,"DESCRIPTION":"","LPM_DISPLAYGROUP":"","REFRESH_SEC":0,"MASTER_IPS":"","TYPE":"master"}],"ERRORARRAY":[]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_multiple_times_should_create_record_set.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_create_record_with_duplicate_records_should_be_noop.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_should_remove_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_fqdn_name_should_remove_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_filter_with_full_name_should_remove_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_by_identifier_should_remove_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_by_content_should_leave_others_untouched.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_delete_record_with_record_set_name_remove_all.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_should_handle_record_sets.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_fqdn_name_filter_should_return_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_full_name_filter_should_return_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_invalid_filter_should_be_empty_list.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_name_filter_should_return_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_list_records_with_no_arguments_should_list_all.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_should_modify_record_name_specified.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_fqdn_name_should_modify_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]
diff --git a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml
--- a/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml
+++ b/tests/fixtures/cassettes/dreamhost/IntegrationTests/test_provider_when_calling_update_record_with_full_name_should_modify_record.yaml
@@ -9,9 +9,9 @@ interactions:
       Content-Type: [application/json]
       User-Agent: [python-requests/2.18.4]
     method: GET
-    uri: https://api.dreamhost.com/?cmd=domain-list_domains&format=json
+    uri: https://api.dreamhost.com/?cmd=dns-list_records&format=json
   response:
-    body: {string: !!python/unicode '{"result":"success","data":[{"domain":"lexicon-example.com"}]}'}
+    body: {string: !!python/unicode '{"result":"success","data":[{"type":"A","record":"lexicon-example.com"}]}'}
     headers:
       access-control-allow-origin: ['*']
       connection: [keep-alive]