Author: hbetts
Date: Mon Mar  5 23:34:48 2012
New Revision: 1297286

URL: http://svn.apache.org/viewvc?rev=1297286&view=rev
Log:
Updated some source code to comply with PEP8.

Modified:
    libcloud/trunk/libcloud/common/aws.py
    libcloud/trunk/libcloud/common/base.py
    libcloud/trunk/libcloud/common/cloudstack.py
    libcloud/trunk/libcloud/common/gogrid.py
    libcloud/trunk/libcloud/common/linode.py
    libcloud/trunk/libcloud/common/openstack.py
    libcloud/trunk/libcloud/compute/base.py
    libcloud/trunk/libcloud/compute/deployment.py
    libcloud/trunk/libcloud/compute/drivers/bluebox.py
    libcloud/trunk/libcloud/compute/drivers/cloudstack.py
    libcloud/trunk/libcloud/compute/drivers/dreamhost.py
    libcloud/trunk/libcloud/compute/drivers/dummy.py
    libcloud/trunk/libcloud/compute/drivers/ecp.py
    libcloud/trunk/libcloud/compute/drivers/gandi.py
    libcloud/trunk/libcloud/compute/drivers/gogrid.py
    libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py
    libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py
    libcloud/trunk/libcloud/compute/drivers/linode.py
    libcloud/trunk/libcloud/compute/ssh.py
    libcloud/trunk/libcloud/compute/types.py
    libcloud/trunk/libcloud/pricing.py
    libcloud/trunk/libcloud/security.py

Modified: libcloud/trunk/libcloud/common/aws.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/aws.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/aws.py (original)
+++ libcloud/trunk/libcloud/common/aws.py Mon Mar  5 23:34:48 2012
@@ -15,5 +15,6 @@
 
 from libcloud.common.base import XmlResponse
 
+
 class AWSBaseResponse(XmlResponse):
     pass

Modified: libcloud/trunk/libcloud/common/base.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/base.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/base.py (original)
+++ libcloud/trunk/libcloud/common/base.py Mon Mar  5 23:34:48 2012
@@ -27,7 +27,6 @@ except:
 
 import libcloud
 
-
 from libcloud.utils.py3 import PY3
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlparse
@@ -290,9 +289,11 @@ class LoggingConnection():
             cmd.extend(["--data-binary", pquote(body)])
 
         cmd.extend(["--compress"])
-        cmd.extend([pquote("%s://%s:%d%s" % (self.protocol, self.host, 
self.port, url))])
+        cmd.extend([pquote("%s://%s:%d%s" % (self.protocol, self.host,
+                                             self.port, url))])
         return " ".join(cmd)
 
+
 class LoggingHTTPSConnection(LoggingConnection, LibcloudHTTPSConnection):
     """
     Utility Class for logging HTTPS connections
@@ -318,6 +319,7 @@ class LoggingHTTPSConnection(LoggingConn
         return LibcloudHTTPSConnection.request(self, method, url, body,
                                                headers)
 
+
 class LoggingHTTPConnection(LoggingConnection, LibcloudHTTPConnection):
     """
     Utility Class for logging HTTP connections
@@ -428,9 +430,11 @@ class Connection(object):
         secure = self.secure
 
         if getattr(self, 'base_url', None) and base_url == None:
-            (host, port, secure, request_path) = 
self._tuple_from_url(self.base_url)
+            (host, port,
+             secure, request_path) = self._tuple_from_url(self.base_url)
         elif base_url != None:
-            (host, port, secure, request_path) = self._tuple_from_url(base_url)
+            (host, port,
+             secure, request_path) = self._tuple_from_url(base_url)
         else:
             host = host or self.host
             port = port or self.port
@@ -456,8 +460,8 @@ class Connection(object):
         """
         Append a token to a user agent string.
 
-        Users of the library should call this to uniquely identify thier 
requests
-        to a provider.
+        Users of the library should call this to uniquely identify thier
+        requests to a provider.
 
         @type token: C{str}
         @param token: Token to add to the user agent.
@@ -611,6 +615,7 @@ class Connection(object):
         """
         return data
 
+
 class PollingConnection(Connection):
     """
     Connection class which can also work with the async APIs.
@@ -736,19 +741,23 @@ class ConnectionKey(Connection):
         Initialize `user_id` and `key`; set `secure` to an C{int} based on
         passed value.
         """
-        super(ConnectionKey, self).__init__(secure=secure, host=host, 
port=port, url=url)
+        super(ConnectionKey, self).__init__(secure=secure, host=host,
+                                            port=port, url=url)
         self.key = key
 
+
 class ConnectionUserAndKey(ConnectionKey):
     """
-    Base connection which accepts a user_id and key
+    Base connection which accepts a user_id and key.
     """
 
     user_id = None
 
-    def __init__(self, user_id, key, secure=True, host=None, port=None, 
url=None):
+    def __init__(self, user_id, key, secure=True,
+                 host=None, port=None, url=None):
         super(ConnectionUserAndKey, self).__init__(key, secure=secure,
-                                                   host=host, port=port, 
url=url)
+                                                   host=host, port=port,
+                                                   url=url)
         self.user_id = user_id
 
 

