You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2016/07/10 10:06:16 UTC

[1/2] libcloud git commit: auroradns: Change valid record types and implement listing

Repository: libcloud
Updated Branches:
  refs/heads/trunk 8048cefeb -> 0f9393a96


auroradns: Change valid record types and implement listing

This commit changes the supported record types by Aurora DNS and it also
supports listing the valid record types.

It merely returns the keys of the RECORD_TYPE_MAP dict which is already
available. In the future Aurora DNS should return this in a API call
so this is no longer a static dictionary.

This dict also contained a type 'SPF', which is not valid. SPF records
are defined as TXT records in DNS. Remove this from the list of valid
record types.

Further it adds support for the SSHFP, DS, TLSA and PTR type since
they are also supported.

Also add tests to verify if this functions returns the proper values

Closes #834

Signed-off-by: Tomaz Muraus <to...@tomaz.me>


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/856b5be2
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/856b5be2
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/856b5be2

Branch: refs/heads/trunk
Commit: 856b5be20a64eb45417489b3d436bf9148888368
Parents: 8048cef
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Sat Jul 2 19:02:11 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Sun Jul 10 11:57:45 2016 +0200

----------------------------------------------------------------------
 libcloud/dns/drivers/auroradns.py   | 12 +++++++++++-
 libcloud/test/dns/test_auroradns.py | 16 ++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/856b5be2/libcloud/dns/drivers/auroradns.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/auroradns.py b/libcloud/dns/drivers/auroradns.py
index eb8a994..7e705be 100644
--- a/libcloud/dns/drivers/auroradns.py
+++ b/libcloud/dns/drivers/auroradns.py
@@ -250,9 +250,12 @@ class AuroraDNSDriver(DNSDriver):
         RecordType.MX: 'MX',
         RecordType.NS: 'NS',
         RecordType.SOA: 'SOA',
-        RecordType.SPF: 'SPF',
         RecordType.SRV: 'SRV',
         RecordType.TXT: 'TXT',
+        RecordType.DS: 'DS',
+        RecordType.PTR: 'PTR',
+        RecordType.SSHFP: 'SSHFP',
+        RecordType.TLSA: 'TLSA'
     }
 
     HEALTHCHECK_TYPE_MAP = {
@@ -337,6 +340,13 @@ class AuroraDNSDriver(DNSDriver):
                                 method='DELETE')
         return True
 
+    def list_record_types(self):
+        types = []
+        for record_type in self.RECORD_TYPE_MAP.keys():
+            types.append(record_type)
+
+        return types
+
     def update_record(self, record, name, type, data, extra=None):
         rdata = {}
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/856b5be2/libcloud/test/dns/test_auroradns.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_auroradns.py b/libcloud/test/dns/test_auroradns.py
index 6855f89..5f48169 100644
--- a/libcloud/test/dns/test_auroradns.py
+++ b/libcloud/test/dns/test_auroradns.py
@@ -87,6 +87,22 @@ class AuroraDNSDriverTests(LibcloudTestCase):
         self.assertEqual(zone, record.zone)
         self.assertEqual(self.driver, record.driver)
 
+    def test_record_types(self):
+        types = self.driver.list_record_types()
+        self.assertEqual(len(types), 12)
+        self.assertTrue(RecordType.A in types)
+        self.assertTrue(RecordType.AAAA in types)
+        self.assertTrue(RecordType.MX in types)
+        self.assertTrue(RecordType.NS in types)
+        self.assertTrue(RecordType.SOA in types)
+        self.assertTrue(RecordType.TXT in types)
+        self.assertTrue(RecordType.CNAME in types)
+        self.assertTrue(RecordType.SRV in types)
+        self.assertTrue(RecordType.DS in types)
+        self.assertTrue(RecordType.SSHFP in types)
+        self.assertTrue(RecordType.PTR in types)
+        self.assertTrue(RecordType.TLSA in types)
+
     def test_list_zones(self):
         zones = self.driver.list_zones()
         self.assertEqual(len(zones), 2)


[2/2] libcloud git commit: Update changelog.

Posted by to...@apache.org.
Update changelog.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/0f9393a9
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/0f9393a9
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/0f9393a9

Branch: refs/heads/trunk
Commit: 0f9393a961290d3d31347bfe51a8e766558d88cb
Parents: 856b5be
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Sun Jul 10 11:59:03 2016 +0200
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Sun Jul 10 11:59:03 2016 +0200

----------------------------------------------------------------------
 CHANGES.rst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0f9393a9/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 7f28f7e..6e3d6ed 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,13 +22,18 @@ DNS
   (GITHUB-829)
   [Wido den Hollander]
 
+- Add support for DS, PTR, SSFHFP and TLSA record type to the Aurora DNS
+  driver.
+  (GITHUB-834)
+  [Wido den Hollander]
+
 Container
 ~~~~~~~~~
 
 - Add network mode and labels when creating containers within
   docker driver
   (GITHUB-831)
-  [Jamie Cressey] 
+  [Jamie Cressey]
 
 
 Changes with Apache Libcloud 1.1.0