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

Re: [libvirt] [PATCH 04/10] test: Allow specifying object runstate in driver XML



On Wed, Aug 07, 2013 at 07:28:58PM -0400, Cole Robinson wrote:
> When passing in custom driver XML, allow a block like
> 
> <domain>
>   ...
>   <testdriver>
>     <runstate>3</runstate>
>   </testdriver>
> </domain>
> 
> This is only read at initial driver start time, and sets the initial
> run state of the object. This is handy for UI testing.
> 
> Wire it up for domains, networks, pools, and interfaces. The latter
> 3 only have a notion of active and inactive, which map to runstate
> 1 and 0 respectively.
> 
> We also take care to unlink this <testdriver> block before passing the
> XML to the object parse function. Right now nothing complains, but if
> XML parsing became stricter in the future we don't want it to choke
> on this custom element.

We have the ability to register custom parser/formatting callbacks
for namespaces that we use for QEMU cli arg passthrough.

I'm thinking we'd be better off defining a custom namespace for
the test driver & using that for this element.

Of course we'd have to extend these namespace hooks to the other
types of objects, since we only have it for domains currently.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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