Modified: libcloud/trunk/libcloud/common/cloudstack.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/cloudstack.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/cloudstack.py (original)
+++ libcloud/trunk/libcloud/common/cloudstack.py Mon Mar  5 23:34:48 2012
@@ -44,7 +44,8 @@ class CloudStackConnection(ConnectionUse
         signature.sort(key=lambda x: x[0])
         signature = urlencode(signature)
         signature = signature.lower().replace('+', '%20')
-        signature = hmac.new(b(self.key), msg=b(signature), 
digestmod=hashlib.sha1)
+        signature = hmac.new(b(self.key), msg=b(signature),
+                             digestmod=hashlib.sha1)
         return base64.b64encode(b(signature.digest()))
 
     def add_default_params(self, params):

Modified: libcloud/trunk/libcloud/common/gogrid.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/gogrid.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/gogrid.py (original)
+++ libcloud/trunk/libcloud/common/gogrid.py Mon Mar  5 23:34:48 2012
@@ -33,6 +33,7 @@ __all__ = ["GoGridResponse",
         "BaseGoGridDriver",
 ]
 
+
 class GoGridResponse(JsonResponse):
 
     def __init__(self, *args, **kwargs):
@@ -58,6 +59,7 @@ class GoGridResponse(JsonResponse):
         except (ValueError, KeyError):
             return None
 
+
 class GoGridConnection(ConnectionUserAndKey):
     """
     Connection class for the GoGrid driver
@@ -79,6 +81,7 @@ class GoGridConnection(ConnectionUserAnd
         m = hashlib.md5(b(key + secret + str(int(time.time()))))
         return m.hexdigest()
 
+
 class GoGridIpAddress(object):
     """
     IP Address
@@ -91,6 +94,7 @@ class GoGridIpAddress(object):
         self.state = state
         self.subnet = subnet
 
+
 class BaseGoGridDriver(object):
     """GoGrid has common object model for services they
     provide, like locations and IP, so keep handling of

Modified: libcloud/trunk/libcloud/common/linode.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/linode.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/linode.py (original)
+++ libcloud/trunk/libcloud/common/linode.py Mon Mar  5 23:34:48 2012
@@ -150,17 +150,22 @@ class LinodeResponse(JsonResponse):
 
 
 class LinodeConnection(ConnectionKey):
-    """A connection to the Linode API
+    """
+    A connection to the Linode API
 
     Wraps SSL connections to the Linode API, automagically injecting the
-    parameters that the API needs for each request."""
+    parameters that the API needs for each request.
+    """
     host = API_HOST
     responseCls = LinodeResponse
 
     def add_default_params(self, params):
-        """Add parameters that are necessary for every request
+        """
+        Add parameters that are necessary for every request
 
-        This method adds C{api_key} and C{api_responseFormat} to the 
request."""
+        This method adds C{api_key} and C{api_responseFormat} to
+        the request.
+        """
         params["api_key"] = self.key
         # Be explicit about this in case the default changes.
         params["api_responseFormat"] = "json"

Modified: libcloud/trunk/libcloud/common/openstack.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/openstack.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/openstack.py (original)
+++ libcloud/trunk/libcloud/common/openstack.py Mon Mar  5 23:34:48 2012
@@ -24,7 +24,8 @@ from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlparse
 
 from libcloud.common.base import ConnectionUserAndKey, Response
-from libcloud.compute.types import LibcloudError, InvalidCredsError, 
MalformedResponseError
+from libcloud.compute.types import (LibcloudError, InvalidCredsError,
+                                    MalformedResponseError)
 
 try:
     import simplejson as json
@@ -53,7 +54,8 @@ class OpenStackAuthResponse(Response):
         elif 'Content-Type' in self.headers:
             key = 'Content-Type'
         else:
-            raise LibcloudError('Missing content-type header', 
driver=OpenStackAuthConnection)
+            raise LibcloudError('Missing content-type header',
+                                driver=OpenStackAuthConnection)
 
         content_type = self.headers[key]
         if content_type.find(';') != -1:
@@ -125,7 +127,9 @@ class OpenStackAuthConnection(Connection
             raise InvalidCredsError()
         elif resp.status != httplib.NO_CONTENT:
             raise MalformedResponseError('Malformed response',
-                    body='code: %s body:%s headers:%s' % (resp.status, 
resp.body, resp.headers),
+                    body='code: %s body:%s headers:%s' % (resp.status,
+                                                          resp.body,
+                                                          resp.headers),
                     driver=self.driver)
         else:
             headers = resp.headers
@@ -137,10 +141,12 @@ class OpenStackAuthConnection(Connection
             self.auth_token = headers.get('x-auth-token', None)
 
             if not self.auth_token:
-                raise MalformedResponseError('Missing X-Auth-Token in response 
headers')
+                raise MalformedResponseError('Missing X-Auth-Token in \
+                                              response headers')
 
     def authenticate_1_1(self):
-        reqbody = json.dumps({'credentials': {'username': self.user_id, 'key': 
self.key}})
+        reqbody = json.dumps({'credentials': {'username': self.user_id,
+                                              'key': self.key}})
         resp = self.request("/v1.1/auth",
                     data=reqbody,
                     headers={},
@@ -164,7 +170,8 @@ class OpenStackAuthConnection(Connection
                 self.urls = body['auth']['serviceCatalog']
             except KeyError:
                 e = sys.exc_info()[1]
-                raise MalformedResponseError('Auth JSON response is missing 
required elements', e)
+                raise MalformedResponseError('Auth JSON response is \
+                                             missing required elements', e)
 
     def authenticate_2_0_with_apikey(self):
         # API Key based authentication uses the RAX-KSKEY extension.
@@ -173,7 +180,8 @@ class OpenStackAuthConnection(Connection
         return self.authenticate_2_0_with_body(reqbody)
 
     def authenticate_2_0_with_password(self):
-        # Password based authentication is the only 'core' authentication 
method in Keystone at this time.
+        # Password based authentication is the only 'core' authentication
+        # method in Keystone at this time.
         # 'keystone' - 
http://docs.openstack.org/api/openstack-identity-service/2.0/content/Identity-Service-Concepts-e1362.html
         reqbody = json.dumps({'auth': {'passwordCredentials': {'username': 
self.user_id, 'password': self.key}}})
         return self.authenticate_2_0_with_body(reqbody)
@@ -185,7 +193,8 @@ class OpenStackAuthConnection(Connection
                     method='POST')
         if resp.status == httplib.UNAUTHORIZED:
             raise InvalidCredsError()
-        elif resp.status not in [httplib.OK, 
httplib.NON_AUTHORITATIVE_INFORMATION]:
+        elif resp.status not in [httplib.OK,
+                                 httplib.NON_AUTHORITATIVE_INFORMATION]:
             raise MalformedResponseError('Malformed response',
                     body='code: %s body: %s' % (resp.status, resp.body),
                     driver=self.driver)
@@ -203,17 +212,18 @@ class OpenStackAuthConnection(Connection
                 self.urls = access['serviceCatalog']
             except KeyError:
                 e = sys.exc_info()[1]
-                raise MalformedResponseError('Auth JSON response is missing 
required elements', e)
+                raise MalformedResponseError('Auth JSON response is \
+                                             missing required elements', e)
 
 
 class OpenStackServiceCatalog(object):
     """
     http://docs.openstack.org/api/openstack-identity-service/2.0/content/
 
-    This class should be instanciated with the contents of the 'serviceCatalog'
-    in the auth response. This will do the work of figuring out which services
-    actually exist in the catalog as well as split them up by type, name, and
-    region if available
+    This class should be instanciated with the contents of the
+    'serviceCatalog' in the auth response. This will do the work of figuring
+    out which services actually exist in the catalog as well as split them up
+    by type, name, and region if available
     """
 
     _auth_version = None
@@ -223,13 +233,15 @@ class OpenStackServiceCatalog(object):
         self._auth_version = ex_force_auth_version or AUTH_API_VERSION
         self._service_catalog = {}
 
-        # check this way because there are a couple of different 2.0_* auth 
types
+        # Check this way because there are a couple of different 2.0_*
+        # auth types.
         if '2.0' in self._auth_version:
             self._parse_auth_v2(service_catalog)
         elif ('1.1' in self._auth_version) or ('1.0' in self._auth_version):
             self._parse_auth_v1(service_catalog)
         else:
-            raise LibcloudError('auth version "%s" not supported' % 
(self._auth_version))
+            raise LibcloudError('auth version "%s" not supported'
+                                % (self._auth_version))
 
     def get_endpoint(self, service_type=None, name=None, region=None):
 
@@ -303,8 +315,8 @@ class OpenStackBaseConnection(Connection
 
     def get_endpoint(self):
         """
-        Every openstack driver must have a connection class that subclasses 
this
-        class and it must implement this method.
+        Every openstack driver must have a connection class that subclasses
+        this class and it must implement this method.
 
         @returns: url of the relevant endpoint for the driver
 
@@ -342,9 +354,11 @@ class OpenStackBaseConnection(Connection
                 aurl = self._ex_force_auth_url
 
             if aurl == None:
-                raise LibcloudError('OpenStack instance must have auth_url 
set')
+                raise LibcloudError('OpenStack instance must \
+                                    have auth_url set')
 
-            osa = OpenStackAuthConnection(self, aurl, self._auth_version, 
self.user_id, self.key)
+            osa = OpenStackAuthConnection(self, aurl, self._auth_version,
+                                          self.user_id, self.key)
 
             # may throw InvalidCreds, etc
             osa.authenticate()

Modified: libcloud/trunk/libcloud/compute/base.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/base.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/base.py (original)
+++ libcloud/trunk/libcloud/compute/base.py Mon Mar  5 23:34:48 2012
@@ -66,6 +66,7 @@ __all__ = [
     "LibcloudHTTPConnection"
     ]
 
+
 class UuidMixin(object):
     """
     Mixin class for get_uuid function.
@@ -80,7 +81,7 @@ class UuidMixin(object):
         @return: C{string}
 
         The hash is a function of an SHA1 hash of the node, node image,
-        or node size's ID and its driver which means that it should be 
+        or node size's ID and its driver which means that it should be
         unique between all objects of its type.
         In some subclasses (e.g. GoGridNode) there is no ID
         available so the public IP address is used.  This means that,

Modified: libcloud/trunk/libcloud/compute/deployment.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/deployment.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/deployment.py (original)
+++ libcloud/trunk/libcloud/compute/deployment.py Mon Mar  5 23:34:48 2012
@@ -21,6 +21,7 @@ import binascii
 
 from libcloud.utils.py3 import basestring
 
+
 class Deployment(object):
     """
     Base class for deployment tasks.
@@ -75,6 +76,7 @@ class SSHKeyDeployment(Deployment):
         client.put(".ssh/authorized_keys", contents=self.key)
         return node
 
+
 class ScriptDeployment(Deployment):
     """
     Runs an arbitrary Shell Script task.
@@ -116,6 +118,7 @@ class ScriptDeployment(Deployment):
             client.delete(self.name)
         return node
 
+
 class MultiStepDeployment(Deployment):
     """
     Runs a chain of Deployment steps.

Modified: libcloud/trunk/libcloud/compute/drivers/bluebox.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/bluebox.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/bluebox.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/bluebox.py Mon Mar  5 23:34:48 2012
@@ -81,6 +81,7 @@ NODE_STATE_MAP = {'queued': NodeState.PE
                   'error': NodeState.TERMINATED,
                   'unknown': NodeState.UNKNOWN}
 
+
 class BlueboxResponse(JsonResponse):
     def parse_error(self):
         if int(self.status) == 401:
@@ -90,6 +91,7 @@ class BlueboxResponse(JsonResponse):
                 raise InvalidCredsError(self.body)
         return self.body
 
+
 class BlueboxNodeSize(NodeSize):
     def __init__(self, id, name, cpu, ram, disk, price, driver):
         self.id = id
@@ -104,6 +106,7 @@ class BlueboxNodeSize(NodeSize):
         return (('<NodeSize: id=%s, name=%s, cpu=%s, ram=%s, disk=%s, 
price=%s, driver=%s ...>')
                % (self.id, self.name, self.cpu, self.ram, self.disk, 
self.price, self.driver.name))
 
+
 class BlueboxConnection(ConnectionUserAndKey):
     """
     Connection class for the Bluebox driver
@@ -118,6 +121,7 @@ class BlueboxConnection(ConnectionUserAn
         headers['Authorization'] = 'Basic %s' % (user_b64)
         return headers
 
+
 class BlueboxNodeDriver(NodeDriver):
     """
     Bluebox Blocks node driver
@@ -214,7 +218,7 @@ class BlueboxNodeDriver(NodeDriver):
                  state=state,
                  public_ips=[ip['address'] for ip in vm['ips']],
                  private_ips=[],
-                 extra={'storage':vm['storage'], 'cpu':vm['cpu']},
+                 extra={'storage': vm['storage'], 'cpu': vm['cpu']},
                  driver=self.connection.driver)
         return n
 

Modified: libcloud/trunk/libcloud/compute/drivers/cloudstack.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/cloudstack.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/cloudstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/cloudstack.py Mon Mar  5 23:34:48 
2012
@@ -19,6 +19,7 @@ from libcloud.compute.base import Node, 
                                   NodeSize
 from libcloud.compute.types import NodeState
 
+
 class CloudStackNode(Node):
     "Subclass of Node so we can expose our extension methods."
 
@@ -40,6 +41,7 @@ class CloudStackNode(Node):
         "Delete a NAT/firewall rule."
         return self.driver.ex_delete_ip_forwarding_rule(self, rule)
 
+
 class CloudStackAddress(object):
     "A public IP address."
 
@@ -57,6 +59,7 @@ class CloudStackAddress(object):
     def __eq__(self, other):
         return self.__class__ is other.__class__ and self.id == other.id
 
+
 class CloudStackForwardingRule(object):
     "A NAT/firewall forwarding rule."
 
@@ -74,6 +77,7 @@ class CloudStackForwardingRule(object):
     def __eq__(self, other):
         return self.__class__ is other.__class__ and self.id == other.id
 
+
 class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
     """Driver for the CloudStack API.
 

Modified: libcloud/trunk/libcloud/compute/drivers/dreamhost.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/dreamhost.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/dreamhost.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/dreamhost.py Mon Mar  5 23:34:48 
2012
@@ -100,6 +100,7 @@ class DreamhostResponse(JsonResponse):
         else:
             raise DreamhostAPIException("Unknown problem: %s" % (self.body))
 
+
 class DreamhostConnection(ConnectionKey):
     """
     Connection class to connect to DreamHost's API servers
@@ -148,13 +149,13 @@ class DreamhostNodeDriver(NodeDriver):
         }
         data = self.connection.request('/', params).object
         return Node(
-            id = data['added_web'],
-            name = data['added_web'],
-            state = NodeState.PENDING,
-            public_ips = [],
-            private_ips = [],
-            driver = self.connection.driver,
-            extra = {
+            id=data['added_web'],
+            name=data['added_web'],
+            state=NodeState.PENDING,
+            public_ips=[],
+            private_ips=[],
+            driver=self.connection.driver,
+            extra={
                 'type' : kwargs['image'].name
             }
         )
@@ -190,9 +191,9 @@ class DreamhostNodeDriver(NodeDriver):
         images = []
         for img in data:
             images.append(NodeImage(
-                id = img['image'],
-                name = img['image'],
-                driver = self.connection.driver
+                id=img['image'],
+                name=img['image'],
+                driver=self.connection.driver
             ))
         return images
 
@@ -200,7 +201,7 @@ class DreamhostNodeDriver(NodeDriver):
         sizes = []
         for key, values in self._sizes.items():
             attributes = copy.deepcopy(values)
-            attributes.update({ 'price': self._get_size_price(size_id=key) })
+            attributes.update({'price': self._get_size_price(size_id=key)})
             sizes.append(NodeSize(driver=self.connection.driver, **attributes))
 
         return sizes
@@ -232,13 +233,13 @@ class DreamhostNodeDriver(NodeDriver):
         Convert the data from a DreamhostResponse object into a Node
         """
         return Node(
-            id = data['ps'],
-            name = data['ps'],
-            state = NodeState.UNKNOWN,
-            public_ips = [data['ip']],
-            private_ips = [],
-            driver = self.connection.driver,
-            extra = {
+            id=data['ps'],
+            name=data['ps'],
+            state=NodeState.UNKNOWN,
+            public_ips=[data['ip']],
+            private_ips=[],
+            driver=self.connection.driver,
+            extra={
                 'current_size': data['memory_mb'],
                 'account_id': data['account_id'],
                 'type': data['type']})

Modified: libcloud/trunk/libcloud/compute/drivers/dummy.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/dummy.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/dummy.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/dummy.py Mon Mar  5 23:34:48 2012
@@ -24,7 +24,8 @@ import struct
 from libcloud.common.base import ConnectionKey
 from libcloud.compute.base import NodeImage, NodeSize, Node
 from libcloud.compute.base import NodeDriver, NodeLocation
-from libcloud.compute.types import Provider,NodeState
+from libcloud.compute.types import Provider, NodeState
+
 
 class DummyConnection(ConnectionKey):
     """
@@ -34,6 +35,7 @@ class DummyConnection(ConnectionKey):
     def connect(self, host=None, port=None):
         pass
 
+
 class DummyNodeDriver(NodeDriver):
     """
     Dummy node driver
@@ -230,7 +232,7 @@ class DummyNodeDriver(NodeDriver):
                      driver=self),
             NodeSize(id=4,
                      name="XXL Big",
-                     ram=4096*2,
+                     ram=4096 * 2,
                      disk=32*4,
                      bandwidth=2500*3,
                      price=32*2,
@@ -295,9 +297,11 @@ class DummyNodeDriver(NodeDriver):
         self.nl.append(n)
         return n
 
+
 def _ip_to_int(ip):
     return socket.htonl(struct.unpack('I', socket.inet_aton(ip))[0])
 
+
 def _int_to_ip(ip):
     return socket.inet_ntoa(struct.pack('I', socket.ntohl(ip)))
 

Modified: libcloud/trunk/libcloud/compute/drivers/ecp.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ecp.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ecp.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ecp.py Mon Mar  5 23:34:48 2012
@@ -41,7 +41,8 @@ from libcloud.compute.base import is_pri
 
 #Defaults
 API_HOST = ''
-API_PORT = (80,443)
+API_PORT = (80, 443)
+
 
 class ECPResponse(Response):
 
@@ -73,6 +74,7 @@ class ECPResponse(Response):
     def getheaders(self):
         return self.headers
 
+
 class ECPConnection(ConnectionUserAndKey):
     """
     Connection class for the Enomaly ECP driver
@@ -89,7 +91,7 @@ class ECPConnection(ConnectionUserAndKey
         base64string = base64.encodestring(
                 b('%s:%s' % (username, password)))[:-1]
         authheader = "Basic %s" % base64string
-        headers['Authorization']= authheader
+        headers['Authorization'] = authheader
 
         return headers
 
@@ -112,7 +114,7 @@ class ECPConnection(ConnectionUserAndKey
         L.append('')
         body = '\r\n'.join(L)
         content_type = 'multipart/form-data; boundary=%s' % boundary
-        header = {'Content-Type':content_type}
+        header = {'Content-Type': content_type}
         return header, body
 
 
@@ -134,7 +136,7 @@ class ECPNodeDriver(NodeDriver):
         res = self.connection.request('/rest/hosting/vm/list').parse_body()
 
         #Put together a list of node objects
-        nodes=[]
+        nodes = []
         for vm in res['vms']:
             node = self._to_node(vm)
             if not node == None:
@@ -188,7 +190,7 @@ class ECPNodeDriver(NodeDriver):
 
         #Turn the VM off
         #Black magic to make the POST requests work
-        d = self.connection._encode_multipart_formdata({'action':'stop'})
+        d = self.connection._encode_multipart_formdata({'action': 'stop'})
         self.connection.request(
                    '/rest/hosting/vm/%s' % node.id,
                    method='POST',
@@ -210,7 +212,7 @@ class ECPNodeDriver(NodeDriver):
 
         #Turn the VM back on.
         #Black magic to make the POST requests work
-        d = self.connection._encode_multipart_formdata({'action':'start'})
+        d = self.connection._encode_multipart_formdata({'action': 'start'})
         self.connection.request(
             '/rest/hosting/vm/%s' % node.id,
             method='POST',
@@ -228,10 +230,10 @@ class ECPNodeDriver(NodeDriver):
 
         #Shut down first
         #Black magic to make the POST requests work
-        d = self.connection._encode_multipart_formdata({'action':'stop'})
+        d = self.connection._encode_multipart_formdata({'action': 'stop'})
         self.connection.request(
             '/rest/hosting/vm/%s' % node.id,
-            method = 'POST',
+            method='POST',
             headers=d[0],
             data=d[1]
         ).parse_body()
@@ -251,7 +253,7 @@ class ECPNodeDriver(NodeDriver):
 
         #Delete the VM
         #Black magic to make the POST requests work
-        d = self.connection._encode_multipart_formdata({'action':'delete'})
+        d = self.connection._encode_multipart_formdata({'action': 'delete'})
         self.connection.request(
             '/rest/hosting/vm/%s' % (node.id),
             method='POST',
@@ -263,7 +265,7 @@ class ECPNodeDriver(NodeDriver):
 
     def list_images(self, location=None):
         """
-        Returns a list of all package templates aka appiances aka images
+        Returns a list of all package templates aka appiances aka images.
         """
 
         #Make the call
@@ -274,9 +276,9 @@ class ECPNodeDriver(NodeDriver):
         images = []
         for ptemplate in response['packages']:
             images.append(NodeImage(
-                id = ptemplate['uuid'],
-                name= '%s: %s' % (ptemplate['name'], ptemplate['description']),
-                driver = self,
+                id=ptemplate['uuid'],
+                name='%s: %s' % (ptemplate['name'], ptemplate['description']),
+                driver=self,
                 ))
 
         return images
@@ -294,13 +296,13 @@ class ECPNodeDriver(NodeDriver):
         sizes = []
         for htemplate in response['templates']:
             sizes.append(NodeSize(
-                id = htemplate['uuid'],
-                name = htemplate['name'],
-                ram = htemplate['memory'],
-                disk = 0,  # Disk is independent of hardware template.
-                bandwidth = 0,  # There is no way to keep track of bandwidth.
-                price = 0,  # The billing system is external.
-                driver = self,
+                id=htemplate['uuid'],
+                name=htemplate['name'],
+                ram=htemplate['memory'],
+                disk=0,  # Disk is independent of hardware template.
+                bandwidth=0,  # There is no way to keep track of bandwidth.
+                price=0,  # The billing system is external.
+                driver=self,
                 ))
 
         return sizes
@@ -344,7 +346,7 @@ class ECPNodeDriver(NodeDriver):
         response = self.connection.request(
             '/rest/hosting/vm/',
             method='PUT',
-            headers = d[0],
+            headers=d[0],
             data=d[1]
         ).parse_body()
 

Modified: libcloud/trunk/libcloud/compute/drivers/gandi.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/gandi.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/gandi.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/gandi.py Mon Mar  5 23:34:48 2012
@@ -179,7 +179,7 @@ class GandiNodeDriver(BaseGandiDriver, N
             'memory': int(size.ram),
             'cores': int(size.id),
             'bandwidth': int(size.bandwidth),
-            'ip_version':  kwargs.get('inet_family', 4),
+            'ip_version': kwargs.get('inet_family', 4),
             }
 
         # Call create_from helper api. Return 3 operations : disk_create,

Modified: libcloud/trunk/libcloud/compute/drivers/gogrid.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/gogrid.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/gogrid.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/gogrid.py Mon Mar  5 23:34:48 2012
@@ -85,9 +85,10 @@ class GoGridNode(Node):
     # so uuid of node should not change after add is completed
     def get_uuid(self):
         return hashlib.sha1(
-            b("%s:%d" % (self.public_ips,self.driver.type))
+            b("%s:%d" % (self.public_ips, self.driver.type))
         ).hexdigest()
 
+
 class GoGridNodeDriver(BaseGoGridDriver, NodeDriver):
     """
     GoGrid node driver
@@ -138,8 +139,8 @@ class GoGridNodeDriver(BaseGoGridDriver,
         return n
 
     def _to_images(self, object):
-        return [ self._to_image(el)
-                 for el in object['list'] ]
+        return [self._to_image(el)
+                 for el in object['list']]
 
     def _to_location(self, element):
         location = NodeLocation(id=element['id'],
@@ -221,7 +222,7 @@ class GoGridNodeDriver(BaseGoGridDriver,
         sizes = []
         for key, values in self._instance_types.items():
             attributes = copy.deepcopy(values)
-            attributes.update({ 'price': self._get_size_price(size_id=key) })
+            attributes.update({'price': self._get_size_price(size_id=key)})
             sizes.append(NodeSize(driver=self.connection.driver, **attributes))
 
         return sizes

Modified: libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py Mon Mar  5 23:34:48 2012
@@ -30,6 +30,7 @@ from libcloud.compute.base import NodeDr
 HOST = 'www-147.ibm.com'
 REST_BASE = '/computecloud/enterprise/api/rest/20100331'
 
+
 class IBMResponse(XmlResponse):
     def success(self):
         return int(self.status) == 200
@@ -42,6 +43,7 @@ class IBMResponse(XmlResponse):
                 raise InvalidCredsError(self.body)
         return self.body
 
+
 class IBMConnection(ConnectionUserAndKey):
     """
     Connection class for the IBM Developer Cloud driver
@@ -61,6 +63,7 @@ class IBMConnection(ConnectionUserAndKey
     def encode_data(self, data):
         return urlencode(data)
 
+
 class IBMNodeDriver(NodeDriver):
     """
     IBM Developer Cloud node driver.
@@ -69,22 +72,22 @@ class IBMNodeDriver(NodeDriver):
     type = Provider.IBM
     name = "IBM Developer Cloud"
 
-    NODE_STATE_MAP = { 0: NodeState.PENDING,      # New
-                       1: NodeState.PENDING,      # Provisioning
-                       2: NodeState.TERMINATED,   # Failed
-                       3: NodeState.TERMINATED,   # Removed
-                       4: NodeState.TERMINATED,   # Rejected
-                       5: NodeState.RUNNING,      # Active
-                       6: NodeState.UNKNOWN,      # Unknown
-                       7: NodeState.PENDING,      # Deprovisioning
-                       8: NodeState.REBOOTING,    # Restarting
-                       9: NodeState.PENDING,      # Starting
-                       10: NodeState.PENDING,     # Stopping
-                       11: NodeState.TERMINATED,  # Stopped
-                       12: NodeState.PENDING,     # Deprovision Pending
-                       13: NodeState.PENDING,     # Restart Pending
-                       14: NodeState.PENDING,     # Attaching
-                       15: NodeState.PENDING }    # Detaching
+    NODE_STATE_MAP = {0: NodeState.PENDING,      # New
+                      1: NodeState.PENDING,      # Provisioning
+                      2: NodeState.TERMINATED,   # Failed
+                      3: NodeState.TERMINATED,   # Removed
+                      4: NodeState.TERMINATED,   # Rejected
+                      5: NodeState.RUNNING,      # Active
+                      6: NodeState.UNKNOWN,      # Unknown
+                      7: NodeState.PENDING,      # Deprovisioning
+                      8: NodeState.REBOOTING,    # Restarting
+                      9: NodeState.PENDING,      # Starting
+                      10: NodeState.PENDING,     # Stopping
+                      11: NodeState.TERMINATED,  # Stopped
+                      12: NodeState.PENDING,     # Deprovision Pending
+                      13: NodeState.PENDING,     # Restart Pending
+                      14: NodeState.PENDING,     # Attaching
+                      15: NodeState.PENDING }    # Detaching
 
     def create_node(self, **kwargs):
         """
@@ -129,15 +132,16 @@ class IBMNodeDriver(NodeDriver):
                 data.update({key: configurationData.get(key)})
 
         # Send request!
-        resp = self.connection.request(action = REST_BASE + '/instances',
-                                       headers = {'Content-Type': 
'application/x-www-form-urlencoded'},
-                                       method = 'POST',
-                                       data = data).object
+        resp = self.connection.request(action=REST_BASE + '/instances',
+                                       headers={'Content-Type': 
'application/x-www-form-urlencoded'},
+                                       method='POST',
+                                       data=data).object
         return self._to_nodes(resp)[0]
 
     def destroy_node(self, node):
         url = REST_BASE + '/instances/%s' % (node.id)
-        status = int(self.connection.request(action = url, 
method='DELETE').status)
+        status = int(self.connection.request(action=url,
+                                             method='DELETE').status)
         return status == 200
 
     def reboot_node(self, node):
@@ -158,15 +162,15 @@ class IBMNodeDriver(NodeDriver):
         return self._to_images(self.connection.request(REST_BASE + 
'/offerings/image').object)
 
     def list_sizes(self, location = None):
-        return [ NodeSize('BRZ32.1/2048/60*175', 'Bronze 32 bit', None, None, 
None, None, self.connection.driver),
-                 NodeSize('BRZ64.2/4096/60*500*350', 'Bronze 64 bit', None, 
None, None, None, self.connection.driver),
-                 NodeSize('COP32.1/2048/60', 'Copper 32 bit', None, None, 
None, None, self.connection.driver),
-                 NodeSize('COP64.2/4096/60', 'Copper 64 bit', None, None, 
None, None, self.connection.driver),
-                 NodeSize('SLV32.2/4096/60*350', 'Silver 32 bit', None, None, 
None, None, self.connection.driver),
-                 NodeSize('SLV64.4/8192/60*500*500', 'Silver 64 bit', None, 
None, None, None, self.connection.driver),
-                 NodeSize('GLD32.4/4096/60*350', 'Gold 32 bit', None, None, 
None, None, self.connection.driver),
-                 NodeSize('GLD64.8/16384/60*500*500', 'Gold 64 bit', None, 
None, None, None, self.connection.driver),
-                 NodeSize('PLT64.16/16384/60*500*500*500*500', 'Platinum 64 
bit', None, None, None, None, self.connection.driver) ]
+        return [NodeSize('BRZ32.1/2048/60*175', 'Bronze 32 bit', None, None, 
None, None, self.connection.driver),
+                NodeSize('BRZ64.2/4096/60*500*350', 'Bronze 64 bit', None, 
None, None, None, self.connection.driver),
+                NodeSize('COP32.1/2048/60', 'Copper 32 bit', None, None, None, 
None, self.connection.driver),
+                NodeSize('COP64.2/4096/60', 'Copper 64 bit', None, None, None, 
None, self.connection.driver),
+                NodeSize('SLV32.2/4096/60*350', 'Silver 32 bit', None, None, 
None, None, self.connection.driver),
+                NodeSize('SLV64.4/8192/60*500*500', 'Silver 64 bit', None, 
None, None, None, self.connection.driver),
+                NodeSize('GLD32.4/4096/60*350', 'Gold 32 bit', None, None, 
None, None, self.connection.driver),
+                NodeSize('GLD64.8/16384/60*500*500', 'Gold 64 bit', None, 
None, None, None, self.connection.driver),
+                NodeSize('PLT64.16/16384/60*500*500*500*500', 'Platinum 64 
bit', None, None, None, None, self.connection.driver)]
 
     def list_locations(self):
         return self._to_locations(self.connection.request(REST_BASE + 
'/locations').object)
@@ -181,28 +185,28 @@ class IBMNodeDriver(NodeDriver):
         if ip:
             public_ips.append(ip)
 
-        return Node(id = instance.findtext('ID'),
-                    name = instance.findtext('Name'),
-                    state = 
self.NODE_STATE_MAP[int(instance.findtext('Status'))],
-                    public_ips = public_ips,
-                    private_ips = [],
-                    driver = self.connection.driver)
+        return Node(id=instance.findtext('ID'),
+                    name=instance.findtext('Name'),
+                    
state=self.NODE_STATE_MAP[int(instance.findtext('Status'))],
+                    public_ips=public_ips,
+                    private_ips=[],
+                    driver=self.connection.driver)
 
     def _to_images(self, object):
-        return [ self._to_image(image) for image in object.findall('Image') ]
+        return [self._to_image(image) for image in object.findall('Image')]
 
     def _to_image(self, image):
-        return NodeImage(id = image.findtext('ID'),
-                         name = image.findtext('Name'),
-                         driver = self.connection.driver,
-                         extra = {'parametersURL': image.findtext('Manifest')})
+        return NodeImage(id=image.findtext('ID'),
+                         name=image.findtext('Name'),
+                         driver=self.connection.driver,
+                         extra={'parametersURL': image.findtext('Manifest')})
 
     def _to_locations(self, object):
-        return [ self._to_location(location) for location in 
object.findall('Location') ]
+        return [self._to_location(location) for location in 
object.findall('Location')]
 
     def _to_location(self, location):
         # NOTE: country currently hardcoded
-        return NodeLocation(id = location.findtext('ID'),
-                            name = location.findtext('Name'),
-                            country = 'US',
-                            driver = self.connection.driver)
+        return NodeLocation(id=location.findtext('ID'),
+                            name=location.findtext('Name'),
+                            country='US',
+                            driver=self.connection.driver)

Modified: libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py Mon Mar  5 
23:34:48 2012
@@ -38,11 +38,11 @@ class LibvirtNodeDriver(NodeDriver):
         0: NodeState.TERMINATED,
         1: NodeState.RUNNING,
         2: NodeState.PENDING,
-        3: NodeState.TERMINATED, # paused
-        4: NodeState.TERMINATED, # shutting down
+        3: NodeState.TERMINATED,  # paused
+        4: NodeState.TERMINATED,  # shutting down
         5: NodeState.TERMINATED,
-        6: NodeState.UNKNOWN, # crashed
-        7: NodeState.UNKNOWN, # last
+        6: NodeState.UNKNOWN,  # crashed
+        7: NodeState.UNKNOWN,  # last
     }
 
     def __init__(self, uri):
@@ -54,29 +54,29 @@ class LibvirtNodeDriver(NodeDriver):
         self.connection = libvirt.open(uri)
 
     def list_nodes(self):
-       domain_ids = self.connection.listDomainsID()
-       domains = [self.connection.lookupByID(id) for id in domain_ids]
+        domain_ids = self.connection.listDomainsID()
+        domains = [self.connection.lookupByID(id) for id in domain_ids]
 
-       nodes = []
-       for domain in domains:
-           state, max_mem, memory, vcpu_count, used_cpu_time = domain.info()
-
-           if state in self.NODE_STATE_MAP:
-               state = self.NODE_STATE_MAP[state]
-           else:
-               state = NodeState.UNKNOWN
-
-           # TODO: Use XML config to get Mac address and then parse ips
-           extra = {'uuid': domain.UUIDString(), 'os_type': domain.OSType(),
-                    'types': self.connection.getType(),
-                    'used_memory': memory / 1024, 'vcpu_count': vcpu_count,
-                    'used_cpu_time': used_cpu_time}
-           node = Node(id=domain.ID(), name=domain.name(), state=state,
-                       public_ips=[], private_ips=[], driver=self,
-                       extra=extra)
-           nodes.append(node)
+        nodes = []
+        for domain in domains:
+            state, max_mem, memory, vcpu_count, used_cpu_time = domain.info()
+
+            if state in self.NODE_STATE_MAP:
+                state = self.NODE_STATE_MAP[state]
+            else:
+                state = NodeState.UNKNOWN
+
+            # TODO: Use XML config to get Mac address and then parse ips
+            extra = {'uuid': domain.UUIDString(), 'os_type': domain.OSType(),
+                     'types': self.connection.getType(),
+                     'used_memory': memory / 1024, 'vcpu_count': vcpu_count,
+                     'used_cpu_time': used_cpu_time}
+            node = Node(id=domain.ID(), name=domain.name(), state=state,
+                        public_ips=[], private_ips=[], driver=self,
+                        extra=extra)
+            nodes.append(node)
 
-       return nodes
+        return nodes
 
     def reboot_node(self, node):
         domain = self._get_domain_for_node(node=node)

Modified: libcloud/trunk/libcloud/compute/drivers/linode.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/linode.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/linode.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/linode.py Mon Mar  5 23:34:48 2012
@@ -50,6 +50,7 @@ from libcloud.compute.base import NodeDr
 from libcloud.compute.base import NodeAuthPassword, NodeAuthSSHKey
 from libcloud.compute.base import NodeImage
 
+
 class LinodeNodeDriver(NodeDriver):
     """libcloud driver for the Linode API
 
@@ -102,7 +103,7 @@ class LinodeNodeDriver(NodeDriver):
         destruction are a separate grant.
 
         @return: C{list} of L{Node} objects that the API key can access"""
-        params = { "api_action": "linode.list" }
+        params = {"api_action": "linode.list"}
         data = self.connection.request(API_ROOT, params=params).objects[0]
         return self._to_nodes(data)
 
@@ -114,7 +115,7 @@ class LinodeNodeDriver(NodeDriver):
 
         @keyword node: the Linode to reboot
         @type node: L{Node}"""
-        params = { "api_action": "linode.reboot", "LinodeID": node.id }
+        params = {"api_action": "linode.reboot", "LinodeID": node.id}
         self.connection.request(API_ROOT, params=params)
         return True
 
@@ -127,12 +128,12 @@ class LinodeNodeDriver(NodeDriver):
 
         In most cases, all disk images must be removed from a Linode before the
         Linode can be removed; however, this call explicitly skips those
-        safeguards.  There is no going back from this method.
+        safeguards. There is no going back from this method.
 
         @keyword node: the Linode to destroy
         @type node: L{Node}"""
-        params = { "api_action": "linode.delete", "LinodeID": node.id,
-            "skipChecks": True }
+        params = {"api_action": "linode.delete", "LinodeID": node.id,
+            "skipChecks": True}
         self.connection.request(API_ROOT, params=params)
         return True
 
@@ -488,6 +489,7 @@ class LinodeNodeDriver(NodeDriver):
 
     features = {"create_node": ["ssh_key", "password"]}
 
+
 def _izip_longest(*args, **kwds):
     """Taken from Python docs
 

Modified: libcloud/trunk/libcloud/compute/ssh.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/ssh.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/ssh.py (original)
+++ libcloud/trunk/libcloud/compute/ssh.py Mon Mar  5 23:34:48 2012
@@ -30,6 +30,7 @@ except ImportError:
 
 from os.path import split as psplit
 
+
 class BaseSSHClient(object):
     """
     Base class representing a connection over SSH/SCP to a remote node.
@@ -114,6 +115,7 @@ class BaseSSHClient(object):
         raise NotImplementedError(
             'close not implemented for this ssh client')
 
+
 class ParamikoSSHClient(BaseSSHClient):
     """
     A SSH Client powered by Paramiko.
@@ -160,7 +162,7 @@ class ParamikoSSHClient(BaseSSHClient):
                     # catch EEXIST consistently *sigh*
                     pass
                 sftp.chdir(part)
-        ak = sftp.file(tail,  mode='w')
+        ak = sftp.file(tail, mode='w')
         ak.write(contents)
         if chmod is not None:
             ak.chmod(chmod)
@@ -191,6 +193,7 @@ class ParamikoSSHClient(BaseSSHClient):
     def close(self):
         self.client.close()
 
+
 class ShellOutSSHClient(BaseSSHClient):
     # TODO: write this one
     pass

Modified: libcloud/trunk/libcloud/compute/types.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/types.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/types.py (original)
+++ libcloud/trunk/libcloud/compute/types.py Mon Mar  5 23:34:48 2012
@@ -108,7 +108,7 @@ class Provider(object):
     EC2_SA_EAST = 39
     RACKSPACE_NOVA_BETA = 40
     RACKSPACE_NOVA_DFW = 41
-    LIBVIRT= 42
+    LIBVIRT = 42
     ELASTICHOSTS_US2 = 43
     ELASTICHOSTS_CA1 = 44
 

Modified: libcloud/trunk/libcloud/pricing.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/pricing.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/pricing.py (original)
+++ libcloud/trunk/libcloud/pricing.py Mon Mar  5 23:34:48 2012
@@ -47,6 +47,7 @@ def get_pricing_file_path(file_path=None
 
     return pricing_file_path
 
+
 def get_pricing(driver_type, driver_name, pricing_file_path=None):
     """
     Return pricing for the provided driver.
@@ -83,6 +84,7 @@ def get_pricing(driver_type, driver_name
 
     return size_pricing
 
+
 def set_pricing(driver_type, driver_name, pricing):
     """
     Populate the driver pricing dictionary.
@@ -99,6 +101,7 @@ def set_pricing(driver_type, driver_name
 
     PRICING_DATA[driver_type][driver_name] = pricing
 
+
 def get_size_price(driver_type, driver_name, size_id):
     """
     Return price for the provided size.
@@ -120,6 +123,7 @@ def get_size_price(driver_type, driver_n
     price = float(pricing[size_id])
     return price
 
+
 def invalidate_pricing_cache():
     """
     Invalidate the cache for all the drivers.
@@ -127,6 +131,7 @@ def invalidate_pricing_cache():
     PRICING_DATA['compute'] = {}
     PRICING_DATA['storage'] = {}
 
+
 def invalidate_module_pricing_cache(driver_type, driver_name):
     """
     Invalidate the cache for the specified driver.

Modified: libcloud/trunk/libcloud/security.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/security.py?rev=1297286&r1=1297285&r2=1297286&view=diff
==============================================================================
--- libcloud/trunk/libcloud/security.py (original)
+++ libcloud/trunk/libcloud/security.py Mon Mar  5 23:34:48 2012
@@ -19,7 +19,7 @@ Usage:
     import libcloud.security
     libcloud.security.VERIFY_SSL_CERT = True
 
-    # optional
+    # Optional.
     libcloud.security.CA_CERTS_PATH.append("/path/to/cacert.txt")
 """
 
@@ -27,7 +27,7 @@ VERIFY_SSL_CERT = True
 VERIFY_SSL_CERT_STRICT = True
 
 # File containing one or more PEM-encoded CA certificates
-# concatenated together
+# concatenated together.
 CA_CERTS_PATH = [
     # centos/fedora: openssl
     '/etc/pki/tls/certs/ca-bundle.crt',


Reply via email to