added argument 'full' to reolsve()
authorTony Mack <tmack@cs.princeton.edu>
Sun, 21 Feb 2010 23:58:12 +0000 (23:58 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Sun, 21 Feb 2010 23:58:12 +0000 (23:58 +0000)
sfa/managers/registry_manager_pl.py

index d3c1a95..158a664 100644 (file)
@@ -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))