1754 Commits

Author SHA1 Message Date
Brant Knudson
eaa7ddd744 Proper deprecation for HTTPClient session and adapter properties
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
2015-08-04 09:56:44 -05:00
Brant Knudson
0c2fef51d2 Proper deprecation for HTTPClient.request methods
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
2015-08-04 09:56:44 -05:00
Brant Knudson
ada04acf4d Proper deprecation for HTTPClient.tenant_id|name
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
2015-08-04 09:56:44 -05:00
Brant Knudson
1721e01743 Proper deprecation for HTTPClient tenant_id, tenant_name parameters
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
2015-08-04 09:56:43 -05:00
OpenStack Proposal Bot
a9ef92a43f Updated from global requirements
Change-Id: Idb9238ef74d67dc2bccf5ca49ada78507dfdf373
2015-08-04 00:48:54 +00:00
Jenkins
32ad0437de Merge "Fix tests passing user, project, and token" 2015-08-03 21:55:44 +00:00
Jenkins
1c76ed9266 Merge "Proper deprecation for httpclient.request()" 2015-08-03 21:43:51 +00:00
Jenkins
5fd80344cb Merge "Proper deprecation for Dicover.raw_version_data unstable parameter" 2015-08-03 21:43:48 +00:00
Brant Knudson
22236fd763 Clarify setting socket_options
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
2015-08-02 11:22:18 -05:00
Brant Knudson
aa5738c23d Remove check for requests version
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
2015-08-02 11:18:45 -05:00
OpenStack Proposal Bot
9e470a5d77 Updated from global requirements
Change-Id: I08cdf12dad7fc99cddc55580ea9a99fefd79a399
2015-07-29 03:50:34 +00:00
Jenkins
e4ff102644 Merge "Set reasonable defaults for TCP Keep-Alive" 2015-07-27 23:06:26 +00:00
Brant Knudson
0b745909a6 Fix tests passing user, project, and token
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
2015-07-26 06:54:23 -05:00
Brant Knudson
9f17732308 Proper deprecation for httpclient.request()
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
2015-07-26 06:54:23 -05:00
Brant Knudson
fb28e1a2b8 Proper deprecation for Dicover.raw_version_data unstable parameter
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
2015-07-26 06:54:23 -05:00
Brant Knudson
a303cbc0ec Proper deprecation for Dicover.available_versions()
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
2015-07-26 06:54:23 -05:00
Brant Knudson
5547fe80b0 Proper deprecation for is_ans1_token
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
2015-07-26 06:54:23 -05:00
Brant Knudson
ce58b07eea Proper deprecation for client.HTTPClient
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
2015-07-26 06:54:23 -05:00
Brant Knudson
c5b03191b6 Proper deprecation for Manager.api
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
2015-07-26 06:54:23 -05:00
Brant Knudson
fee5ba7432 Stop using Manager.api
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
2015-07-26 06:54:22 -05:00
Brant Knudson
b1496abbb7 Proper deprecation for BaseIdentityPlugin trust_id property
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
2015-07-26 06:54:22 -05:00
Brant Knudson
799e1faa50 Proper deprecation for BaseIdentityPlugin username, password, token_id properties
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
2015-07-26 06:54:22 -05:00
Brant Knudson
85b32fcb9d Proper deprecations for modules
Use debtcollector and update docs for deprecating the apiclient,
apiclient.exceptions, middleware.s3_token, and v2_0.shell modules.

bp deprecations

Change-Id: I84e8eac39a209210542f19de08d4c3de15a9dcac
2015-07-26 06:54:22 -05:00
Jenkins
87dbd7e218 Merge "Prevent attempts to "filter" list() calls by globally unique IDs" 2015-07-25 10:44:31 +00:00
Brant Knudson
1a2ccb001b Proper deprecation for AccessInfo management_url property
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
2015-07-24 11:05:05 -05:00
Brant Knudson
6d82f1f17c Proper deprecation for AccessInfo auth_url property
Properly deprecate accessing AccessInfo's auth_url parameter.

bp deprecations

