Re: [openstack-dev] [ironic][python-ironicclient][keystoneauth] Getting rid of a custom HTTPClient implementation

2017-07-31 Thread Pavlo Shchelokovskyy
Hi Vlad,

On Fri, Jul 21, 2017 at 9:09 PM, Vladyslav Drok  wrote:

> Greetings!
>
> I have a patch [0] to deprecate the custom HTTPClient implementation that
> we have in python-ironicclient. Currently it is used when the 'ironic'
> command is issued in a standalone mode, that is, with '--ironic-url' and
> '--os-auth-token' parameters,
>

recently released keystoneauth 3.1.0 has a new 'none' auth plugin that can
be used for standalone mode together with endpoint_override Adapter option
instead of 'admin_token' auth plugin [1]. Maybe that would allow you to
simplify the code a bit. Note that the bump to ironicclient reguirements re
keystoneauth is not merged yet [2].

[1]
https://git.openstack.org/cgit/openstack/keystoneauth/tree/keystoneauth1/noauth.py
[2] https://review.openstack.org/#/c/488117/


> or when a client is instantiated through the following module [1] directly
> without passing the session object, or even directly calling HTTPClient
> constructor at [2]. In other cases, keystoneauth's SessionClient derivative
> object is used. [0] will basically substitute the HTTPClient with the
> SessionClient (by using the 'admin_token' auth plugin). It seems like a
> breaking change, as most likely some HTTP error codes and exceptions thrown
> may be different, so I think we'll need the major client library version
> bump. We'll also make it clear in the docs that the only "true" way for
> instantiating the client is through 'get_client' method in [3].
>
> After that, we'll need to remove the HTTPClient class completely, and here
> a question is, whether we should have another major version bump? Or can we
> remove it right away, and single major version bump should be enough? (as
> the HTTPClient defined in [2] was not something we advertised as a part of
> our public python API)
>

There are actually more reasons for a major version  bump - we've reached
feature parity of our OSC plugin with 'ironic' CLI and should start to
phase the latter out (and drop OSC from hard client requirements).
So I'd vote for las minor version release with many deprecations warnings,
and clean up HTTPClient and officially deprecate 'ironic' CLI in the next
release that would be a major version bump.


> Any suggestions welcome :)
>
> -Vlad
>
> [0] https://review.openstack.org/359061
> [1] https://github.com/openstack/python-ironicclient/
> blob/master/ironicclient/v1/client.py
> [2] https://github.com/openstack/python-ironicclient/
> blob/master/ironicclient/common/http.py
> [3] https://github.com/openstack/python-ironicclient/
> blob/master/ironicclient/client.py
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>

Cheers,
-- 
Dr. Pavlo Shchelokovskyy
Senior Software Engineer
Mirantis Inc
www.mirantis.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [ironic][python-ironicclient][keystoneauth] Getting rid of a custom HTTPClient implementation

2017-07-21 Thread Vladyslav Drok
Greetings!

I have a patch [0] to deprecate the custom HTTPClient implementation that
we have in python-ironicclient. Currently it is used when the 'ironic'
command is issued in a standalone mode, that is, with '--ironic-url' and
'--os-auth-token' parameters, or when a client is instantiated through the
following module [1] directly without passing the session object, or even
directly calling HTTPClient constructor at [2]. In other cases,
keystoneauth's SessionClient derivative object is used. [0] will basically
substitute the HTTPClient with the SessionClient (by using the
'admin_token' auth plugin). It seems like a breaking change, as most likely
some HTTP error codes and exceptions thrown may be different, so I think
we'll need the major client library version bump. We'll also make it clear
in the docs that the only "true" way for instantiating the client is
through 'get_client' method in [3].

After that, we'll need to remove the HTTPClient class completely, and here
a question is, whether we should have another major version bump? Or can we
remove it right away, and single major version bump should be enough? (as
the HTTPClient defined in [2] was not something we advertised as a part of
our public python API)

Any suggestions welcome :)

-Vlad

[0] https://review.openstack.org/359061
[1]
https://github.com/openstack/python-ironicclient/blob/master/ironicclient/v1/client.py
[2]
https://github.com/openstack/python-ironicclient/blob/master/ironicclient/common/http.py
[3]
https://github.com/openstack/python-ironicclient/blob/master/ironicclient/client.py
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev