
I trying to migrate my python code from sdk3 to sdk4, is there any migration doc, documentation help about that ? Even google is unable to find anything relevant about that.

There is documentation online (and within the project). See http://ovirt.github.io/ovirt-engine-api-model/master/ There are tens of examples in the RPM (and online). See https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples HTH, Y. On Thu, Apr 6, 2017 at 12:22 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
I trying to migrate my python code from sdk3 to sdk4, is there any migration doc, documentation help about that ? Even google is unable to find anything relevant about that.
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

--Apple-Mail=_FB73B2DD-ECCB-4F94-82B5-49A0262ACEF2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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.
Le 6 avr. 2017 =C3=A0 14:23, Yaniv Kaul <ykaul@redhat.com> a =C3=A9crit = : =20 There is documentation online (and within the project). See http://ovirt.github.io/ovirt-engine-api-model/master/ = <http://ovirt.github.io/ovirt-engine-api-model/master/> =20 There are tens of examples in the RPM (and online). See https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples = <https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples> =20 HTH, Y. =20 On Thu, Apr 6, 2017 at 12:22 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: I trying to migrate my python code from sdk3 to sdk4, is there any = migration doc, documentation help about that ? Even google is unable to = find anything relevant about that. =20 _______________________________________________ Users mailing list Users@ovirt.org <mailto:Users@ovirt.org> http://lists.ovirt.org/mailman/listinfo/users = <http://lists.ovirt.org/mailman/listinfo/users> =20 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--Apple-Mail=_FB73B2DD-ECCB-4F94-82B5-49A0262ACEF2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">Yes I'm starting to understand that thinking about migrating = code is pointless.<div class=3D""><br class=3D""></div><div class=3D"">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 class=3D""><br= class=3D""></div><div class=3D""><div class=3D""><br = class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">Le = 6 avr. 2017 =C3=A0 14:23, Yaniv Kaul <<a = href=3D"mailto:ykaul@redhat.com" class=3D"">ykaul@redhat.com</a>> a = =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D"">There is documentation online = (and within the project).<div class=3D"">See <a = href=3D"http://ovirt.github.io/ovirt-engine-api-model/master/" = class=3D"">http://ovirt.github.io/ovirt-engine-api-model/master/</a></div>= <div class=3D""><br class=3D""></div><div class=3D"">There are tens of = examples in the RPM (and online).</div><div class=3D"">See <a = href=3D"https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples= " = class=3D"">https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examp= les</a></div><div class=3D""><br class=3D""></div><div = class=3D"">HTH,</div><div class=3D"">Y.</div></div><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 12:22 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I trying to = migrate my python code from sdk3 to sdk4, is there any migration doc, = documentation help about that ? Even google is unable to find anything = relevant about that.<br class=3D""> <br class=3D""> ______________________________<wbr class=3D"">_________________<br = class=3D""> Users mailing list<br class=3D""> <a href=3D"mailto:Users@ovirt.org" class=3D"">Users@ovirt.org</a><br = class=3D""> <a href=3D"http://lists.ovirt.org/mailman/listinfo/users" = rel=3D"noreferrer" target=3D"_blank" = class=3D"">http://lists.ovirt.org/<wbr = class=3D"">mailman/listinfo/users</a><br class=3D""> </blockquote></div><br class=3D""></div> _______________________________________________<br class=3D"">Users = mailing list<br class=3D""><a href=3D"mailto:Users@ovirt.org" = class=3D"">Users@ovirt.org</a><br = class=3D"">http://lists.ovirt.org/mailman/listinfo/users<br = class=3D""></div></blockquote></div><br = class=3D""></div></div></body></html>= --Apple-Mail=_FB73B2DD-ECCB-4F94-82B5-49A0262ACEF2--

On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella < fabrice.bacchella@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). Note that right now you can mix between v3 and v4, so you can migrate slowly, function by function. Another option that you can consider, if you are re-writing, is automation via Ansible. See https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/ovirt Y.
Le 6 avr. 2017 à 14:23, Yaniv Kaul <ykaul@redhat.com> a écrit :
There is documentation online (and within the project). See http://ovirt.github.io/ovirt-engine-api-model/master/
There are tens of examples in the RPM (and online). See https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples
HTH, Y.
On Thu, Apr 6, 2017 at 12:22 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
I trying to migrate my python code from sdk3 to sdk4, is there any migration doc, documentation help about that ? Even google is unable to find anything relevant about that.
_______________________________________________ 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

