<div dir="ltr">does ovirt have a restful api?</div><div class="gmail_extra"><br><div class="gmail_quote">On 28 April 2017 at 13:43, Fabrice Bacchella <span dir="ltr">&lt;<a href="mailto:fabrice.bacchella@orange.fr" target="_blank">fabrice.bacchella@orange.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I have started to write a custom sdk/cli in python for Ovirt 4. It provides helpers and wrapper for the rather raw level sdk4 provided.<div><br></div><div>It&#39;s still a work in progress, but a big improvement from my previous version, made for ovirt 3.</div><div><br></div><div>It allows to write simple commands on shell :</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ ./ovcmd host -n hostname maintenance</span></div></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ ./ovcmd host -n hostname activate</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">It also allows to do fine exports:</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ ./ovcmd vm -n vmname export os type</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">rhel_6x64</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ </span>./ovcmd capabilities -n 4.1 export cpu_types name</div><div style="margin:0px;line-height:normal"><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Conroe Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Penryn Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Nehalem Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Westmere Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel SandyBridge Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Haswell-noTSX Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Haswell Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Broadwell-noTSX Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Broadwell Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Intel Skylake Family</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">AMD Opteron G1</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">AMD Opteron G2</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">AMD Opteron G3</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">AMD Opteron G4</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">AMD Opteron G5</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">IBM POWER8</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">Or to get a display console on a mac os:</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">$open $(./ovcmd vm -n vmname console )</span></div><div style="font-family:Menlo;font-size:11px;margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="font-family:Menlo;font-size:11px"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="font-family:Menlo;font-size:11px"><span style="font-variant-ligatures:no-common-ligatures">It can be found at <a href="https://github.com/fbacchella/ovirtcmd/tree/sdk4" target="_blank">https://github.com/<wbr>fbacchella/ovirtcmd/tree/sdk4</a></span></div><div style="font-family:Menlo;font-size:11px">It&#39;s still works in progress, I need to finish to remove sdk3 code.</div><div style="font-family:Menlo;font-size:11px"><br></div><div style="font-family:Menlo;font-size:11px">Some example of object written to sdk4 can be found at:</div><div style="font-family:Menlo;font-size:11px"><br></div><div><span style="font-variant-ligatures:no-common-ligatures;font-size:11px"><font face="Menlo"><a href="https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py" target="_blank">https://github.com/fbacchella/<wbr>ovirtcmd/blob/sdk4/ovlib/vms/_<wbr>_init__.py</a></font></span></div></div></div><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></blockquote></div><br></div>