- # get a list of authorities contained in the peer record list
- for peer_record in peer_records:
- peer_auth = peer_record['peer_authority']
- if peer_auth in registries:
- records = registries[peer_auth].resolve(credential, peer_record['hrn'])
- if not records:
- table.remove(peer_record)
+ # attempt to resolve the record at the authoritative interface
+ for registry_hrn in hrn_dict:
+ if registry_hrn in registries:
+ records = []
+ target_hrns = hrn_dict[registry_hrn]
+ try:
+ records = registries[registry_hrn].Resolve(target_hrns, credential)
+ found_records.extend([record['hrn'] for record in records])
+ except ServerException:
+ # an exception will be thrown if the record doenst exist
+ # if so remove the record from the local registry
+ continue
+ except:
+ # this deosnt necessarily mean the records dont exist
+ # lets give them the benefit of the doubt here (for now)
+ found_records.extend(target_hrns)
+ traceback.print_exc()