[ovirt-users] Ovirt 4, the missing python sdk

Fabrice Bacchella fabrice.bacchella at orange.fr
Fri Apr 28 10:43:52 UTC 2017


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.

It's still a work in progress, but a big improvement from my previous version, made for ovirt 3.

It allows to write simple commands on shell :

$ ./ovcmd host -n hostname maintenance
$ ./ovcmd host -n hostname activate

It also allows to do fine exports:

$ ./ovcmd vm -n vmname export os type
rhel_6x64

$ ./ovcmd capabilities -n 4.1 export cpu_types name
Intel Conroe Family
Intel Penryn Family
Intel Nehalem Family
Intel Westmere Family
Intel SandyBridge Family
Intel Haswell-noTSX Family
Intel Haswell Family
Intel Broadwell-noTSX Family
Intel Broadwell Family
Intel Skylake Family
AMD Opteron G1
AMD Opteron G2
AMD Opteron G3
AMD Opteron G4
AMD Opteron G5
IBM POWER8

Or to get a display console on a mac os:

$open $(./ovcmd vm -n vmname console )


It can be found at https://github.com/fbacchella/ovirtcmd/tree/sdk4
It's still works in progress, I need to finish to remove sdk3 code.

Some example of object written to sdk4 can be found at:

https://github.com/fbacchella/ovirtcmd/blob/sdk4/ovlib/vms/__init__.py
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170428/9fe23de0/attachment.html>


More information about the Users mailing list