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 2014/01/05 23:30:00 UTC

[3/6] git commit: Fix some typos and docstring issues which were causing Sphinx warnings.

Fix some typos and docstring issues which were causing Sphinx warnings.


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

Branch: refs/heads/trunk
Commit: 32c951f205b9de0ca1e1fe5f6471820754c521cb
Parents: 4724923
Author: Tomaz Muraus <to...@apache.org>
Authored: Sun Jan 5 23:19:13 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Jan 5 23:19:13 2014 +0100

----------------------------------------------------------------------
 libcloud/compute/base.py               |  9 ++++-----
 libcloud/compute/deployment.py         |  2 +-
 libcloud/compute/drivers/cloudstack.py | 22 +++++++---------------
 libcloud/compute/drivers/ec2.py        | 18 ++++++++----------
 libcloud/compute/drivers/vcloud.py     | 19 ++++++++-----------
 5 files changed, 28 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/32c951f2/libcloud/compute/base.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/base.py b/libcloud/compute/base.py
index 7e6b9e6..1972ba0 100644
--- a/libcloud/compute/base.py
+++ b/libcloud/compute/base.py
@@ -148,11 +148,10 @@ class Node(UuidMixin):
 
     Althrough Node objects can be subclassed, this isn't normally
     done.  Instead, any driver specific information is stored in the
-    "extra" proproperty of the node.
+    "extra" attribute of the node.
 
     >>> node.extra
     {'foo': 'bar'}
-
     """
 
     def __init__(self, id, name, state, public_ips, private_ips,
@@ -177,10 +176,10 @@ class Node(UuidMixin):
         :type driver: :class:`.NodeDriver`
 
         :param size: Size of this node. (optional)
-        :type size: :class:`.NodeSize:
+        :type size: :class:`.NodeSize`
 
         :param image: Image of this node. (optional)
-        :type size: :class:`.NodeImage:
+        :type size: :class:`.NodeImage`
 
         :param extra: Optional provider specific attributes associated with
                       this node.
@@ -380,7 +379,7 @@ class NodeLocation(object):
         :type name: ``str``
 
         :param country: Location country.
-        :type country : ``str``
+        :type country: ``str``
 
         :param driver: Driver this location belongs to.
         :type driver: :class:`.NodeDriver`

http://git-wip-us.apache.org/repos/asf/libcloud/blob/32c951f2/libcloud/compute/deployment.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/deployment.py b/libcloud/compute/deployment.py
index acab269..5cfc2c6 100644
--- a/libcloud/compute/deployment.py
+++ b/libcloud/compute/deployment.py
@@ -118,7 +118,7 @@ class ScriptDeployment(Deployment):
     Runs an arbitrary shell script on the server.
 
     This step works by first writing the content of the shell script (script
-    argument) in a *.sh file on a remote server and then running that file.
+    argument) in a \*.sh file on a remote server and then running that file.
 
     If you are running a non-shell script, make sure to put the appropriate
     shebang to the top of the script. You are also advised to do that even if

http://git-wip-us.apache.org/repos/asf/libcloud/blob/32c951f2/libcloud/compute/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index 1cc82b2..5c49dc3 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -557,18 +557,10 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
         """
         Stops/Suspends a running virtual machine
 
+        :param node: Node to stop.
         :type node: :class:`CloudStackNode`
 
-        :param id: The ID of the virtual machine
-        :type  id: ``str``
-
-        :param forced: Force stop the VM
-                       (vm is marked as Stopped even when command
-                        fails to be send to the backend).
-                       The caller knows the VM is stopped.
-        :type  forced: ``bool``
-
-        :rtype ``str``
+        :rtype: ``str``
         """
         res = self._async_request(command='stopVirtualMachine',
                                   params={'id': node.id},
@@ -844,11 +836,11 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
         :param     projectid: The project associated with keypair
         :type      projectid: ``str``
 
-        :param     domainid : The domain ID associated with the keypair
+        :param     domainid: The domain ID associated with the keypair
         :type      domainid: ``str``
 
-        :param     account : The account associated with the keypair.
-                             Must be used with the domainId parameter.
+        :param     account: The account associated with the keypair.
+                            Must be used with the domainId parameter.
         :type      account: ``str``
 
         :return:   True of False based on success of Keypair deletion
@@ -1240,10 +1232,10 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
         :param     projectid: The project associated with keypair
         :type      projectid: ``str``
 
-        :param     domainid : The domain ID associated with the keypair
+        :param     domainid: The domain ID associated with the keypair
         :type      domainid: ``str``
 
-        :param     account : The account associated with the keypair.
+        :param     account: The account associated with the keypair.
                              Must be used with the domainId parameter.
         :type      account: ``str``
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/32c951f2/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index ebeae25..a40bc24 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -2051,14 +2051,14 @@ class BaseEC2NodeDriver(NodeDriver):
 
     def ex_create_security_group(self, name, description, vpc_id=None):
         """
