libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/3] git commit: Fix docstrings, add ex_admin_pass argument to create_node in the Openstack driver.
Date Sun, 29 Jun 2014 13:35:39 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk b9f9254a3 -> 0f369d715


Fix docstrings, add ex_admin_pass argument to create_node
in the Openstack driver.

Closes #315

Signed-off-by: Tomaz Muraus <tomaz@apache.org>


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

Branch: refs/heads/trunk
Commit: 7a31c7b2971ce43ae0b66c1eb31bbc3255744d35
Parents: 13c38de
Author: Marcus Devich <m.devich@gmx.at>
Authored: Sun Jun 29 12:28:32 2014 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sun Jun 29 15:17:10 2014 +0200

----------------------------------------------------------------------
 CHANGES.rst                                       |  5 +++++
 contrib/generate_provider_feature_matrix_table.py |  1 +
 libcloud/compute/drivers/abiquo.py                |  4 ++--
 libcloud/compute/drivers/brightbox.py             | 17 ++++++++++-------
 libcloud/compute/drivers/cloudsigma.py            |  8 ++++----
 libcloud/compute/drivers/ec2.py                   |  8 ++++----
 libcloud/compute/drivers/gogrid.py                |  2 +-
 libcloud/compute/drivers/libvirt_driver.py        |  1 +
 libcloud/compute/drivers/opennebula.py            |  2 +-
 libcloud/compute/drivers/openstack.py             | 16 +++++++++++-----
 10 files changed, 40 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index c4df822..82a6e67 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -24,6 +24,11 @@ Compute
   (LIBCLOUD-580, GITHUB-320)
   [Lior Goikhburg]
 
+- Allow user to specify admin password by passing ``ex_admin_pass`` argument
+  to the ``create_node`` method in the Openstack driver.
+  (GITHUB-315)
+  [Marcus Devich]
+
 Changes with Apache Libcloud 0.15.0
 -----------------------------------
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/contrib/generate_provider_feature_matrix_table.py
----------------------------------------------------------------------
diff --git a/contrib/generate_provider_feature_matrix_table.py b/contrib/generate_provider_feature_matrix_table.py
index 54ab7fe..54ef3e6 100755
--- a/contrib/generate_provider_feature_matrix_table.py
+++ b/contrib/generate_provider_feature_matrix_table.py
@@ -13,6 +13,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+from __future__ import with_statement
 
 import os
 import sys

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/abiquo.py b/libcloud/compute/drivers/abiquo.py
index edf2f25..cccd5cf 100644
--- a/libcloud/compute/drivers/abiquo.py
+++ b/libcloud/compute/drivers/abiquo.py
@@ -274,8 +274,8 @@ class AbiquoNodeDriver(NodeDriver):
 
         You can specify the location as well.
 
-        :param     name:     name of the group (required)
-        :type      name:     ``str``
+        :param     group:     name of the group (required)
+        :type      group:     ``str``
 
         :param     location: location were to create the group
         :type      location: :class:`NodeLocation`

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/brightbox.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/brightbox.py b/libcloud/compute/drivers/brightbox.py
index a7b5ccd..8798332 100644
--- a/libcloud/compute/drivers/brightbox.py
+++ b/libcloud/compute/drivers/brightbox.py
@@ -121,12 +121,15 @@ class BrightboxNodeDriver(NodeDriver):
         )
 
     def _to_location(self, data):
-        return NodeLocation(
-            id=data['id'],
-            name=data['handle'],
-            country='GB',
-            driver=self
-        )
+        if data:
+            return NodeLocation(
+                id=data['id'],
+                name=data['handle'],
+                country='GB',
+                driver=self
+            )
+        else:
+            return None
 
     def _post(self, path, data={}):
         headers = {'Content-Type': 'application/json'}
@@ -183,7 +186,7 @@ class BrightboxNodeDriver(NodeDriver):
         data = self.connection.request('/%s/servers' % self.api_version).object
         return list(map(self._to_node, data))
 
-    def list_images(self):
+    def list_images(self, location=None):
         data = self.connection.request('/%s/images' % self.api_version).object
         return list(map(self._to_image, data))
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/cloudsigma.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudsigma.py b/libcloud/compute/drivers/cloudsigma.py
index 55e472f..29b65cb 100644
--- a/libcloud/compute/drivers/cloudsigma.py
+++ b/libcloud/compute/drivers/cloudsigma.py
@@ -1611,8 +1611,8 @@ class CloudSigma_2_0_NodeDriver(CloudSigmaNodeDriver):
         """
         Retrieve a single tag.
 
-        :param id: ID of the tag to retrieve.
-        :type id: ``str``
+        :param tag_id: ID of the tag to retrieve.
+        :type tag_id: ``str``
 
         :rtype: ``list`` of :class:`.CloudSigmaTag` objects
         """
