[Freeipa-devel] [PATCH] jderose 009 part 2 of limiting param to certain contexts

Jason Gerard DeRose jderose at redhat.com
Wed May 20 22:03:16 UTC 2009


This patch finishes my work to allow one to limit a parameter to only
certain contexts, is the follow up to my 007 patch.

This patch is fairly large but as far as I can tell is also totally
benign: all the unit tests and doctests still pass (including the xmlrpc
tests).  Plus, as currently no plugins are using the `include` or
`exclude` kwarg in their parameters, it should not change any high-level
behavior.

I renamed my `UsesParams` base class from the 007 patch to `HasParam`,
from which now both `Command` and `Object` subclass.  The context-based
filtering is now enabled for the 'Command.args`, `Command.options`, and
`Object.params` parameter namespaces.

This patch includes docstrings that hopefully explain how this all
works.  Because the docstrings are much easier to read via the epydoc
generated documentation, I built the documentation and uploaded it to my
fedorapeople page:

http://jderose.fedorapeople.org/freeipa2-dev-doc/

For reviewing this patch, I would start with the Param.use_in_context()
docstring:

http://jderose.fedorapeople.org/freeipa2-dev-doc/ipalib.parameters.Param-class.html#use_in_context

And then read the HasParam class docstring:

http://jderose.fedorapeople.org/freeipa2-dev-doc/ipalib.frontend.HasParam-class.html

I'll no doubt have additional small follow up patches soon, but I'd like
to get this committed so we don't get too far out of sync.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jderose-009-part2-of-limiting-param-to-certain-contexts.patch
Type: text/x-patch
Size: 31583 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090520/4575d5f1/attachment.bin>


More information about the Freeipa-devel mailing list