def uploadLDIF(ldifFolder, outputLdifFolder):
    files = os.listdir(outputLdifFolder)
    for fn in files:
        cmd = [ldapmodify] + ldap_creds + ['-a', '-f', "%s/%s" % (outputLdifFolder, fn)]
        output = getOutput(cmd)
        if output:
            logIt(output)
        else:
            logIt("Error adding file %s" % fn, True)

    # delete default admin user created in 2.4 install
    dn_list = getDns("/opt/opendj/ldif/people.ldif")
    deleteEntries(dn_list)

    # Add People
    cmd = [ldapmodify] + ldap_creds + ['-a', '-c', '-f', "%s/people.ldif" % ldifFolder]
    output = getOutput(cmd)
    if output:
        logIt(output)
    else:
        logIt("Error adding people.ldif", True)

    dn_list = getDns("%s/site.ldif" % ldifFolder)
    if dn_list > 2:
        cmd = [ldapmodify] + ldap_creds + ['-a', '-c', '-f', "%s/site.ldif" % ldifFolder]
        output = getOutput(cmd)
        if output:
            logIt(output)
        else:
            logIt("Error adding site.ldif", True)
dataset/ETHPy150Open GluuFederation/community-edition-setup/static/scripts/import23.py/uploadLDIF/original