Bug 1219404
| Summary: | Parameters nested two levels are incorrectly interpreted as top level options | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine-cli | Reporter: | Juan Hernández <juan.hernandez> |
| Component: | General | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED WONTFIX | QA Contact: | Pavel Stehlik <pstehlik> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | --- | CC: | bugs, gklein, lsurette, oourfali, rbalakri, srevivo, ykaul |
| Target Milestone: | --- | Flags: | sbonazzo:
ovirt-4.1-
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-10 10:18:41 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
There aren't plans to update the CLI, so this won't be fixed. |
Currently the RESTAPI supports data structures that can be nested multiple times. For example, when creating a virtual machine the user can specify a set of "payloads" and each of these payloads can contain a set of "files": <vm> ... <payloads> <payload> <files> <file .../> <file .../> ... </files> </payload> <payload> <files> <file .../> <file .../> ... </files> </payload> ... </payloads> ... </vm> This kind of multidimensional array is documented in the RSDL metadata file as two nested collections: vm.payloads.payload--COLLECTION: payload.type: xs:string payload.volume_id: xs:string payload.files.file--COLLECTION: file.name: xs:string file.content: xs:string And this results on the following documentation in the generated Python SDK: [@param vm.payloads.payload: collection] { [@ivar payload.type: string] [@ivar payload.volume_id: string] [@ivar payload.files.file: collection] { [@param file.name: string] [@param file.content: string] } } The CLI consumes this documentation, but it doesn't support this nesting. As a result the nested parameters are interpreted as regular top level parameters. In this case, for example, the CLI assumes that there are top level "name" and "content" parameters, which is wrong: $ ovirt-engine-shell # add vm --comm<TAB> <-- This is incorrectly autocompletd as "comment" These nested parameters should be supported correctly (see bug 1198677) or at least ignored.