there is a disconnect between the methods that help(libvirt) shows for class virStorageVol and the method listed in
/usr/lib64/python2.6/site-packages/libvirt.py for the same class. method createXML used for virStorageVolCreateXML is missing when i use help(libvirt) and scroll down to the class virStorageVol, however the method is listed in libvirt.py as:
def createXML(self, xmldesc, flags):
"""Create a storage volume within a pool based
on an XML description. Not all pools support
creation of volumes """
ret = libvirtmod.virStorageVolCreateXML(self._o, xmldesc, flags)
if
ret is None:raise libvirtError('virStorageVolCreateXML() failed', pool=self)
__tmp = virStorageVol(self, _obj=ret)
return __tmp
From: Osier Yang <jyang@xxxxxxxxxx>
To: Syed A. Ali <syed_a_ali@xxxxxxxxx>
Cc: "libvirt-users@xxxxxxxxxx" <libvirt-users@xxxxxxxxxx>
Sent: Monday, May 7, 2012 6:23 AM
Subject: Re: list storage pools and volumes using python api calls
On 2012年05月07日 13:26, Syed A. Ali wrote:
> how do i list storage pools and volumes using the python bindings?
> basically the python api calls for virsh pool-list and virsh vol-list
> thanks
>
>
# python
>>> import libvirt
>>> help(libvirt)
You will find "listStoragePools" in class "virConnect",
and "listVolumes" in class "virStoragePool".
Regards,
Osier
_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users
_______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users