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 2015/03/29 22:50:59 UTC
[1/3] libcloud git commit: Fix HostVirtual delete_zone method params
Repository: libcloud
Updated Branches:
refs/heads/trunk 6f4fbdab7 -> b8ae90653
Fix HostVirtual delete_zone method params
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/eecde231
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/eecde231
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/eecde231
Branch: refs/heads/trunk
Commit: eecde231b9a919ded4be1d5b43bb80270fa4a6c3
Parents: 6f4fbda
Author: Vanč Levstik <va...@gmail.com>
Authored: Tue Feb 17 15:27:41 2015 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Mar 29 22:41:36 2015 +0200
----------------------------------------------------------------------
libcloud/dns/drivers/hostvirtual.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/eecde231/libcloud/dns/drivers/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/hostvirtual.py b/libcloud/dns/drivers/hostvirtual.py
index 1775f06..128506a 100644
--- a/libcloud/dns/drivers/hostvirtual.py
+++ b/libcloud/dns/drivers/hostvirtual.py
@@ -153,7 +153,7 @@ class HostVirtualDNSDriver(DNSDriver):
return record
def delete_zone(self, zone):
- params = {'zone_id': zone.id}
+ params = {'id': zone.id}
self.connection.set_context({'resource': 'zone', 'id': zone.id})
result = self.connection.request(
API_ROOT + '/dns/zone/', params=params, method='DELETE').object
[3/3] libcloud git commit: Update changelog.
Posted by to...@apache.org.
Update changelog.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b8ae9065
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b8ae9065
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b8ae9065
Branch: refs/heads/trunk
Commit: b8ae90653d710a2137c9a21f6e4c97204bc1443f
Parents: 11b71d2
Author: Tomaz Muraus <to...@apache.org>
Authored: Sun Mar 29 22:43:00 2015 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Mar 29 22:43:00 2015 +0200
----------------------------------------------------------------------
CHANGES.rst | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b8ae9065/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index c5d4972..eab9126 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -154,6 +154,14 @@ DNS
(GITHUB-469)
[Vanč Levstik]
+- Fix delete_zone method in the HostVirtual driver.
+ (GITHUB-461)
+ [Vanč Levstik]
+
+- Fix parsing of the record name in the HostVirtual driver.
+ (GITHUB-461)
+ [Vanč Levstik]
+
Changes with Apache Libcloud 0.17.0
-----------------------------------
[2/3] libcloud git commit: Fix parsing of HostVirtual record names
Posted by to...@apache.org.
Fix parsing of HostVirtual record names
Closes #461
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/11b71d29
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/11b71d29
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/11b71d29
Branch: refs/heads/trunk
Commit: 11b71d296b6a256c2660530a3630671efbe52501
Parents: eecde23
Author: Vanč Levstik <va...@gmail.com>
Authored: Tue Feb 17 15:28:09 2015 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Mar 29 22:41:37 2015 +0200
----------------------------------------------------------------------
libcloud/dns/drivers/hostvirtual.py | 3 ++-
libcloud/test/dns/test_hostvirtual.py | 17 +++++++++++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/11b71d29/libcloud/dns/drivers/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/dns/drivers/hostvirtual.py b/libcloud/dns/drivers/hostvirtual.py
index 128506a..4d98df5 100644
--- a/libcloud/dns/drivers/hostvirtual.py
+++ b/libcloud/dns/drivers/hostvirtual.py
@@ -105,7 +105,8 @@ class HostVirtualDNSDriver(DNSDriver):
def _to_record(self, item, zone=None):
extra = {'ttl': item['ttl']}
type = self._string_to_record_type(item['type'])
- record = Record(id=item['id'], name=item['name'],
+ name = item['name'][:-len(zone.domain) - 1]
+ record = Record(id=item['id'], name=name,
type=type, data=item['content'],
zone=zone, driver=self, extra=extra)
return record
http://git-wip-us.apache.org/repos/asf/libcloud/blob/11b71d29/libcloud/test/dns/test_hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_hostvirtual.py b/libcloud/test/dns/test_hostvirtual.py
index 26c00f8..cb6ed8f 100644
--- a/libcloud/test/dns/test_hostvirtual.py
+++ b/libcloud/test/dns/test_hostvirtual.py
@@ -54,7 +54,7 @@ class HostVirtualTests(unittest.TestCase):
self.assertEqual(len(records), 3)
record = records[1]
- self.assertEqual(record.name, 'www.t.com')
+ self.assertEqual(record.name, 'www')
self.assertEqual(record.id, '300719')
self.assertEqual(record.type, RecordType.A)
self.assertEqual(record.data, '208.111.35.173')
@@ -77,7 +77,7 @@ class HostVirtualTests(unittest.TestCase):
def test_get_record(self):
record = self.driver.get_record(zone_id='47234', record_id='300377')
self.assertEqual(record.id, '300377')
- self.assertEqual(record.name, '*.t.com')
+ self.assertEqual(record.name, '*')
self.assertEqual(record.type, RecordType.CNAME)
self.assertEqual(record.data, 't.com')
@@ -140,6 +140,19 @@ class HostVirtualTests(unittest.TestCase):
self.assertEqual(updated_zone.type, zone.type)
self.assertEqual(updated_zone.ttl, '3600')
+ def test_create_record_no_name(self):
+ zone = self.driver.list_zones()[0]
+ record = self.driver.create_record(
+ name='', zone=zone,
+ type=RecordType.A, data='127.0.0.1'
+ )
+
+ self.assertEqual(record.id, '300377')
+ self.assertEqual(record.name, '')
+ self.assertEqual(record.zone, zone)
+ self.assertEqual(record.type, RecordType.A)
+ self.assertEqual(record.data, '127.0.0.1')
+
def test_create_record(self):
zone = self.driver.list_zones()[0]
record = self.driver.create_record(