From 77b4ce18bd09f757cb4858561c3f86a2fbc57b33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 3 Jul 2009 13:01:24 +0000 Subject: [PATCH] cleanup dup. functions and use the ones from misc --- geni/util/auth.py | 23 +---------------------- geni/util/misc.py | 1 - 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/geni/util/auth.py b/geni/util/auth.py index ed02451f..0d074e0c 100644 --- a/geni/util/auth.py +++ b/geni/util/auth.py @@ -84,7 +84,7 @@ class Auth: @param auth_name human readable name of authority """ - auth_info = self.get_auth_info(auth_name) + auth_info = get_auth_info(auth_name) table = GeniTable(hrn=auth_name, cninfo=auth_info.get_dbinfo()) # if the table doesn't exist, then it means we haven't put any records @@ -222,24 +222,3 @@ class Auth: if not (cred_object_hrn in operators): raise PermissionError(cred_object_hrn + " is not in operator list for " + record.get_name()) - def get_leaf(self, hrn): - parts = hrn.split(".") - return ".".join(parts[-1:]) - - def get_authority(self, hrn): - parts = hrn.split(".") - return ".".join(parts[:-1]) - - def hrn_to_pl_slicename(self, 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(self, 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(self, hrn): - return self.hrn_to_pl_authname(hrn) - diff --git a/geni/util/misc.py b/geni/util/misc.py index 41f50701..445e0a3d 100644 --- a/geni/util/misc.py +++ b/geni/util/misc.py @@ -8,7 +8,6 @@ def get_leaf(hrn): return ".".join(parts[-1:]) def get_authority(hrn): - parts = hrn.split(".") return ".".join(parts[:-1]) -- 2.47.0