X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Fregistry_manager_pl.py;h=9dba54dbd3239916b03315e9f8ab94fbf027d2bd;hb=253a0cf17a7cc14072222df2feb77e0a88b3ad30;hp=033f762bc177464e180258f9d627e7629030c1c5;hpb=f5a6829ab1fd58a695c3e6a92bfbf905223c4693;p=sfa.git diff --git a/sfa/managers/registry_manager_pl.py b/sfa/managers/registry_manager_pl.py index 033f762b..9dba54db 100644 --- a/sfa/managers/registry_manager_pl.py +++ b/sfa/managers/registry_manager_pl.py @@ -13,13 +13,17 @@ from sfa.trust.credential import Credential from sfa.trust.certificate import Certificate, Keypair from sfa.trust.gid import create_uuid from sfa.util.version import version_core +# Thierry - turning this off, it's a slice interface not a registry one ?!? +#from sfa.managers.aggregate_manager_pl import SliverStatus # The GENI GetVersion call def GetVersion(api): - peers =dict ([ (peername,v._ServerProxy__host) for (peername,v) in api.registries.items() + peers =dict ([ (peername,v._ServerProxy__host) for (peername,v) in api.registries.iteritems() if peername != api.hrn]) + xrn=Xrn(api.hrn) return version_core({'interface':'registry', - 'hrn':api.hrn, + 'hrn':xrn.get_hrn(), + 'urn':xrn.get_urn(), 'peers':peers}) def get_credential(api, xrn, type, is_self=False): @@ -84,12 +88,14 @@ def get_credential(api, xrn, type, is_self=False): def resolve(api, xrns, type=None, full=True): - # load all know registry names into a prefix tree and attempt to find + # load all known registry names into a prefix tree and attempt to find # the longest matching prefix if not isinstance(xrns, types.ListType): + if not type: + type = Xrn(xrns).get_type() xrns = [xrns] hrns = [urn_to_hrn(xrn)[0] for xrn in xrns] - # create a dict whre key is an registry hrn and its value is a + # create a dict where key is a registry hrn and its value is a # hrns at that registry (determined by the known prefix tree). xrn_dict = {} registries = api.registries