libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@apache.org
Subject git commit: LIBCLOUD-615: Add optional param project for ex_list_networks() to CloudStack provider.
Date Fri, 03 Oct 2014 10:05:30 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 08b463813 -> 76c6fd91e


LIBCLOUD-615: Add optional param project for ex_list_networks() to CloudStack provider.

Signed-off-by: René Moser <mail@renemoser.net>
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>

This closes #367


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

Branch: refs/heads/trunk
Commit: 76c6fd91edb3487783fb65a226e27f7ea1e8551d
Parents: 08b4638
Author: René Moser <mail@renemoser.net>
Authored: Wed Oct 1 09:25:26 2014 +0200
Committer: Sebastien Goasguen <runseb@gmail.com>
Committed: Fri Oct 3 12:04:45 2014 +0200

----------------------------------------------------------------------
 CHANGES.rst                            |  3 +++
 libcloud/compute/drivers/cloudstack.py | 11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/76c6fd91/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 1873f1a..2d0aa6d 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -137,6 +137,9 @@ Compute
   (GITHUB-365)
   [Gertjan Oude Lohuis]
 
+- Add optional project parameters for ex_list_networks() to CloudStack driver
+  (GITHUB-367, LIBCLOUD-615)
+  [Rene Moser]
 
 Storage
 ~~~~~~~

http://git-wip-us.apache.org/repos/asf/libcloud/blob/76c6fd91/libcloud/compute/drivers/cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudstack.py b/libcloud/compute/drivers/cloudstack.py
index 0129e07..6ff91f2 100644
--- a/libcloud/compute/drivers/cloudstack.py
+++ b/libcloud/compute/drivers/cloudstack.py
@@ -1103,14 +1103,23 @@ class CloudStackNodeDriver(CloudStackDriverMixIn, NodeDriver):
 
         return diskOfferings
 
-    def ex_list_networks(self):
+    def ex_list_networks(self, project=None):
         """
         List the available networks
 
+        :param  project: Optional project the networks belongs to.
+        :type   project: :class:`.CloudStackProject`
+
         :rtype ``list`` of :class:`CloudStackNetwork`
         """
 
+        args = {}
+
+        if project is not None:
+            args['projectid'] = project.id
+
         res = self._sync_request(command='listNetworks',
+                                 params=args,
                                  method='GET')
         nets = res.get('network', [])
 


Mime
View raw message