libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1411020 - in /libcloud/branches/0.11.x: ./ libcloud/dns/drivers/linode.py libcloud/dns/drivers/rackspace.py libcloud/dns/drivers/zerigo.py
Date Sun, 18 Nov 2012 23:26:57 GMT
Author: tomaz
Date: Sun Nov 18 23:26:56 2012
New Revision: 1411020

URL: http://svn.apache.org/viewvc?rev=1411020&view=rev
Log:
Backport bug-fix commit from trunk:

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/branches/0.11.x/   (props changed)
    libcloud/branches/0.11.x/libcloud/dns/drivers/linode.py
    libcloud/branches/0.11.x/libcloud/dns/drivers/rackspace.py
    libcloud/branches/0.11.x/libcloud/dns/drivers/zerigo.py

Propchange: libcloud/branches/0.11.x/
------------------------------------------------------------------------------
  Merged /libcloud/trunk:r1397769

Modified: libcloud/branches/0.11.x/libcloud/dns/drivers/linode.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.11.x/libcloud/dns/drivers/linode.py?rev=1411020&r1=1411019&r2=1411020&view=diff
==============================================================================
--- libcloud/branches/0.11.x/libcloud/dns/drivers/linode.py (original)
+++ libcloud/branches/0.11.x/libcloud/dns/drivers/linode.py Sun Nov 18 23:26:56 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/branches/0.11.x/libcloud/dns/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.11.x/libcloud/dns/drivers/rackspace.py?rev=1411020&r1=1411019&r2=1411020&view=diff
==============================================================================
--- libcloud/branches/0.11.x/libcloud/dns/drivers/rackspace.py (original)
+++ libcloud/branches/0.11.x/libcloud/dns/drivers/rackspace.py Sun Nov 18 23:26:56 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/branches/0.11.x/libcloud/dns/drivers/zerigo.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.11.x/libcloud/dns/drivers/zerigo.py?rev=1411020&r1=1411019&r2=1411020&view=diff
==============================================================================
--- libcloud/branches/0.11.x/libcloud/dns/drivers/zerigo.py (original)
+++ libcloud/branches/0.11.x/libcloud/dns/drivers/zerigo.py Sun Nov 18 23:26:56 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