1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-30 23:41:52 +03:00

override: Properly override wrapper for virDomainGetGuestVcpus

Without the change to libvirt-override-api.xml generator.py would
generate the following function header:

    def guestVcpus(self, params, nparams, flags=0):

Since @params and @nparams are output-only in C and the python C
implementation actualy creates a dict from them we should not need to
pass them. Add the API definition to drop the two unnecessary args:

    def guestVcpus(self, flags=0):

The code did not work at all until this change as the C impl expects
only two arguments but the python required use of four.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1377071
This commit is contained in:
Peter Krempa
2016-09-19 13:54:37 +02:00
parent 3e041e5b36
commit 0061566872

View File

@ -698,5 +698,11 @@
<arg name='flags' type='unsigned int' info='extra flags; not used yet, so callers should always pass 0'/>
<return type='char *' info="dictionary of domain interfaces along with their MAC and IP addresses"/>
</function>
<function name='virDomainGetGuestVcpus' file='python'>
<info>returns a dictionary containing information regarding guest vcpus</info>
<arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
<arg name='flags' type='unsigned int' info='extra flags; not used yet, so callers should always pass 0'/>
<return type='int' info="dictionary of vcpu data returned by the guest agent"/>
</function>
</symbols>
</api>