You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by je...@apache.org on 2010/02/09 14:50:11 UTC
svn commit: r908029 - /incubator/libcloud/trunk/libcloud/drivers/slicehost.py
Author: jerry
Date: Tue Feb 9 13:50:10 2010
New Revision: 908029
URL: http://svn.apache.org/viewvc?rev=908029&view=rev
Log:
80-col formatting update: drivers/slicehost.py
Modified:
incubator/libcloud/trunk/libcloud/drivers/slicehost.py
Modified: incubator/libcloud/trunk/libcloud/drivers/slicehost.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/slicehost.py?rev=908029&r1=908028&r2=908029&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/slicehost.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/slicehost.py Tue Feb 9 13:50:10 2010
@@ -16,7 +16,8 @@
Slicehost Driver
"""
from libcloud.types import NodeState, Provider
-from libcloud.base import ConnectionKey, Response, NodeDriver, Node, NodeSize, NodeImage, NodeLocation
+from libcloud.base import ConnectionKey, Response, NodeDriver, Node,
+from libcloud.base import NodeSize, NodeImage, NodeLocation
import base64
import struct
import socket
@@ -94,9 +95,13 @@
xml = ET.tostring(root)
node = self._to_nodes(
- self.connection.request(uri, method='POST',
- data=xml, headers={'Content-Type': 'application/xml'}
- ).object)[0]
+ self.connection.request(
+ uri,
+ method='POST',
+ data=xml,
+ headers={'Content-Type': 'application/xml'}
+ ).object
+ )[0]
return node
def reboot_node(self, node):
@@ -109,7 +114,9 @@
#expected_status = 'hard_reboot' if hard else 'reboot'
uri = '/slices/%s/reboot.xml' % (node.id)
- node = self._to_nodes(self.connection.request(uri, method='PUT').object)[0]
+ node = self._to_nodes(
+ self.connection.request(uri, method='PUT').object
+ )[0]
return node.state == NodeState.REBOOTING
def destroy_node(self, node):