From: Tony Mack Date: Sun, 21 Feb 2010 23:58:12 +0000 (+0000) Subject: added argument 'full' to reolsve() X-Git-Tag: sfa-0.9-11~70 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5d854f346907027d478087ed8a6a4a9d7309d93d;p=sfa.git added argument 'full' to reolsve() --- diff --git a/sfa/managers/registry_manager_pl.py b/sfa/managers/registry_manager_pl.py index d3c1a95e..158a6644 100644 --- a/sfa/managers/registry_manager_pl.py +++ b/sfa/managers/registry_manager_pl.py @@ -66,7 +66,7 @@ def get_credential(api, xrn, type, is_self=False): return new_cred.save_to_string(save_parents=True) -def resolve(api, xrns, type=None, origin_hrn=None): +def resolve(api, xrns, type=None, origin_hrn=None, full=True): # load all know registry names into a prefix tree and attempt to find # the longest matching prefix @@ -108,7 +108,8 @@ def resolve(api, xrns, type=None, origin_hrn=None): remaining_hrns = [hrn for hrn in remaining_hrns] table = SfaTable() local_records = table.findObjects({'hrn': remaining_hrns}) - api.fill_record_info(local_records) + if full: + api.fill_record_info(local_records) records.extend(local_records) if not records: raise RecordNotFound(str(hrns))