From: Martin Kletzander Date: Fri, 3 Feb 2012 14:53:06 +0000 (+0100) Subject: Added missing memory reporting into python bindings X-Git-Tag: v0.9.10-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a4ed59ad9e433f3ea50cf79ad3440a407b3829c;p=thirdparty%2Flibvirt.git Added missing memory reporting into python bindings Two types of memory stats were not reported by python bindings. This patch fixes both of them. --- diff --git a/python/libvirt-override.c b/python/libvirt-override.c index 68e0b5503d..33a841de14 100644 --- a/python/libvirt-override.c +++ b/python/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; }