From 4bb1c793ec2432c454ec91d55d1a819a61ec9ede Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 17 Aug 2010 18:00:43 +0000 Subject: [PATCH] make sure to honor the xrn argument --- sfa/methods/get_aggregates.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sfa/methods/get_aggregates.py b/sfa/methods/get_aggregates.py index 0ed15f34..c9609744 100644 --- 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 -- 2.43.0