use self.get_auth_info
[sfa.git] / geni / util / hierarchy.py
index 1146963..e33874a 100644 (file)
 #      *.DBINFO - database info
 ##
 
+### $Id$
+### $URL$
+
 import os
 import report
-from cert import *
-from credential import *
-from gid import *
-from misc import *
-from config import *
-from geniticket import *
+
+from geni.trust.certificate import Keypair
+from geni.trust.credential import *
+from geni.trust.gid import *
+
+from geni.util.misc import *
+from geni.util.config import *
+from geni.util.geniticket import *
 
 ##
 # The AuthInfo class contains the information for an authority. This information
@@ -106,7 +111,7 @@ class Hierarchy():
     def __init__(self, basedir = None):
         if not basedir:
             config = Config()
-            basedir = config.basepath + os.sep + "authorities"
+            basedir = config.config_path + os.sep + "authorities"
         self.basedir = basedir
     ##
     # Given a hrn, return the filenames of the GID, private key, and dbinfo
@@ -134,7 +139,7 @@ class Hierarchy():
     def auth_exists(self, hrn):
         (directory, gid_filename, privkey_filename, dbinfo_filename) = \
             self.get_auth_filenames(hrn)
-    
+        
         return os.path.exists(gid_filename) and \
                os.path.exists(privkey_filename) and \
                os.path.exists(dbinfo_filename)