<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>Thanks for the response.<br><br></div>I've used the URI: <br></div>"test+ssh://<ipaddress>/default" and the connection is successful and with that connection I issued getCapabilities and its result is attached.<br>
</div>I'm not sure how is result xml generated by the files in the /examples folder.<br></div>Will you please explain how is this xml generated.<br><br>Also my client is not going to modified. My client is going to connect with the URI "qemu+tls://<host>/system?no_tty=1", so I can't directly use the test driver here so I need to replace the qemu driver with the test driver and give my dummy response. So I need to know how to replace the driver say qemu with test driver and generating my desired output.<br>
<br></div>If the test driver is not going to support me too much then I might want to write new driver. Is there is any reference how to write new driver.<br><br>Regards,<br>Arun V<br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, Sep 11, 2013 at 2:23 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Sep 11, 2013 at 12:50:37PM +0530, Arun Viswanath wrote:<br>
> Hi Eric,<br>
><br>
> Thanks for your response.<br>
> I like to know how test driver works.<br>
><br>
> In the <a href="http://libvirt.org" target="_blank">libvirt.org</a> for test driver it is mentioned as "It can start with a<br>
> pre-configured default config, or be given a path to an alternate config".<br>
> Is the config is an xml file where we mentioned some dummy data so that the<br>
> test driver will return it as response. If yes then where can I find this<br>
> dummy file?<br>
><br>
> As mentioned earlier my intention is to mock qemu calls. so it test driver<br>
> works then I'm planning to remove the qemu driver and register "test"<br>
> driver as "qemu" driver and take the fake data from the config file. Please<br>
> let me know which are the files I need to look into to register "test" as<br>
> "qemu" and make its operations to work.<br>
<br>
</div>The XML file is provided via the URI. For example<br>
<br>
   test:///default<br>
<br>
uses a built-in config, but you can supply a real path eg<br>
<br>
   test:///home/berrange/testnode.xml<br>
<br>
<br>
Take a look at examples/xml/test/testnode.xml  in the libvirt source<br>
tree for an example.<br>
<br>
FYI, the test driver is used very successfully in virt-install and<br>
virt-manager for testing their functionality in an automated way,<br>
so I can strongly recommend its use, over trying to mock the APIs<br>
or wire protocol yourself.<br>
<span class="HOEnZb"><font color="#888888"><br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></blockquote></div><br></div>