Change-Id: I3824904f517434b507587cf73d4389b72f73f22b
2015-07-24 11:05:05 -05:00
Brant Knudson
66fd1eb748 Stop using deprecated AccessInfo.auth_url and management_url
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
2015-07-24 11:04:04 -05:00
Brant Knudson
f782ee853c Proper deprecation for AccessInfo scoped property
Properly deprecate constructing AccessInfo's scoped parameter.

bp deprecations

Change-Id: I8f81c75eb8e758feb9d4c62ce7f041957562e766
2015-07-24 09:14:40 -05:00
Brant Knudson
8d65259cb8 Proper deprecation for AccessInfo region_name parameter
Properly deprecate constructing AccessInfo with region_name
parameter.

bp deprecations

Change-Id: Ic5f48a4f5354beb8be68c2fd788bf0a974501917
2015-07-24 08:16:03 -05:00
Brant Knudson
610844d06d Deprecations fixture support calling deprecated function
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
2015-07-24 08:05:13 -05:00
Ian Cordasco
c6b14f94c5 Set reasonable defaults for TCP Keep-Alive
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
2015-07-23 20:14:14 -05:00
Jenkins
43749c5ac1 Merge "Unit tests catch deprecated function usage" 2015-07-23 20:14:03 +00:00
Jenkins
6363f98987 Merge "Add get_token_data to token CRUD" 2015-07-23 20:04:04 +00:00
Jenkins
cbf8345925 Merge "Remove unused time_patcher" 2015-07-23 13:55:40 +00:00
OpenStack Proposal Bot
bb6463e20f Updated from global requirements
Change-Id: I772ee10288955bae1f3f3707eb1b34573df03e60
2015-07-23 07:44:44 +00:00
Boris Bobrov
0d5415e9e9 Remove unused time_patcher
There is no reason to patch time now, tests succeed without it

Change-Id: I3cf3017b5f86bae35276037c60cfec8dc3be20ae
2015-07-23 07:22:57 +00:00
Boris Bobrov
7d5d8b3432 Make OAuth testcase use actual request headers
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
2015-07-22 23:41:07 +03:00
Dolph Mathews
98326c72f7 Prevent attempts to "filter" list() calls by globally unique IDs
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
2015-07-19 09:49:04 -05:00
Jenkins
ae066a828f Merge "Switch from deprecated oslo_utils.timeutils.strtime" 2015-07-16 15:35:08 +00:00
Jenkins
3bfcb6ae29 Merge "Switch from deprecated isotime" 2015-07-16 15:34:09 +00:00
Jamie Lennox
a4584c4ba7 Add get_token_data to token CRUD
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
2015-07-15 22:01:14 +00:00
Jenkins
f1d0b15bae Merge "py34 not py33 is tested and supported" 2015-07-15 20:31:32 +00:00
OpenStack Proposal Bot
2f90bb68ac Updated from global requirements
Change-Id: I25bef4f42fc42765b493f17295add61ba3353803
2015-07-15 01:37:25 +00:00
Jenkins
78194b170b Merge "Fixes modules index generated by Sphinx" 2015-07-13 22:57:47 +00:00
Eric Brown
3668d9cae2 py34 not py33 is tested and supported
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
2015-07-13 04:53:17 -07:00
OpenStack Proposal Bot
d3b9755395 Updated from global requirements
Change-Id: I584fe4bee5a4785d6c5862fe8ae417481cc04d36
2015-07-12 15:22:13 +00:00
David Stanek
4034366b51 Fixes modules index generated by Sphinx
Sphinx was always using (k)eystoneclient for the prefix so the index
wasn't very useful.

Change-Id: I9f883e1005874b5f5019f9030b94174a2169ed77
2015-07-08 20:12:31 +00:00
OpenStack Proposal Bot
c503c29f93 Updated from global requirements
Change-Id: I55424466d38369fdbd12852255fe94a0e2676c0a
2015-07-02 18:57:20 +00:00
Jenkins
dab0c4738d Merge "Remove keystoneclient CLI references in README" 2015-07-02 05:54:34 +00:00
Brant Knudson
31f326dab6 Unit tests catch deprecated function usage
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
2015-06-30 12:58:55 -05:00