You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by rb...@apache.org on 2010/08/05 15:03:29 UTC
svn commit: r982594 - in /incubator/libcloud/trunk: CHANGES
libcloud/drivers/gogrid.py
Author: rbogorodskiy
Date: Thu Aug 5 13:03:28 2010
New Revision: 982594
URL: http://svn.apache.org/viewvc?rev=982594&view=rev
Log:
- Use better name for GoGrid driver
- Use HTTP POST method for 'unsafe' operations in GoGrid driver
- Update CHANGES accordingly
Changes submitted by Russell Haering as a part of LIBCLOUD-44.
Modified:
incubator/libcloud/trunk/CHANGES
incubator/libcloud/trunk/libcloud/drivers/gogrid.py
Modified: incubator/libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/CHANGES?rev=982594&r1=982593&r2=982594&view=diff
==============================================================================
--- incubator/libcloud/trunk/CHANGES (original)
+++ incubator/libcloud/trunk/CHANGES Thu Aug 5 13:03:28 2010
@@ -2,6 +2,10 @@
Changes with Apache Libcloud 0.4.0 [In Development]
+ *) Use more consistent name for GoGrid driver and use http
+ POST method for 'unsafe' operations
+ [Russell Haering]
+
*) Implement password handling and add deployment support
for GoGrid nodes.
[Roman Bogorodskiy]
Modified: incubator/libcloud/trunk/libcloud/drivers/gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/gogrid.py?rev=982594&r1=982593&r2=982594&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/gogrid.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/gogrid.py Thu Aug 5 13:03:28 2010
@@ -129,7 +129,7 @@ class GoGridNodeDriver(NodeDriver):
connectionCls = GoGridConnection
type = Provider.GOGRID
- name = 'GoGrid API'
+ name = 'GoGrid'
features = {"create_node": ["generates_password"]}
_instance_types = GOGRID_INSTANCE_TYPES
@@ -216,11 +216,13 @@ class GoGridNodeDriver(NodeDriver):
def _server_power(self, id, power):
# power in ['start', 'stop', 'restart']
params = {'id': id, 'power': power}
- return self.connection.request("/api/grid/server/power", params)
+ return self.connection.request("/api/grid/server/power", params,
+ method='POST')
def _server_delete(self, id):
params = {'id': id}
- return self.connection.request("/api/grid/server/delete", params)
+ return self.connection.request("/api/grid/server/delete", params,
+ method='POST')
def _get_first_ip(self):
params = {'ip.state': 'Unassigned', 'ip.type': 'public'}
@@ -252,7 +254,7 @@ class GoGridNodeDriver(NodeDriver):
'ip': first_ip}
object = self.connection.request('/api/grid/server/add',
- params=params).object
+ params=params, method='POST').object
node = self._to_node(object['list'][0])
return node