On Fri, 7 Jan 2011, Karen Tung wrote:
Hi Keith,
On 01/ 7/11 02:14 PM, Keith Mitchell wrote:
On 01/ 7/11 02:01 PM, Karen Tung wrote:
Hi Keith,
grub_setup.py:
----------------------
lines 185-191: "installadm_entry" is a new optional argument you
introduced.
Why not explicitly checking for that argument since that's the only thing
that gets interpreted at this time? The way it is coded now will allow
other arguments to be specified, but then, people will be confused as
to why the values they specified are being ignored.
The call to __setup will reject any arguments that aren't
"installadm_entry". I'm trying to let Python do the checking for me. (Note
that other checkpoints *do* run into the problem you've mentioned - see
PkgImgMod for example. Perhaps a CR should be filed to adjust some of this
handling - since it would also be nice to be able to specify the keyword
args directly in __init__, rather than wrapping them in arg - I can't
recall if there was a reason for doing it as written though.)
OK, now, I understand why you did it that way.
I know that the engine allows one to specify keyword args directly in
__init__.
In fact, if you do that, the engine will even validate that they provided all
the expected args at registration time.
Take a look at usr/src/lib/install_engine/test/empty_checkpoint.py.
It shows you all the combination of args and keyword arg scenarios.
Looks like it is DC's choice to pass in the args like that. Perhaps Alok
or Drew know why. I agree with you that other checkpoints do run into
the problem of arguments not being completely validated. Let me file a bug
on that.
No specific reason, please feel free to log a bug.
Alok
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss