X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=util%2Fmisc.py;h=90c257b4700b66882884ddced3ec2a5f45907da5;hb=455f3a3cfa775a386a66db8ca0a040f7c5b33d29;hp=140c7b525246b3f046f9819449a36901f4218f22;hpb=be4bba4d844ba251a7f5898fbe199d998f1ac283;p=sfa.git diff --git a/util/misc.py b/util/misc.py index 140c7b52..90c257b4 100644 --- a/util/misc.py +++ b/util/misc.py @@ -6,7 +6,7 @@ def get_leaf(hrn): def get_authority(hrn): parts = hrn.split(".") - return ".".join(parts[:-1]) + return ".".join(parts[:-1]) 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) +