[Freeipa-devel] [PATCHES] jderose 0009-0019

Jason Gerard DeRose jderose at redhat.com
Fri Feb 13 21:34:19 UTC 2009


These patches finish my (initial) cleanup and testing of Andrew's
request authority plugins.  These have been tested against a CA server
Andrew has running (only accessible inside Red Hat firewall).  The tests
I ran aren't exhaustive by any means, but it's a start.

A few other noteworthy changes:

1) I added a mechanism for an entire plugin module to be conditionally
loaded.  Previously individual plugins (classes) could be conditionally
registered, but there wasn't a way to conditionally skip the entire
module.  Now you can raise errors2.SkipPluginModule.

For example, if your plugin is included in the built-in freeIPA plugins
but is only optionally enabled, you can use SkipPluginModule so that
nothing in your module after the point where you raise SkipPluginModule
gets processed:

        from ipalib import api, SkipPluginModule
        if api.env.enable_ra is not True:
            # In this case, abort loading this plugin module...
            raise SkipPluginModule(reason='env.enable_ra is not True')
        
        # The remaining is only processed when env.enable_ra is True...
        
        # So we don't get an import error here!
        import not_installed_python_package

2) I added a place-holder directory for integration tests: checks/
Inside is my still rather hacky check-ra.py script I was using to test
the ra backend plugin.  I'll send another email shortly with some
thoughts about integration testing.


P.S.: I put the patches in a tarball because it seems that Evolution is
Windows-ifying the line endings in my attachments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jderose.0009-0019.tar.gz
Type: application/x-compressed-tar
Size: 13715 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090213/6113ed67/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090213/6113ed67/attachment.sig>


More information about the Freeipa-devel mailing list