[libvirt] Storage api problem

import libvirt con = libvirt.open(<my uri using ssh>) con.numOfDefinedStoragePools()
Hi, I am just trying to use libvirt storage api from python terminal, and i am getting the following error. libvir: Remote error : Broken pipe Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/libvirt.py", line 1022, in numOfDefinedStoragePools ret = libvirtmod.virConnectNumOfDefinedStoragePools(self._o) AttributeError: 'module' object has no attribute 'virConnectNumOfDefinedStoragePools'
I have checked in the libvirt.c file and the function "virConnectNumOfDefinedStoragePools(virConnectPtr conn)" is implemented. Thanks,

Hi, You should also check python directory in libvirt, since it should be python binging problem.:-) "sarveswara rao mygapula" <sarvesh.18@gmail.com> wrote:
I have checked in the libvirt.c file and the function "virConnectNumOfDefinedStoragePools(virConnectPtr conn)" is implemented.
Thanks Atushi SAKAI

On Fri, May 23, 2008 at 11:32:37AM +0530, sarveswara rao mygapula wrote:
Hi,
I am just trying to use libvirt storage api from python terminal, and i am getting the following error.
import libvirt con = libvirt.open(<my uri using ssh>) con.numOfDefinedStoragePools() libvir: Remote error : Broken pipe Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/libvirt.py", line 1022, in numOfDefinedStoragePools ret = libvirtmod.virConnectNumOfDefinedStoragePools(self._o) AttributeError: 'module' object has no attribute 'virConnectNumOfDefinedStoragePools'
The version of the python binding you are using is different from the version of libvirt C library. I guess you're install is done properly, or you installed it in a non-standard location and have not set the neccessary LD_LIBRARY_PATH/PYTHONPATH environemnt variables. That all said, I've just noticed there is another bug in the python bindings that would prevent this method from working. I'll fix that shortly. Dan -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (3)
-
Atsushi SAKAI
-
Daniel P. Berrange
-
sarveswara rao mygapula