<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 6, 2017 at 5:02 PM, Fabrice Bacchella <span dir="ltr"><<a href="mailto:fabrice.bacchella@orange.fr" target="_blank">fabrice.bacchella@orange.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
> Le 6 avr. 2017 à 15:47, Yaniv Kaul <<a href="mailto:ykaul@redhat.com">ykaul@redhat.com</a>> a écrit :<br>
><br>
><br>
<br>
> Perhaps in your case. Here[1] is an example of the ovirt system tests, which were only partially converted (work in progress...) to v4 API.<br>
<br>
</span>yes that really related to my use case.<br>
<br>
Another problem that I have with lack of documentation, that REST API documentation or samples don't provide.<br>
<br>
In python, what does vms_service.list(search='name=<wbr>NotExistingVM') will return ? It's not stated in the REST documentation, but it's even worst in python.<br></blockquote><div><br></div><div>You could file a bug for documentation, or better yet, contribute a patch to it.</div><div>A patch to a basic example for negative cases would be very helpful as well.</div><div>An example of a patch[1] for the SDK examples from someone who found it is lacking.</div><div><br></div><div>Let me know if I can help you with contributing the example. Start here[2]</div><div>TIA,</div><div>Y.</div><div><br></div><div>[1] <a href="https://gerrit.ovirt.org/#/c/75076/">https://gerrit.ovirt.org/#/c/75076/</a></div><div>[2] <a href="http://www.ovirt.org/develop/dev-process/working-with-gerrit/">http://www.ovirt.org/develop/dev-process/working-with-gerrit/</a></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
It could throw an exception, return None, or return an empty list ?<br>
<br>
If I'm using a sdk instead of direct HTTP call is not to be bothered my xml versus json representation, but instead find an answer to that kind of questions easily.<br>
In the sample I just find:<br>
<br>
vm = vms_service.list(search='name=<wbr>myvm')[0]<br>
<br>
Not really helpfull.<br>
<br>
Is there any documentation about python exception thrown ? Or must I dig throw all the examples ?<br>
<br>
<br>
</blockquote></div><br></div></div>