Bug 1584676

Summary: Python bindings fail to build for virConnectBaselineHypervisorCPU API
Product: [Community] Virtualization Tools Reporter: Kashyap Chamarthy <kchamart>
Component: libvirt-pythonAssignee: Jiri Denemark <jdenemar>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: jtomko, lcheng, libvirt-maint, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: libvirt-python-4.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-01 06:23:26 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:

Description Kashyap Chamarthy 2018-05-31 12:38:32 UTC
Upstream (thanks: Jiri Denemark) has recently implemented two new 
CPU-related APIs:

    virConnectCompareHypervisorCPU()
    virConnectBaselineHypervisorCPU()

As part of:

  https://bugzilla.redhat.com/show_bug.cgi?id=1559832 -- [RFC] 
  Fine-grained API to validate if a given CPU model and flags are 
  supported by QEMU / KVM

However, building their Python bindings fail:

    $> ~/build/libvirt/run python setup.py build                                                                                                                                               
    running build                              
    /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt                        
    /usr/bin/python generator.py libvirt /home/kashyapc/tinker-space/libvirt/docs/libvirt-api.xml
    Found 433 functions in /home/kashyapc/tinker-space/libvirt/docs/libvirt-api.xml            
    Found 0 functions in libvirt-override-api.xml
    Generated 353 wrapper functions            
    Missing type converters:                   
    char **:1                                  
    ERROR: failed virConnectBaselineHypervisorCPU
    error: command '/usr/bin/python' failed with exit status 1

Comment 1 Jiri Denemark 2018-05-31 15:17:46 UTC
Sent upstream for review: https://www.redhat.com/archives/libvir-list/2018-May/msg02411.html

Comment 2 Jiri Denemark 2018-06-01 06:23:26 UTC
Fixed by

commit 0f3f82e8be5a814c42b1dcf2def1884a505e6fa8
Refs: v4.3.0-8-g0f3f82e
Author:     Jiri Denemark <jdenemar>
AuthorDate: Thu May 31 17:14:25 2018 +0200
Commit:     Jiri Denemark <jdenemar>
CommitDate: Fri Jun 1 08:16:48 2018 +0200

    Add support for virConnectBaselineHypervisorCPU

    The python bindings for this API cannot be generated because are
    generator is not capable of handling string arrays (char **) parameters.

    https://bugzilla.redhat.com/show_bug.cgi?id=1584676

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Ján Tomko <jtomko>