X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-afs.git/blobdiff_plain/264e62aff58ab2cdc835cbce60cacca5b4d6236f..28bd6503bcc8b1c09f4f12196ea9c0172a450160:/afs/pts.py diff --git a/afs/pts.py b/afs/pts.py index cfbfb7d..8bee97e 100644 --- a/afs/pts.py +++ b/afs/pts.py @@ -1,5 +1,5 @@ import collections -import _pts +from afs import _pts class PTRelationSet(collections.MutableSet): """Collection class for the groups/members of a PTEntry. @@ -354,6 +354,14 @@ class PTS(_pts.PTS): else: return PTEntry(self, id=ident) + def getEntryFromKrbname(self, ident): + """Retrieve a PTEntry matching a given Kerberos v5 principal. + + getEntryFromKrb accepts a krb5 principal, converts it to the + equivalent AFS principal, and returns a PTEntry for that + principal.""" + return self.getEntry(self._Krb5ToAfs(ident)) + def expire(self): """Flush the cache of PTEntry objects.