##
# Import PLC records into the SFA database. It is indended that this tool be
# run once to create SFA records that reflect the current state of the
##
# Import PLC records into the SFA database. It is indended that this tool be
# run once to create SFA records that reflect the current state of the
-from sfa.util.namespace import *
+from sfa.util.namespace import get_leaf, get_authority, hostname_to_hrn, slicename_to_hrn, email_to_hrn, hrn_to_pl_slicename
from sfa.util.config import Config
from sfa.trust.certificate import convert_public_key, Keypair
from sfa.trust.trustedroot import *
from sfa.util.config import Config
from sfa.trust.certificate import convert_public_key, Keypair
from sfa.trust.trustedroot import *
(options, args) = getopt.getopt(sys.argv[1:], '', [])
for opt in options:
(options, args) = getopt.getopt(sys.argv[1:], '', [])
for opt in options:
interface_hrn = config.SFA_INTERFACE_HRN
keys_filename = config.config_path + os.sep + 'person_keys.py'
sfaImporter = sfaImport()
interface_hrn = config.SFA_INTERFACE_HRN
keys_filename = config.config_path + os.sep + 'person_keys.py'
sfaImporter = sfaImport()
sfaImporter.create_top_level_auth_records(interface_hrn)
sfaImporter.logger.info("Import: adding " + interface_hrn + " to trusted list")
sfaImporter.create_top_level_auth_records(interface_hrn)
sfaImporter.logger.info("Import: adding " + interface_hrn + " to trusted list")
- authority = AuthHierarchy.get_auth_info(interface_hrn)
- TrustedRoots.add_gid(authority.get_gid_object())
+ authority = sfaImporter.AuthHierarchy.get_auth_info(interface_hrn)
+ sfaImporter.TrustedRoots.add_gid(authority.get_gid_object())