X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Fregistry_manager_pl.py;h=1af2caf57668cfb7504c8ca3b602ee6a5e0bfc2b;hb=c8b2e29038b7ac58d4423e04ed0a8e160b78500b;hp=7c969278f7e3dc339853aefbb5dce7d1c7ca7562;hpb=4126e6565c7266066cb34bc1f696ccef243f3271;p=sfa.git diff --git a/sfa/managers/registry_manager_pl.py b/sfa/managers/registry_manager_pl.py index 7c969278..1af2caf5 100644 --- a/sfa/managers/registry_manager_pl.py +++ b/sfa/managers/registry_manager_pl.py @@ -1,6 +1,5 @@ import types import time -from sfa.server.registry import Registries from sfa.util.prefixTree import prefixTree from sfa.util.record import SfaRecord from sfa.util.table import SfaTable @@ -76,8 +75,7 @@ def resolve(api, xrns, type=None, origin_hrn=None, full=True): # create a dict whre key is an registry hrn and its value is a # hrns at that registry (determined by the known prefix tree). xrn_dict = {} - # XX Preload this into the api module - registries = Registries(api) + registries = api.registries tree = prefixTree() registry_hrns = registries.keys() tree.load(registry_hrns) @@ -126,7 +124,7 @@ def list(api, xrn, origin_hrn=None): # load all know registry names into a prefix tree and attempt to find # the longest matching prefix records = [] - registries = Registries(api) + registries = api.registries registry_hrns = registries.keys() tree = prefixTree() tree.load(registry_hrns) @@ -367,7 +365,7 @@ def remove(api, xrn, type, origin_hrn=None): type = record['type'] credential = api.getCredential() - registries = Registries(api) + registries = api.registries # Try to remove the object from the PLCDB of federated agg. # This is attempted before removing the object from the local agg's PLCDB and sfa table