Help wanted - simple python or perl script for schema conversion
Andrew Bartlett
abartlet at samba.org
Mon Dec 15 07:35:11 GMT 2008
On Fri, 2008-12-12 at 02:10 +0530, Sreepathi Pai wrote:
> [ Attached are two patches and a script.
>
> Patch #1 is the minschema_wspp tool that generates schema.ldif from
> WSPP documentation. This uses code from minschema.py (Samba 4 alpha 5)
> and is licensed similarly.
>
> Patch #2 is against the AD schema text files that fix errors in them.
> minschema_wspp will not work on these files without this patch.
> Details below.
>
> extract_from_pdf.py is a script written by me that can generate the AD
> Schema text files directly from the WSPP PDF documentation mentioned
> by Andrew. Note that there are inconsistencies between a schema.ldif
> generated from the MS text files and the ones generated by this tool.
> Requires pdftotext. I release this script (extract_from_pdf.py) into
> the public domain. It is not required for minschema_wspp to work.
>
> Thanks to Andrew for testing early versions of this script!
> ]
>
> For minschema_wspp.patch:
>
> Add minschema_wspp that generates schema.ldif from WSPP documentation.
>
>
> For MS-AD_Schema_Attributes_v20080618.txt.patch:
>
> Fix errors in MS-AD_Schema_Attributes_v20080618.txt
>
> - Remove spurious line breaks
> - Add missing attributeId from docs
> - Remove incorrect multiple values of systemFlags
> - Fix duplicate attributeId
This looks really good, and I'll commit these both for you.
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.
Oddly, I also have a weird issue to report - even with your script as
is, the provision fails. I ran it like:
python ../../scripting/bin/minschema_wspp
MS-AD_Schema_Attributes_v20080618.txt MS-AD_Schema_Classes_v20080618.txt
--dump-classes --dump-attributes > ../schema.ldif
(then a normal 'make test')
Andrew Bartlett
--
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc.
-------------- 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/20081215/8d7a2b1c/attachment.bin
More information about the samba-technical
mailing list