From 9cb19ca836b1bbc005dbee364e75c9d60b596a7e Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 22 Nov 2011 15:14:06 -0500 Subject: [PATCH] fix remaining bugs. passes regression tests --- sfa/managers/aggregate_manager.py | 6 +++--- sfa/managers/slice_manager.py | 10 +++++----- sfa/methods/ListResources.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sfa/managers/aggregate_manager.py b/sfa/managers/aggregate_manager.py index a31efc6a..6f7fb3b3 100644 --- a/sfa/managers/aggregate_manager.py +++ b/sfa/managers/aggregate_manager.py @@ -254,7 +254,7 @@ class AggregateManager: return 1 def DeleteSliver(self, api, xrn, creds, options={}): - call_id = option.get('call_id') + call_id = options.get('call_id') if Callids().already_handled(call_id): return "" (hrn, _) = urn_to_hrn(xrn) slicename = hrn_to_pl_slicename(hrn) @@ -275,7 +275,7 @@ class AggregateManager: return 1 def ListSlices(self, api, creds, options={}): - call_id = option.get('call_id') + call_id = options.get('call_id') if Callids().already_handled(call_id): return [] # look in cache first if self.caching and api.cache: @@ -295,7 +295,7 @@ class AggregateManager: return slice_urns def ListResources(self, api, creds, options={}): - call_id = option.get('call_id') + call_id = options.get('call_id') if Callids().already_handled(call_id): return "" # get slice's hrn from options xrn = options.get('geni_slice_urn', None) diff --git a/sfa/managers/slice_manager.py b/sfa/managers/slice_manager.py index 6f012e7c..350dae14 100644 --- a/sfa/managers/slice_manager.py +++ b/sfa/managers/slice_manager.py @@ -168,7 +168,7 @@ class SliceManager: # get the rspec from the aggregate interface = api.aggregates[aggregate] server = api.server_proxy(interface, cred) - threads.run(_ListResources, aggregate, server, [cred], options, call_id) + threads.run(_ListResources, aggregate, server, [cred], options) results = threads.get_results() @@ -220,7 +220,7 @@ class SliceManager: logger.log_exc('Something wrong in _CreateSliver with URL %s'%server.url) return {"aggregate": aggregate, "elapsed": time.time()-tStart, "status": "exception", "exc_info": sys.exc_info()} - call_id = option.get('call_id') + call_id = options.get('call_id') if Callids().already_handled(call_id): return "" # Validate the RSpec against PlanetLab's schema --disabled for now # The schema used here needs to aggregate the PL and VINI schemas @@ -274,7 +274,7 @@ class SliceManager: args.append(options) return server.RenewSliver(*args) - call_id = option.get('call_id') + call_id = options.get('call_id') if Callids().already_handled(call_id): return True (hrn, type) = urn_to_hrn(xrn) @@ -306,7 +306,7 @@ class SliceManager: args.append(options) return server.DeleteSliver(*args) - call_id = option.get('call_id') + call_id = options.get('call_id') if Callids().already_handled(call_id): return "" (hrn, type) = urn_to_hrn(xrn) # get the callers hrn @@ -407,7 +407,7 @@ class SliceManager: continue interface = api.aggregates[aggregate] server = api.server_proxy(interface, cred) - threads.run(_ListSlices, server, [cred], call_id, options) + threads.run(_ListSlices, server, [cred], options) # combime results results = threads.get_results() diff --git a/sfa/methods/ListResources.py b/sfa/methods/ListResources.py index 38634de9..6b1e7850 100644 --- a/sfa/methods/ListResources.py +++ b/sfa/methods/ListResources.py @@ -35,7 +35,7 @@ class ListResources(Method): origin_hrn = options.get('origin_hrn', None) if not origin_hrn: origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn() - rspec = self.api.manager.ListResources(self.api, creds, options, options) + rspec = self.api.manager.ListResources(self.api, creds, options) # filter rspec through sfatables if self.api.interface in ['aggregate']: -- 2.47.0