You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by qu...@apache.org on 2017/09/27 03:12:49 UTC

[06/14] libcloud git commit: fixing docstring line handling

fixing docstring line handling

Signed-off-by: Quentin Pradet <qu...@apache.org>


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

Branch: refs/heads/trunk
Commit: d238e9391cad3d94e50d6e35b9d4efe06f598cda
Parents: 33c1e6f
Author: Mika Lackman <mi...@upcloud.com>
Authored: Sun Sep 24 08:45:06 2017 +0300
Committer: Quentin Pradet <qu...@apache.org>
Committed: Wed Sep 27 07:04:33 2017 +0400

----------------------------------------------------------------------
 libcloud/common/upcloud.py          | 14 ++++++++++----
 libcloud/compute/drivers/upcloud.py | 17 +++++++++++++----
 2 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/d238e939/libcloud/common/upcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/common/upcloud.py b/libcloud/common/upcloud.py
index 432606a..cbb2904 100644
--- a/libcloud/common/upcloud.py
+++ b/libcloud/common/upcloud.py
@@ -23,10 +23,12 @@ class UpcloudTimeoutException(Exception):
 
 
 class UpcloudCreateNodeRequestBody(object):
-    """Body of the create_node request
+    """
+    Body of the create_node request
 
     Takes the create_node arguments (**kwargs) and constructs the request body
     """
+
     def __init__(self, user_id, name, size, image, location, auth=None):
         self.body = {
             'server': {
@@ -40,14 +42,18 @@ class UpcloudCreateNodeRequestBody(object):
         }
 
     def to_json(self):
-        """Serializes the body to json"""
+        """
+        Serializes the body to json
+        """
         return json.dumps(self.body)
 
 
 class UpcloudNodeDestroyer(object):
-    """Destroyes the node.
+    """
+    Destroyes the node.
     Node must be first stopped and then it can be
-    destroyed"""
+    destroyed
+    """
 
     WAIT_AMOUNT = 2
     SLEEP_COUNT_TO_TIMEOUT = 20

http://git-wip-us.apache.org/repos/asf/libcloud/blob/d238e939/libcloud/compute/drivers/upcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/upcloud.py b/libcloud/compute/drivers/upcloud.py
index b9daf84..d2e0314 100644
--- a/libcloud/compute/drivers/upcloud.py
+++ b/libcloud/compute/drivers/upcloud.py
@@ -37,7 +37,9 @@ SERVER_STATE = {
 
 
 class UpcloudResponse(JsonResponse):
-    """Response class for UpcloudDriver"""
+    """
+    Response class for UpcloudDriver
+    """
 
     def success(self):
         if self.status == httplib.NO_CONTENT:
@@ -52,7 +54,10 @@ class UpcloudResponse(JsonResponse):
 
 
 class UpcloudConnection(ConnectionUserAndKey):
-    """Connection class for UpcloudDriver"""
+    """
+    Connection class for UpcloudDriver
+    """
+
     host = 'api.upcloud.com'
     responseCls = UpcloudResponse
 
@@ -71,7 +76,8 @@ class UpcloudConnection(ConnectionUserAndKey):
 
 
 class UpcloudDriver(NodeDriver):
-    """Upcloud node driver
+    """
+    Upcloud node driver
 
     :keyword    username: Username required for authentication
     :type       username: ``str``
@@ -79,6 +85,7 @@ class UpcloudDriver(NodeDriver):
     :keyword    password: Password required for authentication
     :type       password: ``str``
     """
+
     type = Provider.UPCLOUD
     name = 'Upcloud'
     website = 'https://www.upcloud.com'
@@ -207,7 +214,9 @@ class UpcloudDriver(NodeDriver):
         return destroyer.destroy_node(node.id)
 
     def _node_ids(self):
-        """Returns list of server uids currently on upcloud"""
+        """
+        Returns list of server uids currently on upcloud
+        """
         response = self.connection.request('1.2/server')
         servers = response.object['servers']['server']
         return [server['uuid'] for server in servers]