X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fserver%2Fregistry.py;h=13a75fc72b860f888f29fb2881b20c984db0db66;hb=862dfa7f7b8cce8c17e80c42aedd8d500ea86cb6;hp=0536c5c16d311bbbe10bd25a82eca0a394e116e1;hpb=de6e581a83658003a2a741348e4fe05e0f9fca95;p=sfa.git diff --git a/sfa/server/registry.py b/sfa/server/registry.py index 0536c5c1..13a75fc7 100644 --- a/sfa/server/registry.py +++ b/sfa/server/registry.py @@ -1,18 +1,14 @@ # # Registry is a SfaServer that implements the Registry interface # -### $Id$ -### $URL$ -# - -from sfa.util.server import SfaServer -from sfa.util.faults import * -from sfa.util.xrn import hrn_to_urn +from sfa.server.sfaserver import SfaServer from sfa.server.interface import Interfaces, Interface from sfa.util.config import Config -## +# # Registry is a SfaServer that serves registry and slice operations at PLC. +# this truly is a server-side object +# class Registry(SfaServer): ## # Create a new registry object. @@ -24,11 +20,16 @@ class Registry(SfaServer): def __init__(self, ip, port, key_file, cert_file): SfaServer.__init__(self, ip, port, key_file, cert_file,'registry') + sfa_config=Config() + if Config().SFA_REGISTRY_ENABLED: + from sfa.storage.alchemy import engine + from sfa.storage.dbschema import DBSchema + DBSchema().init_or_upgrade() -## -# Registries is a dictionary of registry connections keyed on the registry -# hrn - +# +# Registries is a dictionary of registry connections keyed on the registry hrn +# as such it's more of a client-side thing for registry servers to reach their peers +# class Registries(Interfaces): default_dict = {'registries': {'registry': [Interfaces.default_fields]}}