Re: [ovirt-users] oVirt SDK v4 backwards compatibility

--_000_830be3d01aa1402fa5d497f8f7611c67exch24sluse_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 DQpEZW4gNyBub3YuIDIwMTYgMTU6NTMgc2tyZXYgUmFmYWVsIE1hcnRpbnMgPHJtYXJ0aW5zQHJl ZGhhdC5jb20+Og0KPg0KPiAtLS0tLSBPcmlnaW5hbCBNZXNzYWdlIC0tLS0tDQo+ID4gRnJvbTog IkthcmxpIFNqw7ZiZXJnIiA8a2FybGkuc2pvYmVyZ0BzbHUuc2U+DQo+ID4gVG86IHVzZXJzQG92 aXJ0Lm9yZw0KPiA+IFNlbnQ6IE1vbmRheSwgTm92ZW1iZXIgNywgMjAxNiAzOjA2OjEwIFBNDQo+ ID4gU3ViamVjdDogW292aXJ0LXVzZXJzXSBvVmlydCBTREsgdjQgYmFja3dhcmRzIGNvbXBhdGli aWxpdHkNCj4gPg0KPiA+IEhleWEhDQo+ID4NCj4gPiBRdWljayBxdWVzdGlvbiwgaWYgSSBoYXZl IG9uIG15IGNvbXB1dGVyIGluc3RhbGxlZCBhIG5ld2VyIHZlcnNpb24NCj4gPiBQeXRob24gU0RL IHRoYW4gd2hhdMK0cyBpbnN0YWxsZWQgb24gdGhlIGVuZ2luZSAoNC4wLjMgbG9jYWxseSBhbmQg My42LlgNCj4gPiBpbiBlbmdpbmUpLCBpcyBpdCBwb3NzaWJsZSB0byBjb25uZWN0Pw0KPg0KPiBJ dCBpcyBub3QgcG9zc2libGUsIGJ1dCB5b3UgY2FuIHN0aWxsIGluc3RhbGwgdGhlIFJQTSBmb3Ig dGhlIHZlcnNpb24gMyBvZiB0aGUgU0RLLiBQbGVhc2Ugbm90ZSB0aGF0IHRoZSBjb2RlIG9mIHRo ZSBTREsgdmVyc2lvbnMgaXMgbm90IGNvbXBhdGlibGUuDQoNCk9rLCBhcyBJIHRob3VnaHQuIEJ1 dCBob3cgZG9lcyBvdGhlcnMgaGFuZGxlIHRoYXQsIGxpa2UgbW9WaXJ0IGUuZz8gSXMgdGhlcmUg YSBiZXN0LXByYWN0aWNlIGZvciBiYWNrd2FyZHMgY29tcGF0aWJpbGl0eT8NCg0KL0sNCg0KPg0K PiA+IFRJQQ0KPiA+IEthcmxpIFNqw7ZiZXJnDQo+ID4gX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX18NCj4gPiBVc2VycyBtYWlsaW5nIGxpc3QNCj4gPiBVc2Vy c0BvdmlydC5vcmcNCj4gPiBodHRwOi8vbGlzdHMub3ZpcnQub3JnL21haWxtYW4vbGlzdGluZm8v dXNlcnMNCj4gPg0K --_000_830be3d01aa1402fa5d497f8f7611c67exch24sluse_ Content-Type: text/html; charset="utf-8" Content-ID: <1F4DC3768E552E46B3F99A0EC585980F@ad.slu.se> Content-Transfer-Encoding: base64 PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4NCjwvaGVhZD4NCjxib2R5Pg0KPHAgZGlyPSJsdHIi Pjxicj4NCkRlbiA3IG5vdi4gMjAxNiAxNTo1MyBza3JldiBSYWZhZWwgTWFydGlucyAmbHQ7cm1h cnRpbnNAcmVkaGF0LmNvbSZndDs6PGJyPg0KJmd0Ozxicj4NCiZndDsgLS0tLS0gT3JpZ2luYWwg TWVzc2FnZSAtLS0tLTxicj4NCiZndDsgJmd0OyBGcm9tOiAmcXVvdDtLYXJsaSBTasO2YmVyZyZx dW90OyAmbHQ7a2FybGkuc2pvYmVyZ0BzbHUuc2UmZ3Q7PGJyPg0KJmd0OyAmZ3Q7IFRvOiB1c2Vy c0BvdmlydC5vcmc8YnI+DQomZ3Q7ICZndDsgU2VudDogTW9uZGF5LCBOb3ZlbWJlciA3LCAyMDE2 IDM6MDY6MTAgUE08YnI+DQomZ3Q7ICZndDsgU3ViamVjdDogW292aXJ0LXVzZXJz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0OyBVc2Vy cyBtYWlsaW5nIGxpc3Q8YnI+DQomZ3Q7ICZndDsgVXNlcnNAb3ZpcnQub3JnPGJyPg0KJmd0OyAm Z3Q7IGh0dHA6Ly9saXN0cy5vdmlydC5vcmcvbWFpbG1hbi9saXN0aW5mby91c2Vyczxicj4NCiZn dDsgJmd0OyA8YnI+DQo8L3A+DQo8L2JvZHk+DQo8L2h0bWw+DQo= --_000_830be3d01aa1402fa5d497f8f7611c67exch24sluse_--

