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>