On Sat, Sep 29, 2018 at 04:08 AM +0200, John Ferlan <jferlan(a)redhat.com> wrote:
On 9/20/18 1:44 PM, Marc Hartmayer wrote:
> Signed-off-by: Marc Hartmayer <mhartmay(a)linux.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
> ---
> src/conf/domain_conf.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index a3f2fcb0a001..3c307d325a89 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -5215,6 +5215,19 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def,
> }
>
>
> +/**
> + * virDomainDefPostParse:
> + * @def: domain definition
> + * @caps: driver capabilities object
> + * @parseFlags: virDomainDefParseFlags
> + * @xmlopt: XML parser option object
> + * @parseOpaque: opaque data and it might be NULL (for QEMU driver it's
qemuCaps)
> + *
> + * This function does various common and hypervisor specific auto
> + * generation, verification, and validation.
I think this is a good start. I'd really like to see what the
"expectations" are for various @parseFlags. By far one of the more
confusing things. Also while we're at it - @parseOpaque details and/or
assumptions w/r/t whether it should be provided or not.
I really hope this function will be divided into separate functions in
some time… Currently, it does way _too_ many things.
I also note a few callers use the comment "/* callback to fill driver
specific domain aspects */", so that maybe good to pull in...
Okay.
John
> + *
> + * Returns 0 on success, -1 on error
> + */
> int
> virDomainDefPostParse(virDomainDefPtr def,
> virCapsPtr caps,
>
--
Kind regards / Beste Grüße
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294