From: Tony Mack Date: Tue, 18 Jan 2011 17:11:15 +0000 (-0500) Subject: create unique registry record for each SFA interface X-Git-Tag: sfa-1.0-12~14 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f26f642672be9d61f4d0022c3ef4e65686c3ec3d;p=sfa.git create unique registry record for each SFA interface --- diff --git a/sfa/plc/sfa-import-plc.py b/sfa/plc/sfa-import-plc.py index c5ccbded..7077eb6e 100755 --- a/sfa/plc/sfa-import-plc.py +++ b/sfa/plc/sfa-import-plc.py @@ -67,8 +67,9 @@ def main(): if config.SFA_API_DEBUG: sfaImporter.logger.setLevelDebug() shell = sfaImporter.shell plc_auth = sfaImporter.plc_auth + + # initialize registry db table table = SfaTable() - if not table.exists(): table.create() @@ -77,10 +78,16 @@ def main(): if not root_auth == interface_hrn: sfaImporter.create_top_level_auth_records(interface_hrn) + # create interface records + sfaImporter.logger.info("Import: creating interface records") + sfaImporter.create_interface_records() + + # add local root authority's cert to trusted list sfaImporter.logger.info("Import: adding " + interface_hrn + " to trusted list") authority = sfaImporter.AuthHierarchy.get_auth_info(interface_hrn) sfaImporter.TrustedRoots.add_gid(authority.get_gid_object()) + # special case for vini if ".vini" in interface_hrn and interface_hrn.endswith('vini'): # create a fake internet2 site first i2site = {'name': 'Internet2', 'abbreviated_name': 'I2',