#
# @param basedir the base directory to store the hierarchy in
- def __init__(self, basedir="."):
+ def __init__(self, basedir = None):
+ config = Config()
+ if not basedir:
+ basedir = config.GENI_BASE_DIR + os.sep + 'geni' + os.sep
self.basedir = os.path.join(basedir, "authorities")
##
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)
def get_auth_info(self, hrn):
#report.trace("Hierarchy: getting authority: " + hrn)
-
+
if not self.auth_exists(hrn):
raise MissingAuthority(hrn)