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/06/29 15:35:39 UTC

[1/3] git commit: Fix docstrings, add ex_admin_pass argument to create_node in the Openstack driver.

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 <to...@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....@gmx.at>
Authored: Sun Jun 29 12:28:32 2014 +0200
Committer: Tomaz Muraus <to...@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``
         """


[2/3] git commit: Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/libcloud into trunk

Posted by to...@apache.org.
Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/libcloud into trunk


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

Branch: refs/heads/trunk
Commit: 03f6512d5bdfe46c5e1dac3304c9d46bcc6c41f6
Parents: 7a31c7b b9f9254
Author: Tomaz Muraus <to...@apache.org>
Authored: Sun Jun 29 15:24:26 2014 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Jun 29 15:24:26 2014 +0200

----------------------------------------------------------------------
 CHANGES.rst                            |  4 ++++
 libcloud/compute/drivers/cloudstack.py | 19 +++++++++++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/03f6512d/CHANGES.rst
----------------------------------------------------------------------


[3/3] git commit: Remove extra comma, re-order changes.

Posted by to...@apache.org.
Remove extra comma, re-order changes.


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

Branch: refs/heads/trunk
Commit: 0f369d715b96f7934e5d91a15e7fd59402444fa2
Parents: 03f6512
Author: Tomaz Muraus <to...@apache.org>
Authored: Sun Jun 29 15:24:50 2014 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Sun Jun 29 15:25:28 2014 +0200

----------------------------------------------------------------------
 CHANGES.rst                            | 8 ++++----
 libcloud/compute/drivers/cloudstack.py | 3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/0f369d71/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 67c73a0..84e2b91 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -7,10 +7,6 @@ Changes with Apache Libcloud in development
 Compute
 ~~~~~~~
 
-- Add network_association_id to ex_list_public_ips and CloudstackAddress object
-  (GITHUB-327)
-  [Roeland Kuipers]
-
 - Allow user to limit a list of subnets which are returned by passing
   ``subnet_ids`` and ``filters`` argument to the ``ex_list_subnets``
   method in the EC2 driver.
@@ -28,6 +24,10 @@ Compute
   (LIBCLOUD-580, GITHUB-320)
   [Lior Goikhburg]
 
+- Add network_association_id to ex_list_public_ips and CloudstackAddress object
+  (GITHUB-327)
+  [Roeland Kuipers]
+
 - Allow user to specify admin password by passing ``ex_admin_pass`` argument
   to the ``create_node`` method in the Openstack driver.
   (GITHUB-315)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/0f369d71/libcloud/compute/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index d4c7173..089e3f0 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -351,8 +351,7 @@ class CloudStackAddress(object):
     :type       associated_network_id: ``str``
     """
 
-    def __init__(self, id, address, driver, associated_network_id=None,):
-
+    def __init__(self, id, address, driver, associated_network_id=None):
         self.id = id
         self.address = address
         self.driver = driver