def __init__(self):
self.AuthHierarchy = Hierarchy()
- self.TrustedRoots = TrustedRootList()
+ self.TrustedRoots = TrustedRootList(Config.get_trustedroots_dir())
self.config = Config()
self.plc_auth = self.config.get_plc_auth()
from sfa.trust.hierarchy import Hierarchy
+from sfa.util.config import Config
+
# after http://www.erlenstar.demon.co.uk/unix/faq_2.html
def daemon():
"""Daemonize the current process."""
AuthHierarchy = Hierarchy()
- TrustedRoots = TrustedRootList()
+ TrustedRoots = TrustedRootList(Config().get_trustedroots_dir())
# start registry server
if (options.registry):
import os
from sfa.trust.gid import *
-from sfa.util.config import Config
class TrustedRootList:
- def __init__(self, dir=None):
- if not dir:
- # keep trusted roots in /etc/sfa
- dir = Config().config_path + os.sep + 'trusted_roots'
+ def __init__(self, dir):
self.basedir = dir
# create the directory to hold the files
except IOError, e:
raise IOError, "Could not find the configuration file: %s" % config_file
+ def get_trustedroots_dir(self):
+ return self.config_path + os.sep + 'trusted_roots'
+
def get_openflow_aggrMgr_info(self):
aggr_mgr_ip = 'localhost'
if (hasattr(self,'OPENFLOW_AGGREGATE_MANAGER_IP')):