-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12913/#review24058
-----------------------------------------------------------
I've simplified the check in this way:
- missing = filter(lambda x: x not in args_dict.keys() +
[parm.split('[')[0] for parm in args_dict.keys()],
+ missing = filter(lambda x: x not in [key.split('[')[0]
+ for key in args_dict],
self.apicache[verb][subject]['requiredparams'])
It's because splitting at [ and getting 0th element will be same as string if [
was not present, not need to duplicate list elements.
- Rohit Yadav
On July 25, 2013, 4:52 a.m., Carson Anderson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12913/
> -----------------------------------------------------------
>
> (Updated July 25, 2013, 4:52 a.m.)
>
>
> Review request for cloudstack and Rohit Yadav.
>
>
> Bugs: CLOUDSTACK-3787
>
>
> Repository: cloudstack-git
>
>
> Description
> -------
>
> CM does not detect required tags if they are passed as a map. When creating
> resource tags for example. The tags[0].key and tags[0].value weren't counted
> for the "tags" parameter and CM would give a "missing required parameter"
> error.
>
>
> Diffs
> -----
>
> tools/cli/cloudmonkey/cloudmonkey.py 13f54ad
>
> Diff: https://reviews.apache.org/r/12913/diff/
>
>
> Testing
> -------
>
> Tested by adding/removing resourceTags
>
>
> Thanks,
>
> Carson Anderson
>
>