----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: "Rafael Martins" <rmartins@redhat.com> Cc: users@ovirt.org Sent: Monday, November 7, 2016 6:13:33 PM Subject: Re: [ovirt-users] oVirt SDK v4 backwards compatibility
Den 7 nov. 2016 15:53 skrev Rafael Martins <rmartins@redhat.com>:
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: users@ovirt.org Sent: Monday, November 7, 2016 3:06:10 PM Subject: [ovirt-users] oVirt SDK v4 backwards compatibility
Heya!
Quick question, if I have on my computer installed a newer version Python SDK than what´s installed on the engine (4.0.3 locally and 3.6.X in engine), is it possible to connect?
It is not possible, but you can still install the RPM for the version 3 of the SDK. Please note that the code of the SDK versions is not compatible.
Ok, as I thought. But how does others handle that, like moVirt e.g? Is there a best-practice for backwards compatibility?
Right now if you use the old SDK you should be able to "talk" with both 3.6 and 4.0, because 4.0 api provides backward compatibility with 3.6. But I'm not sure if you can rely on this. Juan may have more details for you. Thanks, Rafael
/K
TIA Karli Sjöberg _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

----- Original Message -----
From: "Rafael Martins" <rmartins@redhat.com> To: "Karli Sjöberg" <karli.sjoberg@slu.se> Cc: users@ovirt.org Sent: Monday, November 7, 2016 7:06:33 PM Subject: Re: [ovirt-users] oVirt SDK v4 backwards compatibility
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: "Rafael Martins" <rmartins@redhat.com> Cc: users@ovirt.org Sent: Monday, November 7, 2016 6:13:33 PM Subject: Re: [ovirt-users] oVirt SDK v4 backwards compatibility
Den 7 nov. 2016 15:53 skrev Rafael Martins <rmartins@redhat.com>:
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: users@ovirt.org Sent: Monday, November 7, 2016 3:06:10 PM Subject: [ovirt-users] oVirt SDK v4 backwards compatibility
Heya!
Quick question, if I have on my computer installed a newer version Python SDK than what´s installed on the engine (4.0.3 locally and 3.6.X in engine), is it possible to connect?
It is not possible, but you can still install the RPM for the version 3 of the SDK. Please note that the code of the SDK versions is not compatible.
Ok, as I thought. But how does others handle that, like moVirt e.g? Is there a best-practice for backwards compatibility?
moVirt is not using the SDKs, it is talking to API directly. But the general rule for the clients (moVirt but also ManageIQ) works like this: - check the version of the API right at the beginning - according to the found version use either the new or the old api
Right now if you use the old SDK you should be able to "talk" with both 3.6 and 4.0, because 4.0 api provides backward compatibility with 3.6. But I'm not sure if you can rely on this. Juan may have more details for you.
Thanks, Rafael
/K
TIA Karli Sjöberg _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On Tue, 2016-11-08 at 02:20 -0500, Tomas Jelinek wrote:
----- Original Message -----
From: "Rafael Martins" <rmartins@redhat.com> To: "Karli Sjöberg" <karli.sjoberg@slu.se> Cc: users@ovirt.org Sent: Monday, November 7, 2016 7:06:33 PM Subject: Re: [ovirt-users] oVirt SDK v4 backwards compatibility
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: "Rafael Martins" <rmartins@redhat.com> Cc: users@ovirt.org Sent: Monday, November 7, 2016 6:13:33 PM Subject: Re: [ovirt-users] oVirt SDK v4 backwards compatibility
Den 7 nov. 2016 15:53 skrev Rafael Martins <rmartins@redhat.com>:
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: users@ovirt.org Sent: Monday, November 7, 2016 3:06:10 PM Subject: [ovirt-users] oVirt SDK v4 backwards compatibility
Heya!
Quick question, if I have on my computer installed a newer version Python SDK than what´s installed on the engine (4.0.3 locally and 3.6.X in engine), is it possible to connect?
It is not possible, but you can still install the RPM for the version 3 of the SDK. Please note that the code of the SDK versions is not compatible.
Ok, as I thought. But how does others handle that, like moVirt e.g? Is there a best-practice for backwards compatibility?
moVirt is not using the SDKs, it is talking to API directly. But the general rule for the clients (moVirt but also ManageIQ) works like this: - check the version of the API right at the beginning - according to the found version use either the new or the old api
Ah, I see. OK, that answers my question pretty clearly, correct me if I'm wrong; for anyone who wishes to write something in python, you have two SDK's installed (or, talk to the API directly) and check the API version to determine which SDK you should use? Is there a standard ("correct") way of checking the API version? /K
Right now if you use the old SDK you should be able to "talk" with both 3.6 and 4.0, because 4.0 api provides backward compatibility with 3.6. But I'm not sure if you can rely on this. Juan may have more details for you.
Thanks, Rafael
/K
TIA Karli Sjöberg _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 11/07/2016 07:06 PM, Rafael Martins wrote:
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: "Rafael Martins" <rmartins@redhat.com> Cc: users@ovirt.org Sent: Monday, November 7, 2016 6:13:33 PM Subject: Re: [ovirt-users] oVirt SDK v4 backwards compatibility
Den 7 nov. 2016 15:53 skrev Rafael Martins <rmartins@redhat.com>:
----- Original Message -----
From: "Karli Sjöberg" <karli.sjoberg@slu.se> To: users@ovirt.org Sent: Monday, November 7, 2016 3:06:10 PM Subject: [ovirt-users] oVirt SDK v4 backwards compatibility
Heya!
Quick question, if I have on my computer installed a newer version Python SDK than what´s installed on the engine (4.0.3 locally and 3.6.X in engine), is it possible to connect?
It is not possible, but you can still install the RPM for the version 3 of the SDK. Please note that the code of the SDK versions is not compatible.
Ok, as I thought. But how does others handle that, like moVirt e.g? Is there a best-practice for backwards compatibility?
Right now if you use the old SDK you should be able to "talk" with both 3.6 and 4.0, because 4.0 api provides backward compatibility with 3.6. But I'm not sure if you can rely on this. Juan may have more details for you.
It is important to understand the following: * There are two different versions of the API: version 3 and version 4. * Version 3 of the engine implements only version 3 of the API. * Version 4 of the engine implements versions 3 and 4 of the API. This is the current situation. In version 4.2 we will probably drop suport for version 3 of the API completely. * Version 3 of the SDK implements only version 3 of the SDK. The name of the package is "ovirt-engine-sdk-python". * Version 4 of the SDK implements only version 4 of the SDK. The name of the package is "python-ovirt-engine-sdk4". In your specific use case, version 4.0.3 of the "python-ovirt-engine-sdk4" package can't talk to version 3.6.X of the engine. But as Rafael says, you can install version 3 of the SDK, the "ovirt-engine-sdk-python" package, and then it will version 3.6.X of the engine. -- Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
participants (4)
-
Juan Hernández
-
Karli Sjöberg
-
Rafael Martins
-
Tomas Jelinek