Le 6 avr. 2017 =C3=A0 15:32, Yaniv Kaul <ykaul@redhat.com> a =C3=A9crit = : =20 =20 =20 On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: Yes I'm starting to understand that thinking about migrating code is =
=20 The old skd3 code is just good to be thrown away. There is no hope =
--Apple-Mail=_0D1EAE83-E7CC-445A-919C-CCDFCBE51B20 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 pointless. 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.
=20 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).
Easy to write code that a well though sdk should have provided.
Note that right now you can mix between v3 and v4, so you can migrate = slowly, function by function.
That's a possible but almost as complicated as rewrite everything in my = case.
=20 =20 Another option that you can consider, if you are re-writing, is = automation via Ansible.=20 See = https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/ovirt = <https://github.com/ansible/ansible-modules-extras/tree/devel/cloud/ovirt>= =20
A lot of people don't use ansible or use concurrent tools. So no that's = not an option. --Apple-Mail=_0D1EAE83-E7CC-445A-919C-CCDFCBE51B20 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 6 avr. 2017 =C3=A0 15:32, Yaniv Kaul <<a = href=3D"mailto:ykaul@redhat.com" class=3D"">ykaul@redhat.com</a>> a = =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 3:58 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div style=3D"word-wrap:break-word" = class=3D"">Yes I'm starting to understand that thinking about migrating = code is pointless.<div class=3D""><br class=3D""></div><div class=3D"">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=3D""><br class=3D""></div><div = class=3D"">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><div><br = class=3D""></div>Easy to write code that a well though sdk should have = provided.</div><div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div = class=3D"gmail_extra"><div class=3D"gmail_quote"><div class=3D""> Note = that right now you can mix between v3 and v4, so you can migrate slowly, = function by function.</div></div></div></div></div></blockquote><div><br = class=3D""></div><div>That's a possible but almost as complicated as = rewrite everything in my case.</div><div><br class=3D""></div><blockquote = type=3D"cite" class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div = class=3D"gmail_extra"><div class=3D"gmail_quote"><div class=3D""><br = class=3D""></div><div class=3D""><br class=3D""></div><div = class=3D"">Another option that you can consider, if you are re-writing, = is automation via Ansible. </div><div class=3D"">See <a = href=3D"https://github.com/ansible/ansible-modules-extras/tree/devel/cloud= /ovirt" = class=3D"">https://github.com/ansible/ansible-modules-extras/tree/devel/cl= oud/ovirt</a> </div></div></div></div></div></blockquote><br = class=3D""></div><div>A lot of people don't use ansible or use = concurrent tools. So no that's not an option.</div><br = class=3D""></body></html>= --Apple-Mail=_0D1EAE83-E7CC-445A-919C-CCDFCBE51B20--

On Thu, Apr 6, 2017 at 4:41 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 15:32, Yaniv Kaul <ykaul@redhat.com> a écrit :
On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella < fabrice.bacchella@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).
Easy to write code that a well though sdk should have provided.
I'd like to believe our v4 SDKs are. They fix several inconsistencies we've had with v3.
Note that right now you can mix between v3 and v4, so you can migrate slowly, function by function.
That's a possible but almost as complicated as rewrite everything in my case.
Perhaps in your case. Here[1] is an example of the ovirt system tests, which were only partially converted (work in progress...) to v4 API. HTH, Y. [1] https://gerrit.ovirt.org/gitweb?p=ovirt-system-tests.git;a=blob;f=basic-suit...
Another option that you can consider, if you are re-writing, is automation via Ansible. See https://github.com/ansible/ansible-modules-extras/tree/ devel/cloud/ovirt
A lot of people don't use ansible or use concurrent tools. So no that's not an option.

Le 6 avr. 2017 à 15:47, Yaniv Kaul <ykaul@redhat.com> a écrit :
Perhaps in your case. Here[1] is an example of the ovirt system tests, which were only partially converted (work in progress...) to v4 API.
yes that really related to my use case. Another problem that I have with lack of documentation, that REST API documentation or samples don't provide. In python, what does vms_service.list(search='name=NotExistingVM') will return ? It's not stated in the REST documentation, but it's even worst in python. It could throw an exception, return None, or return an empty list ? If I'm using a sdk instead of direct HTTP call is not to be bothered my xml versus json representation, but instead find an answer to that kind of questions easily. In the sample I just find: vm = vms_service.list(search='name=myvm')[0] Not really helpfull. Is there any documentation about python exception thrown ? Or must I dig throw all the examples ?

On Thu, Apr 6, 2017 at 5:02 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 15:47, Yaniv Kaul <ykaul@redhat.com> a écrit :
Perhaps in your case. Here[1] is an example of the ovirt system tests, which were only partially converted (work in progress...) to v4 API.
yes that really related to my use case.
Another problem that I have with lack of documentation, that REST API documentation or samples don't provide.
In python, what does vms_service.list(search='name=NotExistingVM') will return ? It's not stated in the REST documentation, but it's even worst in python.
You could file a bug for documentation, or better yet, contribute a patch to it. A patch to a basic example for negative cases would be very helpful as well. An example of a patch[1] for the SDK examples from someone who found it is lacking. Let me know if I can help you with contributing the example. Start here[2] TIA, Y. [1] https://gerrit.ovirt.org/#/c/75076/ [2] http://www.ovirt.org/develop/dev-process/working-with-gerrit/
It could throw an exception, return None, or return an empty list ?
If I'm using a sdk instead of direct HTTP call is not to be bothered my xml versus json representation, but instead find an answer to that kind of questions easily. In the sample I just find:
vm = vms_service.list(search='name=myvm')[0]
Not really helpfull.
Is there any documentation about python exception thrown ? Or must I dig throw all the examples ?

