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 2013/02/27 00:22:40 UTC
svn commit: r1450524 - in /libcloud/branches/0.12.x: ./ CHANGES
libcloud/dns/drivers/rackspace.py libcloud/test/dns/test_rackspace.py
Author: tomaz
Date: Tue Feb 26 23:22:40 2013
New Revision: 1450524
URL: http://svn.apache.org/r1450524
Log:
Backport commits from trunk.
Modified:
libcloud/branches/0.12.x/ (props changed)
libcloud/branches/0.12.x/CHANGES
libcloud/branches/0.12.x/libcloud/dns/drivers/rackspace.py
libcloud/branches/0.12.x/libcloud/test/dns/test_rackspace.py
Propchange: libcloud/branches/0.12.x/
------------------------------------------------------------------------------
Merged /libcloud/trunk:r1450504-1450523
Modified: libcloud/branches/0.12.x/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/CHANGES?rev=1450524&r1=1450523&r2=1450524&view=diff
==============================================================================
--- libcloud/branches/0.12.x/CHANGES (original)
+++ libcloud/branches/0.12.x/CHANGES Tue Feb 26 23:22:40 2013
@@ -9,6 +9,12 @@ Changes with Apache Libcloud in developm
is private. (LIBCLOUD-297)
[Grischa Meyer, Tomaz Muraus]
+ *) Compute
+
+ - Allow user to specify 'priority' extra argument when creating a MX or SRV
+ record.
+ [Brian Jinwright, Tomaz Muraus]
+
Changes with Apache Libcloud 0.12.1:
*) General
Modified: libcloud/branches/0.12.x/libcloud/dns/drivers/rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/dns/drivers/rackspace.py?rev=1450524&r1=1450523&r2=1450524&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/dns/drivers/rackspace.py (original)
+++ libcloud/branches/0.12.x/libcloud/dns/drivers/rackspace.py Tue Feb 26 23:22:40 2013
@@ -34,7 +34,7 @@ from libcloud.dns.types import ZoneDoesN
from libcloud.dns.base import DNSDriver, Zone, Record
VALID_ZONE_EXTRA_PARAMS = ['email', 'comment', 'ns1']
-VALID_RECORD_EXTRA_PARAMS = ['ttl', 'comment']
+VALID_RECORD_EXTRA_PARAMS = ['ttl', 'comment', 'priority']
class RackspaceDNSResponse(OpenStack_1_1_Response):
@@ -241,6 +241,9 @@ class RackspaceDNSDriver(DNSDriver, Open
if 'ttl' in extra:
data['ttl'] = int(extra['ttl'])
+ if 'priority' in extra:
+ data['priority'] = int(extra['priority'])
+
payload = {'records': [data]}
self.connection.set_context({'resource': 'zone', 'id': zone.id})
response = self.connection.async_request(action='/domains/%s/records'
@@ -340,11 +343,9 @@ class RackspaceDNSDriver(DNSDriver, Open
record_data = data['data']
extra = {'fqdn': fqdn}
- if 'ttl' in data:
- extra['ttl'] = data['ttl']
-
- if 'comment' in data:
- extra['comment'] = data['comment']
+ for key in VALID_RECORD_EXTRA_PARAMS:
+ if key in data:
+ extra[key] = data[key]
record = Record(id=str(id), name=name, type=type, data=record_data,
zone=zone, driver=self, extra=extra)
Modified: libcloud/branches/0.12.x/libcloud/test/dns/test_rackspace.py
URL: http://svn.apache.org/viewvc/libcloud/branches/0.12.x/libcloud/test/dns/test_rackspace.py?rev=1450524&r1=1450523&r2=1450524&view=diff
==============================================================================
--- libcloud/branches/0.12.x/libcloud/test/dns/test_rackspace.py (original)
+++ libcloud/branches/0.12.x/libcloud/test/dns/test_rackspace.py Tue Feb 26 23:22:40 2013
@@ -109,6 +109,7 @@ class RackspaceUSTests(unittest.TestCase
self.assertEqual(records[0].type, RecordType.A)
self.assertEqual(records[0].data, '127.7.7.7')
self.assertEqual(records[0].extra['ttl'], 777)
+ self.assertEqual(records[0].extra['comment'], 'lulz')
self.assertEqual(records[0].extra['fqdn'], 'test3.%s' %
(records[0].zone.domain))