HTTPClient's forwarded session and adapter properties weren't
properly deprecated since the deprecations was only mentioned in
the docstring. Proper deprecation requires use of warnings/
debtcollector and documentation.
bp deprecations
Change-Id: Iea76d7bbc3bdeb13f7fdb097f13e007b4dd85c8d
HTTPClient.request and related methods weren't properly
deprecated since they were only mentioned in the docstrings.
Proper deprecation requires use of warnings/debtcollector and
documentation.
Also, fixed places where the deprecated request method was called.
bp deprecations
Change-Id: I0a16933252937ca046793bb6eb2e5cc5da03c9ae
HTTPClient tenant_id and tenant_name properties weren't properly
deprecated since they were only mentioned in the docstring. Proper
deprecation requires use of warnings/debtcollector and
documentation.
bp deprecations
Change-Id: I3c2f87df14bc9f8ffd82b99919fd1048123d0669
HTTPClient() tenant_id and tenant_name parameters weren't properly
deprecated since they were only mentioned in the docstring. Proper
deprecation requires use of warnings/debtcollector and documentation.
Also fixed a bunch of places in the tests where tenant_id and
tenant_name were still being used despite being deprecated.
bp deprecations
Change-Id: I9c4f596b8ff10aede6c417886638a942cb18044c
There was a lot of code that would have no effect if kwargs already
had socket_options set. To make the code clearer, only execute the
code if it's going to have an effect.
Change-Id: Ic42f5a0bac07113aff59d36d19293dc6d65cd58a
requirements.txt has requests>=2.5.2, so requests version is always
going to be >= 2.4.1 and there's no need to check it.
Change-Id: I8069cfbd54ce716979bc991d137bd2e71790a1e4
The tests were creating httpclient.HTTPClient() using username,
token, and project, but if you pass a token then username and
project are going to be ignored since there's no need to auth.
Make the tests more understandable by removing the ignored and
useless parameters.
bp deprecations
Change-Id: Ide3f4be4dd00db89f551d014876625cff296f6a7
httpclient.request() wasn't properly deprecated since it was only
mentioned in a comment. Proper deprecation requires use of
warnings/debtcollector and documentation.
bp deprecations
Change-Id: Id35d64a8b2d536c5de90e398b2a7680fa30881d6
Dicover.raw_version_data()'s unstable parameter wasn't properly
deprecated since it was only mentioned in the docstring. Prope
deprecation requires use of warnings/debtcollector and
documentation.
Also, fixed a place where the deprecated function could be used.
bp deprecations
Change-Id: I42dd7c1831bcfc3c637572eb112353b8760ed8d0
Dicover.available_versions() wasn't properly deprecated since it
was only mentioned in the docstring. Proper deprecation requires use
of warnings/debtcollector and documentation.
bp deprecations
Change-Id: Ifbcedec1d464435ebb9bcec779fadac0dfb28909
is_ans1_token wasn't properly deprecated since it used LOG.warn
rather than warnings/debtcollector. Proper deprecation requires use
of warnings and documentation.
bp deprecations
Change-Id: I81be2844014745a5951ce91a336e9e9ecf4d5328
client.HTTPClient wasn't properly deprecated since all it had was
a comment in the code. Proper deprecation requires use of warnings
and documentation.
bp deprecations
Change-Id: I1c50c1441b23a79831e6e1df749084130e4b9af7
base.Manager's api property wasn't properly deprecated since all it
had was documentation. Proper deprecation requires use of warnings
and documentation.
bp deprecations
Change-Id: Ic5e218151e9b3f3b66f78729052680691d5ad582
base.Manager's api is documented as being deprecated, but there was
still code using it. Deprecated function must not be used.
bp deprecations
Change-Id: I58678626b55f3cd11f4fdbcddbe4cc9461692fbf
BaseIdentityPlugin's trust_id property wasn't properly deprecated
since all it had was a comment in the code. Proper deprecation
requires use of warnings and documentation.
Where the plugins already provide their own trust_id, the
property needs to be un-deprecated.
bp deprecations
Change-Id: I15d4e019bfc5542990120ba39be65ad83cf040d5
BaseIdentityPlugin's username, password, and token_id properties
weren't properly deprecated since all they had was a comment in
the code. Proper deprecation requires use of warnings and
documentation.
Where the plugins already provide their own properties, the
properties need to be un-deprecated.
bp deprecations
Change-Id: Ic9fce89b8544d8c01f16e8f9c2f9dd2659d03c18
Use debtcollector and update docs for deprecating the apiclient,
apiclient.exceptions, middleware.s3_token, and v2_0.shell modules.
bp deprecations
Change-Id: I84e8eac39a209210542f19de08d4c3de15a9dcac
AccessInfo's management_url parameter wasn't properly deprecated
since all it had was a comment in the code. Proper deprecation
requires use of warnings and documentation.
bp deprecations
Change-Id: I0ee07c5adc6a7c91f8b23b291eea76f4ae7b3b89
The comments for the auth_url and management_url properties say
that they're deprecated and to use the service catalog, but
internal code was using the deprecated function. The
code needs to be changed to use non-deprecated function.
bp deprecations
Change-Id: I6ada821fe305650d22e58a55192332f0f4986537
Sometimes a test is expected to call deprecated function, such as
when testing that deprecated function still works. Now the test can
tell the Deprecations fixture that it's calling deprecated function.
Change-Id: Ic7486b74f681989eb5110dfeaf8dae0e5d7ae50e
Previously we simply turned on TCP Keep-Alive which relied on
per-distribution, per-operating system defaults for keep-alive options.
Here we set reasonable defaults since long running processes can get
stuck for hours on end by using system defaults. This also adds comments
around the options to explain why they're being set.
Closes-bug: 1477275
Related-bug: 1323862
Change-Id: Ibd53ae2d4d2455db0ebc9951e5c764befc57850f
OAuth test verifies that access_token manager's methods make requests with
certain parameters. It is supposed to use values from mocked http handler
and compare them with referential values acquired from oauth client.
But instead of using values from mocked handler, it used the values from
oauth client and compared them with values from the client acquired using
attributes, basically testing oauthlib and not access_token manager's
methods.
Make the test compare correct values and remove check of timestamp,
which was useless because it is always mocked in tests and not provided in
actual requests.
As a consequence, use of get_oauth_params, which changed in oauthlib
1.0 and blocked the gate, was removed.
Closes-Bug: 1477177
Closes-Bug: 1477247
Change-Id: I5e049163f84fde5827104fd4a6441222eb08468f
This use case isn't covered by our current APIs:
GET /entities?id={entity_id}
Because we have a dedicated API for that:
GET /entities/{entity_id}
But our list() methods generally support **kwargs, which are passed as
query parameters to keystone. When an 'id' is passed to keystone as a
query parameter, keystone rightly ignores it and returns an unfiltered
collection.
This change raises a client-side TypeError (as you'd expect when you try
to pass a keyword argument that a function isn't expecting), and
includes a helpful suggestion to try calling get() instead.
Change-Id: I100b69bbf571ad6de49ccc5ad1099c20b877d13d
Closes-Bug: 1452298
We already have the validate method that returns an AccessInfo object.
For auth_token middleware it would be simpler if the client returned
simply the token data so it presented the same way as other sources of
token data.
It would also help with the keystoneauth transition in auth_token as we
could bypass the keystoneclient.AccessInfo objects.
Closes-Bug: #1475041
Change-Id: Ifbe7a7004937d910739c325cc04ae7264a4498e0
The setup.cfg refers to Programming Language of Python 3.3 whereas
jenkins is setup only to test Python 3.4. This patch updates setup.cfg
and removes py33 from tox.ini.
TrivialFix
Change-Id: I1bc7fae6481c4fef71746ed1c144af37445a81ac
Rather than continue to call deprecated functions without knowing
it, have the unit tests fail when deprecated function is used.
This will ensure that code isn't added that calls deprecated
functions.
Change-Id: If9f58e30a08a88778e4ae3fc01399ad90997e812