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 2015/08/09 22:21:23 UTC

libcloud git commit: List VPCs project support in the CloudStack driver.

Repository: libcloud
Updated Branches:
  refs/heads/trunk 664135b86 -> 9fefa0ce7


List VPCs project support in the CloudStack driver.

Closes #516

Signed-off-by: Tomaz Muraus <to...@tomaz.me>


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

Branch: refs/heads/trunk
Commit: 9fefa0ce70de7e5df9739b6315888c2bf4f04a0a
Parents: 664135b
Author: Syed <sy...@gmail.com>
Authored: Wed May 13 11:47:03 2015 -0400
Committer: Tomaz Muraus <to...@tomaz.me>
Committed: Sun Aug 9 22:12:13 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/9fefa0ce/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index f8f852f..d3741b4 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,17 @@
 Changelog
 =========
 
+Changes with Apache Libcloud in development
+-------------------------------------------
+
+Compute
+~~~~~~~
+
+- Allow user to filter VPC by project in the CloudStack driver by passing
+  ``project`` argument to the ``ex_list_vps`` method.
+  (GITHUB-516)
+  [Syed Mushtaq Ahmed]
+
 Changes with Apache Libcloud 0.18.0
 -----------------------------------
 
@@ -38,7 +49,6 @@ General
   (GITHUB-515, LIBCLOUD-360, LIBCLOUD-709)
 
 - Fix a bug in consuming stdout and stderr strams in Paramiko SSH client.
-
   In some cases (like connecting to localhost via SSH), exit_status_ready
   gets set immediately even before the while loop to consume the streams
   kicks in. In those cases, we will not have consumed the streams at all.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/9fefa0ce/libcloud/compute/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index 41b5c06..1c77b3b 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -1913,14 +1913,23 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
 
         return vpcofferings
 
-    def ex_list_vpcs(self):
+    def ex_list_vpcs(self, project=None):
         """
         List the available VPCs
 
+        :keyword    project: Optional project under which VPCs are present.
+        :type       project: :class:`.CloudStackProject`
+
         :rtype ``list`` of :class:`CloudStackVPC`
         """
 
+        args = {}
+
+        if project is not None:
+            args['projectid'] = project.id
+
         res = self._sync_request(command='listVPCs',
+                                 params=args,
                                  method='GET')
         vpcs = res.get('vpc', [])