On Thu, Nov 19, 2015 at 10:15:25 -0500, Laine Stump wrote:
On 11/19/2015 07:50 AM, Peter Krempa wrote:
> On Thu, Nov 19, 2015 at 11:12:29 +0100, Michal Privoznik wrote:
>> On 18.11.2015 21:19, Laine Stump wrote:
> [...]
>
>>> Does anyone else have an opinion about this?
>>>
>> I believe there's not much gain in calling post parse callbacks during
>> cmd line parsing.
> Well, then you have to extract all the code that is setting the
> hypervisor-specific defaults that can be omitted on the commandline but
> need to be present in the definition (e.g. default network card model)
> into the command line parser, otherwise certain parts of the code will
> crash (e.g. network card model formatter).
Ugh. Right - once you've got the XML out it will get all the defaults
when it is fed back in to the parser with a virDomainDefine. But the
very first time it is formatted, right at the end of the argv-to-xml,
that could cause a problem.
That is the same case as when you try to attach to a existing process.
It's very unlikely to actually work, but there is a possibility to reuse
the object created from argv parsing directly. In that case we probably
do need to have the definiton working.
Peter