Code review comment for lp:~mwhudson/lava-dispatcher/more-validation

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

On Thu, 08 Mar 2012 09:23:19 -0000, Zygmunt Krynicki <email address hidden> wrote:
> Review: Approve
>
> +1
>
> We should think how to validate commands better.

Yes, good idea.

> Perhaps we could attempt constructing them and calling per-command
> validate()

Have a look at what I just pushed. I worry a bit that some of the
errors will be a bit opaque.

One thing that is interesting here is that my immediate reason for doing
this is that I want to do validation in the scheduler but the scheduler
actually accepts a slightly different schema to the dispatcher -- for
example, 'target' is optional for the scheduler but not at all for the
dispatcher, and I'd like to make the 'server' parameter optional for the
submit_results command. Not sure what to do about that though...

Cheers,
mwh

« Back to merge proposal