Bug 915042
Summary: | ovirt-engine-restapi : make cpu-mode enumerable values lower-case and add to /capabilities | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> |
Component: | ovirt-engine-restapi | Assignee: | Laszlo Hornyak <lhornyak> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ido Begun <ibegun> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | acathrow, dfediuck, dyasny, iheim, mpastern, oramraz, Rhev-m-bugs, sgrinber, ykaul |
Target Milestone: | --- | Flags: | sgrinber:
Triaged+
|
Target Release: | 3.2.0 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | sla | ||
Fixed In Version: | sf16 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | SLA | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 948448 |
Description
Oded Ramraz
2013-02-24 11:15:28 UTC
Michael, will such a change will not be considered as an API change? (In reply to comment #1) > Michael, will such a change will not be considered as an API change? indeed. OK, so all .value() at enum should return enum.value.lowercase() in api. (In reply to comment #0) > Description of problem: > > cpu-mode enumerable values should not be capitalized , it is true for both > VM / Host objects . > I would add those values to /capabilities link as well . > > oded, i see that enum returned in lowercase, only issue is a lack of the /capabilities documentation. seems like bugzila has a bug and i can't remove the old "External Trackers" and add new ones, so here they are: http://gerrit.ovirt.org/#/c/13308/ http://gerrit.ovirt.org/#/c/13309/ Still see the CPU mode value in capitals in CLI : [RHEVM shell (connected)]# show vm 90417bba-31e7-480d-b88b-6f0bc628f8bf | grep cpu-mode cpu-mode : CUSTOM [RHEVM shell (connected)]# show host 6372a8f7-89e4-4100-86d0-3fc26199d145 | grep -i cpu-mode cpu-mode : CUSTOM [RHEVM shell (connected)]# show cluster 300664d6-d0a6-4065-95ab-e1c43a484384 | grep -i cpu-mode cpu-mode : CUSTOM SF13.1 (In reply to comment #6) > Still see the CPU mode value in capitals in CLI : > > [RHEVM shell (connected)]# show vm 90417bba-31e7-480d-b88b-6f0bc628f8bf | > grep cpu-mode > cpu-mode : CUSTOM > > > [RHEVM shell (connected)]# show host 6372a8f7-89e4-4100-86d0-3fc26199d145 | > grep -i cpu-mode > cpu-mode : CUSTOM > > > [RHEVM shell (connected)]# show cluster 300664d6-d0a6-4065-95ab-e1c43a484384 > | grep -i cpu-mode > cpu-mode : CUSTOM > > > SF13.1 oded, are you sure your shell is pointing to the SF13.1? looking in the code i see: vm == if(entity.isUseHostCpuFlags()) { cpu.setMode(CpuMode.HOST_PASSTHROUGH.value()); } public enum CpuMode { CUSTOM, HOST_MODEL, HOST_PASSTHROUGH; public String value() { return name().toLowerCase(); } public static CpuMode fromValue(String value) { try { return valueOf(value.toUpperCase()); } catch (IllegalArgumentException e) { return null; } } } also i can't see any mapping code in the host for cpu-mode Hi Michael, I do not see where you commented that on the patch. Later you requested the code to be changed but never accepted the fix, I think I abandoned the patch. I am working on something else now, please ask Doron to give me time for this. Thx, Laszlo (In reply to comment #10) > Hi Michael, > > I do not see where you commented that on the patch. Later you requested the > code to be changed but never accepted the fix, I think I abandoned the patch. > I am working on something else now, please ask Doron to give me time for > this. > > Thx, > Laszlo Lazlo, please revert your change to <xs:complexType name="CPU"> from http://gerrit.ovirt.org/#/c/9753/ OK - SF17.1 CPU modes are listed in /capabilities: <cpu_modes> <cpu_mode>custom</cpu_mode> <cpu_mode>host_model</cpu_mode> <cpu_mode>host_passthrough</cpu_mode> </cpu_modes> Also, in CLI/API, listed values are displayed in lower case (if they are displayed; if cpu_mode=custom, then it's not displayed). 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released |