<div dir="ltr">I just generated the python API with the cmdline tools. <br><br>I tend to use docker with random things like this from the internet, but with docker installed this will generate a python version of the api. <br><br>docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate \<br> -c /local/swagger.json \<br> -l python \<br> -o /local/out/<div><br></div><div>to a folder called local/out </div><div><br></div><div><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 April 2017 at 20:01, Juan Hernández <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04/28/2017 06:00 PM, Ben De Luca wrote:<br>
> before people go writing yet another api client wouldn't it make sense<br>
> to just define the api client in terms of some thing like swagger<br>
> ? <a href="http://swagger.io/" rel="noreferrer" target="_blank">http://swagger.io/</a><br>
><br>
<br>
</span>The oVirt API has a formal specification, defined in this project:<br>
<br>
<a href="https://github.com/oVirt/ovirt-engine-api-model" rel="noreferrer" target="_blank">https://github.com/oVirt/<wbr>ovirt-engine-api-model</a><br>
<br>
The skeleton of the server, the documentation, and the SDKs are<br>
automatically generated from that specification.<br>
<br>
There is also an experimental Swagger/OpenAPI specification, available here:<br>
<br>
<a href="https://jhernand.fedorapeople.org/ovirt-engine-api-model/swagger.json" rel="noreferrer" target="_blank">https://jhernand.fedorapeople.<wbr>org/ovirt-engine-api-model/<wbr>swagger.json</a><br>
<br>
However this seems to be too big for Swagger tools (1 MiB, 17000 lines).<br>
Every time I tried to load it into Swagger editor or Swagger UI it just<br>
burns the CPU of the browser and never finishes loading. If you have<br>
some Swagger expertise would be nice if you can take a look and pinpoint<br>
what is the problem.<br>
<span class=""><br>
><br>
><br>
> On 28 April 2017 at 18:57, Alexander Wels <<a href="mailto:awels@redhat.com">awels@redhat.com</a><br>
</span><span class="">> <mailto:<a href="mailto:awels@redhat.com">awels@redhat.com</a>>> wrote:<br>
><br>
> On Friday, April 28, 2017 11:41:03 AM EDT Ben De Luca wrote:<br>
> > does ovirt have a restful api?<br>
> ><br>
><br>
> Yes,<br>
><br>
> Its available at https://<engine_url>/ovirt-<wbr>engine/api<br>
><br>
> In fact the python/java/ruby sdk are just wrappers to calling this api.<br>
><br>
> > On 28 April 2017 at 13:43, Fabrice Bacchella<br>
</span>> <<a href="mailto:fabrice.bacchella@orange.fr">fabrice.bacchella@orange.fr</a> <mailto:<a href="mailto:fabrice.bacchella@orange.fr">fabrice.bacchella@<wbr>orange.fr</a>>><br>
<div><div class="h5">> ><br>
> > wrote:<br>
> > > I have started to write a custom sdk/cli in python for Ovirt 4. It<br>
> > > provides helpers and wrapper for the rather raw level sdk4 provided.<br>
> > ><br>
> > > It's still a work in progress, but a big improvement from my<br>
> previous<br>
> > > version, made for ovirt 3.<br>
> > ><br>
> > > It allows to write simple commands on shell :<br>
> > ><br>
> > > $ ./ovcmd host -n hostname maintenance<br>
> > > $ ./ovcmd host -n hostname activate<br>
> > ><br>
> > > It also allows to do fine exports:<br>
> > ><br>
> > > $ ./ovcmd vm -n vmname export os type<br>
> > > rhel_6x64<br>
> > ><br>
> > > $ ./ovcmd capabilities -n 4.1 export cpu_types name<br>
> > > Intel Conroe Family<br>
> > > Intel Penryn Family<br>
> > > Intel Nehalem Family<br>
> > > Intel Westmere Family<br>
> > > Intel SandyBridge Family<br>
> > > Intel Haswell-noTSX Family<br>
> > > Intel Haswell Family<br>
> > > Intel Broadwell-noTSX Family<br>
> > > Intel Broadwell Family<br>
> > > Intel Skylake Family<br>
> > > AMD Opteron G1<br>
> > > AMD Opteron G2<br>
> > > AMD Opteron G3<br>
> > > AMD Opteron G4<br>
> > > AMD Opteron G5<br>
> > > IBM POWER8<br>
> > ><br>
> > > Or to get a display console on a mac os:<br>
> > ><br>
> > > $open $(./ovcmd vm -n vmname console )<br>
> > ><br>
> > ><br>
> > > It can be found at<br>
> <a href="https://github.com/fbacchella/ovirtcmd/tree/sdk4" rel="noreferrer" target="_blank">https://github.com/fbacchella/<wbr>ovirtcmd/tree/sdk4</a><br>
> <<a href="https://github.com/fbacchella/ovirtcmd/tree/sdk4" rel="noreferrer" target="_blank">https://github.com/<wbr>fbacchella/ovirtcmd/tree/sdk4</a>><br>
> > > It's still works in progress, I need to finish to remove sdk3 code.<br>
> > ><br>
> > > Some example of object written to sdk4 can be found at:<br>
> > ><br>
> > ><br>
> <a href="https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py" rel="noreferrer" target="_blank">https://github.com/fbacchella/<wbr>ovirtcmd/blob/sdk4/ovlib/vms/_<wbr>_init__.py</a><br>
> <<a href="https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py" rel="noreferrer" target="_blank">https://github.com/<wbr>fbacchella/ovirtcmd/blob/sdk4/<wbr>ovlib/vms/__init__.py</a>><br>
> > ><br>
> > > ______________________________<wbr>_________________<br>
> > > Users mailing list<br>
</div></div>> > > <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>><br>
> > > <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
> <<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a>><br>
<div class="HOEnZb"><div class="h5">><br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Users mailing list<br>
> <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
><br>
<br>
</div></div></blockquote></div><br></div>