X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Faggregate_manager_pl.py;h=6b362842d2093561d1eb9d5274d8a0295e877b81;hb=refs%2Fheads%2Frspec_extension;hp=081695dde61a0a0088fc906f5b69ae93a78e3dcd;hpb=0ae6f1e2beecf53d48b7d5e049b4f54e7953a675;p=sfa.git diff --git a/sfa/managers/aggregate_manager_pl.py b/sfa/managers/aggregate_manager_pl.py index 081695dd..6b362842 100644 --- a/sfa/managers/aggregate_manager_pl.py +++ b/sfa/managers/aggregate_manager_pl.py @@ -283,8 +283,8 @@ def DeleteSliver(api, xrn, creds, call_id): return 1 # xxx Thierry : caching at the aggregate level sounds wrong... -caching=True -#caching=False +#caching=True +caching=False def ListSlices(api, creds, call_id): if Callids().already_handled(call_id): return [] # look in cache first @@ -313,6 +313,12 @@ def ListResources(api, creds, options,call_id): # get the rspec's return format from options rspec_version = RSpecVersion(options.get('rspec_version')) version_string = "rspec_%s" % (rspec_version.get_version_name()) + + #panos adding the info option to the caching key (can be improved) + if options.get('info'): + version_string = version_string + "_"+options.get('info') + + print "[aggregate] version string = ",version_string # look in cache first if caching and api.cache and not xrn: @@ -321,7 +327,10 @@ def ListResources(api, creds, options,call_id): api.logger.info("aggregate.ListResources: returning cached value for hrn %s"%hrn) return rspec - aggregate = Aggregate(api) + #aggregate = Aggregate(api) + #panos: passing user-defined options + #print "manager options = ",options + aggregate = Aggregate(api, options) rspec = aggregate.get_rspec(slice_xrn=xrn, version=rspec_version)