#NEWLINE# def handle_LDAPModifyDNRequest( self , request , controls , reply ) : #NEWLINE# #INDENT# self . checkControls ( controls ) #NEWLINE# dn = distinguishedname . DistinguishedName ( request . entry ) #NEWLINE# newrdn = distinguishedname . RelativeDistinguishedName ( request . newrdn ) #NEWLINE# deleteoldrdn = bool ( request . deleteoldrdn ) #NEWLINE# if ( not deleteoldrdn ) : #NEWLINE# #INDENT# raise ldaperrors . LDAPUnwillingToPerform ( 'Cannot handle preserving old RDN yet.' ) #NEWLINE# #UNINDENT# newSuperior = request . newSuperior #NEWLINE# if ( newSuperior is None ) : #NEWLINE# #INDENT# newSuperior = dn . up ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# newSuperior = distinguishedname . DistinguishedName ( newSuperior ) #NEWLINE# #UNINDENT# newdn = distinguishedname . DistinguishedName ( listOfRDNs = ( ( newrdn , ) + newSuperior . split ( ) ) ) #NEWLINE# root = interfaces . IConnectedLDAPEntry ( self . factory ) #NEWLINE# d = root . lookup ( dn ) #NEWLINE# def _gotEntry( entry ) : #NEWLINE# #INDENT# d = entry . move ( newdn ) #NEWLINE# return d #NEWLINE# #UNINDENT# def _report( entry ) : #NEWLINE# #INDENT# return pureldap . LDAPModifyDNResponse ( resultCode = 0 ) #NEWLINE# #UNINDENT# d . addCallback ( _gotEntry ) #NEWLINE# d . addCallback ( _report ) #NEWLINE# return d