Le 6 avr. 2017 =C3=A0 15:32, Yaniv Kaul <ykaul@redhat.com> a =C3=A9crit = : =20 =20 =20 On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: Yes I'm starting to understand that thinking about migrating code is =
=20 The old skd3 code is just good to be thrown away. There is no hope =
--Apple-Mail=_E9D80E67-7974-4602-8A67-05FD8FEC3A98 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 pointless. 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.
=20 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 =3D "%s=3D%s" % (type, value) vm =3D vms_service.list(search=3D searchfilter)[0] instead of : vms_service.list(search=3D {type: value})[0] or even better: vms_service.get(**{type: value}) --Apple-Mail=_E9D80E67-7974-4602-8A67-05FD8FEC3A98 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 6 avr. 2017 =C3=A0 15:32, Yaniv Kaul <<a = href=3D"mailto:ykaul@redhat.com" class=3D"">ykaul@redhat.com</a>> a = =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 3:58 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div style=3D"word-wrap:break-word" = class=3D"">Yes I'm starting to understand that thinking about migrating = code is pointless.<div class=3D""><br class=3D""></div><div class=3D"">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=3D""><br class=3D""></div><div = class=3D"">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=3D""></div><div>An example of code that I'm unhappy to write and = that a good sdk should have provided:</div><div><br = class=3D""></div><div>searchfilter =3D "%s=3D%s" % (type, = value)</div><div><span style=3D"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=3D"">vm = </span><span class=3D"pl-k" style=3D"box-sizing: border-box; color: = rgb(167, 29, 93); font-family: SFMono-Regular, Consolas, 'Liberation = Mono', Menlo, Courier, monospace; white-space: pre;">=3D</span><span = style=3D"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=3D""> = vms_service.list(</span><span class=3D"pl-v" style=3D"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=3D"pl-k" style=3D"box-sizing: border-box; = color: rgb(167, 29, 93); font-family: SFMono-Regular, Consolas, = 'Liberation Mono', Menlo, Courier, monospace; white-space: = pre;">=3D</span> searchfilter<span style=3D"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=3D"">)[</span><span class=3D"pl-c1" style=3D"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=3D"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=3D"">]</span></div><div><span style=3D"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=3D""><br class=3D""></span></div><div><span style=3D"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=3D"">instead of :</span></div><div><span = style=3D"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=3D"">vms_service.list(</span><span class=3D"pl-v" = style=3D"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=3D"pl-k" style=3D"box-sizing: = border-box; color: rgb(167, 29, 93); font-family: SFMono-Regular, = Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: = pre;">=3D</span> {type: value}<span style=3D"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=3D"">)[</span><span class=3D"pl-c1" style=3D"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=3D"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=3D"">]</span></div><div><span style=3D"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=3D""><br class=3D""></span></div><div><span style=3D"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=3D"">or even better:</span></div><div><span = style=3D"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=3D"">vms_service.get(**{type:= value})</span></div><div><span style=3D"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=3D""><br class=3D""></span></div><div><span style=3D"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=3D""><br class=3D""></span></div><br = class=3D""></body></html>= --Apple-Mail=_E9D80E67-7974-4602-8A67-05FD8FEC3A98--

On Thu, Apr 6, 2017 at 4:49 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 15:32, Yaniv Kaul <ykaul@redhat.com> a écrit :
On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella < fabrice.bacchella@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})
Yes, I see what you mean. 100% more LoC are currently needed vs. your idea ;-) Seriously though - perhaps you could borrow code from our Ansible module? See[1]. Y. [1] https://github.com/ansible/ansible/blob/699df5824d36dab5cb46b3f7c63e8992bd77...

On Thu, Apr 6, 2017 at 5:30 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 16:12, Yaniv Kaul <ykaul@redhat.com> a écrit :
Seriously though - perhaps you could borrow code from our Ansible module? See[1].
If the code already exists, why it's not already in the sdk instead of having to dig throw external code ?
It's a good question, which I've asked as well in the past. The reason is that it's above the SDK, not part of the SDK. But that doesn't matter - we really ought to have a module/library on top of the SDK, that can be shared. For example, between ovirt-system-tests, Ansible, oVirtBackup[1] and several others who write on top of our SDK. We just never got to generalise it enough and split it. You are welcome to begin this work - I believe it has value. (It's also a good Google Summer of Code project - I'll see if I can update that page on ovirt.org). Y. [1] https://github.com/wefixit-AT/oVirtBackup

--Apple-Mail=_9D5F353B-59C7-41DC-8147-56CB3280FDC1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8
Le 6 avr. 2017 =C3=A0 20:06, Yaniv Kaul <ykaul@redhat.com> a =C3=A9crit = : =20 =20 =20 On Thu, Apr 6, 2017 at 5:30 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: =20
Le 6 avr. 2017 =C3=A0 16:12, Yaniv Kaul <ykaul@redhat.com = <mailto:ykaul@redhat.com>> a =C3=A9crit : =20 Seriously though - perhaps you could borrow code from our Ansible = module? See[1].
=20 If the code already exists, why it's not already in the sdk instead of = having to dig throw external code ? =20 It's a good question, which I've asked as well in the past. The reason = is that it's above the SDK, not part of the SDK. But that doesn't matter - we really ought to have a module/library on = top of the SDK, that can be shared. For example, between ovirt-system-tests, Ansible, oVirtBackup[1] and = several others who write on top of our SDK. We just never got to generalise it enough and split it. You are = welcome to begin this work - I believe it has value. (It's also a good Google Summer of Code project - I'll see if I can = update that page on ovirt.org <http://ovirt.org/>).
I have already started it for sdk3, I will need to restart if almost = from scratch to sdk4: https://github.com/fbacchella/ovirtcmd = <https://github.com/fbacchella/ovirtcmd> and need to right a lot of very = basic code. --Apple-Mail=_9D5F353B-59C7-41DC-8147-56CB3280FDC1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 6 avr. 2017 =C3=A0 20:06, Yaniv Kaul <<a = href=3D"mailto:ykaul@redhat.com" class=3D"">ykaul@redhat.com</a>> a = =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 5:30 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><span class=3D"gmail-"><br class=3D""> > Le 6 avr. 2017 =C3=A0 16:12, Yaniv Kaul <<a = href=3D"mailto:ykaul@redhat.com" class=3D"">ykaul@redhat.com</a>> a = =C3=A9crit :<br class=3D""> <br class=3D""> > Seriously though - perhaps you could borrow code from our Ansible = module? See[1].<br class=3D""> ><br class=3D""> <br class=3D""> </span>If the code already exists, why it's not already in the sdk = instead of having to dig throw external code ?</blockquote><div = class=3D""><br class=3D""></div><div class=3D"">It's a good question, = which I've asked as well in the past. The reason is that it's above the = SDK, not part of the SDK.</div><div class=3D"">But that doesn't matter - = we really ought to have a module/library on top of the SDK, that = can be shared.</div><div class=3D"">For example, between = ovirt-system-tests, Ansible, oVirtBackup[1] and several others who write = on top of our SDK.</div><div class=3D"">We just never got to generalise = it enough and split it. You are welcome to begin this work - I believe = it has value.</div><div class=3D"">(It's also a good Google Summer of = Code project - I'll see if I can update that page on <a = href=3D"http://ovirt.org/" = class=3D"">ovirt.org</a>).</div></div></div></div></div></blockquote><br = class=3D""></div><div>I have already started it for sdk3, I will need to = restart if almost from scratch to sdk4: <a = href=3D"https://github.com/fbacchella/ovirtcmd" = class=3D"">https://github.com/fbacchella/ovirtcmd</a> and need to = right a lot of very basic code.</div><br class=3D""></body></html>= --Apple-Mail=_9D5F353B-59C7-41DC-8147-56CB3280FDC1--