@@ -1674,8 +1674,8 @@ class CloudSigma_2_0_NodeDriver(CloudSigmaNodeDriver):
         """
         Associate tag with the provided resources.
 
-        :param resource: Resources to associate a tag with.
-        :type resource: ``list`` of :class:`libcloud.compute.base.Node` or
+        :param resources: Resources to associate a tag with.
+        :type resources: ``list`` of :class:`libcloud.compute.base.Node` or
                         :class:`.CloudSigmaDrive`
 
         :param tag: Tag to associate with the resources.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 628ee63..c17f072 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -3490,8 +3490,8 @@ class BaseEC2NodeDriver(NodeDriver):
         """
         Create a network interface within a VPC subnet.
 
-        :param      node: EC2NetworkSubnet instance
-        :type       node: :class:`EC2NetworkSubnet`
+        :param      subnet: EC2NetworkSubnet instance
+        :type       subnet: :class:`EC2NetworkSubnet`
 
         :param      name:  Optional name of the interface
         :type       name:  ``str``
@@ -3630,8 +3630,8 @@ class BaseEC2NodeDriver(NodeDriver):
         """
         Modify image attributes.
 
-        :param      node: Node instance
-        :type       node: :class:`Node`
+        :param      image: NodeImage instance
+        :type       image: :class:`NodeImage`
 
         :param      attributes: Dictionary with node attributes
         :type       attributes: ``dict``

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/gogrid.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gogrid.py b/libcloud/compute/drivers/gogrid.py
index cc24252..6c73e46 100644
--- a/libcloud/compute/drivers/gogrid.py
+++ b/libcloud/compute/drivers/gogrid.py
@@ -403,7 +403,7 @@ class GoGridNodeDriver(BaseGoGridDriver, NodeDriver):
         :type       ex_description: ``str``
 
         :keyword    name: name of the image
-        :type       name ``str``
+        :type       name: ``str``
 
         :rtype: :class:`NodeImage`
         """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/libvirt_driver.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/libvirt_driver.py b/libcloud/compute/drivers/libvirt_driver.py
index 9b71885..3618ac4 100644
--- a/libcloud/compute/drivers/libvirt_driver.py
+++ b/libcloud/compute/drivers/libvirt_driver.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+from __future__ import with_statement
 
 import re
 import os

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/opennebula.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/opennebula.py b/libcloud/compute/drivers/opennebula.py
index c29833e..c295cd4 100644
--- a/libcloud/compute/drivers/opennebula.py
+++ b/libcloud/compute/drivers/opennebula.py
@@ -415,9 +415,9 @@ class OpenNebulaNodeDriver(NodeDriver):
         """
         List virtual networks on a provider.
 
-        :type  location: :class:`NodeLocation`
         :param location: Location from which to request a list of virtual
                          networks. (optional)
+        :type  location: :class:`NodeLocation`
 
         :return: List of virtual networks available to be connected to a
                  compute node.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a31c7b2/libcloud/compute/drivers/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/openstack.py b/libcloud/compute/drivers/openstack.py
index c573feb..c09cee6 100644
--- a/libcloud/compute/drivers/openstack.py
+++ b/libcloud/compute/drivers/openstack.py
@@ -1083,7 +1083,7 @@ class OpenStackSecurityGroup(object):
         :type       description: ``str``
 
         :keyword    rules: Rules associated with this group.
-        :type       description: ``list`` of
+        :type       rules: ``list`` of
                     :class:`OpenStackSecurityGroupRule`
 
         :keyword    extra: Extra attributes associated with this group.
@@ -1259,6 +1259,9 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
                                     Can be either ``AUTO`` or ``MANUAL``.
         :type       ex_disk_config: ``str``
 
+        :keyword    ex_admin_pass: The root password for the node
+        :type       ex_admin_pass: ``str``
+
         :keyword    ex_availability_zone: Nova availability zone for the node
         :type       ex_availability_zone: ``str``
         """
@@ -1345,6 +1348,9 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
         if 'ex_disk_config' in kwargs:
             server_params['OS-DCF:diskConfig'] = kwargs['ex_disk_config']
 
+        if 'ex_admin_pass' in kwargs:
+            server_params['adminPass'] = kwargs['ex_admin_pass']
+
         if 'networks' in kwargs:
             networks = kwargs['networks']
             networks = [{'uuid': network.id} for network in networks]
@@ -1653,8 +1659,8 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
         """
         Create a snapshot based off of a volume.
 
-        :param      node: volume
-        :type       node: :class:`StorageVolume`
+        :param      volume: volume
+        :type       volume: :class:`StorageVolume`
 
         :keyword    name: New name for the volume snapshot
         :type       name: ``str``
@@ -1680,8 +1686,8 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver):
         """
         Delete a VolumeSnapshot
 
-        :param      node: snapshot
-        :type       node: :class:`VolumeSnapshot`
+        :param      snapshot: snapshot
+        :type       snapshot: :class:`VolumeSnapshot`
 
         :rtype:     ``bool``
         """


Mime
View raw message