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 1229199 - Expose typed parameter names in libvirt-api.xml
Summary: Expose typed parameter names in libvirt-api.xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 974510 1222795
TreeView+ depends on / blocked
 
Reported: 2015-06-08 09:13 UTC by Jiri Denemark
Modified: 2015-11-19 06:40 UTC (History)
9 users (show)

Fixed In Version: libvirt-1.2.17-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1222795
Environment:
Last Closed: 2015-11-19 06:40:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The script i used to test macro (1.81 KB, text/x-python)
2015-07-23 06:02 UTC, Luyao Huang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Jiri Denemark 2015-06-08 09:13:11 UTC
+++ This bug was initially created as a clone of Bug #1222795 +++

Description of problem:
Typed parameter names are defined as string macros in libvirt-domain.h. Let's expose their string values in libvirt-api.xml

Version-Release number of selected component (if applicable):
libvirt-1.2.16-1.el7

Comment 1 Jiri Denemark 2015-06-11 11:58:42 UTC
Fixed upstream by v1.2.16-128-gb6a2639:

commit b6a2639bd22671c44d6e3e0ca8c73b3b637d9e12
Author: Jiri Denemark <jdenemar>
Date:   Fri Jun 5 11:48:59 2015 +0200

    apibuild: Generate macro/@string attribute
    
    If a macro has a string value, the @string attribute will contain the
    value. Otherwise @string attribute will be missing.
    
    For example, the following macro definition from libvirt-domain.h:
    
     /**
      * VIR_MIGRATE_PARAM_URI:
      * ...
      */
     # define VIR_MIGRATE_PARAM_URI               "migrate_uri"
    
    will result in
    
     <macro name='VIR_MIGRATE_PARAM_URI' file='libvirt-domain' string='migrate_uri'>
       <info><![CDATA[...]]></info>
     </macro>
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1229199
    
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 3 Luyao Huang 2015-07-23 06:00:46 UTC
Verify this bug in libvirt-1.2.17-2.el7.x86_64:

1. check the /usr/share/libvirt/api/libvirt-api.xml:
...
    <macro name='VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTA' file='libvirt-domain' string='cputune.emulator_quota'>
      <info><![CDATA[Macro represents the maximum bandwidth to be used within a period for all emulator activity not tied to vcpus, when using the posix scheduler, as an VIR_TYPED_PARAM_LLONG.]]></info>
    </macro>
...

2. check the /usr/include/libvirt/libvirt-domain.h:

/**
 * VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTA:
 *
 * Macro represents the maximum bandwidth to be used within a period for
 * all emulator activity not tied to vcpus, when using the posix scheduler,
 * as an VIR_TYPED_PARAM_LLONG.
 */
# define VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTA "cputune.emulator_quota"


3. since it is hard to past all the result in this bug, i have wrote a script to check each macro:

# python test-macro.py
found 0 string marcos in /usr/include/libvirt/libvirt-domain-snapshot.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 80 string marcos in /usr/include/libvirt/libvirt-domain.h, and 80 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-event.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 11 string marcos in /usr/include/libvirt/libvirt-host.h, and 11 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-interface.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-network.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-nodedev.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-nwfilter.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-secret.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-storage.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/libvirt-stream.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml
found 0 string marcos in /usr/include/libvirt/virterror.h, and 0 string marcos in /usr/share/libvirt/api/libvirt-api.xml

Comment 4 Luyao Huang 2015-07-23 06:02:01 UTC
Created attachment 1055164 [details]
The script i used to test macro

Comment 5 Luyao Huang 2015-07-23 06:03:47 UTC
Hi Jiri,

Would you please help to check out is that okay to verify this bug via thus script ?

Thanks in advance for your reply.

Luyao

Comment 6 Jiri Denemark 2015-09-01 12:03:50 UTC
Yeah, this seems to be enough.

Comment 7 Jiri Denemark 2015-09-01 12:04:43 UTC
I mean good enough to verify the bz :-)

Comment 8 Luyao Huang 2015-09-02 01:26:22 UTC
(In reply to Jiri Denemark from comment #7)
> I mean good enough to verify the bz :-)

Thanks a lot for your reply, verify this bug with comment 5

Comment 10 errata-xmlrpc 2015-11-19 06:40:11 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/RHBA-2015-2202.html


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