On Thu, Apr 6, 2017 at 9:19 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 20:06, Yaniv Kaul <ykaul@redhat.com> a écrit :
On Thu, Apr 6, 2017 at 5:30 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 16:12, Yaniv Kaul <ykaul@redhat.com> a écrit :
Seriously though - perhaps you could borrow code from our Ansible module? See[1].
If the code already exists, why it's not already in the sdk instead of having to dig throw external code ?
It's a good question, which I've asked as well in the past. The reason is that it's above the SDK, not part of the SDK. But that doesn't matter - we really ought to have a module/library on top of the SDK, that can be shared. For example, between ovirt-system-tests, Ansible, oVirtBackup[1] and several others who write on top of our SDK. We just never got to generalise it enough and split it. You are welcome to begin this work - I believe it has value. (It's also a good Google Summer of Code project - I'll see if I can update that page on ovirt.org).
I have already started it for sdk3, I will need to restart if almost from scratch to sdk4: https://github.com/fbacchella/ovirtcmd and need to right a lot of very basic code.
Well, if you are talking about a CLI, I've started one for SDK4[1]. It exactly suffers from what I describe above - due to lack of a library on top of the SDK I'm quite wastefully re-writing what others (for example, the Ansible module) have probably done already. But other than that, and the fact I stopped the effort, it's a very cool CLI, I encourage you to check it out and perhaps pick it and do a better job than me. Y. [1] https://github.com/mykaul/ovirt4cli

Le 6 avr. 2017 =C3=A0 16:12, Yaniv Kaul <ykaul@redhat.com> a =C3=A9crit = : =20 =20 =20 On Thu, Apr 6, 2017 at 4:49 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: =20
Le 6 avr. 2017 =C3=A0 15:32, Yaniv Kaul <ykaul@redhat.com = <mailto:ykaul@redhat.com>> a =C3=A9crit : =20 =20 =20 On Thu, Apr 6, 2017 at 3:58 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: Yes I'm starting to understand that thinking about migrating code is =
=20 The old skd3 code is just good to be thrown away. There is no hope =
--Apple-Mail=_A0BCE435-D932-45C3-A53D-79ED9D41DC62 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 pointless. 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.
=20 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). =20 An example of code that I'm unhappy to write and that a good sdk = should have provided: =20 searchfilter =3D "%s=3D%s" % (type, value) vm =3D vms_service.list(search=3D searchfilter)[0] =20 instead of : vms_service.list(search=3D {type: value})[0] =20 or even better: vms_service.get(**{type: value}) =20 =20 Yes, I see what you mean. 100% more LoC are currently needed vs. your = idea ;-)
It's not about the number of LoC, it's about legibility, having code = that says what's it's doing and doing what it says.= --Apple-Mail=_A0BCE435-D932-45C3-A53D-79ED9D41DC62 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 6 avr. 2017 =C3=A0 16:12, Yaniv Kaul <<a = href=3D"mailto:ykaul@redhat.com" class=3D"">ykaul@redhat.com</a>> a = =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 4:49 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div style=3D"word-wrap:break-word" = class=3D""><span class=3D"gmail-"><br class=3D""><div = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">Le 6 = avr. 2017 =C3=A0 15:32, Yaniv Kaul <<a href=3D"mailto:ykaul@redhat.com"= target=3D"_blank" class=3D"">ykaul@redhat.com</a>> a =C3=A9crit = :</div><br = class=3D"gmail-m_-6007873883923554742Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 3:58 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0px= 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div style=3D"word-wrap:break-word" = class=3D"">Yes I'm starting to understand that thinking about migrating = code is pointless.<div class=3D""><br class=3D""></div><div class=3D"">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=3D""><br class=3D""></div><div = class=3D"">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=3D""></div></span><div class=3D"">An example of code that I'm = unhappy to write and that a good sdk should have provided:</div><div = class=3D""><br class=3D""></div><div class=3D"">searchfilter =3D "%s=3D%s"= % (type, value)</div><div class=3D""><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">vm </span><span = class=3D"gmail-m_-6007873883923554742pl-k" = style=3D"box-sizing:border-box;color:rgb(167,29,93);font-family:sfmono-reg= ular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">=3D</span><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D""> vms_service.list(</span><span = class=3D"gmail-m_-6007873883923554742pl-v" = style=3D"box-sizing:border-box;color:rgb(237,106,67);font-family:sfmono-re= gular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">search</span><spa= n class=3D"gmail-m_-6007873883923554742pl-k" = style=3D"box-sizing:border-box;color:rgb(167,29,93);font-family:sfmono-reg= ular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">=3D</span> <= wbr class=3D"">searchfilter<span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">)[</span><span = class=3D"gmail-m_-6007873883923554742pl-c1" = style=3D"box-sizing:border-box;color:rgb(0,134,179);font-family:sfmono-reg= ular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">0</span><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">]</span></div><div class=3D""><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D""><br class=3D""></span></div><div = class=3D""><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">instead of :</span></div><div class=3D""><span= = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">vms_service.list(</span><span = class=3D"gmail-m_-6007873883923554742pl-v" = style=3D"box-sizing:border-box;color:rgb(237,106,67);font-family:sfmono-re= gular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">search</span><spa= n class=3D"gmail-m_-6007873883923554742pl-k" = style=3D"box-sizing:border-box;color:rgb(167,29,93);font-family:sfmono-reg= ular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">=3D</span> {= <wbr class=3D"">type: value}<span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">)[</span><span = class=3D"gmail-m_-6007873883923554742pl-c1" = style=3D"box-sizing:border-box;color:rgb(0,134,179);font-family:sfmono-reg= ular,consolas,"liberation = mono",menlo,courier,monospace;white-space:pre-wrap">0</span><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">]</span></div><div class=3D""><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D""><br class=3D""></span></div><div = class=3D""><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">or even better:</span></div><div = class=3D""><span = style=3D"color:rgb(36,41,46);font-family:sfmono-regular,consolas,"lib= eration = mono",menlo,courier,monospace;white-space:pre-wrap;background-color:r= gb(255,255,255)" class=3D"">vms_service.get(**{type: = value})</span></div></div></blockquote><div class=3D""><br = class=3D""></div><div class=3D""><br class=3D""></div><div class=3D"">Yes,= I see what you mean. 100% more LoC are currently needed vs. your idea = ;-)</div></div></div></div></div></blockquote><br = class=3D""></div><div>It's not about the number of LoC, it's about = legibility, having code that says what's it's doing and doing what it = says.</div></body></html>= --Apple-Mail=_A0BCE435-D932-45C3-A53D-79ED9D41DC62--

