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.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|