I am testing 389 Directory server testing with lib389.
I am following the bellow link.
https://fedorapeople.org/~spichugi/html/guidelines.html#add-modify-and-delete-operations
JavaScript
x
from lib389._constants import *
# Add an entry
USER_DN = 'cn=mreynolds,{}'.format(DEFAULT_SUFFIX)
standalone.add_s(Entry((USER_DN, {
'objectclass': (b'top', b'person'),
'cn': b'mreynolds',
'sn': b'reynolds',
'userpassword': b'password'
})))
# Modify an entry
standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE, 'cn', b'Mark Reynolds')])
# Delete an entry
standalone.delete_s(USER_DN)
What is the meaning of “standalone” here?
Advertisement
Answer
Its the name of ldap server instance:
JavaScript
import ldap
standalone=ldap.open('ldap-server-name')