Bug 1175795
Summary: | RFE: allow passing in a pre-opened libvirt connection from python | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jiri Denemark <jdenemar> |
Component: | libvirt-python | Assignee: | Libvirt Maintainers <libvirt-maint> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.1 | CC: | crobinso, dyuan, gscrivan, honzhang, lmiksik, mbooth, mzhan, ptoscano, rbalakri, rjones, weizhan |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-python-1.2.13-1.el7 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | 1075164 | Environment: | |
Last Closed: | 2015-11-19 05:33:16 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1075164 | ||
Bug Blocks: | 1138203, 1173695 |
Description
Jiri Denemark
2014-12-18 15:35:08 UTC
Implemented upstream by v1.2.11: commit e3da7ade421a1fbb5f1789dea9903a3ae6243ced Author: Richard W.M. Jones <rjones> Date: Thu Dec 11 11:16:12 2014 +0000 Add c_pointer method to classes. This returns the raw C pointer to the underlying object, eg: conn = libvirt.open(None) print "0x%x" % conn.c_pointer() # returns virConnectPtr of the connection dom = conn.lookupByName("test") print "0x%x" % dom.c_pointer() # returns virDomainPtr of the domain The reason behind this is to allow us to transparently pass Python dom objects through the libguestfs Python API. https://bugzilla.redhat.com/show_bug.cgi?id=1075164 *** Bug 1173697 has been marked as a duplicate of this bug. *** Verify it as follows.The result is expected. Move its stauts to VERIFIED. # rpm -q libvirt-python libvirt-python-1.2.15-1.el7.x86_64 # python Python 2.7.5 (default, Feb 11 2014, 07:46:25) [GCC 4.8.2 20140120 (Red Hat 4.8.2-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import libvirt >>> conn = libvirt.open(None) >>> print "0x%x" % conn.c_pointer() 0x243cc10 >>> dom = conn.lookupByName("r7a") >>> print "0x%x" % dom.c_pointer() 0x23ff900 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2203.html |