Add rename_object method
This commit is contained in:
parent
0a10f2f984
commit
4faaf2c3ad
1 changed files with 10 additions and 0 deletions
|
@ -82,6 +82,16 @@ class LdapServer(object):
|
|||
self._error("LdapServer - Error updating %s : %s" % (dn,e))
|
||||
return False
|
||||
|
||||
def rename_object(self,dn,new_rdn):
|
||||
try:
|
||||
logging.debug("LdapServer - Rename %s in %s" % (dn,new_rdn))
|
||||
self.con.rename_s(dn,new_rdn)
|
||||
return True
|
||||
except ldap.LDAPError, e:
|
||||
self._error("LdapServer - Error renaming %s in %s : %s" % (dn,new_rdn,e))
|
||||
|
||||
return False
|
||||
|
||||
def drop_object(self,dn):
|
||||
try:
|
||||
logging.debug("LdapServer - Delete %s" % dn)
|
||||
|
|
Loading…
Reference in a new issue