[PATCH 3/8] hyperv: break out common lookups into separate functions
Matt Coleman
mcoleman at datto.com
Fri Oct 2 21:50:22 UTC 2020
On Oct 2, 2020, at 2:25 AM, Pino Toscano <ptoscano at redhat.com> wrote:
> Note that now hypervGetVirtualSystemByID() issues VIR_ERR_INTERNAL_ERROR
> in case &computerSystem / *computerSystemList is null, instead of
> VIR_ERR_NO_DOMAIN. Shouldn't this still be able to explicitly report
> when the requested domain does not exist?
I’ll split it up into two conditionals. Would you prefer to see the NULL
check that produces the VIR_ERR_NO_DOMAIN error in the new helper
function (hypervGetVirtualSystemByID) or its caller
(hypervDomainLookupByID)?
I’ll also change the code to report VIR_ERR_OPERATION_FAILED instead of
VIR_ERR_INTERNAL_ERROR for WS-MAN failures. I had considered
VIR_ERR_RPC, but decided to go with VIR_ERR_OPERATION_FAILED since
WS-MAN isn’t exactly RPC.
Thanks again for all your help.
--
Matt
More information about the libvir-list
mailing list