Help wanted - simple python or perl script for schema conversion
Andrew Bartlett
abartlet at samba.org
Tue Dec 16 01:02:52 GMT 2008
On Mon, 2008-12-15 at 14:35 +0530, Sreepathi Pai wrote:
> On Mon, Dec 15, 2008 at 1:05 PM, Andrew Bartlett <abartlet at samba.org> wrote:
> > This looks really good, and I'll commit these both for you.
>
> Thanks!
>
> > I wondered, do you think it would be possible to change the script into
> > a python library? I'm thinking it could be part of
> > scripting/python/samba/provision.py. The idea would be to be able to
> > call the full conversion in the provision script.
>
> This shouldn't be difficult, I'll take a look at provision.py and see
> what has to be done.
In particular, look at where it loads schema.ldif, and replace that with
the output of your routines.
ie, replace:
setup_add_ldif(samdb, setup_path("schema.ldif"),
{"SCHEMADN": names.schemadn})
with:
data = read_ms_schema(setup_path("ad-schema/attrs.ldif",
"ad-schema/classses.ldif"))
data = substitute_var(data, subst_vars)
check_all_substituted(data)
ldb.add_ldif(data)
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20081216/a7a4455a/attachment.bin
More information about the samba-technical
mailing list