5 return ".".join(parts[-1:])
7 def get_authority(hrn):
9 return ".".join(parts[:-1])
11 def get_auth_type(type):
12 if (type=="slice") or (type=="user") or (type=="sa"):
14 elif (type=="component") or (type=="ma"):
17 raise UnknownGeniType(type)
19 def hrn_to_pl_slicename(hrn):
20 parts = hrn.split(".")
21 return parts[-2] + "_" + parts[-1]
23 # assuming hrn is the hrn of an authority, return the plc authority name
24 def hrn_to_pl_authname(hrn):
25 parts = hrn.split(".")
28 # assuming hrn is the hrn of an authority, return the plc login_base
29 def hrn_to_pl_login_base(hrn):
30 return hrn_to_pl_authname(hrn)