<div dir="ltr">ok this works.<br><br>docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate \<br> -i /local/swagger.json \<br> -c /local/config.json \<br> -l python \<br> -o /local/out/<br><br><br>where config looks like <br><br>{"packageName": "overt",<br> "packageVersion": "0.9"<br>}<br><br><br><br><br><br><br>On 28 April 2017 at 20:11, Ben De Luca <<a href="mailto:bdeluca@gmail.com">bdeluca@gmail.com</a>> wrote:<br>><br>> I wrote too soon! oops generated the wrong api!<br>><br>> On 28 April 2017 at 20:09, Ben De Luca <<a href="mailto:bdeluca@gmail.com">bdeluca@gmail.com</a>> wrote:<br>>><br>>> 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/<br>>><br>>> to a folder called local/out<br>>><br>>><br>>><br>>><br>>> On 28 April 2017 at 20:01, Juan Hernández <<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>> wrote:<br>>>><br>>>> 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/">http://swagger.io/</a><br>>>> ><br>>>><br>>>> The oVirt API has a formal specification, defined in this project:<br>>>><br>>>> <a href="https://github.com/oVirt/ovirt-engine-api-model">https://github.com/oVirt/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">https://jhernand.fedorapeople.org/ovirt-engine-api-model/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>>>><br>>>> ><br>>>> ><br>>>> > On 28 April 2017 at 18:57, Alexander Wels <<a href="mailto:awels@redhat.com">awels@redhat.com</a><br>>>> > <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-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>>>> > <<a href="mailto:fabrice.bacchella@orange.fr">fabrice.bacchella@orange.fr</a> <mailto:<a href="mailto:fabrice.bacchella@orange.fr">fabrice.bacchella@orange.fr</a>>><br>>>> > ><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">https://github.com/fbacchella/ovirtcmd/tree/sdk4</a><br>>>> > <<a href="https://github.com/fbacchella/ovirtcmd/tree/sdk4">https://github.com/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">https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py</a><br>>>> > <<a href="https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py">https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py</a>><br>>>> > > ><br>>>> > > > _______________________________________________<br>>>> > > > Users mailing list<br>>>> > > > <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">http://lists.ovirt.org/mailman/listinfo/users</a><br>>>> > <<a href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a>><br>>>> ><br>>>> ><br>>>> ><br>>>> ><br>>>> ><br>>>> > _______________________________________________<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">http://lists.ovirt.org/mailman/listinfo/users</a><br>>>> ><br>>>><br>>><br>><br></div>