]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hyperv: Add a utility function for getting method output params
authorJonathon Jongsma <jjongsma@redhat.com>
Wed, 11 Feb 2026 22:23:30 +0000 (16:23 -0600)
committerJonathon Jongsma <jjongsma@redhat.com>
Wed, 15 Apr 2026 18:45:28 +0000 (13:45 -0500)
commit9a82b2a92fc91e4a46bb7d77cfefe2b2d04a0b6e
tree55576770aea673679b0a2e08bd722720b07a2763
parent6554e6ad95cd369a5113738baa34a902b38b562c
hyperv: Add a utility function for getting method output params

When invoking a method in WMI, it can either return synchronously or
asynchronously (with return value 4096). In the latter case, the output
parameters of the method are not present in the method response xml
document. We have to fetch the output parameters via associations with
the Job object that is returned in the method response.

the hypervInvokeMethod() function already partially handles the async
case by polling the job until it fails, completes successfully, or
times out. This patch adds a utility function to fetch a named output
parameter from a given method response xml document. It handles both
synchronous and asynchronous cases.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/hyperv/hyperv_wmi.c
src/hyperv/hyperv_wmi.h