'rename(dn, newrdn [, newsuperior=None [,delold=1][,serverctrls=None[,clientctrls=None]]]) -> int
rename_s(dn, newrdn [, newsuperior=None] [,delold=1][,serverctrls=None[,clientctrls=None]]) -> None
Perform a rename entry operation. These routines take dn, the
DN of the entry whose RDN is to be changed, newrdn, the
new RDN, and newsuperior, the new parent DN, to give to the entry.
If newsuperior is None then only the RDN is modified.
The optional parameter delold is used to specify whether the
old RDN should be kept as an attribute of the entry or not.
The asynchronous version returns the initiated message id.
This actually corresponds to the rename* routines in the
LDAP-EXT C API library.'

def rename(self, dn, newrdn, newsuperior=None, delold=1, serverctrls=None, clientctrls=None):

    return self._ldap_call(self._l.rename, dn, newrdn, newsuperior, delold, EncodeControlTuples(serverctrls), EncodeControlTuples(clientctrls))
