check in latest updates to documentation
[sfa.git] / util / misc.py
index 140c7b5..90c257b 100644 (file)
@@ -6,7 +6,7 @@ def get_leaf(hrn):
 
 def get_authority(hrn):
     parts = hrn.split(".")\r
-    return ".".join(parts[:-1])
+    return ".".join(parts[:-1])\r
 
 def get_auth_type(type):
     if (type=="slice") or (type=="user") or (type=="sa"):
@@ -20,7 +20,12 @@ def hrn_to_pl_slicename(hrn):
     parts = hrn.split(".")
     return parts[-2] + "_" + parts[-1]
 
+# assuming hrn is the hrn of an authority, return the plc authority name
 def hrn_to_pl_authname(hrn):
     parts = hrn.split(".")
     return parts[-1]
 
+# assuming hrn is the hrn of an authority, return the plc login_base
+def hrn_to_pl_login_base(hrn):
+    return hrn_to_pl_authname(hrn)
+