--Apple-Mail=_9A6C3E09-DC30-4361-B49C-2D8D2D343AA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Ho my good, in ovirtsdk.services.py, for every service, there is a = different method with a different name that return a associated service, = so it's not possible to have a generic like: def resolve(service, ...): id =3D ..... return service.service(id) because the generic call service is used by something that take a path = argument. But why not a service_by_id(self, id) ? grep 'def .*_service.self, id.:' site-packages/ovirtsdk4/services.py def vm_service(self, id): def group_service(self, id): def host_service(self, id): def vm_service(self, id): def label_service(self, id): def label_service(self, id): def profile_service(self, id): def profile_service(self, id): def network_service(self, id): def permission_service(self, id): def role_service(self, id): def tag_service(self, id): def profile_service(self, id): def storage_domain_service(self, id): def balance_service(self, id): def bookmark_service(self, id): def level_service(self, id): def cluster_service(self, id): def profile_service(self, id): def data_center_service(self, id): def attachment_service(self, id): def disk_profile_service(self, id): def snapshot_service(self, id): def disk_service(self, id): def group_service(self, id): def user_service(self, id): def domain_service(self, id): def event_service(self, id): def resource_service(self, id): def host_service(self, id): def group_service(self, id): def provider_service(self, id): def host_service(self, id): def certificate_service(self, id): def agent_service(self, id): def file_service(self, id): def filter_service(self, id): def brick_service(self, id): def hook_service(self, id): def volume_service(self, id): def group_service(self, id): def device_service(self, id): def hook_service(self, id): def nic_service(self, id): def node_service(self, id): def storage_service(self, id): def host_service(self, id): def icon_service(self, id): def image_transfer_service(self, id): def image_service(self, id): def console_service(self, id): def nic_service(self, id): def watchdog_service(self, id): def instance_type_service(self, id): def iscsi_bond_service(self, id): def job_service(self, id): def katello_erratum_service(self, id): def mac_pool_service(self, id): def attachment_service(self, id): def network_filter_service(self, id): def label_service(self, id): def network_service(self, id): def provider_service(self, id): def image_service(self, id): def provider_service(self, id): def network_service(self, id): def subnet_service(self, id): def key_service(self, id): def provider_service(self, id): def type_service(self, id): def operating_system_service(self, id): def permit_service(self, id): def qos_service(self, id): def limit_service(self, id): def limit_service(self, id): def quota_service(self, id): def role_service(self, id): def policy_service(self, id): def unit_service(self, id): def cdrom_service(self, id): def disk_service(self, id): def nic_service(self, id): def snapshot_service(self, id): def key_service(self, id): def statistic_service(self, id): def step_service(self, id): def disk_service(self, id): def connection_service(self, id): def template_service(self, id): def attachment_service(self, id): def vm_service(self, id): def storage_domain_service(self, id): def storage_connection_extension_service(self, id): def storage_connection_service(self, id): def permission_service(self, id): def tag_service(self, id): def cdrom_service(self, id): def attachment_service(self, id): def disk_service(self, id): def console_service(self, id): def nic_service(self, id): def watchdog_service(self, id): def template_service(self, id): def unmanaged_network_service(self, id): def user_service(self, id): def network_service(self, id): def application_service(self, id): def cdrom_service(self, id): def disk_service(self, id): def console_service(self, id): def device_service(self, id): def nic_service(self, id): def node_service(self, id): def pool_service(self, id): def reported_device_service(self, id): def session_service(self, id): def watchdog_service(self, id): def vm_service(self, id): def profile_service(self, id): def weight_service(self, id): def katello_erratum_service(self, id): --Apple-Mail=_9A6C3E09-DC30-4361-B49C-2D8D2D343AA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">Ho my good, in ovirtsdk.services.py, for every service, there = is a different method with a different name that return a associated = service, so it's not possible to have a generic like:<div class=3D""><br = class=3D""></div><div class=3D"">def resolve(service, = ...):</div><div class=3D""><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>id =3D .....</div><div = class=3D""><span class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>return service.service(id)</div><div class=3D""><br = class=3D""></div><div class=3D"">because the generic call service is = used by something that take a path argument. But why not a = service_by_id(self, id) ?<br class=3D""><div class=3D""><span = style=3D"font-family: Menlo; font-size: 11px;" class=3D""><br = class=3D""></span></div><div class=3D""><span style=3D"font-family: = Menlo; font-size: 11px;" class=3D"">grep 'def .*_service.self, = id.:' </span><span style=3D"font-family: Menlo; font-size: 11px;" = class=3D"">site-packages/ovirtsdk4/services.py</span></div><div = class=3D""><div style=3D"margin: 0px; font-size: 11px; line-height: = normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def vm_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def group_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def host_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def vm_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def label_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def label_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def profile_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def profile_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def network_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def permission_service(self, id):</span></div><div style=3D"margin:= 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def role_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def tag_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def profile_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def storage_domain_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def balance_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def bookmark_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def level_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def cluster_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def profile_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def data_center_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = attachment_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def disk_profile_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def snapshot_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def disk_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def group_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def user_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def domain_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def event_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def resource_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def host_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def group_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def provider_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def host_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = certificate_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def agent_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def file_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def filter_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def brick_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def hook_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def volume_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def group_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def device_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def hook_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def nic_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def node_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def storage_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def host_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def icon_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def image_transfer_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def image_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def console_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def nic_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def watchdog_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def instance_type_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = iscsi_bond_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def job_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = katello_erratum_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def mac_pool_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def attachment_service(self, id):</span></div><div style=3D"margin:= 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def network_filter_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def label_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def network_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def provider_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def image_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def provider_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def network_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def subnet_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def key_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def provider_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def type_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = operating_system_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def permit_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def qos_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def limit_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def limit_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def quota_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def role_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def policy_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def unit_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def cdrom_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def disk_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def nic_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def snapshot_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def key_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = statistic_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def step_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def disk_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def connection_service(self, id):</span></div><div style=3D"margin:= 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def template_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def attachment_service(self, id):</span></div><div style=3D"margin:= 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def vm_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = storage_domain_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def storage_connection_extension_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def storage_connection_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = permission_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def tag_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def cdrom_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def attachment_service(self, id):</span></div><div style=3D"margin:= 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def disk_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def console_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def nic_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def watchdog_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def template_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def unmanaged_network_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def user_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def network_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = application_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def cdrom_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def disk_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def console_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def device_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def nic_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def node_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def pool_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def = reported_device_service(self, id):</span></div><div style=3D"margin: = 0px; font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def session_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def watchdog_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def vm_service(self, id):</span></div><div style=3D"margin: 0px; = font-size: 11px; line-height: normal; font-family: Menlo;" = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""> def profile_service(self, id):</span></div><div = style=3D"margin: 0px; font-size: 11px; line-height: normal; font-family: = Menlo;" class=3D""><span style=3D"font-variant-ligatures: = no-common-ligatures" class=3D""> def weight_service(self, = id):</span></div><div style=3D"margin: 0px; font-size: 11px; = line-height: normal; font-family: Menlo;" class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""> = def katello_erratum_service(self, id):</span></div><div = class=3D""><span style=3D"font-variant-ligatures: no-common-ligatures" = class=3D""><br class=3D""></span></div><div class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br = class=3D""></span></div><div class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br = class=3D""></span></div><div class=3D""><span = style=3D"font-variant-ligatures: no-common-ligatures" class=3D""><br = class=3D""></span></div><div class=3D""><br = class=3D""></div></div></div></body></html>= --Apple-Mail=_9A6C3E09-DC30-4361-B49C-2D8D2D343AA0--

