summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Normalize datetimes to account for tz"0.4.0Jenkins2013-10-092-7/+236
|\
| * Normalize datetimes to account for tzBryan Davidson2013-10-092-7/+236
| | | | | | | | | | | | | | | | | | | | | | | | This patch makes sure that datetimes in the auth_token middleware are normalized to account for timezone offsets. Some of the old tests were changed to ensure that the expires string stored in the cache is in ISO 8601 format and not a random float. Fixes bug 1195924 Change-Id: I5917ab728193cd2aa8784c4860a96cdc17f3d43f
* | Merge "Fix H202 assertRaises Exception"Jenkins2013-10-095-15/+23
|\ \ | |/ |/|
| * Fix H202 assertRaises ExceptionKui Shi2013-10-045-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Align the hacking version between test-requirement and global requirement. The change of H202 detection from 0.6 to 0.7 in hacking is: - if logical_line.startswith("self.assertRaises(Exception)"): + if logical_line.startswith("self.assertRaises(Exception,"): then more cases are detected by this change. Fix the exposed H202 error. There is a special test case: tests/v3/test_endpoints.py:test_update_invalid_interface ref = self.new_ref(interface=uuid.uuid4().hex) this line can not generate proper parameter for self.manager.update, add a parameter "endpoint" for it, according to the definition in keystoneclient/v3/endpoints.py:EndpointManager.update. Otherwise, there will be following error after changing the Exception to exceptions.ValidationError: TypeError: update() takes at least 2 arguments (6 given) Fixes Bug #1220008 Change-Id: I8f7ed7a6eebf8576a6db5fecd86b9d19a15c8d60
* | Merge "Refactor for testability of an upcoming change"Jenkins2013-10-072-23/+45
|\ \ | |/ |/|
| * Refactor for testability of an upcoming changeBryan Davidson2013-10-012-23/+45
| | | | | | | | | | | | | | | | | | confirm_token_not_expired() in keystoneclient/middleware/auth_token.py has been moved out of the class to make it a function and be more testable. Currently, there is no need to keep it within the class. An upcoming commit makes fixes that rely on this refactor to be tested. Change-Id: I8460a2ee663dec8be0f339735208779a3b988040
* | Merge "Add auth_uri in conf to avoid unnecessary warning"Jenkins2013-10-041-2/+6
|\ \
| * | Add auth_uri in conf to avoid unnecessary warningZhiQiang Fan2013-09-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unittest code for auth_token.py doesn't specify auth_uri in conf, which will cause lots of warnings, since auth_token.py will use '%(protocol)s://%(host)s:%(port)s' to generate auth_uri when it is None, we can specify this value directly to avoid unnecessary warnings. Closes-Bug: #1219493 Change-Id: I26b636bcddabd91b06479c6a42a6a48d74ac9431
* | | Merge "Log user info in auth_token middleware"Jenkins2013-10-021-0/+3
|\ \ \ | |_|/ |/| |
| * | Log user info in auth_token middlewareAmalaBasha2013-09-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add logging for user information (like user name, tenant_id, roles) in the auth_token middleware. This would make tracking down issues much easier. Change-Id: Ife4ce29d2f8e1a338a025dda4afbd7b563f6b8c1 Implements: blueprint user-info-logging-in-auth-token-middleware
* | | Fix misused assertTrue in unit testsChang Bo Guo2013-09-251-2/+2
| |/ |/| | | | | | | | | | | | | | | Refactored unit tests to use assertEqual instead of assertTrue where needed. Fixes bug #1226374 Change-Id: I678b2e7fcc522c8776c7fc0a554c1fc229ab781e
* | Merge "Move tests in keystoneclient"Jenkins2013-09-2552-65/+59
|\ \
| * | Move tests in keystoneclientJamie Lennox2013-09-2452-65/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the suggested location for tests and is adopted by most projects. As part of this change relative imports to package imports. Fix all the test running and coverage code to point to the new location. Change-Id: I01264aed14f396ab9a7242e3e72b71e1bc332675
* | | Require oslo.config 1.2.0 finalMark McLoughlin2013-09-241-2/+1
|/ / | | | | | | | | | | | | | | Now that 1.2.0 has been released, require it rather than on of the beta release tarballs. Closes-Bug: #1182861 Change-Id: I75ffc4a572d14488d19491a38742d6920951c171
* | Merge "Modify keyring tests to test authentication"Jenkins2013-09-241-51/+96
|\ \
| * | Modify keyring tests to test authenticationJamie Lennox2013-08-301-51/+96
| | | | | | | | | | | | | | | | | | | | | | | | Currently keyring tests test the calls to the keyring service directly and not their use in an actual authentication call. Modify them so we test how the keyring performs under more realistic usage. Change-Id: I2216dcaaa6464f39807fd79a3bea07d1de71f827
* | | Merge "Change Babel to a runtime requirement"Jenkins2013-09-192-2/+1
|\ \ \
| * | | Change Babel to a runtime requirementClint Byrum2013-09-172-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #1226736 Change-Id: Id0ab5a1b74688601f4f8dd1c2613f4cee93401ab
* | | | Merge "Allow blank to email in user-update"Jenkins2013-09-192-2/+13
|\ \ \ \
| * | | | Allow blank to email in user-updateYuuichi Fujioka2013-09-172-2/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User cannot set blank to email address when use "user-update". This patch fixes this problem. Change-Id: I3b9494a1c668358a529031c366c55b303f43c533 Closes-bug: #1226439
* | | | Merge "Decode the non-english username str to unicode"Jenkins2013-09-182-0/+8
|\ \ \ \ | |/ / / |/| | |
| * | | Decode the non-english username str to unicodeYangLei2013-09-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | convert the non-english username str to unicode, then the converted username can match the username from db. Fixes bug #1221576 Change-Id: I9e5f941fe43f081d75750e3f4754e8beea8210db
* | | | Merge "Convert tests to HTTPretty and reorganize"Jenkins2013-09-1735-2118/+935
|\ \ \ \
| * | | | Convert tests to HTTPretty and reorganizeJamie Lennox2013-09-1135-2118/+935
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a lot of problems with the current means of mocking. Most annoyingly is that we cannot differ the call to the request library by even a single optional header or whitespace difference without breaking the mock. HTTPretty does a better job of this because it only cares about what is transmitted over the socket. Rewrite tests so that they no longer do string comparisons of JSON encoded dictionaries. This meant that they had to order the dictionary before encoding and would fail tests where the ordering was not followed. In the process of this I reorganized the inheritance of the utils.TestCase object so that there is a clear separation between the data stored on the V2 and V3 base test objects. Change-Id: I590df65adb1d2177b4be4e016708db05131b6880
* | | | | Merge "Don't need to init testr explicitly"Jenkins2013-09-171-6/+0
|\ \ \ \ \
| * | | | | Don't need to init testr explicitlyKui Shi2013-09-031-6/+0
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In run_tests.sh, function init_testr will initialize testr if the directory .testrepository is not existed. Actually, testr will do the check before run the test: In Python package testrepository, setuptools_command.py:Testr.run 68 def run(self): 69 """Set up testr repo, then run testr""" 70 if not os.path.isdir(".testrepository"): 71 self._run_testr("init") "python setup.py testr" will trigger this function to create .testrepository if not exist. So, init_testr can be removed safely. Fixes Bug #1220149 Change-Id: I4dfcdfa5e1e323bbc7ee3add5d9d0888a42e3812
* | | | | Merge "Deprecation warning should be 'pending'"Jenkins2013-09-141-3/+3
|\ \ \ \ \
| * | | | | Deprecation warning should be 'pending'Dolph Mathews2013-09-051-3/+3
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | Until python-openstackclient is ready for more mainstream users. Change-Id: Ic90daa38cd7e8e2f6d6b23c30c3d83935cf6c1a6
* | | | | Set example timestamps to 2038-01-18T21:14:07ZDolph Mathews2013-09-1318-209/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This timestamp is the last possible moment that can be represented on 32-bit systems as an integer. As a consequence of revising the JSON examples, the corresponding PEM files must be re-generated as well. Change-Id: Ic6014c08b4545db036605beef1e6a8829ed347c4 Related-Bug: 1190054 Related-Bug: 1225084
* | | | | Merge "Replace HttpConnection in auth_token with Requests"Jenkins2013-09-133-69/+66
|\ \ \ \ \
| * | | | | Replace HttpConnection in auth_token with RequestsJamie Lennox2013-09-123-69/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requests is becoming the standard way of doing http communication, it also vastly simplifies adding other authentication mechanisms. Use it in the auth_token middleware. This adds the ability to specify a CA file that will be used to verify a HTTPS connections or insecure to specifically ignore HTTPS validation. SecurityImpact DocImpact Partial-Bug: #1188189 Change-Id: Iae94329e7abd105bf95224d28f39f4b746b9eb70
* | | | | | Merge "Support client generate literal ipv6 auth_uri base on auth_host"Jenkins2013-09-132-2/+18
|\ \ \ \ \ \ | |/ / / / / | | | | / / | |_|_|/ / |/| | | |
| * | | | Support client generate literal ipv6 auth_uri base on auth_hostDazhao2013-09-112-2/+18
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is for fix bug 1208784. Support keystone client generate literal ipv6 auth_uri via provided auth_host, when the auth_uri is None. Fixes bug 1208784 Change-Id: I226881a35a74ef668d4cd1c6829a64c94ff185d9
* | | | Merge "Allow Hacking 0.7.x or later"Jenkins2013-09-102-3/+3
|\ \ \ \ | |_|/ / |/| | |
| * | | Allow Hacking 0.7.x or laterDirk Mueller2013-09-022-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | Allow newer versions of Hacking as well, which permits further checks to be used for gating. Suppress H202 for now to pass tests. Change-Id: I75ab26df94b5dd8b8b05f4ada2ca6831d8584a75
* | | Deprecation warning for the CLIDolph Mathews2013-09-031-1/+5
|/ / | | | | | | | | | | | | | | | | keystoneclient/shell.py's docstr is rendered by argparse as the description for: $ keystone --help Change-Id: I7355cdf533800086027824fb729eb52cdd8bbc33
* | Merge "Correct keyword args in test cases"Jenkins2013-08-311-5/+5
|\ \
| * | Correct keyword args in test casesWu Wenxiang2013-08-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tests/test_auth_token_middleware.py, some assertRaises tests do not pass conf as a keyword argument to self.set_middleware. This patch correct them. Fixes bug #1212984 Change-Id: Idd34dc043526a4eb22b28b144d327fd95aa14af2
* | | Remove testcase test_invalid_auth_version_requestWu Wenxiang2013-08-311-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In keystoneclient/middleware/auth_token.py, _choose_api_version(), the codes's logic assume that auth_version in conf is always correct, so the testcase test_invalid_auth_version_request() is incorrect. This patch remove it. Fixes bug #1218881 Change-Id: I6aec0526a6a60eea8d357ec1b44570e7d74da653
* | | Merge "Fix and enable gating on F811"Jenkins2013-08-302-11/+1
|\ \ \
| * | | Fix and enable gating on F811Morgan Fainberg2013-08-293-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes duplicate method definitions and enables gating on F811 Change-Id: Ic360e70d13da864b8b5c10fc5e731b3952b2d2e8
* | | | Merge "Standardize base.py with novaclient"Jenkins2013-08-302-42/+234
|\ \ \ \
| * | | | Standardize base.py with novaclientAlessio Ababilov2013-08-272-42/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main changes: * deprecate api variable in favour of client * add documentation * use to_slug from oslo strutils * remove Python 2.4 support * other small fixes from novaclient Change-Id: Ife54fd3207798ee03101a48bc1cda3b3f62cc5e4
* | | | | Merge "Fixing potential NameErrors"Jenkins2013-08-304-1/+25
|\ \ \ \ \
| * | | | | Fixing potential NameErrorsMorgan Fainberg2013-08-304-1/+25
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing a couple locations that could potentially raise NameErrors instead of intended exceptions. These were found by looking at flake8 F821 (undefined name) errors. Added in unit tests to verify NameErrors would not be raised. Change-Id: I8619cb0be495b814335a5aea23daca025484d3c6
* | | | | Merge "Add apiclient.exceptions hierarchy"Jenkins2013-08-307-163/+533
|\ \ \ \ \
| * | | | | Add apiclient.exceptions hierarchyAlessio Ababilov2013-08-207-163/+533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new apiclient.exceptions hierarchy is more comprehensive and it covers almost all HTTP error status codes. These exceptions can be used in novaclient, keystoneclient, glanceclient, and other client projects thus providing a single inteface. Users can have benefit from OpenStack clients raising exceptions of known classes while now every client has its own classes making difficult to catch, e.g., NotFound for every client. Change-Id: Ia7b25880e0ffca3526525a0f0e77c7e77c4f0076
* | | | | | Merge "Replace auth_token middleware tests with httpretty"Jenkins2013-08-301-407/+322
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | |
| * | | | | Replace auth_token middleware tests with httprettyJamie Lennox2013-08-271-407/+322
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Httpretty will work in exactly the same way regardless of whether we use the httplib or requests library. Convert it so we can modify the middleware and know that our tests are still correct. In this process we also split the tests from having V3 tests override V2 tests, to having a base test class and V2 and V3 seperate overrides. Change-Id: I1bfcecc6ae47a6dd5e76d4ceb8b3941e6ad1089f
* | | | | Merge "python3: Use from future import unicode_literals"Jenkins2013-08-304-320/+330
|\ \ \ \ \