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 2014/01/03 18:23:21 UTC

[2/4] git commit: Issue LIBCLOUD-489: Update API endpoint used in the HostVirtual drivers.

Issue LIBCLOUD-489: Update API endpoint used in the HostVirtual drivers.

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/389f10cd
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/389f10cd
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/389f10cd

Branch: refs/heads/trunk
Commit: 389f10cdf4aeb683b8efbf897e7565be0e741131
Parents: 85b4792
Author: Dinesh Bhoopathy <db...@vr.org>
Authored: Fri Jan 3 05:12:09 2014 -0800
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Jan 3 18:13:44 2014 +0100

----------------------------------------------------------------------
 libcloud/common/hostvirtual.py            |  2 +-
 libcloud/compute/drivers/hostvirtual.py   |  2 +-
 libcloud/test/compute/test_hostvirtual.py | 24 ++++++++++++------------
 libcloud/test/dns/test_hostvirtual.py     | 22 +++++++++++-----------
 4 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/389f10cd/libcloud/common/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/common/hostvirtual.py b/libcloud/common/hostvirtual.py
index f98f3a1..e7ce14d 100644
--- a/libcloud/common/hostvirtual.py
+++ b/libcloud/common/hostvirtual.py
@@ -22,7 +22,7 @@ from libcloud.common.base import ConnectionKey, JsonResponse
 from libcloud.compute.types import InvalidCredsError
 from libcloud.common.types import LibcloudError
 
-API_HOST = 'www.vr.org'
+API_HOST = 'vapi.vr.org'
 
 
 class HostVirtualException(LibcloudError):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/389f10cd/libcloud/compute/drivers/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/hostvirtual.py b/libcloud/compute/drivers/hostvirtual.py
index a024273..ebef915 100644
--- a/libcloud/compute/drivers/hostvirtual.py
+++ b/libcloud/compute/drivers/hostvirtual.py
@@ -33,7 +33,7 @@ from libcloud.compute.base import Node, NodeDriver
 from libcloud.compute.base import NodeImage, NodeSize, NodeLocation
 from libcloud.compute.base import NodeAuthSSHKey, NodeAuthPassword
 
