Perform a LDAP modify request. :returns:
(
self,
object: str,
changes: List[LDAP_ModifyRequestChange],
controls: List[LDAP_Control] = [],
)
| 2340 | return entries |
| 2341 | |
| 2342 | def modify( |
| 2343 | self, |
| 2344 | object: str, |
| 2345 | changes: List[LDAP_ModifyRequestChange], |
| 2346 | controls: List[LDAP_Control] = [], |
| 2347 | ) -> None: |
| 2348 | """ |
| 2349 | Perform a LDAP modify request. |
| 2350 | |
| 2351 | :returns: |
| 2352 | """ |
| 2353 | resp = self.sr1( |
| 2354 | LDAP_ModifyRequest( |
| 2355 | object=object, |
| 2356 | changes=changes, |
| 2357 | ), |
| 2358 | controls=controls, |
| 2359 | timeout=self.timeout, |
| 2360 | ) |
| 2361 | if ( |
| 2362 | LDAP_ModifyResponse not in resp.protocolOp |
| 2363 | or resp.protocolOp.resultCode != 0 |
| 2364 | ): |
| 2365 | raise LDAP_Exception( |
| 2366 | "LDAP modify failed !", |
| 2367 | resp=resp, |
| 2368 | ) |
| 2369 | |
| 2370 | def add( |
| 2371 | self, |
no test coverage detected