-        Creates a new Security Group in EC2-Classic or a targetted VPC
+        Creates a new Security Group in EC2-Classic or a targetted VPC.
 
         :param      name:        The name of the security group to Create.
                                  This must be unique.
         :type       name:        ``str``
 
         :param      description: Human readable description of a Security
-        Group.
+                                 Group.
         :type       description: ``str``
 
         :param      description: Optional identifier for VPC networks
@@ -2116,10 +2116,10 @@ class BaseEC2NodeDriver(NodeDriver):
 
     def ex_delete_security_group(self, name):
         """
-        Wrapper method which calls ex_delete_security_group_by_name
+        Wrapper method which calls ex_delete_security_group_by_name.
 
         :param      name: The name of the security group
-        :type       name ``str``
+        :type       name: ``str``
 
         :rtype: ``bool``
         """
@@ -2956,7 +2956,8 @@ class BaseEC2NodeDriver(NodeDriver):
         return self.ex_modify_instance_attribute(node, attributes)
 
     def create_node(self, **kwargs):
-        """Create a new EC2 node
+        """
+        Create a new EC2 node.
 
         Reference: http://bit.ly/8ZyPSy [docs.amazonwebservices.com]
 
@@ -2985,9 +2986,7 @@ class BaseEC2NodeDriver(NodeDriver):
         :type       ex_clienttoken: ``str``
 
         :keyword    ex_blockdevicemappings: ``list`` of ``dict`` block device
-                    mappings. Example:
-                    [{'DeviceName': '/dev/sda1', 'Ebs.VolumeSize': 10},
-                     {'DeviceName': '/dev/sdb', 'VirtualName': 'ephemeral0'}]
+                    mappings.
         :type       ex_blockdevicemappings: ``list`` of ``dict``
 
         :keyword    ex_iamprofile: Name or ARN of IAM profile
@@ -3142,8 +3141,7 @@ class BaseEC2NodeDriver(NodeDriver):
 
         :return:    Dictionary with the following keys:
                     - instance_id (``str``)
-                    - timestamp (``datetime.datetime``) - timestamp of the last
-                      output
+                    - timestamp (``datetime.datetime``) - ts of the last output
                     - output (``str``) - console output
         :rtype:     ``dict``
         """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/32c951f2/libcloud/compute/drivers/vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/vcloud.py b/libcloud/compute/drivers/vcloud.py
index 177820e..3b289d4 100644
--- a/libcloud/compute/drivers/vcloud.py
+++ b/libcloud/compute/drivers/vcloud.py
@@ -693,23 +693,19 @@ class VCloudNodeDriver(NodeDriver):
         """
         Creates and returns node.
 
-        @inherits: :class:`NodeDriver.create_node`
-
         :keyword    ex_network: link to a "Network" e.g.,
-          "https://services.vcloudexpress.terremark.com/api/v0.8/network/7"
+                    ``https://services.vcloudexpress...``
         :type       ex_network: ``str``
 
         :keyword    ex_vdc: Name of organisation's virtual data
-            center where vApp VMs will be deployed.
+                            center where vApp VMs will be deployed.
         :type       ex_vdc: ``str``
 
         :keyword    ex_cpus: number of virtual cpus (limit depends on provider)
         :type       ex_cpus: ``int``
 
-        :keyword    ex_row: ???
         :type       ex_row: ``str``
 
-        :keyword    ex_group: ????
         :type       ex_group: ``str``
         """
         name = kwargs['name']
@@ -1336,11 +1332,12 @@ class VCloud_1_5_NodeDriver(VCloudNodeDriver):
         return results
 
     def create_node(self, **kwargs):
-        """Creates and returns node. If the source image is:
-           - vApp template - a new vApp is instantiated from template
-           - existing vApp - a new vApp is cloned from the source vApp. Can
-                             not clone more vApps is parallel otherwise
-                             resource busy error is raised.
+        """
+        Creates and returns node. If the source image is:
+          - vApp template - a new vApp is instantiated from template
+          - existing vApp - a new vApp is cloned from the source vApp. Can
+                            not clone more vApps is parallel otherwise
+                            resource busy error is raised.
 
 
         @inherits: :class:`NodeDriver.create_node`