Bug 1173196
| Summary: | [restapi] Add support to search disk by name parameter | ||
|---|---|---|---|
| Product: | [Retired] oVirt | Reporter: | Ondra Machacek <omachace> |
| Component: | ovirt-engine-core | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ori Gofen <ogofen> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.5 | CC: | acanan, amureini, bugs, ecohen, gklein, juan.hernandez, lsurette, rbalakri, yeylon, ylavi |
| Target Milestone: | --- | ||
| Target Release: | 3.5.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | storage | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
Disks are special in that they don't have a "name" attribute like all the other entities do. Instead they have an "alias" attribute with has essentially the same meaning.
Consequence:
This makes things confusing for users and tools, specially taking into account that when we generate the representation of a disk we already populate the "name" attribute with the value of the "alias" attribute.
Fix:
Modify the RESTAPI so it accepts "name" in addition to "alias" when searching for a disk.
Result:
Both "name" and "alias" will be accepted.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-04-29 06:18:14 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1193058, 1196662, 1197441 | ||
|
Description
Ondra Machacek
2014-12-11 16:31:36 UTC
Juan, shouldn't the search simply be done with the alias instead of the name? (In reply to Allon Mureinik from comment #1) > Juan, shouldn't the search simply be done with the alias instead of the name? Allowing to query by "name" makes things a bit more consistent, as users are already used to get both "name" and "alias" populated. For example, when retrieving a disk: GET /disks/{disk:id} <disk href="..." id="..."> <name>mydisk</name> <alias>mydisk</alias> ... </disk> Both "name" and "alias" are populated with the same value. Same when adding or updating a disk: both "name" and "alias" are accepted. Anyhow this is just a little convenience. As you suggest the caller can always use the "alias". Feel free to close if you think it isn't relevant. In the future I think that what should be deprecated is "alias", not "name", as almost all the entities have a "name", and only disks have an "alias". This irregularity has already caused bugs in the SDKs and the CLI. Fair enough - let's just solve this, especially since the patch is already posted, and seems pretty trivial. this ovirt bug was fixed during 3.5.1 cycle and is included in the build, and therefore should be verified. verified on 14.1 Juan, can you provide some doctext for this bz please? ovirt 3.5.2 was GA'd. closing current release. |