Change in vdsm[master]: vmstats: make sure values are all strings

fromani at redhat.com fromani at redhat.com
Thu Jul 16 10:54:33 UTC 2015


Francesco Romani has uploaded a new change for review.

Change subject: vmstats: make sure values are all strings
......................................................................

vmstats: make sure values are all strings

Until we drop support of XML-RPC, we need
to make sure that possibly large integers are
reported as strings.

This patch converts directly the values to strings,
avoiding the need for a later conversion step.

Change-Id: I8326c284c412cb392619b33a3bd869b12add1206
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vmstats.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/43715/1

diff --git a/vdsm/virt/vmstats.py b/vdsm/virt/vmstats.py
index f6636cf..10d0776 100644
--- a/vdsm/virt/vmstats.py
+++ b/vdsm/virt/vmstats.py
@@ -273,10 +273,10 @@
 
 def _disk_rate(first_sample, last_sample, interval):
     return {
-        'readRate': (
+        'readRate': str(
             (last_sample['rd.bytes'] - first_sample['rd.bytes'])
             / interval),
-        'writeRate': (
+        'writeRate': str(
             (last_sample['wr.bytes'] - first_sample['wr.bytes'])
             / interval)}
 


-- 
To view, visit https://gerrit.ovirt.org/43715
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8326c284c412cb392619b33a3bd869b12add1206
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list