test; please ignore
[sfa.git] / geni-config-tty
index c0f0cce..e99a6c0 100755 (executable)
@@ -97,7 +97,8 @@ def validate(changes):
     if not changes:
         return
 
-    # GENI_INTERFACE_HRN is generated by combining GENI_REGISTRY_ROOT_AUTH and 
+    # GENI_INTERFACE_HRN is GENI_REGISTRY_LEVEL1_AUTH, if thats blank it
+    # then defaults to GENI_REGISTRY_ROOT_AUTH 
     # GENI_REGISTRY_LEVEL1_AUTH, so if either of these are present we must 
     # update GENI_INTERFACE_HRN
     if 'GENI_REGISTRY_ROOT_AUTH' in changes:
@@ -110,14 +111,17 @@ def validate(changes):
     else:
         level1_auth = default['GENI_REGISTRY_LEVEL1_AUTH']
                 
-    interface_hrn = ".".join([root_auth, level1_auth])
+    if level1_auth:
+        interface_hrn = level1_auth
+    else:
+        interface_hrn = root_auth
     changes['GENI_INTERFACE_HRN'] = interface_hrn
     return changes                            
 
 def get_defaults():
     geni_config = Config()
     plc_vars = {'PLC_API_MAINTENANCE_PASSWORD': 'GENI_PLC_PASSWORD',
-                'PLC_API_MAINTENCE_USER': 'GENI_PLC_PASSWORD'
+                'PLC_API_MAINTENANCE_USER': 'GENI_PLC_USER'
                }
     try:
         from geni.util.config import plcConfig