summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2012-02-03 15:53:06 +0100
committerEric Blake <eblake@redhat.com>2012-02-03 10:48:32 -0700
commitf185a1df733b031b8bed2f8feb25f4610c5c0e23 (patch)
tree9739930cd15dd75af9bf5fb9506e9c2a307b5043
parent77446a59e33b0c4be2ca8043feefc157842f1607 (diff)
downloadlibvirt-python-split-f185a1df733b031b8bed2f8feb25f4610c5c0e23.tar.gz
libvirt-python-split-f185a1df733b031b8bed2f8feb25f4610c5c0e23.tar.xz
libvirt-python-split-f185a1df733b031b8bed2f8feb25f4610c5c0e23.zip
Added missing memory reporting into python bindings
Two types of memory stats were not reported by python bindings. This patch fixes both of them.
-rw-r--r--libvirt-override.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index 68e0b55..33a841d 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -259,6 +259,12 @@ libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_AVAILABLE)
PyDict_SetItem(info, libvirt_constcharPtrWrap("available"),
PyLong_FromUnsignedLongLong(stats[i].val));
+ else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON)
+ PyDict_SetItem(info, libvirt_constcharPtrWrap("actual"),
+ PyLong_FromUnsignedLongLong(stats[i].val));
+ else if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_RSS)
+ PyDict_SetItem(info, libvirt_constcharPtrWrap("rss"),
+ PyLong_FromUnsignedLongLong(stats[i].val));
}
return info;
}