On Fri, Mar 09, 2007 at 01:42:29AM +0000, Daniel P. Berrange wrote: > I was about to make use of the new networking APIs in virt-manager/virt-install > when I discovered we don't have any python binding for it. Attached is the > quickest patch I could write to support it - I basically copied all the > virDomain related bits & s/Domain/Network/ throughout. A simple demo script > works: > > #!/usr/bin/python > > import libvirt > > con = libvirt.open(None) > > n = con.listNetworks() > print str(n) > for name in n: > net = con.lookupByName(name) > print net.XMLDesc(0) > print net.bridgeName() > > I think there are a couple more methods which need manual implementations > though - eg UUIDString() is generated incorrectly - in fact the UUIDString() > impl for virDomains is already broken, and so is the binding for VCPU > pinning. Okay, that looks good to me and considering that I would like to push a new release real soon, it would be a bit sad to not have the python bindings for the new functionalities. Please apply :-), thanks ! On a related note, I think I would be ready to drop the generator stuff in some recent future, I can see how it makes things rather harder, and does not provide that much value considering we are trying to keep a rather small API. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/