that class.
Signed-off-by: Evan Broder <broder@mit.edu>
ubik_ClientDestroy(self.client)
rx_Finalize()
ubik_ClientDestroy(self.client)
rx_Finalize()
- def NameOrId(self, ident):
+ def _NameOrId(self, ident):
"""
Given an identifier, convert it to a PTS ID by looking up the
name if it's a string, or otherwise just converting it to an
"""
Given an identifier, convert it to a PTS ID by looking up the
name if it's a string, or otherwise just converting it to an
- def NameToId(self, name):
+ def _NameToId(self, name):
"""
Converts a user or group to an AFS ID.
"""
"""
Converts a user or group to an AFS ID.
"""
pyafs_error(code)
return id
pyafs_error(code)
return id
- def IdToName(self, id):
+ def _IdToName(self, id):
"""
Convert an AFS ID to the name of a user or group.
"""
"""
Convert an AFS ID to the name of a user or group.
"""
pyafs_error(code)
return name
pyafs_error(code)
return name
- def CreateUser(self, name, id=None):
+ def _CreateUser(self, name, id=None):
"""
Create a new user in the protection database. If an ID is
provided, that one will be used.
"""
Create a new user in the protection database. If an ID is
provided, that one will be used.
pyafs_error(code)
return cid
pyafs_error(code)
return cid
- def CreateGroup(self, name, owner, id=None):
+ def _CreateGroup(self, name, owner, id=None):
"""
Create a new group in the protection database. If an ID is
provided, that one will be used.
"""
Create a new group in the protection database. If an ID is
provided, that one will be used.
pyafs_error(code)
return cid
pyafs_error(code)
return cid
- def Delete(self, ident):
+ def _Delete(self, ident):
"""
Delete the protection database entry with the provided
identifier.
"""
Delete the protection database entry with the provided
identifier.
code = ubik_PR_Delete(self.client, 0, id)
pyafs_error(code)
code = ubik_PR_Delete(self.client, 0, id)
pyafs_error(code)
- def AddToGroup(self, user, group):
+ def _AddToGroup(self, user, group):
"""
Add the given user to the given group.
"""
"""
Add the given user to the given group.
"""
code = ubik_PR_AddToGroup(self.client, 0, uid, gid)
pyafs_error(code)
code = ubik_PR_AddToGroup(self.client, 0, uid, gid)
pyafs_error(code)
- def RemoveFromGroup(self, user, group):
+ def _RemoveFromGroup(self, user, group):
"""
Remove the given user from the given group.
"""
"""
Remove the given user from the given group.
"""
code = ubik_PR_RemoveFromGroup(self.client, 0, uid, gid)
pyafs_error(code)
code = ubik_PR_RemoveFromGroup(self.client, 0, uid, gid)
pyafs_error(code)
- def ListMembers(self, ident):
+ def _ListMembers(self, ident):
"""
Get the membership of an entity.
"""
Get the membership of an entity.
- def ListOwned(self, owner):
+ def _ListOwned(self, owner):
"""
Get all groups owned by an entity.
"""
"""
Get all groups owned by an entity.
"""
- def ListEntry(self, ident):
+ def _ListEntry(self, ident):
"""
Load a PTEntry instance with information about the provided
entity.
"""
Load a PTEntry instance with information about the provided
entity.
_ptentry_from_c(entry, ¢ry)
return entry
_ptentry_from_c(entry, ¢ry)
return entry
- def ChangeEntry(self, ident, newname=None, newid=None, newoid=None):
+ def _ChangeEntry(self, ident, newname=None, newid=None, newoid=None):
"""
Change the name, ID, and/or owner of a PTS entity.
"""
Change the name, ID, and/or owner of a PTS entity.
code = ubik_PR_ChangeEntry(self.client, 0, id, c_newname, c_newoid, c_newid)
pyafs_error(code)
code = ubik_PR_ChangeEntry(self.client, 0, id, c_newname, c_newoid, c_newid)
pyafs_error(code)
- def IsAMemberOf(self, user, group):
+ def _IsAMemberOf(self, user, group):
"""
Return True if the given user is a member of the given group.
"""
"""
Return True if the given user is a member of the given group.
"""
"""
Return a tuple of the maximum user ID and the maximum group
ID currently assigned.
"""
Return a tuple of the maximum user ID and the maximum group
ID currently assigned.
- def SetMaxUserId(self, id):
+ def _SetMaxUserId(self, id):
"""
Set the maximum currently assigned user ID (the next
automatically assigned UID will be id + 1)
"""
Set the maximum currently assigned user ID (the next
automatically assigned UID will be id + 1)
code = ubik_PR_SetMax(self.client, 0, id, 0)
pyafs_error(code)
code = ubik_PR_SetMax(self.client, 0, id, 0)
pyafs_error(code)
- def SetMaxGroupId(self, id):
+ def _SetMaxGroupId(self, id):
"""
Set the maximum currently assigned user ID (the next
automatically assigned UID will be id + 1)
"""
Set the maximum currently assigned user ID (the next
automatically assigned UID will be id + 1)
code = ubik_PR_SetMax(self.client, 0, id, PRGRP)
pyafs_error(code)
code = ubik_PR_SetMax(self.client, 0, id, PRGRP)
pyafs_error(code)
- def ListEntries(self, users=None, groups=None):
+ def _ListEntries(self, users=None, groups=None):
"""
Return a list of PTEntry instances representing all entries in
the PRDB.
"""
Return a list of PTEntry instances representing all entries in
the PRDB.
- def SetFields(self, ident, access=None, groups=None, users=None):
+ def _SetFields(self, ident, access=None, groups=None, users=None):
"""
Update the fields for an entry.
"""
Update the fields for an entry.