def setup_modify_ldif(ldb, ldif_path, subst_vars=None,controls=["relax:0"]): """Modify a ldb in the private dir. :param ldb: LDB object. :param ldif_path: LDIF file path. :param subst_vars: Optional dictionary with substitution variables. """ data = read_and_sub_file(ldif_path, subst_vars) ldb.modify_ldif(data, controls)
def setup_modify_ldif(ldb, ldif_path, subst_vars=None, controls=["relax:0"]): """Modify a ldb in the private dir. :param ldb: LDB object. :param ldif_path: LDIF file path. :param subst_vars: Optional dictionary with substitution variables. """ data = read_and_sub_file(ldif_path, subst_vars) ldb.modify_ldif(data, controls)
def modify_ldif(ldb, ldif_file, subst_vars, controls=["relax:0"]): ldif_file_path = os.path.join(samba.param.setup_dir(), ldif_file) data = read_and_sub_file(ldif_file_path, subst_vars) ldb.modify_ldif(data, controls)