diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-06-19 17:15:26 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-06-19 22:46:43 +0200 |
commit | 74309eb29cba6a9a3c22bcb808b5c2e59a9f9880 (patch) | |
tree | 80b877f38dd8b502e28ccca54bd9399c2dbe730c /source4/scripting/python | |
parent | a4f60ffe4bb4e0e32d7cd62dc872b1f23435edca (diff) | |
download | samba-74309eb29cba6a9a3c22bcb808b5c2e59a9f9880.tar.gz samba-74309eb29cba6a9a3c22bcb808b5c2e59a9f9880.tar.bz2 samba-74309eb29cba6a9a3c22bcb808b5c2e59a9f9880.zip |
pydsdb: Move write_prefixes_from_schema_to_ldb to pydsdb from pyglue.
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/pyglue.c | 26 | ||||
-rw-r--r-- | source4/scripting/python/samba/__init__.py | 2 |
2 files changed, 1 insertions, 27 deletions
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index ce164a7085..5df1b9de6f 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -131,30 +131,6 @@ static PyObject *py_set_debug_level(PyObject *self, PyObject *args) -static PyObject *py_dsdb_write_prefixes_from_schema_to_ldb(PyObject *self, PyObject *args) -{ - PyObject *py_ldb; - struct ldb_context *ldb; - WERROR result; - struct dsdb_schema *schema; - - if (!PyArg_ParseTuple(args, "O", &py_ldb)) - return NULL; - - PyErr_LDB_OR_RAISE(py_ldb, ldb); - - schema = dsdb_get_schema(ldb, NULL); - if (!schema) { - PyErr_SetString(PyExc_RuntimeError, "Failed to set find a schema on ldb!\n"); - return NULL; - } - - result = dsdb_write_prefixes_from_schema_to_ldb(NULL, ldb, schema); - PyErr_WERROR_IS_ERR_RAISE(result); - - Py_RETURN_NONE; -} - /* return the list of interface IPs we have configured takes an loadparm context, returns a list of IPs in string form @@ -222,8 +198,6 @@ static PyMethodDef py_misc_methods[] = { "nttime2unix(nttime) -> timestamp" }, { "nttime2string", (PyCFunction)py_nttime2string, METH_VARARGS, "nttime2string(nttime) -> string" }, - { "dsdb_write_prefixes_from_schema_to_ldb", (PyCFunction)py_dsdb_write_prefixes_from_schema_to_ldb, METH_VARARGS, - NULL }, { "set_debug_level", (PyCFunction)py_set_debug_level, METH_VARARGS, "set debug level" }, { "interface_ips", (PyCFunction)py_interface_ips, METH_VARARGS, diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 2f125e6ba7..c8ce6b0af0 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -287,7 +287,7 @@ class Ldb(_Ldb): dsdb.dsdb_set_schema_from_ldb(self, ldb) def write_prefixes_from_schema(self): - _glue.dsdb_write_prefixes_from_schema_to_ldb(self) + dsdb.dsdb_write_prefixes_from_schema_to_ldb(self) def convert_schema_to_openldap(self, target, mapping): return dsdb.dsdb_convert_schema_to_openldap(self, target, mapping) |