From 65ef8171496537b49fcdd0a5b833d61a8ad23351 Mon Sep 17 00:00:00 2001 From: Guannan Ren Date: Tue, 20 Mar 2012 12:34:06 +0800 Subject: python: add virDomainGetCPUStats python binding API dom.getCPUStats(True, 0) [{'cpu_time': 24699446159L, 'system_time': 10870000000L, 'user_time': 950000000L}] dom.getCPUStats(False, 0) [{'cpu_time': 8535292289L}, {'cpu_time': 1005395355L}, {'cpu_time': 9351766377L}, {'cpu_time': 5813545649L}] *generator.py Add a new naming rule *libvirt-override-api.xml The API function description *libvirt-override.c Implement it. --- generator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'generator.py') diff --git a/generator.py b/generator.py index e641c31..cb55740 100755 --- a/generator.py +++ b/generator.py @@ -423,7 +423,7 @@ skip_impl = ( 'virDomainGetBlockIoTune', 'virDomainSetInterfaceParameters', 'virDomainGetInterfaceParameters', - 'virDomainGetCPUStats', # not implemented now. + 'virDomainGetCPUStats', 'virDomainGetDiskErrors', ) @@ -967,6 +967,9 @@ def nameFixup(name, classe, type, file): elif name[0:19] == "virStorageVolLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] + elif name[0:20] == "virDomainGetCPUStats": + func = name[9:] + func = string.lower(func[0:1]) + func[1:] elif name[0:12] == "virDomainGet": func = name[12:] func = string.lower(func[0:1]) + func[1:] -- cgit