On Sun, 2010-11-28 at 17:23 -0200, Cleber Rosa wrote:
> First appearing in commit d7249c87b56f922056917459c50df4102cb1ab68,
> the 'parameterized_job' feature still is incomplete. By using a
> parameterized job, one would be able to simply pass parameters to
> create a job, but would lose the ability to specify a control file.
>
> The API function 'get_info_for_clone' returns information about the
> 'parameterized_job' like this:
>
> {"error": null, "result": {
> ...
> "job" : {"parameterized_job": null, ... }
> ...
> }
> }
>
> The job cloning functionality of 'atest', implemented in cli/job.py,
> forwards this to the create_job() API function, which does NOT
> accept it as a parameter. This fixes the atest cli error:
>
> Operation create_job failed:
> TypeError: create_job() got an unexpected keyword argument 'parameterized_job'
LGTM, applied, thanks!
http://autotest.kernel.org/changeset/4978
> Signed-off-by: Cleber Rosa <[email protected]>
> ---
> cli/job.py | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/cli/job.py b/cli/job.py
> index a5122be..5eb00a5 100644
> --- a/cli/job.py
> +++ b/cli/job.py
> @@ -602,6 +602,12 @@ class job_clone(job_create_or_clone):
> for field in ('name', 'created_on', 'id', 'owner'):
> del clone_info['job'][field]
>
> + # Also remove parameterized_job field, as the feature still is
> + # incomplete, this tool does not attempt to support it for now,
> + # it uses a different API function and it breaks create_job()
> + if clone_info['job'].has_key('parameterized_job'):
> + del clone_info['job']['parameterized_job']
> +
> # Keyword args cannot be unicode strings
> self.data.update((str(key), val)
> for key, val in clone_info['job'].iteritems())
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest