John Dennis wrote:
This adds a new module and set of classes to ipalib for handling DN's.
Please see the module doc and class doc for full explanation.
Included is a very complete unit test for the module. At close to 900
lines of code the unit test exercises just about every conceivable way
these objects can be used.
The module doc touches on some of the problems found in our existing
code which handles DN's, which this module is meant to provide fixes
for. A more complete write-up of the existing code issues will follow on
Comments welcome of course.
Another patch will follow for comma's in privileges. The
test_role_plugin.py unit test was modified to introduce a comma, but
there were many failures because of improper DN handling in the core
code (as well as limitations of the unit test framework). The next patch
introduces a number of fixes, some of which are dependent upon the use
of the classes introduced here. With the fixes in the next patch the
test_role_plugin unit test once again fully succeeds.
Am I misreading the documentation on how one can create a DN?
>>> print container
>>> print basedn
>>> str(DN(container, basedn))
>>> str(DN('%s=%s' % (rdnattr, uid), container, basedn))
The patch requires one very minor change, the import from dn should be
from ipalib.dn import ... We run the tests from the top-level.
Freeipa-devel mailing list