<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Devs,<br>
<br>
In the Mitaka design summit session [1], it was decided to create a new<br>
library apiclient with completely new code (Metadata classes) and copy<br>
only code from oslo-incubator/openstack/common/apiclient that is needed by<br>
all python clients libraries.<br>
<br>
We have done extensive analysis to figure out the differences of usages of<br>
different oslo-incubator/openstack/common/apiclient modules used in the<br>
respective Openstack python client libraries and added all our<br>
observations in the google spreadsheet [2].<br>
<br>
Please read the spreadsheet before reading the below information.<br>
<br>
All modules from oslo-incubator/openstack/common/apiclient are taken into<br>
consideration.<br>
<br>
auth.py<br>
===========<br>
Few python client libraries are using auth.py from oslo-incubator for<br>
loading auth plugins and authentication and others have its own code<br>
auth_plugin.py which does the same job in conjunction with keystoneclient<br>
library.<br>
 <br>
Differences between oslo.incubator/openstack/common/apiclient/auth.py and<br>
python-*client/*client/auth_plugin.py :<br>
 <br>
a) Methods names are same but implementation is different<br>
(discover_auth_systems, load_auth_system_opts, load_plugin etc)<br>
 <br>
b) auth_plugin.py module is present in nova and cinder client (nova and<br>
cinder has almost same auth_plugin module)<br>
 <br>
c) BaseAuthPlugin of auth_plugin.py and auth.py have same methods defined<br>
except<br>
 i. BaseAuthPlugin class of auth.py module do not have 'get_auth_url'<br>
method<br>
 ii. 'authenticate' function takes different arguments<br>
<br>
Possible resolutions:-<br>
1) Remove auth_plugin.py from respective python client libraries and add<br>
all required common functionality in auth.py. Add auth.py module into the<br>
new apiclient library.<br>
2) Remove auth.py completely and add auth_plugins.py module in the<br>
respective python client libraries. No need to add auth.py into the new<br>
apiclient library.<br>
3) Check if keystoneauth library has all needed functionality present in<br>
auth.py and auth_plugin.py. If present, donıt include auth.py in the new<br>
client library and eliminate auth_plugin.py from python client libraries<br>
and instead use keystoneauth wherever needed.<br>
<br>
base.py<br>
===================<br>
Uses classes ResourceClass and CrudManager and method getid() from<br>
openstack/common/apiclient/base.py in various python client libraries.<br>
There is also getid() method implemented in some of the python client<br>
libraries. getid() method should be deleted from respective python client<br>
libraries and should be used from base.py and this module should be added<br>
to the new apiclient library as it is.<br>
<br>
<br>
client.py<br>
===================<br>
<br>
Only few of the python client libraries are using get_class() static<br>
method of class BaseClient from<br>
oslo.incubator/openstack/common/apiclient/client.py module.<br>
This method is implemented in few of the python client libraries. we can<br>
simply ignore client.py and not include in the new apiclient library. We<br>
should add get_class method missing in the required python client<br>
libraries.<br>
<br>
<br>
exceptions.py<br>
===================<br>
<br>
Please refer to the exception classes present in the respective python<br>
client libraries in the google spreadsheet ³exception_details².<br>
All common exceptions from respective python client libraries should be<br>
moved to the exception.py module and this module should be part of the new<br>
apiclient library.<br>
<br>
<br>
fake_client.py<br>
===================<br>
<br>
Retain this module as it is for unit testing purpose.<br>
<br>
<br>
utils.py<br>
===================<br>
<br>
find_resource method from utils.py is used only by manila-client, all<br>
other clients has itıs own version.<br>
<br>
Possible resolutions:<br>
1. Move utils.py to the new apiclient library and delete find_resource<br>
method from all python client libraries and make them use it from the<br>
apiclient library<br>
2. Simply not include utils.py to the new apiclient library and implement<br>
find_resource method in the manila client.<br>
We prefer to implement option #1.<br>
<br>
<br>
Please have a look at it and let us know your suggestions on the same.<br>
Currently we are having Diwali Vacation in India and once we are back from the vacation, based on your inputs I will update the oslo-specs [3] and upload it for community review.<br>
<br>
[1]: <a href="https://mitakadesignsummit.sched.org/event/a98e66b41bf5a8bec8db81dd15f77671" target="_blank">
https://mitakadesignsummit.sched.org/event/a98e66b41bf5a8bec8db81dd15f77671</a><br>
[2]: <a href="https://docs.google.com/spreadsheets/d/1ZpnEl5QoZz6kv4_ElvqIZULQ4UrVFkxmIuUo_zsyVnE" target="_blank">
https://docs.google.com/spreadsheets/d/1ZpnEl5QoZz6kv4_ElvqIZULQ4UrVFkxmIuUo_zsyVnE</a><br>
[3]: <a href="https://review.openstack.org/#/c/235200/" target="_blank">https://review.openstack.org/#/c/235200/</a><br>
<br>
Thank you in advance.<br>
<br>
Abhishek Kekane<br>
</div>
<br clear="both">
______________________________________________________________________<BR>
Disclaimer: This email and any attachments are sent in strictest confidence<BR>
for the sole use of the addressee and may contain legally privileged,<BR>
confidential, and proprietary data. If you are not the intended recipient,<BR>
please advise the sender by replying promptly to this email and then delete<BR>
and destroy this email and any attachments without any further use, copying<BR>
or forwarding.<BR>
</body>
</html>