git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge master again (2.0-10 changelog only)
[sfa.git]
/
sfa
/
server
/
registry.py
diff --git
a/sfa/server/registry.py
b/sfa/server/registry.py
index
0536c5c
..
13a75fc
100644
(file)
--- a/
sfa/server/registry.py
+++ b/
sfa/server/registry.py
@@
-1,18
+1,14
@@
#
# Registry is a SfaServer that implements the Registry interface
#
#
# 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
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.
# 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.
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')
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]}}
class Registries(Interfaces):
default_dict = {'registries': {'registry': [Interfaces.default_fields]}}