Fix more docstring issues.

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

Branch: refs/heads/trunk
Commit: 0a7b29eea051881af51afd8e19af51df6e7ba586
Parents: 68b6c2d
Author: Tomaz Muraus <to...@tomaz.me>
Authored: Wed Dec 30 16:34:00 2015 +0800
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Wed Dec 30 16:34:00 2015 +0800

----------------------------------------------------------------------
 docs/conf.py                               |  2 +-
 libcloud/compute/drivers/gce.py            | 12 ++++++------
 libcloud/compute/drivers/hostvirtual.py    |  9 ++++++---
 libcloud/compute/drivers/ibm_sce.py        |  3 +--
 libcloud/compute/drivers/linode.py         | 24 ++++++++++++------------
 libcloud/compute/drivers/nephoscale.py     | 14 +++++++-------
 libcloud/compute/drivers/profitbricks.py   |  2 +-
 libcloud/storage/drivers/google_storage.py | 18 +++++++++++++-----
 libcloud/test/compute/test_elasticstack.py | 10 ----------
 9 files changed, 47 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/docs/conf.py
----------------------------------------------------------------------
diff --git a/docs/conf.py b/docs/conf.py
index 155a30a..56b68eb 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -284,7 +284,7 @@ def mock_warning(self, *args, **kwargs):
 original_warn_node = BuildEnvironment.warn_node
 
 def ignore_more_than_one_target_found_errors(self, msg, node):
-    if "more than one target found" in msg:
+    if 'more than one target found' in msg:
         return None
 
     return original_warn_node(self, msg, node)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 03a8320..84ac64d 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -2292,7 +2292,7 @@ class GCENodeDriver(NodeDriver):
                                        list of dictionaries containing email
                                        and list of scopes, e.g.
                                        [{'email':'default',
-                                         'scopes':['compute', ...]}, ...]
+                                       'scopes':['compute', ...]}, ...]
                                        Scopes can either be full URLs or short
                                        names. If not provided, use the
                                        'default' service account email and a
@@ -2345,8 +2345,8 @@ class GCENodeDriver(NodeDriver):
         :type     ex_automatic_restart: ``bool`` or ``None``
 
         :keyword  ex_preemptible: Defines whether the instance is preemptible.
-                                        (If not supplied, the instance will
-                                         not be preemptible)
+                                  (If not supplied, the instance will not be
+                                  preemptible)
         :type     ex_preemptible: ``bool`` or ``None``
 
         :return:  A Node object for the new node.
@@ -2491,7 +2491,7 @@ class GCENodeDriver(NodeDriver):
                                        list of dictionaries containing email
                                        and list of scopes, e.g.
                                        [{'email':'default',
-                                         'scopes':['compute', ...]}, ...]
+                                       'scopes':['compute', ...]}, ...]
                                        Scopes can either be full URLs or short
                                        names. If not provided, use the
                                        'default' service account email and a
@@ -3299,7 +3299,7 @@ class GCENodeDriver(NodeDriver):
                                        list of dictionaries containing email
                                        and list of scopes, e.g.
                                        [{'email':'default',
-                                         'scopes':['compute', ...]}, ...]
+                                       'scopes':['compute', ...]}, ...]
                                        Scopes can either be full URLs or short
                                        names. If not provided, use the
                                        'default' service account email and a
@@ -4592,7 +4592,7 @@ class GCENodeDriver(NodeDriver):
                                        list of dictionaries containing email
                                        and list of scopes, e.g.
                                        [{'email':'default',
-                                         'scopes':['compute', ...]}, ...]
+                                       'scopes':['compute', ...]}, ...]
                                        Scopes can either be full URLs or short
                                        names. If not provided, use the
                                        'default' service account email and a

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/hostvirtual.py 
b/libcloud/compute/drivers/hostvirtual.py
index 116a211..e56889e 100644
--- a/libcloud/compute/drivers/hostvirtual.py
+++ b/libcloud/compute/drivers/hostvirtual.py
@@ -126,8 +126,11 @@ class HostVirtualNodeDriver(NodeDriver):
         return images
 
     def create_node(self, name, image, size, **kwargs):
-        """Creates a node
-        Example of node creation with ssh key deployed
+        """
+        Creates a node
+
+        Example of node creation with ssh key deployed:
+
         >>> from libcloud.compute.base import NodeAuthSSHKey
         >>> key = open('/home/user/.ssh/id_rsa.pub').read()
         >>> auth = NodeAuthSSHKey(pubkey=key)
