summaryrefslogtreecommitdiff
path: root/keystoneclient
Commit message (Collapse)AuthorAgeFilesLines
* Merge "auth_token tests use assertIs/Not/None"0.4.2Jenkins2014-01-131-4/+4
|\
| * auth_token tests use assertIs/Not/NoneBrant Knudson2014-01-121-4/+4
| | | | | | | | | | | | | | | | 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
* | Merge "Removes use of timeutils.set_time_override"Jenkins2014-01-121-17/+19
|\ \ | |/
| * Removes use of timeutils.set_time_overrideZhongyue Luo2014-01-101-17/+19
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Python 3: Use HTTPMessage.get() rather than HTTPMessage.getheader()"Jenkins2014-01-111-1/+1
|\ \
| * | Python 3: Use HTTPMessage.get() rather than HTTPMessage.getheader()Cyril Roelandt2014-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In Python 2, get() is a synonym for getheader(), which does not exist in Python 3. Closes-Bug: #1267987 Change-Id: I6989a6ea733e0a186e9e68a61aaa8c3e43a198a6
* | | Merge "Sync strutils from oslo"Jenkins2014-01-111-2/+8
|\ \ \
| * | | Sync strutils from osloChmouel Boudjnah2014-01-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Controllable redirect handling"Jenkins2014-01-113-17/+146
|\ \ \ \
| * | | | Controllable redirect handlingJamie Lennox2014-01-093-17/+146
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Fix auth_token middleware test invalid cross-device link issue"Jenkins2014-01-101-1/+2
|\ \ \ \
| * | | | Fix auth_token middleware test invalid cross-device link issueFlorent Flament2014-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge "Add unit tests for generic/shell.py"Jenkins2014-01-102-0/+131
|\ \ \ \ \
| * | | | | Add unit tests for generic/shell.pyIgor A. Lukyanenkov2014-01-072-0/+131
| |/ / / / | | | | | | | | | | | | | | | | | | | | blueprint generic-shell-unittest Change-Id: I234c58d6e0dfa6402633f5f4f2149e7b1b9d36f2
* | | | | Merge "Do not try to call decode() on a text string"Jenkins2014-01-101-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Do not try to call decode() on a text stringCyril Roelandt2014-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a call to 'isinstance' that only worked on Python2. Closes-Bug: #1265879 Change-Id: I886da95f1ad2a8314de92be8aecb354ee3124e6d
* | | | | Merge "Prevent dictionary size from changing while iterating over its items"Jenkins2014-01-091-10/+8
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Prevent dictionary size from changing while iterating over its itemsCyril Roelandt2014-01-061-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge "v3 test utils, don't modify input parameter"Jenkins2014-01-071-1/+1
|\ \ \ \ \
| * | | | | v3 test utils, don't modify input parameterSteven Hardy2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge "Fix error in v3 credentials create/update"Jenkins2014-01-073-7/+46
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | |
| * | | | Fix error in v3 credentials create/updateSteven Hardy2013-12-203-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge "Remove the 'cmp' keyword from a call to 'sort()'"Jenkins2014-01-041-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Remove the 'cmp' keyword from a call to 'sort()'Cyril Roelandt2013-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This keyword does not exist in Python 3, and 'key' should be used instead. Change-Id: I0f92a1e3d389b491bf138c215e11e68fddc15477
* | | | | Merge "Correctly handle auth_url/token authentication"Jenkins2014-01-025-7/+148
|\ \ \ \ \
| * | | | | Correctly handle auth_url/token authenticationJamie Lennox2013-12-205-7/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge "Use testresources for example files"Jenkins2014-01-024-328/+401
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | |
| * | | | | Use testresources for example filesBrant Knudson2013-12-034-328/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example files were loaded at import time rather than used as a test fixture. Change-Id: I3c1ac4db4b269725bf83904c1568a86b45eb7e55
* | | | | | Merge "Make _get_utf8_value Python3 compliant"Jenkins2013-12-301-2/+2
|\ \ \ \ \ \
| * | | | | | Make _get_utf8_value Python3 compliantCyril Roelandt2013-12-111-2/+2
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function now works with both Python 2 and 3. Thanks to Victor Stinner for helping with this. Change-Id: I1644db7705f7818471d06fb74a4b9a91956e6b58
* | | | | | Merge "Move redirect handling to session"Jenkins2013-12-282-15/+20
|\ \ \ \ \ \
| * | | | | | Move redirect handling to sessionJamie Lennox2013-12-202-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | Merge "Fix missed management_url setter in v3 client"Jenkins2013-12-282-8/+17
|\ \ \ \ \ \ \
| * | | | | | | Fix missed management_url setter in v3 clientJamie Lennox2013-12-202-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | Merge "Add service catalog to domain scoped token fixture"Jenkins2013-12-282-2/+83
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | / / | |_|_|_|_|/ / |/| | | | | |
| * | | | | | Add service catalog to domain scoped token fixtureJamie Lennox2013-12-192-2/+83
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge "Rename instead of writing directly to revoked file"Jenkins2013-12-201-1/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Rename instead of writing directly to revoked fileChmouel Boudjnah2013-12-201-1/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the operation more atomic with multiple writers. Closes-Bug: 1261554 Change-Id: I990a2ba28d9a2a1d01300dcd33266956d059afa3
* | | | | Remove debug specific handlingJamie Lennox2013-12-204-57/+46
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Avoid meaningless comparison that leads to a TypeError"Jenkins2013-12-191-1/+1
|\ \ \ \
| * | | | Avoid meaningless comparison that leads to a TypeErrorCyril Roelandt2013-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Change assertEquals to assertIsNoneBrant Knudson2013-12-161-8/+8
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Some tests were using assertEquals where they should have used assertIsNone. assertEquals doesn't distinguish False from None. Change-Id: Id7dc1075fbaaa9a6dbff5b05ab587df39c79c180
* | | | Merge "Fix --debug handling in the shell"Jenkins2013-12-162-0/+14
|\ \ \ \ | |/ / / |/| | |
| * | | Fix --debug handling in the shellThomas Herve2013-12-092-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sets the debug level globally on root logger so that every debug calls are logged. Change-Id: Ia8d61f213b2bc6c4bcb1038e7ff6ac0104581b4b Closes-Bug: #1259210
* | | | Merge "Python3: replace urllib by six.moves.urllib"Jenkins2013-12-145-13/+20
|\ \ \ \
| * | | | Python3: replace urllib by six.moves.urllibCyril Roelandt2013-12-125-13/+20
| | |/ / | |/| | | | | | | | | | | | | | | | | | This makes the code compatible with both Python 2 and 3. Change-Id: I721a5567842f2df6ce2a8af501787204daba3082
* | | | Merge "Sync with latest module from oslo"Jenkins2013-12-147-50/+129
|\ \ \ \ | |/ / / |/| | |
| * | | Sync with latest module from osloChmouel Boudjnah2013-12-107-50/+129
| |/ / | | | | | | | | | | | | | | | - This add a few bugfixes for py3 support. Change-Id: Ieb73d5f799423fa8abf71634c86601ba6d32df2f
* | | Merge "Properly handle Regions in keystoneclient"Jenkins2013-12-118-43/+325
|\ \ \ | |/ / |/| |
| * | Properly handle Regions in keystoneclientJamie Lennox2013-12-048-43/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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