diff options
author | Guannan Ren <gren@redhat.com> | 2012-03-23 01:10:46 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-03-26 13:52:51 +0800 |
commit | a333d94eb3b2135c1cf9129b2e5a9aa5307b9882 (patch) | |
tree | 26e4ed98a0325000cac36126f35f3d1596b16bf0 /generator.py | |
parent | f14ce3e4bdae296653d3ebc03ba65f35d3120676 (diff) | |
download | libvirt-python-v6-a333d94eb3b2135c1cf9129b2e5a9aa5307b9882.tar.gz libvirt-python-v6-a333d94eb3b2135c1cf9129b2e5a9aa5307b9882.tar.xz libvirt-python-v6-a333d94eb3b2135c1cf9129b2e5a9aa5307b9882.zip |
python: add virDomainGetCPUStats python binding API
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=800366
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.
(cherry picked from commit a772f4eebc9e62870ac03dfaaac1102d0fa967b4)
Diffstat (limited to 'generator.py')
-rwxr-xr-x | generator.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generator.py b/generator.py index 98072f0..4f95cc9 100755 --- a/generator.py +++ b/generator.py @@ -423,7 +423,7 @@ skip_impl = ( 'virDomainGetBlockIoTune', 'virDomainSetInterfaceParameters', 'virDomainGetInterfaceParameters', - 'virDomainGetCPUStats', # not implemented now. + 'virDomainGetCPUStats', 'virDomainGetDiskErrors', ) @@ -966,6 +966,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:] |