@@ -139,7 +142,7 @@ class HostVirtualNodeDriver(NodeDriver):
         >>> location = conn.list_locations()[1]
         >>> name = 'markos-dev'
         >>> node = conn.create_node(name, image, size, auth=auth,
-                                    location=location)
+        >>>                         location=location)
         """
 
         dc = None

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/ibm_sce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ibm_sce.py 
b/libcloud/compute/drivers/ibm_sce.py
index 66cbec6..d01e5d4 100644
--- a/libcloud/compute/drivers/ibm_sce.py
+++ b/libcloud/compute/drivers/ibm_sce.py
@@ -132,8 +132,7 @@ class Address(object):
     """
     A reserved IP address that can be attached to an instance.
     Properties: id, ip, state, options(location, type, created_time, state,
-     hostname, instance_ids, vlan, owner,
-    mode, offering_id)
+    hostname, instance_ids, vlan, owner, mode, offering_id)
     """
     def __init__(self, id, ip, state, options):
         self.id = id

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/linode.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/linode.py 
b/libcloud/compute/drivers/linode.py
index c3a9642..e24e367 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -55,18 +55,18 @@ class LinodeNodeDriver(NodeDriver):
 
     Rough mapping of which is which:
 
-        list_nodes              linode.list
-        reboot_node             linode.reboot
-        destroy_node            linode.delete
-        create_node             linode.create, linode.update,
-                                linode.disk.createfromdistribution,
-                                linode.disk.create, linode.config.create,
-                                linode.ip.addprivate, linode.boot
-        list_sizes              avail.linodeplans
-        list_images             avail.distributions
-        list_locations          avail.datacenters
-        list_volumes            linode.disk.list
-        destroy_volume          linode.disk.delete
+    - list_nodes              linode.list
+    - reboot_node             linode.reboot
+    - destroy_node            linode.delete
+    - create_node             linode.create, linode.update,
+                              linode.disk.createfromdistribution,
+                              linode.disk.create, linode.config.create,
+                              linode.ip.addprivate, linode.boot
+    - list_sizes              avail.linodeplans
+    - list_images             avail.distributions
+    - list_locations          avail.datacenters
+    - list_volumes            linode.disk.list
+    - destroy_volume          linode.disk.delete
 
     For more information on the Linode API, be sure to read the reference:
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/nephoscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/nephoscale.py 
b/libcloud/compute/drivers/nephoscale.py
index 1888ac8..e06b7d3 100644
--- a/libcloud/compute/drivers/nephoscale.py
+++ b/libcloud/compute/drivers/nephoscale.py
@@ -351,13 +351,13 @@ get all keys call with no arguments')
         We can also specify the location
         >>> location = conn.list_locations()[0]
         >>> node = conn.create_node(name=name,
-            ...                     size=size,
-            ...                     image=image,
-            ...                     console_key=console_key,
-            ...                     server_key=server_key,
-            ...                     connect_attempts=10,
-            ...                     nowait=True,
-            ...                     zone=location.id)
+        >>> ...                     size=size,
+        >>> ...                     image=image,
+        >>> ...                     console_key=console_key,
+        >>> ...                     server_key=server_key,
+        >>> ...                     connect_attempts=10,
+        >>> ...                     nowait=True,
+        >>> ...                     zone=location.id)
         """
         hostname = kwargs.get('hostname', name)
         service_type = size.id

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/compute/drivers/profitbricks.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/profitbricks.py 
b/libcloud/compute/drivers/profitbricks.py
index f47fc66..697b082 100644
--- a/libcloud/compute/drivers/profitbricks.py
+++ b/libcloud/compute/drivers/profitbricks.py
@@ -248,7 +248,7 @@ class ProfitBricksNodeDriver(NodeDriver):
 
     These are instance types that match up with what other providers support.
 
-    You can configure disk size, core size, and memory size using the ex_
+    You can configure disk size, core size, and memory size using the ``ex_``
     parameters on the create_node method.
     """
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/storage/drivers/google_storage.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/google_storage.py 
b/libcloud/storage/drivers/google_storage.py
index 8646556..ca80c97 100644
--- a/libcloud/storage/drivers/google_storage.py
+++ b/libcloud/storage/drivers/google_storage.py
@@ -113,16 +113,24 @@ class GoogleStorageDriver(BaseS3StorageDriver):
     Installed App credentials, and GCE instance service accounts)
 
     Examples:
-    Service Accounts
+
+    Service Accounts::
+
         driver = GoogleStorageDriver(key=client_email, secret=private_key, ...)
-    Installed Application
+
+    Installed Application::
+
         driver = GoogleStorageDriver(key=client_id, secret=client_secret, ...)
-    From GCE instance
+
+    From GCE instance::
+
         driver = GoogleStorageDriver(key=foo , secret=bar, ...)
 
     Can also authenticate via Google Cloud Storage's S3 interoperability API.
-    S3 user keys are 20 alphanumeric characters, starting with GOOG
-    Example:
+    S3 user keys are 20 alphanumeric characters, starting with GOOG.
+
+    Example::
+
         driver = GoogleStorageDriver(key='GOOG0123456789ABCXYZ',
                                      secret=key_secret)
     """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0a7b29ee/libcloud/test/compute/test_elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_elasticstack.py 
b/libcloud/test/compute/test_elasticstack.py
index 40dea2e..4cbbbe5 100644
--- a/libcloud/test/compute/test_elasticstack.py
+++ b/libcloud/test/compute/test_elasticstack.py
@@ -34,16 +34,6 @@ class ElasticStackTestCase(object):
 
     def setUp(self):
         # Re-use ElasticHosts fixtures for the base ElasticStack platform tests
-        """ElasticStack.type = Provider.ELASTICHOSTS
-        ElasticStack.api_name = 'elastichosts'
-
-        ElasticStackBaseConnection.host = 'test.com'
-        ElasticStack.connectionCls.conn_classes = (None,
-                                                   ElasticStackMockHttp)
-        ElasticStack._standard_drives = ElasticHosts._standard_drives
-
-        self.driver = ElasticStack('foo', 'bar')
-        """
         self.mockHttp = ElasticStackMockHttp
         self.mockHttp.type = None
 

Reply via email to