using auth_cred for user record update
[sfa.git] / geni / plc.py
index a9322ad..5b6bedf 100644 (file)
@@ -37,11 +37,11 @@ from optparse import OptionParser
 from geni.util.hierarchy import Hierarchy
 from geni.util.trustedroot import TrustedRootList
 from geni.util.cert import Keypair, Certificate
+from geni.util.config import Config
 from geni.registry import Registry
 from geni.aggregate import Aggregate
 from geni.slicemgr import SliceMgr
 
-
 # after http://www.erlenstar.demon.co.uk/unix/faq_2.html
 def daemon():
     """Daemonize the current process."""
@@ -76,9 +76,11 @@ def main():
     parser.add_option("-d", "--daemon", dest="daemon", action="store_true",
          help="Run as daemon.", default=False)
     (options, args) = parser.parse_args()
-    key_file = "server.key"
-    cert_file = "server.cert"
+
+    config = Config()
+    path = config.basepath 
+    key_file = path + os.sep + "server.key"
+    cert_file = path + os.sep + "server.cert"
     
     if (options.daemon):  daemon()
 
@@ -108,20 +110,20 @@ def main():
     # start registry server
     if (options.registry):
         r = Registry("", registry_port, key_file, cert_file)
-        r.trusted_cert_list = TrustedRoots.get_list()
-        r.hierarchy = AuthHierarchy
+        #r.trusted_cert_list = TrustedRoots.get_list()
+        #r.hierarchy = AuthHierarchy
         r.start()
 
     # start aggregate manager
     if (options.am):
         a = Aggregate("", aggregate_port, key_file, cert_file)
-        a.trusted_cert_list = TrustedRoots.get_list()
+        #a.trusted_cert_list = TrustedRoots.get_list()
         a.start()
 
     # start slice manager
     if (options.sm):
         s = SliceMgr("", slicemgr_port, key_file, cert_file)
-        s.trusted_cert_list = TrustedRoots.get_list()
+        #s.trusted_cert_list = TrustedRoots.get_list()
         s.start()
 
 if __name__ == "__main__":