X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FListResources.py;h=795594be5cb6dd0dad6aa3629c2da7f42070d8a8;hb=796d35d54ab31e209ddf76b4584b6508b309c6c1;hp=a9ffe76027900e148e725408064c50cd7ee81e30;hpb=0fe918467c52fd7b06abe8a92082c50ac282f470;p=sfa.git diff --git a/sfa/methods/ListResources.py b/sfa/methods/ListResources.py index a9ffe760..795594be 100644 --- a/sfa/methods/ListResources.py +++ b/sfa/methods/ListResources.py @@ -33,10 +33,8 @@ class ListResources(Method): else: raise SfaInvalidArgument('Must specify an rspec version option. geni_rspec_version cannot be null') - (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for')) - # Find the valid credentials - valid_creds = self.api.auth.checkCredentials(creds, 'listnodes', speaking_for_hrn=speaking_for) + valid_creds = self.api.auth.checkCredentialsSpeaksFor(creds, 'listnodes', options=options) # get hrn of the original caller origin_hrn = options.get('origin_hrn', None) @@ -52,7 +50,7 @@ class ListResources(Method): self.api.logger.debug("ListResources: sfatables on chain %s"%chain_name) filtered_rspec = run_sfatables(chain_name, '', origin_hrn, rspec) - if options.has_key('geni_compressed') and options['geni_compressed'] == True: + if 'geni_compressed' in options and options['geni_compressed'] == True: filtered_rspec = zlib.compress(filtered_rspec).encode('base64') return filtered_rspec