From 68b01dec6680d82f6896409bd306e6fd6d2cb82b Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Mon, 31 Oct 2011 10:57:10 -0400 Subject: [PATCH] fix bug in List and Resolve --- sfa/managers/registry_manager.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sfa/managers/registry_manager.py b/sfa/managers/registry_manager.py index e4a5b172..085bc39f 100644 --- a/sfa/managers/registry_manager.py +++ b/sfa/managers/registry_manager.py @@ -119,7 +119,9 @@ def resolve(api, xrns, type=None, full=True): xrns = xrn_dict[registry_hrn] if registry_hrn != api.hrn: credential = api.getCredential() - peer_records = registries[registry_hrn].Resolve(xrns, credential) + interface = api.registries[registry_hrn] + server = api.get_server(interface, credential) + peer_records = server.Resolve(xrns, credential) records.extend([SfaRecord(dict=record).as_dict() for record in peer_records]) # try resolving the remaining unfound records at the local registry @@ -155,13 +157,14 @@ def list(api, xrn, origin_hrn=None): #if there was no match then this record belongs to an unknow registry if not registry_hrn: raise MissingAuthority(xrn) - # if the best match (longest matching hrn) is not the local registry, # forward the request records = [] if registry_hrn != api.hrn: credential = api.getCredential() - record_list = registries[registry_hrn].List(xrn, credential) + interface = api.registries[registry_hrn] + server = api.get_server(interface, credential) + record_list = server.List(xrn, credential) records = [SfaRecord(dict=record).as_dict() for record in record_list] # if we still have not found the record yet, try the local registry -- 2.43.0