| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The tests in test_auth_token_middleware were using
assertEqual(res, None) and assertNotEqual(res, None) when they
should use assertIsNone and assertIsNotNone.
Change-Id: Ib1601b3a6101f843d9c29f3cd00aab339e671e61
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The set_time_override function in timeutils was written as a
helper function to mock utcnow for unittests before 'mock' was
generally used. Now that we have mock and fixture, we no longer
need to use it.
Partial-Bug: #1266962
Change-Id: I56935911a08ccd9847419eb118af2d2c9dd6c1cd
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Python 2, get() is a synonym for getheader(), which does not exist in Python
3.
Closes-Bug: #1267987
Change-Id: I6989a6ea733e0a186e9e68a61aaa8c3e43a198a6
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Sync strutils from oslo which fix safe_encode under py3, this gets
keystone CLI to properly output results.
84d461 Fix a bug in safe_encode where it returns a bytes object in py3
Closes-Bug: 1260824
Change-Id: Idf0f3a51f5cfe3077395b53da66a12955449861f
|
| |\ \ \ \ |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The requests library handles redirects as a browser would, which has the problem
that forwarding a POST will convert it to a GET. This is not necessarily
intuitive for an API. Handle all redirection manually and provide some
control over how far redirection can go.
Closes-Bug: 1267286
Change-Id: I24596a9c39cc29db28a66c3053ef3954b33abf90
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes path of temporary files, containing token revocation lists,
which weren't in the appropriate directory. File renaming now works
properly since source and destination files are in the same directory,
and therefore on the same partition.
Added to .gitignore temporary files generated during tests, that are
not being removed at the end of test.
Change-Id: I21ff81419313f4205ebe552556e27b86135fd096
Closes-Bug: #1265190
|
| |\ \ \ \ \ |
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
blueprint generic-shell-unittest
Change-Id: I234c58d6e0dfa6402633f5f4f2149e7b1b9d36f2
|
| |\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This fixes a call to 'isinstance' that only worked on Python2.
Closes-Bug: #1265879
Change-Id: I886da95f1ad2a8314de92be8aecb354ee3124e6d
|
| |\ \ \ \ \
| |_|_|/ /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In Python 3, dict.items() returns 'a dict_item'. Iterating over it while
deleting some of the dictionary elements is forbidden. We have to iterate over
a list to avoid getting this error:
RuntimeError: dictionary changed size during iteration
Change-Id: I43401e6eb9a31148fda4677644bf99e1b739d0dd
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As mentioned in https://review.openstack.org/#/c/61046/ for
test_update, we should not modify the input req_ref in test_create
instead we should make a copy
Change-Id: I649433596a3ebbf2133eb724f09eb4bd470b7cdd
|
| |\ \ \ \ \ \
| |/ / / / /
| | / / / /
| |/ / / /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The v3 credentials passes data associated with the credential in
a "data" key, but the underlying API expects "blob", which is also
what is documented in the API spec.
Currently any attempt to create a credential with a type of 'ec2'
will fail with 'Invalid blob in credential' So s/data/blob to fix.
Change-Id: I0858e8c39653477eb554ee9d15fb4f2dde2b195c
Closes-Bug: #1259461
|
| |\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This keyword does not exist in Python 3, and 'key' should be used instead.
Change-Id: I0f92a1e3d389b491bf138c215e11e68fddc15477
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously the client assumed that if a user passed a token then this
token should be used for everything. This assumption is correct for the
endpoint/token case but not in the auth_url/token case where you will
want to fetch a new token. This is needed in the case where you want to
use an existing token to fetch a token that is re-scoped or activate a
trust.
There are still problems such as if you use auth_url/token
authentication then when the token expires it will try to refresh it,
but authenticating with a token will not extend the token expiry.
Closes-Bug: #1257541
Change-Id: I1c35600ca5437da44071dcea5361bfb42f6b72a3
|
| |\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The example files were loaded at import time rather than used as
a test fixture.
Change-Id: I3c1ac4db4b269725bf83904c1568a86b45eb7e55
|
| |\ \ \ \ \ \ |
|
| | | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This function now works with both Python 2 and 3.
Thanks to Victor Stinner for helping with this.
Change-Id: I1644db7705f7818471d06fb74a4b9a91956e6b58
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Particularly 305 is expected to be handled by the tests so we need to
handle this centrally if we want to have session and non-session clients
to work the same way.
Change-Id: Id4ec35ddd8b8304d24df9e6cd2ab995d123ef125
|
| |\ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Setting management_url is intended to mean that this is an overriding
URL not one received from the service catalog. This was fixed for
project scoped tokens but was missed from domain scoped tokens.
Change-Id: I8484f4a26a5695ef7ae962918ad442fe20bd2caa
Related Change: I2fa41e2ae1b853bbb254698cf94b9314eb0f0903
Related-Bug: #1252927
|
| |\ \ \ \ \ \ \ \
| |/ / / / / / /
| | | | | | / /
| |_|_|_|_|/ /
|/| | | | | | |
|
| | | |_|_|/ /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This was simply forgotten previously and testing that required a service
catalog was done with the project token. This has led to some problems
of not testing the domain paths correctly.
Fix the one test that was incorrectly relying on an empty service
catalog being returned from a domain scoped token.
Change-Id: I66e3a9302d6a73ba17d4ed45f2366d9bb91461ab
|
| |\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
|
| | | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make the operation more atomic with multiple writers.
Closes-Bug: 1261554
Change-Id: I990a2ba28d9a2a1d01300dcd33266956d059afa3
|
| | |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I think debug handling was initially done this way for CLI handling
where we wanted to make sure only the correct information was printed to
the console. However as logging.basicConfig sets up a stream handler on
the root logging object I can't see any purpose to the debug handling in
the actual HTTPClient. Further than this it is completely wrong that a
client library is messing with it's logging level, this should be handled
by an application.
The debug flag is maintained and deprecated in HTTPClient and removed
from the session object. There has been no release since the addition of
session so there is no problem with compatibility.
Change-Id: Ib00f3d93d099ed1a9dd25f17121610a7289f0061
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The "requests" module tries to do this comparison in raise_for_status():
400 <= self.status_code < 500
with "self.status_code" being "None". In Python2, it's a valid comparison, but
in Python3, it triggers a TypeError. We fix it by giving a valid default value
to "self.status_code".
Change-Id: I9ea9ecfb698546a7f6526464aa528441bb7c1ccd
|
| | |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some tests were using assertEquals where they should have used
assertIsNone. assertEquals doesn't distinguish False from None.
Change-Id: Id7dc1075fbaaa9a6dbff5b05ab587df39c79c180
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This sets the debug level globally on root logger so that every debug
calls are logged.
Change-Id: Ia8d61f213b2bc6c4bcb1038e7ff6ac0104581b4b
Closes-Bug: #1259210
|
| |\ \ \ \ |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
This makes the code compatible with both Python 2 and 3.
Change-Id: I721a5567842f2df6ce2a8af501787204daba3082
|
| |\ \ \ \
| |/ / /
|/| | | |
|
| | |/ /
| | |
| | |
| | |
| | |
| | | |
- This add a few bugfixes for py3 support.
Change-Id: Ieb73d5f799423fa8abf71634c86601ba6d32df2f
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Region name is taken as a parameter but is ignored in all communication
with the service catalog. Currently region can be stored in the token
data and then requests to url functions will return the appropriate
region. This is the wrong approach because there is nothing specific to
the token (or auth_data) that is region specific. Instead region
information should be held by the client.
Closes-Bug: 1147530
Closes-Bug: 1255992
Change-Id: I812aa89c8b4af28e294e63926a7f88e8246fffc5
|