On 6 April 2017 at 18:00, Fabrice Bacchella <fabrice.bacchella@orange.fr> wrote:
Ho my good, in ovirtsdk.services.py, for every service, there is a different method with a different name that return a associated service, so it's not possible to have a generic like:
def resolve(service, ...): id = ..... return service.service(id)
because the generic call service is used by something that take a path argument. But why not a service_by_id(self, id) ?
I think you can use getattr to get a generic call like you want: With your example code: def resolve(service, ...): id = ..... return getattr(services, service + '_service')(id) -- Barak Korren bkorren@redhat.com RHCE, RHCi, RHV-DevOps Team https://ifireball.wordpress.com/

On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Ho my good, in ovirtsdk.services.py, for every service, there is a different method with a different name that return a associated service, so it's not possible to have a generic like:
def resolve(service, ...): id = ..... return service.service(id)
because the generic call service is used by something that take a path argument. But why not a service_by_id(self, id) ?
I am not fully sure I understand what you are missing, but feel free to open the bug on Python SDK in bugzilla, we will be happy to improve the SDK.
grep 'def .*_service.self, id.:' site-packages/ovirtsdk4/services.py def vm_service(self, id): def group_service(self, id): def host_service(self, id): def vm_service(self, id): def label_service(self, id): def label_service(self, id): def profile_service(self, id): def profile_service(self, id): def network_service(self, id): def permission_service(self, id): def role_service(self, id): def tag_service(self, id): def profile_service(self, id): def storage_domain_service(self, id): def balance_service(self, id): def bookmark_service(self, id): def level_service(self, id): def cluster_service(self, id): def profile_service(self, id): def data_center_service(self, id): def attachment_service(self, id): def disk_profile_service(self, id): def snapshot_service(self, id): def disk_service(self, id): def group_service(self, id): def user_service(self, id): def domain_service(self, id): def event_service(self, id): def resource_service(self, id): def host_service(self, id): def group_service(self, id): def provider_service(self, id): def host_service(self, id): def certificate_service(self, id): def agent_service(self, id): def file_service(self, id): def filter_service(self, id): def brick_service(self, id): def hook_service(self, id): def volume_service(self, id): def group_service(self, id): def device_service(self, id): def hook_service(self, id): def nic_service(self, id): def node_service(self, id): def storage_service(self, id): def host_service(self, id): def icon_service(self, id): def image_transfer_service(self, id): def image_service(self, id): def console_service(self, id): def nic_service(self, id): def watchdog_service(self, id): def instance_type_service(self, id): def iscsi_bond_service(self, id): def job_service(self, id): def katello_erratum_service(self, id): def mac_pool_service(self, id): def attachment_service(self, id): def network_filter_service(self, id): def label_service(self, id): def network_service(self, id): def provider_service(self, id): def image_service(self, id): def provider_service(self, id): def network_service(self, id): def subnet_service(self, id): def key_service(self, id): def provider_service(self, id): def type_service(self, id): def operating_system_service(self, id): def permit_service(self, id): def qos_service(self, id): def limit_service(self, id): def limit_service(self, id): def quota_service(self, id): def role_service(self, id): def policy_service(self, id): def unit_service(self, id): def cdrom_service(self, id): def disk_service(self, id): def nic_service(self, id): def snapshot_service(self, id): def key_service(self, id): def statistic_service(self, id): def step_service(self, id): def disk_service(self, id): def connection_service(self, id): def template_service(self, id): def attachment_service(self, id): def vm_service(self, id): def storage_domain_service(self, id): def storage_connection_extension_service(self, id): def storage_connection_service(self, id): def permission_service(self, id): def tag_service(self, id): def cdrom_service(self, id): def attachment_service(self, id): def disk_service(self, id): def console_service(self, id): def nic_service(self, id): def watchdog_service(self, id): def template_service(self, id): def unmanaged_network_service(self, id): def user_service(self, id): def network_service(self, id): def application_service(self, id): def cdrom_service(self, id): def disk_service(self, id): def console_service(self, id): def device_service(self, id): def nic_service(self, id): def node_service(self, id): def pool_service(self, id): def reported_device_service(self, id): def session_service(self, id): def watchdog_service(self, id): def vm_service(self, id): def profile_service(self, id): def weight_service(self, id): def katello_erratum_service(self, id):
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Le 6 avr. 2017 =C3=A0 17:21, Ondra Machacek <omachace@redhat.com> a = =C3=A9crit : =20 =20 =20 On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: Ho my good, in ovirtsdk.services.py <http://ovirtsdk.services.py/>, = for every service, there is a different method with a different name =
--Apple-Mail=_CDB9676B-CE19-4C70-9324-BB4AFA1E388D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 that return a associated service, so it's not possible to have a generic = like:
=20 def resolve(service, ...): id =3D ..... return service.service(id) =20 because the generic call service is used by something that take a path = argument. But why not a service_by_id(self, id) ? =20 I am not fully sure I understand what you are missing, but feel free = to open the bug on Python SDK in bugzilla, we will be happy to improve the = SDK. =20
Done, with a first idea for what might be needed: https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879 = <https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879> --Apple-Mail=_CDB9676B-CE19-4C70-9324-BB4AFA1E388D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 6 avr. 2017 =C3=A0 17:21, Ondra Machacek <<a = href=3D"mailto:omachace@redhat.com" class=3D"">omachace@redhat.com</a>>= a =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 5:00 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div = style=3D"word-wrap:break-word" class=3D"">Ho my good, in <a = href=3D"http://ovirtsdk.services.py/" target=3D"_blank" = class=3D"">ovirtsdk.services.py</a>, for every service, there is a = different method with a different name that return a associated service, = so it's not possible to have a generic like:<div class=3D""><br = class=3D""></div><div class=3D"">def resolve(service, = ...):</div><div class=3D""><span = class=3D"m_-4816859605268981919Apple-tab-span" = style=3D"white-space:pre-wrap"> </span>id =3D .....</div><div = class=3D""><span class=3D"m_-4816859605268981919Apple-tab-span" = style=3D"white-space:pre-wrap"> </span>return = service.service(id)</div><div class=3D""><br class=3D""></div><div = class=3D"">because the generic call service is used by something that = take a path argument. But why not a service_by_id(self, id) ?<br = class=3D""></div></div></blockquote><div class=3D""><br = class=3D""></div><div class=3D"">I am not fully sure I understand what = you are missing, but feel free to open<br class=3D"">the bug on Python = SDK in bugzilla, we will be happy to improve the SDK.<br = class=3D""></div><div = class=3D""> </div></div></div></div></div></blockquote><br = class=3D""></div><div>Done, with a first idea for what might be = needed:</div><div><br class=3D""></div><div><a = href=3D"https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879" = class=3D"">https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879</a></div>= <div><br class=3D""></div><div><br class=3D""></div><br = class=3D""></body></html>= --Apple-Mail=_CDB9676B-CE19-4C70-9324-BB4AFA1E388D--

