libcloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject svn commit: r908025 - /incubator/libcloud/trunk/libcloud/drivers/gogrid.py
Date Tue, 09 Feb 2010 13:49:38 GMT
Author: jerry
Date: Tue Feb  9 13:49:38 2010
New Revision: 908025

URL: http://svn.apache.org/viewvc?rev=908025&view=rev
Log:
80-col formatting update: drivers/gogrid.py

Modified:
    incubator/libcloud/trunk/libcloud/drivers/gogrid.py

Modified: incubator/libcloud/trunk/libcloud/drivers/gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/gogrid.py?rev=908025&r1=908024&r2=908025&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/gogrid.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/gogrid.py Tue Feb  9 13:49:38 2010
@@ -17,7 +17,8 @@
 """
 from libcloud.providers import Provider
 from libcloud.types import NodeState, InvalidCredsException
-from libcloud.base import Node, ConnectionUserAndKey, Response, NodeDriver, NodeSize, NodeImage,
NodeLocation
+from libcloud.base import Node, ConnectionUserAndKey, Response, NodeDriver
+from libcloud.base import NodeSize, NodeImage, NodeLocation
 import time
 import hashlib
 
@@ -108,10 +109,15 @@
         return m.hexdigest()
 
 class GoGridNode(Node):
-    # Generating uuid based on public ip to get around missing id on create_node in gogrid
api
-    # Used public ip since it is not mutable and specified at create time, so uuid of node
should not change after add is completed
+    # Generating uuid based on public ip to get around missing id on
+    # create_node in gogrid api
+    #
+    # Used public ip since it is not mutable and specified at create time,
+    # so uuid of node should not change after add is completed
     def get_uuid(self):
-        return hashlib.sha1("%s:%d" % (self.public_ip,self.driver.type)).hexdigest()
+        return hashlib.sha1(
+            "%s:%d" % (self.public_ip,self.driver.type)
+        ).hexdigest()
 
 class GoGridNodeDriver(NodeDriver):
 
@@ -221,7 +227,8 @@
                   'server.ram': size.id,
                   'ip':first_ip}
 
-        object = self.connection.request('/api/grid/server/add', params=params).object
+        object = self.connection.request('/api/grid/server/add',
+                                         params=params).object
         node = self._to_node(object['list'][0])
 
         return node



Mime
View raw message