From dae52c3ca701ee7cd654b00375ae06e439010e2f Mon Sep 17 00:00:00 2001 From: Viktor Mihajlovski Date: Thu, 25 Oct 2012 16:59:08 +0200 Subject: virNodeGetCPUMap: Add python binding Added a method getCPUMap to virConnect. It can be used as follows: import libvirt import sys import os conn = libvirt.openReadOnly(None) if conn == None: print 'Failed to open connection to the hypervisor' sys.exit(1) try: (cpus, cpumap, online) = conn.getCPUMap(0) except: print 'Failed to extract the node cpu map information' sys.exit(1) print 'CPUs total %d, online %d' % (cpus, online) print 'CPU map %s' % str(cpumap) del conn print "OK" sys.exit(0) Signed-off-by: Viktor Mihajlovski Signed-off-by: Eric Blake --- libvirt-override-api.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libvirt-override-api.xml') diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index b76fb4e..a0e0496 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -542,5 +542,11 @@ + + Get node CPU information + + + + -- cgit