Le 6 avr. 2017 =C3=A0 17:21, Ondra Machacek <omachace@redhat.com> a = =C3=A9crit : =20 =20 =20 On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella = <fabrice.bacchella@orange.fr <mailto:fabrice.bacchella@orange.fr>> = wrote: Ho my good, in ovirtsdk.services.py <http://ovirtsdk.services.py/>, = for every service, there is a different method with a different name =
--Apple-Mail=_E71938C9-E743-4136-A405-57ECD65F94EE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 that return a associated service, so it's not possible to have a generic = like:
=20 def resolve(service, ...): id =3D ..... return service.service(id) =20 because the generic call service is used by something that take a path = argument. But why not a service_by_id(self, id) ? =20 I am not fully sure I understand what you are missing, but feel free = to open the bug on Python SDK in bugzilla, we will be happy to improve the = SDK.
I tried : https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879 = <https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879> I hit a wall. it seems that some of you are not willing to improve the = SDK. --Apple-Mail=_E71938C9-E743-4136-A405-57ECD65F94EE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">Le 6 avr. 2017 =C3=A0 17:21, Ondra Machacek <<a = href=3D"mailto:omachace@redhat.com" class=3D"">omachace@redhat.com</a>>= a =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div = class=3D""><div dir=3D"ltr" class=3D""><br class=3D""><div = class=3D"gmail_extra"><br class=3D""><div class=3D"gmail_quote">On Thu, = Apr 6, 2017 at 5:00 PM, Fabrice Bacchella <span dir=3D"ltr" = class=3D""><<a href=3D"mailto:fabrice.bacchella@orange.fr" = target=3D"_blank" class=3D"">fabrice.bacchella@orange.fr</a>></span> = wrote:<br class=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0 = 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div = style=3D"word-wrap:break-word" class=3D"">Ho my good, in <a = href=3D"http://ovirtsdk.services.py/" target=3D"_blank" = class=3D"">ovirtsdk.services.py</a>, for every service, there is a = different method with a different name that return a associated service, = so it's not possible to have a generic like:<div class=3D""><br = class=3D""></div><div class=3D"">def resolve(service, = ...):</div><div class=3D""><span = class=3D"m_-4816859605268981919Apple-tab-span" = style=3D"white-space:pre-wrap"> </span>id =3D .....</div><div = class=3D""><span class=3D"m_-4816859605268981919Apple-tab-span" = style=3D"white-space:pre-wrap"> </span>return = service.service(id)</div><div class=3D""><br class=3D""></div><div = class=3D"">because the generic call service is used by something that = take a path argument. But why not a service_by_id(self, id) ?<br = class=3D""></div></div></blockquote><div class=3D""><br = class=3D""></div><div class=3D"">I am not fully sure I understand what = you are missing, but feel free to open<br class=3D"">the bug on Python = SDK in bugzilla, we will be happy to improve the SDK.<br = class=3D""></div></div></div></div></div></blockquote><br = class=3D""></div><div>I tried :</div><div><a = href=3D"https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879" = class=3D"">https://bugzilla.redhat.com/show_bug.cgi?id=3D1439879</a></div>= <div><br class=3D""></div><div>I hit a wall. it seems that some of you = are not willing to improve the SDK.</div><br class=3D""></body></html>= --Apple-Mail=_E71938C9-E743-4136-A405-57ECD65F94EE--

