git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70af546
)
make sure to honor the xrn argument
author
Tony Mack
<tmack@cs.princeton.edu>
Tue, 17 Aug 2010 18:00:43 +0000
(18:00 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Tue, 17 Aug 2010 18:00:43 +0000
(18:00 +0000)
sfa/methods/get_aggregates.py
patch
|
blob
|
history
diff --git
a/sfa/methods/get_aggregates.py
b/sfa/methods/get_aggregates.py
index
0ed15f3
..
c960974
100644
(file)
--- a/
sfa/methods/get_aggregates.py
+++ b/
sfa/methods/get_aggregates.py
@@
-30,5
+30,7
@@
class get_aggregates(Method):
def call(self, cred, xrn = None):
hrn, type = urn_to_hrn(xrn)
self.api.auth.check(cred, 'list')
- aggregates = Aggregates(self.api)
- return aggregates.interfaces.values()
+ aggregates = Aggregates(self.api).interfaces.values()
+ if hrn:
+ aggregates = [agg for agg in aggregates if agg['hrn'] == hrn]
+ return aggregates