Bug 1212168
| Summary: | add an event on device attach to the python bindings | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Ján Tomko <jtomko> |
| Component: | libvirt-python | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | dyuan, gscrivan, honzhang, juzhou, mzhan, rbalakri, tzheng, virt-bugs, zhwang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-python-1.2.15-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1206114 | Environment: | |
| Last Closed: | 2015-11-19 05:34:40 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: | 1206114 | ||
| Bug Blocks: | 1179138 | ||
|
Description
Ján Tomko
2015-04-15 17:14:18 UTC
Pushed upstream:
commit cd2d02ab0d92078b4addcbf1e650add92730bc4d
Author: Ján Tomko <jtomko>
CommitDate: 2015-04-15 18:48:23 +0200
Implement the DEVICE_ADDED event
git describe: v1.2.14-2-gcd2d02a
Verify it as follows. The result is expected. Move its status to VERIFIED. # rpm -q libvirt libvirt-python libvirt-1.2.15-2.el7.x86_64 libvirt-python-1.2.13-1.el7.x86_64 Execute the event-test.py # python /usr/share/doc/libvirt-python-1.2.15/examples/event-test.py In another terminal , execute the following steps # virsh start r7a Domain r7a started # cat nic.xml <interface type='network'> <source network='default'/> </interface> # virsh domiflist r7a Interface Type Source Model MAC ------------------------------------------------------- vnet0 network default rtl8139 52:54:00:cc:6d:e8 # virsh attach-device r7a nic.xml Device attached successfully # virsh domiflist r7a Interface Type Source Model MAC ------------------------------------------------------- vnet0 network default rtl8139 52:54:00:cc:6d:e8 vnet1 network default rtl8139 52:54:00:8c:3d:27 Check the output of event-test.py , it is capture the 'device-added' event. # # python /usr/share/doc/libvirt-python-1.2.15/examples/event-test.py Using uri:qemu:///system myDomainEventAgentLifecycleCallback: Domain r7a(8) disconnected domain started myDomainEventCallback1 EVENT: Domain r7a(8) Resumed Unpaused myDomainEventCallback2 EVENT: Domain r7a(8) Resumed Unpaused myDomainEventCallback1 EVENT: Domain r7a(8) Started Booted myDomainEventCallback2 EVENT: Domain r7a(8) Started Booted myDomainEventAgentLifecycleCallback: Domain r7a(8) connected channel event myDomainEventDeviceAddedCallback: Domain r7a(8) device added: net1 It is verified in the following versions. The versions in the above comment is wrong when copy and paste # rpm -q libvirt libvirt-python libvirt-1.2.15-2.el7.x86_64 libvirt-python-1.2.15-1.el7.x86_64 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 |