Hi Fabrice, I think you got proper explanation from Juan. I think you should indeed consider whether to use the sdk or not, depending on whether it fits your needs. Regards, Oved On Apr 9, 2017 12:14, "Fabrice Bacchella" <fabrice.bacchella@orange.fr> wrote: Le 6 avr. 2017 à 17:21, Ondra Machacek <omachace@redhat.com> a écrit : On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Ho my good, in ovirtsdk.services.py, for every service, there is a different method with a different name that return a associated service, so it's not possible to have a generic like:
def resolve(service, ...): id = ..... return service.service(id)
because the generic call service is used by something that take a path argument. But why not a service_by_id(self, id) ?
I am not fully sure I understand what you are missing, but feel free to open the bug on Python SDK in bugzilla, we will be happy to improve the SDK. I tried : https://bugzilla.redhat.com/show_bug.cgi?id=1439879 I hit a wall. it seems that some of you are not willing to improve the SDK. _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On Sun, Apr 9, 2017 at 12:14 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 6 avr. 2017 à 17:21, Ondra Machacek <omachace@redhat.com> a écrit :
On Thu, Apr 6, 2017 at 5:00 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Ho my good, in ovirtsdk.services.py, for every service, there is a different method with a different name that return a associated service, so it's not possible to have a generic like:
def resolve(service, ...): id = ..... return service.service(id)
because the generic call service is used by something that take a path argument. But why not a service_by_id(self, id) ?
I am not fully sure I understand what you are missing, but feel free to open the bug on Python SDK in bugzilla, we will be happy to improve the SDK.
I tried : https://bugzilla.redhat.com/show_bug.cgi?id=1439879
I hit a wall. it seems that some of you are not willing to improve the SDK.
That's the beauty of open source. You can help improving the SDK, instead just complaining. Patches are welcome. However, I tend to agree with closing the bug - I'd create a library (module) *on top of the SDK* . The comment in the bug is quite clear about it: "The objective of the SDK is to offer the same that the API offers, without the burden of the details of the HTTP and XML handling. Nothing less, and nothing more." So improving the SDK where we do not feel it should be improved, may not be the best path. Y.

Le 9 avr. 2017 à 11:25, Yaniv Kaul <ykaul@redhat.com> a écrit :
However, I tend to agree with closing the bug - I'd create a library (module) *on top of the SDK* . The comment in the bug is quite clear about it: "The objective of the SDK is to offer the same that the API offers, without the burden of the details of the HTTP and XML handling. Nothing less, and nothing more."
Then don't call it a SDK, they are barely helper functions with bad design decisions, connection.vms_service().vm_service(id) is nothing else than redundancy and bring nothing else than noise.

On Sun, Apr 9, 2017 at 1:27 PM, Fabrice Bacchella < fabrice.bacchella@orange.fr> wrote:
Le 9 avr. 2017 à 11:25, Yaniv Kaul <ykaul@redhat.com> a écrit :
However, I tend to agree with closing the bug - I'd create a library (module) *on top of the SDK* . The comment in the bug is quite clear about it: "The objective of the SDK is to offer the same that the API offers, without the burden of the details of the HTTP and XML handling. Nothing less, and nothing more."
Then don't call it a SDK, they are barely helper functions with bad design decisions, connection.vms_service().vm_service(id) is nothing else than redundancy and bring nothing else than noise.
http://www.ovirt.org/community/about/community-guidelines/#be-respectful Y.
participants (5)
-
Barak Korren
-
Fabrice Bacchella
-
Ondra Machacek
-
Oved Ourfali
-
Yaniv Kaul