[ovirt-users] SKD4

Fabrice Bacchella fabrice.bacchella at orange.fr
Thu Apr 6 13:49:50 UTC 2017


> Le 6 avr. 2017 à 15:32, Yaniv Kaul <ykaul at redhat.com> a écrit :
> 
> 
> 
> On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella <fabrice.bacchella at orange.fr <mailto:fabrice.bacchella at orange.fr>> wrote:
> Yes I'm starting to understand that thinking about migrating code is pointless.
> 
> The old skd3 code is just good to be thrown away. There is no hope thinking about "migrating code". And as it's just a thin layer around REST calls, it's up to us to try to make something usable around that. So I expect a lot of sweat and tears to adapt my existing code.
> 
> Well, yes and no. Yes, it's not smooth, but once you 'get' the idea behind the v4 API philosophy, it's quite easy to write to (at least in Python).

An example of code that I'm unhappy to write and that a good sdk should have provided:

searchfilter = "%s=%s" % (type, value)
vm = vms_service.list(search= searchfilter)[0]

instead of :
vms_service.list(search= {type: value})[0]

or even better:
vms_service.get(**{type: value})



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170406/caa0d0f8/attachment.html>


More information about the Users mailing list