<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 6 avr. 2017 à 15:32, Yaniv Kaul &lt;<a href="mailto:ykaul@redhat.com" class="">ykaul@redhat.com</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella <span dir="ltr" class="">&lt;<a href="mailto:fabrice.bacchella@orange.fr" target="_blank" class="">fabrice.bacchella@orange.fr</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class="">Yes I'm starting to understand that thinking about migrating code is pointless.<div class=""><br class=""></div><div class="">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.</div></div></blockquote><div class=""><br class=""></div><div class="">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).</div></div></div></div></div></blockquote><br class=""></div><div>An example of code that I'm unhappy to write and that a good sdk should have provided:</div><div><br class=""></div><div>searchfilter = "%s=%s" % (type, value)</div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">vm </span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">=</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class=""> vms_service.list(</span><span class="pl-v" style="box-sizing: border-box; color: rgb(237, 106, 67); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">search</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">=</span>&nbsp;searchfilter<span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">)[</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">0</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">]</span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">instead of :</span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">vms_service.list(</span><span class="pl-v" style="box-sizing: border-box; color: rgb(237, 106, 67); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">search</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">=</span>&nbsp;{type: value}<span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">)[</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre;">0</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">]</span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">or even better:</span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class="">vms_service.get(**{type: value})</span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><br class=""></body></html>