[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] conf: Generate agent socket path if missing



On 02/15/2013 06:56 AM, Peter Krempa wrote:
> On 02/15/13 09:53, Michal Privoznik wrote:
>> The other possibility is to generate path during XML parse phase,
>> however this
>> expose something we are lacking for years - callbacks to fill in
>> default values
>
> Yep, that is missing. Without that you will fill the path only when
> the machine is started. This isn't ideal. I have the same issue with
> recording the default network model in the XML.

There are many things with defaults filled in by the parser (either
blindly, or after checking for the type of domain) that IMO really
should be determined by the hypervisor. The biggest example of this is
pretty much everything added by virDomainDefAddImplicitControllers().
Ideally, *nothing* should be added by a call to virDomainDefParseXML();
it should simply build an exact representation of the XML document in
the form of C objects. Since any defaults/implicit devices/whatever
depend not only on the target hypervisor, but often also on the
machinetype, all of that should be done after return from the parse (is
there an instance where it's necessary to add the extra complexity of a
callback?)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]