<div dir="ltr"><div>>It was also proposed to reuse openstackclient or the openstack SDK.<br><br>Openstack
SDK was proposed a long time ago(it looks like it was several cycles
ago) as "alternative" for cliutils and apiclient, but I don't know any
client which use it yet. Maybe openstacksdk cores should try to port
any client as an example of how their project should be used.</div><br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 10, 2015 at 12:29 PM, Victor Stinner <span dir="ltr"><<a href="mailto:vstinner@redhat.com" target="_blank">vstinner@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
At Tokyo, we discussed quickly what to do with cliutils.py of oslo-incubator, but for me the plan is not really concrete.<br>
<br>
<a href="https://etherpad.openstack.org/p/mitaka-oslo-incubator-cleanup" rel="noreferrer" target="_blank">https://etherpad.openstack.org/p/mitaka-oslo-incubator-cleanup</a><br>
<br>
I don't like dims' suggestion to move code inside clients, it means duplicating 280 lines of python in 11 clients.<br>
<br>
It was also proposed to reuse openstackclient or the openstack SDK. I don't understand how novaclient can use openstackclient, since openstackclient depends on python-novaclient... The OpenStack SDK project is also a large library no? (I don't know well the OpenStack SDK project.)<br>
<br>
I would prefer to move cliutils.py to oslo.utils. Only 3 clients use cliutils.py but don't depend on oslo.utils yet. The 8 remaining clients using cliutils.py already depends on oslo.utils.<br>
<br>
An alternative is to create yet another oslo library. But it means creating a library for a single file of 280 lines.<br>
<br>
What do you think?<br>
<br>
--<br>
<br>
On 29 "python-*client" projects, I found 11 clients using cliutils.py:<br>
<br>
python-ceilometerclient<br>
python-cloudkittyclient<br>
python-heatclient<br>
python-ironicclient<br>
python-magnumclient<br>
python-manilaclient<br>
python-mistralclient<br>
python-novaclient<br>
python-saharaclient<br>
python-solumclient<br>
python-tuskarclient<br>
<br>
9 clients are almost synchronized with oslo-incubator: only the new optional 'dict_value' parameter of the print_list() function is missing, not a big deal (since the parameter is optional, it doesn't break the API).<br>
<br>
magnumclient and mistralclient have larger changes.<br>
<br>
magnumclient adds a recursive keys_and_vals_to_strs() function which casts all dictionary keys and values to string. We may copy this feature in the upstream code (oslo incubator), it makes sense to me.<br>
<br>
cliutils.py of mistralclient looks outdated, but a find_resource() function was also added. We can move find_resource() out of cliutils.py, to put it somewhere in mistralclient.<br>
<br>
On the 11 clients using cliutils.py, 8 depend oslo.utils, whereas 3 don't.<br>
<br>
Victor<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Best regards,<br>Andrey Kurilin.<br></div></div>
</div>