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 2014/01/18 01:49:43 UTC

[1/6] git commit: Add SPF to supported record types of the Rackspace DNS driver.

Updated Branches:
  refs/heads/trunk fcf48b75b -> b6f0ce88e


Add SPF to supported record types of the Rackspace DNS driver.


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

Branch: refs/heads/trunk
Commit: 4cf0088f2294702986d4618cf734f698ed161657
Parents: fcf48b7
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Jan 18 00:45:56 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Jan 18 00:45:56 2014 +0100

----------------------------------------------------------------------
 libcloud/dns/drivers/rackspace.py   | 1 +
 libcloud/test/dns/test_rackspace.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4cf0088f/libcloud/dns/drivers/rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/rackspace.py b/libcloud/dns/drivers/rackspace.py
index d685745..f56a993 100644
--- a/libcloud/dns/drivers/rackspace.py
+++ b/libcloud/dns/drivers/rackspace.py
@@ -147,6 +147,7 @@ class RackspaceDNSDriver(DNSDriver, OpenStackDriverMixin):
         RecordType.NS: 'NS',
         RecordType.TXT: 'TXT',
         RecordType.SRV: 'SRV',
+        RecordType.PTR: 'PTR',
     }
 
     def list_zones(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/4cf0088f/libcloud/test/dns/test_rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_rackspace.py b/libcloud/test/dns/test_rackspace.py
index 589aaa1..0afc337 100644
--- a/libcloud/test/dns/test_rackspace.py
+++ b/libcloud/test/dns/test_rackspace.py
@@ -75,7 +75,7 @@ class RackspaceUSTests(unittest.TestCase):
 
     def test_list_record_types(self):
         record_types = self.driver.list_record_types()
-        self.assertEqual(len(record_types), 7)
+        self.assertEqual(len(record_types), 8)
         self.assertTrue(RecordType.A in record_types)
 
     def test_list_zones_success(self):


[4/6] git commit: Update .gitignore.

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


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

Branch: refs/heads/trunk
Commit: 8cd5b2e56b28965ef4743fda7ee3c6e51f417b6d
Parents: 0df3b71
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Jan 18 01:31:56 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Jan 18 01:31:56 2014 +0100

----------------------------------------------------------------------
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8cd5b2e5/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index eff804d..ce19293 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,6 @@ MANIFEST
 coverage_html_report/
 .idea
 dist/*apache-libcloud*
+dist/*apache_libcloud*
 _build/
 apache_libcloud.egg-info/


[5/6] git commit: Update CHANGES.

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


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

Branch: refs/heads/trunk
Commit: 3965328b5da648ba09427ff5fa0d86ce4b593169
Parents: 8cd5b2e
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Jan 18 01:37:07 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Jan 18 01:37:07 2014 +0100

----------------------------------------------------------------------
 CHANGES.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3965328b/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 82357df..13acc40 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,24 @@
 Changelog
 =========
 
+Changes with Apache Libcloud in development
+-------------------------------------------
+
+DNS
+~~~
+
+- Add PTR to the supported record types in the Rackspace driver.
+  [Tomaz Muraus]
+
+- Fix Zerigo driver to set Record.name attribute for records which refer
+  to the bare domain to "None" instead of an empty string.
+  [Tomaz Muraus]
+
+- For consistency with other drivers, update Rackspace driver to set
+  Record.name attribute for the records which refer to the bare domain
+  to "None" instead of setting them to FQDN.
+  [Tomaz Muraus]
+
 Changes with Apache Libcloud 0.14.0
 -----------------------------------
 


[3/6] git commit: Update Zerigo DNS driver to set Record.name attribute for records for bare domains to None instead of an empty string.

Posted by to...@apache.org.
Update Zerigo DNS driver to set Record.name attribute for records for bare
domains to None instead of an empty string.


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

Branch: refs/heads/trunk
Commit: 0df3b71b0c4a5bca67460e05db5908d4dc5089f1
Parents: 81028e6
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Jan 18 01:30:53 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Jan 18 01:30:53 2014 +0100

----------------------------------------------------------------------
 libcloud/dns/drivers/zerigo.py                  |  3 +++
 .../test/dns/fixtures/zerigo/list_records.xml   | 26 ++++++++++++++++++++
 libcloud/test/dns/test_zerigo.py                | 10 +++++++-
 3 files changed, 38 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0df3b71b/libcloud/dns/drivers/zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/zerigo.py b/libcloud/dns/drivers/zerigo.py
index db2ef07..50e3ed0 100644
--- a/libcloud/dns/drivers/zerigo.py
+++ b/libcloud/dns/drivers/zerigo.py
@@ -425,6 +425,9 @@ class ZerigoDNSDriver(DNSDriver):
         priority = findtext(element=elem, xpath='priority', no_text_value=None)
         ttl = findtext(element=elem, xpath='ttl', no_text_value=None)
 
+        if not name:
+            name = None
+
         if ttl:
             ttl = int(ttl)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0df3b71b/libcloud/test/dns/fixtures/zerigo/list_records.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/fixtures/zerigo/list_records.xml b/libcloud/test/dns/fixtures/zerigo/list_records.xml
index f0826cf..f226162 100644
--- a/libcloud/test/dns/fixtures/zerigo/list_records.xml
+++ b/libcloud/test/dns/fixtures/zerigo/list_records.xml
@@ -25,4 +25,30 @@
     <updated-at type="datetime">2008-12-07T02:51:13Z</updated-at>
     <zone-id type="integer">12345678</zone-id>
   </host>
+  <host>
+    <created-at type="datetime">2008-12-07T02:51:13Z</created-at>
+    <data>172.16.16.3</data>
+    <fqdn>test2.example.com</fqdn>
+    <host-type>A</host-type>
+    <hostname></hostname>
+    <id type="integer">23456789</id>
+    <notes nil="true"/>
+    <priority type="integer" nil="true"/>
+    <ttl type="integer">3600</ttl>
+    <updated-at type="datetime">2008-12-07T02:51:13Z</updated-at>
+    <zone-id type="integer">12345678</zone-id>
+  </host>
+  <host>
+    <created-at type="datetime">2008-12-07T02:51:13Z</created-at>
+    <data>172.16.16.4</data>
+    <fqdn>test4.example.com</fqdn>
+    <host-type>A</host-type>
+    <id type="integer">23456789</id>
+    <notes nil="true"/>
+    <priority type="integer" nil="true"/>
+    <ttl type="integer">3600</ttl>
+    <updated-at type="datetime">2008-12-07T02:51:13Z</updated-at>
+    <zone-id type="integer">12345678</zone-id>
+  </host>
+
 </hosts>

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0df3b71b/libcloud/test/dns/test_zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_zerigo.py b/libcloud/test/dns/test_zerigo.py
index f74d1ec..7897c00 100644
--- a/libcloud/test/dns/test_zerigo.py
+++ b/libcloud/test/dns/test_zerigo.py
@@ -65,7 +65,7 @@ class ZerigoTests(unittest.TestCase):
         zone = self.driver.list_zones()[0]
         records = list(self.driver.list_records(zone=zone))
 
-        self.assertEqual(len(records), 2)
+        self.assertEqual(len(records), 4)
         self.assertEqual(records[0].name, 'www')
         self.assertEqual(records[0].type, RecordType.A)
         self.assertEqual(records[0].data, '172.16.16.1')
@@ -76,6 +76,14 @@ class ZerigoTests(unittest.TestCase):
         self.assertEqual(records[1].name, 'test')
         self.assertEqual(records[1].extra['ttl'], 3600)
 
+    def test_record_with_empty_name(self):
+        zone = self.driver.list_zones()[0]
+        record1 = list(self.driver.list_records(zone=zone))[-1]
+        record2 = list(self.driver.list_records(zone=zone))[-2]
+
+        self.assertEqual(record1.name, None)
+        self.assertEqual(record2.name, None)
+
     def test_list_records_no_results(self):
         zone = self.driver.list_zones()[0]
         ZerigoMockHttp.type = 'NO_RESULTS'


[6/6] git commit: Update upgrade notes.

Posted by to...@apache.org.
Update upgrade notes.


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

Branch: refs/heads/trunk
Commit: b6f0ce88ef90c98b072884e77fa9e9e7fa734eca
Parents: 3965328
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Jan 18 01:44:59 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Jan 18 01:44:59 2014 +0100

----------------------------------------------------------------------
 docs/upgrade_notes.rst | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b6f0ce88/docs/upgrade_notes.rst
----------------------------------------------------------------------
diff --git a/docs/upgrade_notes.rst b/docs/upgrade_notes.rst
index 315cad9..a74d1b2 100644
--- a/docs/upgrade_notes.rst
+++ b/docs/upgrade_notes.rst
@@ -5,6 +5,25 @@ This page describes how to upgrade from a previous version to a new version
 which contains backward incompatible or semi-incompatible changes and how to
 preserve the old behavior when this is possible.
 
+Libcloud in development
+-----------------------
+
+Fix record name inconsistencies in the Rackspace DNS driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``Record.name`` attribute is now correctly set to ``None`` for records which
+refer to the bare domain name. Previously, ``Record.name`` attribute for such
+records was set to the domain name.
+
+For example, lets have a look at a record which points to the domain
+``example.com``.
+
+New ``Record.name`` attribute value for such record: ``None``
+
+Old ``Record.name`` attribute value for such record: ``example.com``
+
+This was done to make the Rackspace driver consistent with the other ones.
+
 Libcloud 0.14.0
 ---------------
 
@@ -657,7 +676,7 @@ Libcloud 0.8
 * ``ex_save_image`` method in the OpenStack driver now returns a ``NodeImage``
   instance.
 
-For a full list of changes, please see the `CHANGES file 
+For a full list of changes, please see the `CHANGES file
 <https://git-wip-us.apache.org/repos/asf?p=libcloud.git;a=blob;f=CHANGES;h=fd1f9cd8917bf9d9c5f4d5344872dbccba894444;hb=b26812db71e6c36be3cc5f7fcb87f82b267bfddd>`__.
 
 Libcloud 0.7
@@ -704,7 +723,7 @@ Bellow is a list of old paths and their new locations:
 In the ``contrib/`` directory you can also find a simple bash script which can
 perform a search and replace for you - `migrate_paths.py <https://svn.apache.org/repos/asf/libcloud/trunk/contrib/migrate_paths.sh>`_.
 
-For a full list of changes, please see the `CHANGES file 
+For a full list of changes, please see the `CHANGES file
 <https://git-wip-us.apache.org/repos/asf?p=libcloud.git;a=blob;f=CHANGES;h=276948338c2581de1178e51f7f7cdbd4e7ba9286;hb=2ad8f3fa1f258d6c53d7b058cdc6cd9ab1fd579b>`__.
 
 Libcloud 0.6


[2/6] git commit: Modify Rackspace DNS driver to set record name to None for the records which correspond to the root domain.

Posted by to...@apache.org.
Modify Rackspace DNS driver to set record name to None for the records
which correspond to the root domain.

This is done for consistency with other drivers.


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

Branch: refs/heads/trunk
Commit: 81028e66d9a87392c0e58ba329b12895c0ca6b57
Parents: 4cf0088
Author: Tomaz Muraus <to...@apache.org>
Authored: Sat Jan 18 01:22:27 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sat Jan 18 01:22:27 2014 +0100

----------------------------------------------------------------------
 libcloud/dns/drivers/rackspace.py   |  8 +++++++-
 libcloud/test/dns/test_rackspace.py | 11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/81028e66/libcloud/dns/drivers/rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/rackspace.py b/libcloud/dns/drivers/rackspace.py
index f56a993..3410742 100644
--- a/libcloud/dns/drivers/rackspace.py
+++ b/libcloud/dns/drivers/rackspace.py
@@ -373,7 +373,7 @@ class RackspaceDNSDriver(DNSDriver, OpenStackDriverMixin):
 
     def _to_partial_record_name(self, domain, name):
         """
-        Strip domain portion from the record name.
+        Remove domain portion from the record name.
 
         :param domain: Domain name.
         :type domain: ``str``
@@ -381,6 +381,12 @@ class RackspaceDNSDriver(DNSDriver, OpenStackDriverMixin):
         :param name: Full record name (fqdn).
         :type name: ``str``
         """
+        if name == domain:
+            # Map "root" record names to None to be consistent with other
+            # drivers
+            return None
+
+        # Strip domain portion
         name = name.replace('.%s' % (domain), '')
         return name
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/81028e66/libcloud/test/dns/test_rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_rackspace.py b/libcloud/test/dns/test_rackspace.py
index 0afc337..4a211a3 100644
--- a/libcloud/test/dns/test_rackspace.py
+++ b/libcloud/test/dns/test_rackspace.py
@@ -309,6 +309,17 @@ class RackspaceUSTests(unittest.TestCase):
         self.assertEqual(self.driver._to_full_record_name(domain, name),
                          'foo.bar')
 
+    def test_to_partial_record_name(self):
+        domain = 'example.com'
+        names = ['test.example.com', 'foo.bar.example.com',
+                 'example.com.example.com', 'example.com']
+        expected_values = ['test', 'foo.bar', 'example.com', None]
+
+        for name, expected_value in zip(names, expected_values):
+            value = self.driver._to_partial_record_name(domain=domain,
+                                                        name=name)
+            self.assertEqual(value, expected_value)
+
 
 class RackspaceUKTests(RackspaceUSTests):
     klass = RackspaceUKDNSDriver