libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami commented on a change in pull request #1464: [WIP] Support for managing CAA record types
Date Mon, 01 Jun 2020 15:07:52 GMT

Kami commented on a change in pull request #1464:
URL: https://github.com/apache/libcloud/pull/1464#discussion_r433291199



##########
File path: libcloud/dns/drivers/cloudflare.py
##########
@@ -415,6 +434,36 @@ def ex_enable_ipv6_support(self, zone):
     def ex_disable_ipv6_support(self, zone):
         raise NotImplementedError('not yet implemented in v4 driver')
 
+    def _normalize_record_data_for_api(self, type, data):
+        """
+        Normalize record data for "special" records such as CAA so it can be
+        used with the CloudFlare API.
+        """
+        if not data:
+            return data
+
+        if type == RecordType.CAA:
+            # Replace whitespace with \t character which CloudFlare API
+            # expects
+            data = data.replace(' ', '\t')

Review comment:
       I decided to have CloudFlare driver use whitespace as a separator since it appears
most of the providers use that and not tab which is used by CloudFlare.
   
   This way it will be consistent format across all the drivers.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message