libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1397769 - in /libcloud/trunk: CHANGES libcloud/dns/drivers/linode.py libcloud/dns/drivers/rackspace.py libcloud/dns/drivers/zerigo.py
Date Sat, 13 Oct 2012 05:16:47 GMT
Author: tomaz
Date: Sat Oct 13 05:16:46 2012
New Revision: 1397769

URL: http://svn.apache.org/viewvc?rev=1397769&view=rev
Log:
Update 'if type' checks in the update_record methods to behave correctly
if users passes in RecordType.A with a value of 0 - if type is not None.
Fixes an issue reported in LIBCLOUD-247.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/dns/drivers/linode.py
    libcloud/trunk/libcloud/dns/drivers/rackspace.py
    libcloud/trunk/libcloud/dns/drivers/zerigo.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1397769&r1=1397768&r2=1397769&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Sat Oct 13 05:16:46 2012
@@ -15,6 +15,13 @@ Changes with Apache Libcloud in developm
       ; LIBCLOUD-245
       [Tomaz Muraus]
 
+  *) DNS
+
+    - Update 'if type' checks in the update_record methods to behave correctly
+      if users passes in RecordType.A with a value of 0 - if type is not None.
+      ; LIBCLOUD-247
+      [Tomaz Muraus]
+
 Changes with Apache Libcloud 0.11.3:
 
   *) Storage

Modified: libcloud/trunk/libcloud/dns/drivers/linode.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/dns/drivers/linode.py?rev=1397769&r1=1397768&r2=1397769&view=diff
==============================================================================
--- libcloud/trunk/libcloud/dns/drivers/linode.py (original)
+++ libcloud/trunk/libcloud/dns/drivers/linode.py Sat Oct 13 05:16:46 2012
@@ -197,7 +197,7 @@ class LinodeDNSDriver(DNSDriver):
         if data:
             params['Target'] = data
 
-        if type:
+        if type is not None:
             params['Type'] = self.RECORD_TYPE_MAP[type]
 
         merged = merge_valid_keys(params=params,

Modified: libcloud/trunk/libcloud/dns/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/dns/drivers/rackspace.py?rev=1397769&r1=1397768&r2=1397769&view=diff
==============================================================================
--- libcloud/trunk/libcloud/dns/drivers/rackspace.py (original)
+++ libcloud/trunk/libcloud/dns/drivers/rackspace.py Sat Oct 13 05:16:46 2012
@@ -269,7 +269,7 @@ class RackspaceDNSDriver(DNSDriver, Open
         if 'comment' in extra:
             payload['comment'] = extra['comment']
 
-        type = type if type else record.type
+        type = type if type is not None else record.type
         data = data if data else record.data
 
         self.connection.set_context({'resource': 'record', 'id': record.id})

Modified: libcloud/trunk/libcloud/dns/drivers/zerigo.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/dns/drivers/zerigo.py?rev=1397769&r1=1397768&r2=1397769&view=diff
==============================================================================
--- libcloud/trunk/libcloud/dns/drivers/zerigo.py (original)
+++ libcloud/trunk/libcloud/dns/drivers/zerigo.py Sat Oct 13 05:16:46 2012
@@ -345,7 +345,7 @@ class ZerigoDNSDriver(DNSDriver):
             name_elem = ET.SubElement(record_elem, 'hostname')
             name_elem.text = name
 
-        if type:
+        if type is not None:
             type_elem = ET.SubElement(record_elem, 'host-type')
             type_elem.text = self.RECORD_TYPE_MAP[type]
 



Mime
View raw message