Bug 855724 - OVIRT35 - [RFE] ovirt-engine-restapi : Statistic values representation issues
OVIRT35 - [RFE] ovirt-engine-restapi : Statistic values representation issues
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-sdk (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity medium
: m1
: 3.5.0
Assigned To: Juan Hernández
Oded Ramraz
infra
: FutureFeature
Depends On: 1115303
Blocks: 1114551
  Show dependency treegraph
 
Reported: 2012-09-10 02:20 EDT by Oded Ramraz
Modified: 2016-02-10 14:31 EST (History)
12 users (show)

See Also:
Fixed In Version: ovirt-engine-cli-3.5.0.0-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1114551 (view as bug list)
Environment:
Last Closed: 2014-10-17 08:28:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 26864 master MERGED cli: Don't write integer statistics as float Never

  None (edit)
Description Oded Ramraz 2012-09-10 02:20:28 EDT
Description of problem:

We need to update some of the statistic values to look like integers instead of floats. 

Example:

values-type       : INTEGER
values-value-datum: 33658241024.0


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:


[RHEVM shell (connected)]# show statistic --host-identifier puma32

id                : 7816602b-c05c-3db7-a4da-3769f7ad8896
name              : memory.total
description       : Total memory
host-id           : d3560912-f2ad-11e1-8f5f-001a4a169798
type              : GAUGE
unit              : BYTES
values-type       : INTEGER
values-value-datum: 33658241024.0
Comment 2 Juan Hernández 2014-01-17 08:39:41 EST
The RESTAPI returns the values of these statistics correctly, as integers, it is the Python SDK that converts this to float. The CLI then renders the float with the default rendering format in Python.
Comment 3 Michael Pasternak 2014-04-17 04:00:03 EDT
(In reply to Juan Hernández from comment #2)
> The RESTAPI returns the values of these statistics correctly, as integers,
> it is the Python SDK that converts this to float. The CLI then renders the
> float with the default rendering format in Python.

the thing is that in rest-api schema datum defined as 'xs:decimal' and python
converts it to 'float' (to get maximum precision),

if fix will be in the python-sdk, it should be for datum only and 'generic' by casting statistics.value-datum to type defined in statistics.values-type
Comment 4 Sandro Bonazzola 2014-10-17 08:28:51 EDT
oVirt 3.5 has been released and should include the fix for this issue.

Note You need to log in before you can comment on or make changes to this bug.