Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 855724

Summary: OVIRT35 - [RFE] ovirt-engine-restapi : Statistic values representation issues
Product: [Retired] oVirt Reporter: Oded Ramraz <oramraz>
Component: ovirt-engine-sdkAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Oded Ramraz <oramraz>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3CC: bazulay, ecohen, gchaplik, gklein, iheim, jkt, juan.hernandez, mishka8520, oramraz, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: m1Keywords: FutureFeature
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
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 12:28:51 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:
Bug Depends On: 1115303    
Bug Blocks: 1114551    

Description Oded Ramraz 2012-09-10 06:20:28 UTC
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 13:39:41 UTC
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 08:00:03 UTC
(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 12:28:51 UTC
oVirt 3.5 has been released and should include the fix for this issue.