RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 985782 - Some flag values of method are missing in libvirt-python bindings
Summary: Some flag values of method are missing in libvirt-python bindings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-18 08:52 UTC by hongming
Modified: 2016-04-26 15:15 UTC (History)
4 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:20:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description hongming 2013-07-18 08:52:35 UTC
Description of problem:
The VIR_NETWORK_UPDATE_COMMAND_ADD_LAST= 3 is missing in update function of virNetwork class in libvirt-python bindings.

Version-Release number of selected component (if applicable):
libvirt-python-0.10.2-20.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
# rpm -q libvirt-python
libvirt-python-0.10.2-20.el6.x86_64

2.
# vim /usr/lib64/python2.6/site-packages/libvirt.py
4469 # virNetworkUpdateCommand
4470 VIR_NETWORK_UPDATE_COMMAND_NONE = 0
4471 VIR_NETWORK_UPDATE_COMMAND_MODIFY = 1
4472 VIR_NETWORK_UPDATE_COMMAND_DELETE = 2
4473 VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST = 4

3.
http://libvirt.org/html/libvirt-libvirt.html#virNetworkUpdateCommand
virNetworkUpdateCommand

enum virNetworkUpdateCommand {

VIR_NETWORK_UPDATE_COMMAND_NONE 	= 	0 	
(invalid)
VIR_NETWORK_UPDATE_COMMAND_MODIFY 	= 	1 	
modify an existing element
VIR_NETWORK_UPDATE_COMMAND_DELETE 	= 	2 	
delete an existing element
VIR_NETWORK_UPDATE_COMMAND_ADD_LAST 	= 	3 	
add an element at end of list
VIR_NETWORK_UPDATE_COMMAND_ADD_FIRST 	= 	4 	
add an element at start of list
VIR_NETWORK_UPDATE_COMMAND_LAST 	= 	5

}


Actual results:
The VIR_NETWORK_UPDATE_COMMAND_ADD_LAST= 3 is missing in update function of virNetwork class in libvirt-python bindings. 

Expected results:
It exists in libvirt-python binding 

Additional info:

Comment 2 hongming 2013-07-19 08:10:56 UTC
The VIR_DOMAIN_REBOOT_INITCTL =4  and   VIR_DOMAIN_REBOOT_SIGNAL = 8 are missing in the reboot method of virDomain class in libvirt-python bindings.

1.
# vim /usr/lib64/python2.6/site-packages/libvirt.py

5155 # virDomainRebootFlagValues
5156 VIR_DOMAIN_REBOOT_DEFAULT = 0
5157 VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = 1
5158 VIR_DOMAIN_REBOOT_GUEST_AGENT = 2


2.
http://libvirt.org/html/libvirt-libvirt.html#virDomainRebootFlagValues
virDomainRebootFlagValues

enum virDomainRebootFlagValues {

VIR_DOMAIN_REBOOT_DEFAULT 	= 	0 	
hypervisor choice
VIR_DOMAIN_REBOOT_ACPI_POWER_BTN 	= 	1 	
Send ACPI event
VIR_DOMAIN_REBOOT_GUEST_AGENT 	= 	2 	
Use guest agent
VIR_DOMAIN_REBOOT_INITCTL 	= 	4 	
Use initctl
VIR_DOMAIN_REBOOT_SIGNAL 	= 	8 	
Send a signal

}

Comment 4 Martin Kletzander 2014-02-20 12:47:25 UTC
(In reply to hongming from comment #2)
This is totally irrelevant.  Upstream added these flags after 1.0.0 was released so of course it is missing from 0.10.2.  You cannot refer to upstream (the webpage you are referring to).

I'm still investigating about the ADD_LAST now.

Comment 5 Martin Kletzander 2014-02-20 15:48:16 UTC
With VIR_NETWORK_UPDATE_COMMAND_ADD_LAST the problem is that it ends with "_LAST" which we effectively filter out as a sentinel.

Comment 6 Martin Kletzander 2014-02-21 06:33:03 UTC
Fixed upstream by commit v1.2.1-6-g014d9bb:

commit 014d9bbaf368b33a881f1d6b2fd8a5dd285a4f71
Author: Martin Kletzander <mkletzan>
Date:   Thu Feb 20 16:35:02 2014 +0100

    generator: Skip exporting only sentinels

Comment 8 Jiri Denemark 2014-04-04 21:37:47 UTC
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.

Comment 10 hongming 2014-11-24 08:17:14 UTC
Verify it as follows.The result is expected. Move its status to VERIFIED. 


# rpm -q libvirt libvirt-python
libvirt-1.2.8-8.el7.x86_64
libvirt-python-1.2.8-5.el7.x86_64


# python -c "import libvirt; print libvirt.VIR_NETWORK_UPDATE_COMMAND_ADD_LAST"
3


# python -c "import libvirt; print libvirt.VIR_DOMAIN_REBOOT_INITCTL"
4


# python -c "import libvirt; print libvirt.VIR_DOMAIN_REBOOT_SIGNAL"
8

Comment 12 errata-xmlrpc 2015-03-05 07:20:53 UTC
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/RHSA-2015-0323.html


Note You need to log in before you can comment on or make changes to this bug.