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 2013/11/17 21:05:33 UTC

[07/17] git commit: Use consistent quoting and docstring style.

Use consistent quoting and docstring style.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/cff3adf2
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/cff3adf2
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/cff3adf2

Branch: refs/heads/trunk
Commit: cff3adf20230d47e7f77329262f38a7bf90820b0
Parents: 32cc7f4
Author: Tomaz Muraus <to...@apache.org>
Authored: Sun Nov 17 20:19:56 2013 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Nov 17 20:23:48 2013 +0100

----------------------------------------------------------------------
 libcloud/compute/base.py      | 37 +++++++++++++++++++++----------------
 libcloud/loadbalancer/base.py |  8 ++++----
 2 files changed, 25 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/cff3adf2/libcloud/compute/base.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/base.py b/libcloud/compute/base.py
index 662d51c..9feb22c 100644
--- a/libcloud/compute/base.py
+++ b/libcloud/compute/base.py
@@ -45,14 +45,14 @@ SSH_CONNECT_TIMEOUT = 5 * 60
 
 
 __all__ = [
-    "Node",
-    "NodeState",
-    "NodeSize",
-    "NodeImage",
-    "NodeLocation",
-    "NodeAuthSSHKey",
-    "NodeAuthPassword",
-    "NodeDriver"
+    'Node',
+    'NodeState',
+    'NodeSize',
+    'NodeImage',
+    'NodeLocation',
+    'NodeAuthSSHKey',
+    'NodeAuthPassword',
+    'NodeDriver'
 ]
 
 
@@ -65,9 +65,8 @@ class UuidMixin(object):
         self._uuid = None
 
     def get_uuid(self):
-        """Unique hash for a node, node image, or node size
-
-        :return: ``string``
+        """
+        Unique hash for a node, node image, or node size
 
         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
@@ -85,6 +84,8 @@ class UuidMixin(object):
 
         Note, for example, that this example will always produce the
         same UUID!
+
+        :rtype: ``str``
         """
         if not self._uuid:
             self._uuid = hashlib.sha1(b('%s:%s' %
@@ -205,7 +206,8 @@ class Node(UuidMixin):
     private_ip = property(fget=_get_private_ips, fset=_set_private_ips)
 
     def reboot(self):
-        """Reboot this node
+        """
+        Reboot this node
 
         :return: ``bool``
 
@@ -226,7 +228,8 @@ class Node(UuidMixin):
         return self.driver.reboot_node(self)
 
     def destroy(self):
-        """Destroy this node
+        """
+        Destroy this node
 
         :return: ``bool``
 
@@ -716,7 +719,8 @@ class NodeDriver(BaseDriver):
             'create_node not implemented for this driver')
 
     def destroy_node(self, node):
-        """Destroy a node.
+        """
+        Destroy a node.
 
         Depending upon the provider, this may destroy all data associated with
         the node, including backups.
@@ -745,7 +749,8 @@ class NodeDriver(BaseDriver):
 
     def list_nodes(self):
         """
-        List all nodes
+        List all nodes.
+
         :return:  list of node objects
         :rtype: ``list`` of :class:`.Node`
         """
@@ -1270,6 +1275,6 @@ def is_valid_ip_address(address, family=socket.AF_INET):
     return True
 
 
-if __name__ == "__main__":
+if __name__ == '__main__':
     import doctest
     doctest.testmod()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cff3adf2/libcloud/loadbalancer/base.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/base.py b/libcloud/loadbalancer/base.py
index 39ada3d..9868efb 100644
--- a/libcloud/loadbalancer/base.py
+++ b/libcloud/loadbalancer/base.py
@@ -17,10 +17,10 @@ from libcloud.common.base import ConnectionKey, BaseDriver
 from libcloud.common.types import LibcloudError
 
 __all__ = [
-    "Member",
-    "LoadBalancer",
-    "Driver",
-    "Algorithm"
+    'Member',
+    'LoadBalancer',
+    'Driver',
+    'Algorithm'
 ]