Hi! I really like the idea of graduation apiclient to separate library. On Tue, Nov 10, 2015 at 8:29 AM, Kekane, Abhishek < [email protected]> wrote:
> Hi Devs, > > In the Mitaka design summit session [1], it was decided to create a new > library apiclient with completely new code (Metadata classes) and copy > only code from oslo-incubator/openstack/common/apiclient that is needed by > all python clients libraries. > > We have done extensive analysis to figure out the differences of usages of > different oslo-incubator/openstack/common/apiclient modules used in the > respective Openstack python client libraries and added all our > observations in the google spreadsheet [2]. > > Please read the spreadsheet before reading the below information. > > All modules from oslo-incubator/openstack/common/apiclient are taken into > consideration. > > auth.py > =========== > Few python client libraries are using auth.py from oslo-incubator for > loading auth plugins and authentication and others have its own code > auth_plugin.py which does the same job in conjunction with keystoneclient > library. > > Differences between oslo.incubator/openstack/common/apiclient/auth.py and > python-*client/*client/auth_plugin.py : > > a) Methods names are same but implementation is different > (discover_auth_systems, load_auth_system_opts, load_plugin etc) > > b) auth_plugin.py module is present in nova and cinder client (nova and > cinder has almost same auth_plugin module) > > c) BaseAuthPlugin of auth_plugin.py and auth.py have same methods defined > except > i. BaseAuthPlugin class of auth.py module do not have 'get_auth_url' > method > ii. 'authenticate' function takes different arguments > > Possible resolutions:- > 1) Remove auth_plugin.py from respective python client libraries and add > all required common functionality in auth.py. Add auth.py module into the > new apiclient library. > 2) Remove auth.py completely and add auth_plugins.py module in the > respective python client libraries. No need to add auth.py into the new > apiclient library. > 3) Check if keystoneauth library has all needed functionality present in > auth.py and auth_plugin.py. If present, don¹t include auth.py in the new > client library and eliminate auth_plugin.py from python client libraries > and instead use keystoneauth wherever needed. > > base.py > =================== > Uses classes ResourceClass and CrudManager and method getid() from > openstack/common/apiclient/base.py in various python client libraries. > There is also getid() method implemented in some of the python client > libraries. getid() method should be deleted from respective python client > libraries and should be used from base.py and this module should be added > to the new apiclient library as it is. > > > client.py > =================== > > Only few of the python client libraries are using get_class() static > method of class BaseClient from > oslo.incubator/openstack/common/apiclient/client.py module. > This method is implemented in few of the python client libraries. we can > simply ignore client.py and not include in the new apiclient library. We > should add get_class method missing in the required python client > libraries. > > > exceptions.py > =================== > > Please refer to the exception classes present in the respective python > client libraries in the google spreadsheet ³exception_details². > All common exceptions from respective python client libraries should be > moved to the exception.py module and this module should be part of the new > apiclient library. > > > I suppose that this module can be useful only for new clients. It is a hard task for existing clients. I broke whole openstack with [1][2](changes were reverted) while working on [3](status is outdated now). Also, few weeks ago, there was another attempt to change novaclient's exceptions[4][5]. It was reverted too. [1] - https://review.openstack.org/#/c/69837/6 [2] - https://review.openstack.org/#/c/94166/3 [3] - https://blueprints.launchpad.net/oslo-incubator/+spec/common-client-library-2 [4] - http://lists.openstack.org/pipermail/openstack-dev/2015-October/077985.html [5] - https://review.openstack.org/#/c/235558/ > fake_client.py > =================== > > Retain this module as it is for unit testing purpose. > > > utils.py > =================== > > find_resource method from utils.py is used only by manila-client, all > other clients has it¹s own version. > > Possible resolutions: > 1. Move utils.py to the new apiclient library and delete find_resource > method from all python client libraries and make them use it from the > apiclient library > 2. Simply not include utils.py to the new apiclient library and implement > find_resource method in the manila client. > We prefer to implement option #1. > > > Please have a look at it and let us know your suggestions on the same. > 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. > > [1]: > https://mitakadesignsummit.sched.org/event/a98e66b41bf5a8bec8db81dd15f77671 > [2]: > https://docs.google.com/spreadsheets/d/1ZpnEl5QoZz6kv4_ElvqIZULQ4UrVFkxmIuUo_zsyVnE > [3]: https://review.openstack.org/#/c/235200/ > > Thank you in advance. > > Abhishek Kekane > > ______________________________________________________________________ > Disclaimer: This email and any attachments are sent in strictest confidence > for the sole use of the addressee and may contain legally privileged, > confidential, and proprietary data. If you are not the intended recipient, > please advise the sender by replying promptly to this email and then delete > and destroy this email and any attachments without any further use, copying > or forwarding. > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: [email protected]?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > -- Best regards, Andrey Kurilin.
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
