Schema-API

Jens Vagelpohl jens at zope.com
Wed Aug 7 21:50:24 CEST 2002


i'm trying to run the Demo/schema.py script and steppping through it with 
pdb there's an oddity i see, which prevents the script from running 
successfully:

- ldapobject.py line 548 (in method search_subschemasubentry) a search is 
done on the passed-in DN to retrieve the value for the attribute 
"subschemaSubentry". the search is successful and returns...

[('dc=vts,dc=zope,dc=com', {'subschemaSubentry': ['cn=Subschema']})]

- in line 555 there is the following call:

e = ldap.cidict.cidict(r[0][1])  (r is the result shown above)

- at this point "e" has the following value:

{'subschemasubentry': ['cn=Subschema']}  (notice: "subschemasubentry" is 
all lowercase now)

- now the problem is in line 556 in the call...

search_subschemasubentry_dn = e.get('subschemaSubentry', [None])[]  
(notice: it expects camelcase again...)

... at this point the result is None and the script dies a little later.

jens


On Friday, August 2, 2002, at 10:23 , Michael Ströder wrote:

> Dear list members,
>
> please review the schema API in Lib/ldap/schema.py. There's also a demo 
> script Demo/schema.py.
>
> I've tested it with OpenLDAP 2.0.x and 2.1.x, an Innosoft server and some 
> Siemens Dir/X servers I found. It still chokes on Netscape/iPlanet/Sun 
> Directory Servers etc. with non-numeric "OID" but now with a nice 
> exception.
>
> Up to now I only addressed the issues with finding the mandantory and 
> optional attribute types to a given list of object classes. It's still 
> far away from being a complete schema support.
>
> Please comment!
>
> Ciao, Michael.
>
>
>
> 


More information about the python-ldap mailing list