5 return ".".join(parts[-1:])
7 def get_authority(hrn):
10 return ".".join(parts[:-1])
12 def get_auth_type(type):
13 if (type=="slice") or (type=="user") or (type=="sa"):
15 elif (type=="component") or (type=="ma"):
18 raise UnknownGeniType(type)
20 def hrn_to_pl_slicename(hrn):
21 parts = hrn.split(".")
22 return parts[-2] + "_" + parts[-1]
24 # assuming hrn is the hrn of an authority, return the plc authority name
25 def hrn_to_pl_authname(hrn):
26 parts = hrn.split(".")
29 # assuming hrn is the hrn of an authority, return the plc login_base
30 def hrn_to_pl_login_base(hrn):
31 return hrn_to_pl_authname(hrn)