-API_ROOT = '/vapi'
+API_ROOT = ''
 
 NODE_STATE_MAP = {
     'BUILDING': NodeState.PENDING,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/389f10cd/libcloud/test/compute/test_hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_hostvirtual.py b/libcloud/test/compute/test_hostvirtual.py
index 80772fb..7098a63 100644
--- a/libcloud/test/compute/test_hostvirtual.py
+++ b/libcloud/test/compute/test_hostvirtual.py
@@ -134,51 +134,51 @@ class HostVirtualTest(unittest.TestCase):
 class HostVirtualMockHttp(MockHttp):
     fixtures = ComputeFileFixtures('hostvirtual')
 
-    def _vapi_cloud_servers(self, method, url, body, headers):
+    def _cloud_servers(self, method, url, body, headers):
         body = self.fixtures.load('list_nodes.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_server(self, method, url, body, headers):
+    def _cloud_server(self, method, url, body, headers):
         body = self.fixtures.load('get_node.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_sizes(self, method, url, body, headers):
+    def _cloud_sizes(self, method, url, body, headers):
         body = self.fixtures.load('list_sizes.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_images(self, method, url, body, headers):
+    def _cloud_images(self, method, url, body, headers):
         body = self.fixtures.load('list_images.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_locations(self, method, url, body, headers):
+    def _cloud_locations(self, method, url, body, headers):
         body = self.fixtures.load('list_locations.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_cancel(self, method, url, body, headers):
+    def _cloud_cancel(self, method, url, body, headers):
         body = self.fixtures.load('node_destroy.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_server_reboot(self, method, url, body, headers):
+    def _cloud_server_reboot(self, method, url, body, headers):
         body = self.fixtures.load('node_reboot.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_server_shutdown(self, method, url, body, headers):
+    def _cloud_server_shutdown(self, method, url, body, headers):
         body = self.fixtures.load('node_stop.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_server_start(self, method, url, body, headers):
+    def _cloud_server_start(self, method, url, body, headers):
         body = self.fixtures.load('node_start.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_buy(self, method, url, body, headers):
+    def _cloud_buy(self, method, url, body, headers):
         body = self.fixtures.load('create_node.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_server_build(self, method, url, body, headers):
+    def _cloud_server_build(self, method, url, body, headers):
         body = self.fixtures.load('create_node.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_cloud_server_delete(self, method, url, body, headers):
+    def _cloud_server_delete(self, method, url, body, headers):
         body = self.fixtures.load('node_destroy.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/389f10cd/libcloud/test/dns/test_hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_hostvirtual.py b/libcloud/test/dns/test_hostvirtual.py
index 3ff404f..ae304ca 100644
--- a/libcloud/test/dns/test_hostvirtual.py
+++ b/libcloud/test/dns/test_hostvirtual.py
@@ -199,55 +199,55 @@ class HostVirtualTests(unittest.TestCase):
 class HostVirtualMockHttp(MockHttp):
     fixtures = DNSFileFixtures('hostvirtual')
 
-    def _vapi_dns_zone(self, method, url, body, headers):
+    def _dns_zone(self, method, url, body, headers):
         body = self.fixtures.load('get_zone.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_dns_zones(self, method, url, body, headers):
+    def _dns_zones(self, method, url, body, headers):
         body = self.fixtures.load('list_zones.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_dns_record(self, method, url, body, headers):
+    def _dns_record(self, method, url, body, headers):
         body = self.fixtures.load('get_record.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_dns_records(self, method, url, body, headers):
+    def _dns_records(self, method, url, body, headers):
         body = self.fixtures.load('list_records.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_dns_zone_ZONE_DOES_NOT_EXIST(self, method, url, body, headers):
+    def _dns_zone_ZONE_DOES_NOT_EXIST(self, method, url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
         return (httplib.NOT_FOUND, body,
                 {}, httplib.responses[httplib.NOT_FOUND])
 
-    def _vapi_dns_zone_RECORD_DOES_NOT_EXIST(self, method, url, body, headers):
+    def _dns_zone_RECORD_DOES_NOT_EXIST(self, method, url, body, headers):
         body = self.fixtures.load('get_zone.json')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
-    def _vapi_dns_zones_ZONE_DOES_NOT_EXIST(self, method, url, body, headers):
+    def _dns_zones_ZONE_DOES_NOT_EXIST(self, method, url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
         return (httplib.NOT_FOUND, body,
                 {}, httplib.responses[httplib.NOT_FOUND])
 
-    def _vapi_dns_record_ZONE_DOES_NOT_EXIST(self, method,
+    def _dns_record_ZONE_DOES_NOT_EXIST(self, method,
                                              url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
         return (httplib.NOT_FOUND, body,
                 {}, httplib.responses[httplib.NOT_FOUND])
 
-    def _vapi_dns_record_RECORD_DOES_NOT_EXIST(self, method,
+    def _dns_record_RECORD_DOES_NOT_EXIST(self, method,
                                                url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
         return (httplib.NOT_FOUND, body,
                 {}, httplib.responses[httplib.NOT_FOUND])
 
-    def _vapi_dns_records_ZONE_DOES_NOT_EXIST(self, method,
+    def _dns_records_ZONE_DOES_NOT_EXIST(self, method,
                                               url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
         return (httplib.NOT_FOUND, body,
                 {}, httplib.responses[httplib.NOT_FOUND])
 
-    def _vapi_dns_zones_RECORD_DOES_NOT_EXIST(self, method,
+    def _dns_zones_RECORD_DOES_NOT_EXIST(self, method,
                                               url, body, headers):
         body = self.fixtures.load('zone_does_not_exist.json')
         return (httplib.NOT_FOUND, body,