From 5b7f7f5e1e09af7bb710502b10918fc5b860f0d7 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 20 May 2009 20:06:09 +0000 Subject: [PATCH] fix error message when keyconvert is not found. Add special case for hrn names in vini --- geni/gimport.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/geni/gimport.py b/geni/gimport.py index 78e96422..588c7559 100755 --- a/geni/gimport.py +++ b/geni/gimport.py @@ -67,7 +67,7 @@ for path in files: break if not loaded: - raise Exception, "Could not find config in " + ", ".join(files) + raise Exception, "Could not find keyconvert in " + ", ".join(files) def un_unicode(str): if isinstance(str, unicode): @@ -290,9 +290,19 @@ def import_site(parent_hrn, site): AuthHierarchy = Hierarchy() sitename = site['login_base'] sitename = cleanup_string(sitename) - + hrn = parent_hrn + "." + sitename + # Hardcode 'internet2' into the hrn for sites hosting + # internet2 nodes. This is a special operation for some vini + # sites + if parent_hrn.find(".vini.") != -1 and 'abbreviated_name' in site: + abv_name = site['abbreviated_name'] + if abv_name.find("I2") != -1 or abv_name.find("NLR") != -1: + if sitename.startswith("ii"): sitename.replace("ii", "") + if sitename.startswith("nlr"): sitename.replace("nlr", "") + hrn = ".".join([parent_hrn, "internet2", sitename]) + report.trace("Import_Site: importing site " + hrn) # create the authority -- 2.43.0