X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fserver%2Fsfa-server.py;h=58bfdb9c37803bcb49e1e3ea81cfd48bffe44074;hb=b3eb20067d71d92432ac4368fe89c08a7bf5fdcb;hp=d492f7af7248092807e9f2d6892cdf6f43365945;hpb=f1be6f99f11d1fe69377ffffd3bb47475b054228;p=sfa.git diff --git a/sfa/server/sfa-server.py b/sfa/server/sfa-server.py index d492f7af..58bfdb9c 100755 --- a/sfa/server/sfa-server.py +++ b/sfa/server/sfa-server.py @@ -43,6 +43,9 @@ from sfa.trust.certificate import Keypair, Certificate from sfa.trust.hierarchy import Hierarchy from sfa.util.config import Config from sfa.util.report import trace +from sfa.plc.api import SfaAPI +from sfa.server.registry import Registries +from sfa.server.aggregate import Aggregates # after http://www.erlenstar.demon.co.uk/unix/faq_2.html def daemon(): @@ -147,6 +150,17 @@ def init_server(options, config): manager.init_server() +def sync_interfaces(): + """ + Attempt to install missing trusted gids and db records for + our federated interfaces + """ + api = SfaAPI() + registries = Registries(api) + aggregates = Aggregates(api) + registries.sync_interfaces() + aggregates.sync_interfaces() + def main(): # xxx get rid of globals - name consistently CamelCase or under_score global AuthHierarchy @@ -179,7 +193,8 @@ def main(): server_cert_file = os.path.join(hierarchy.basedir, "server.cert") init_server_key(server_key_file, server_cert_file, config, hierarchy) - init_server(options, config) + init_server(options, config) + sync_interfaces() # start registry server if (options.registry):