libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [8/9] git commit: Make sure TTL is an int.
Date Wed, 05 Feb 2014 19:45:04 GMT
Make sure TTL is an int.


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

Branch: refs/heads/trunk
Commit: 5af004cc54a5ab45326f4bc2468c978c94dd30cb
Parents: 204d569
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Wed Feb 5 20:39:01 2014 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Wed Feb 5 20:39:01 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5af004cc/libcloud/dns/drivers/route53.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/route53.py b/libcloud/dns/drivers/route53.py
index 944449b..64f34c0 100644
--- a/libcloud/dns/drivers/route53.py
+++ b/libcloud/dns/drivers/route53.py
@@ -290,7 +290,7 @@ class Route53DNSDriver(DNSDriver):
 
         type = self._string_to_record_type(findtext(element=elem, xpath='Type',
                                                     namespace=NAMESPACE))
-        ttl = findtext(element=elem, xpath='TTL', namespace=NAMESPACE)
+        ttl = int(findtext(element=elem, xpath='TTL', namespace=NAMESPACE))
 
         value_elem = elem.findall(
             fixxpath(xpath='ResourceRecords/ResourceRecord',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5af004cc/libcloud/test/dns/test_route53.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_route53.py b/libcloud/test/dns/test_route53.py
index c512a8b..bc11125 100644
--- a/libcloud/test/dns/test_route53.py
+++ b/libcloud/test/dns/test_route53.py
@@ -57,6 +57,7 @@ class Route53Tests(unittest.TestCase):
         self.assertEqual(record.id, 'A:www')
         self.assertEqual(record.type, RecordType.A)
         self.assertEqual(record.data, '208.111.35.173')
+        self.assertEqual(record.extra['ttl'], 86400)
 
         record = records[3]
         self.assertEqual(record.type, RecordType.MX)


Mime
View raw message