summaryrefslogtreecommitdiff
path: root/keystonemiddleware/fixture.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of positional decoratorMorgan Fainberg2017-08-071-3/+0
| | | | | | | | | The positional decorator results in poorly maintainable code in a misguided effort to emulate python3's key-word-arg only notation and functionality. This patch removes keystonemiddleware's dependance on the positional decorator. Change-Id: I1be3b19d08daf18babac66f274787862c6d77a93
* use oslo.log instead of loggingJanonymous2017-01-131-1/+1
| | | | | | | | | The constants of log levels were added in the 1.8 version of the oslo.log library. So we can replace all usage of system logging module with log module from oslo.log Change-Id: I97a1d913b543dc9dbd4d228b04adbdf7ee320df5
* Specify that unknown arguments can be passed to fetch_tokenJamie Lennox2016-10-101-1/+1
| | | | | | | | | | | | | | | | To allow flags to be added to fetch_token we need to ensure that any implementations understand that new information can be passed via the fetch_token function and that they should ignore this information if they don't know how to handle it. This just codifies this information for the equivalent keystone change. Note that the default implementation of fetch_token in AuthProtocol has not been updated as it should know of all flags that could be passed to it. Implements bp: allow-expired Change-Id: I7312beb7cdd9527d959d6b7a94c6bfc6bf3c5952
* Add a fixture method to add your own token dataJamie Lennox2016-06-161-1/+17
| | | | | | | | | | | | The fixture has an add_token_data method which lets you provide common token information, however there is no way to do more adanced tokens through that interface or control the service catalog. Rather than overload the simple method add a more low level method that will let you add a token that you created using keystoneauth1 fixtures yourself. Change-Id: I6351b5980d7d87b00caed351987bf46e30cdf036
* Fix D202: No blank lines allowed after function docstring (PEP257)Dolph Mathews2016-05-171-1/+0
| | | | Change-Id: I634dc4b1dd8fcbab05958d528888325451e2f930
* Use positional instead of keystoneclient versionJamie Lennox2016-02-031-2/+2
| | | | | | | Use the standalone positional library rather than the utils package from keystoneclient. Change-Id: Iaa83e09bb45c766b35755621586700f7cde358b9
* Add project_name to the auth_token fixtureJamie Lennox2016-01-131-4/+6
| | | | | | | | | User and domain options allow you to set the _id and _name values however project_name is missing. Add project_name to the available parameters and enhance the tests to check more variables are set. Closes-Bug: #1533463 Change-Id: Ia19aad0ff9e5c7667f702466e998c44a40f9a673
* Revert "Stop using private keystoneclient functions"Jamie Lennox2016-01-131-0/+2
| | | | | | | | | | | | | This reverts commit 96f6668a27c34c7fd49c8a0df160c0789b0aa6ba. Whilst in theory I agree we don't want to expose this many positional arguments. This is exactly what positional is supposed to be used for. I'm happy to have the debate as to where we can make @positional publically available from but for now (and follow up patch) let's keep it. Change-Id: Idd07e49370597b63c0e49b56843266a7014a0e65
* Stop using private keystoneclient functionsBrant Knudson2015-12-311-2/+0
| | | | | | | | keystoneclient is a library for doing keystone requests. The utility code for handling positional arguments is internal and should not be considered public and used by keystonemiddleware. Change-Id: I7b22d72f24ced08ee064f1e1ffb280e783a55ef7
* Use fixture for mock patchBrant Knudson2015-12-291-6/+2
| | | | | | | fixtures provides a MockPatchObject fixture that encapsulates the necessary cleanup, so use that rather to make the code simpler. Change-Id: Ibb1be532255131729198ff54fbd765e244c3ea8e
* Make BaseAuthProtocol publicJamie Lennox2015-12-101-4/+4
| | | | | | | | | | | | BaseAuthProtocol is the basic validation middleware logic without all the extra hacks, caching, CONF handling etc that has built up around auth_token middleware. It is the basic class that should be reusable with keystone and any newer implementations of middleware. It was private whilst the interfaces stabilized however it has not cheanged in recent releases and should now be available for use. Change-Id: I1e935f5736847941b11495ae086694092baf8b3f
* Use keystoneauth for auth_token fixtureJamie Lennox2015-12-071-1/+1
| | | | | | | | | | | This patch would have been inflight at the same time as the keystoneauth conversion patch. Now that it has merged we should use keystoneauth for the token fixture. Keystoneauth doesn't make @positional public so continue using that from ksc - we have this dependency still anyway. Change-Id: Idb04c805a55d23389fe610e11c45f9138ba1c4ff
* Add a mock-fixture for keystonemiddleware auth_protocolMorgan Fainberg2015-11-261-0/+89
This adds a test-usable fixture that will patch the base protocol to simply return the token data specified rather than reaching out to the keystone server (or lack of keystone server). This is intended to allow projects such as ceilometer to function without needing to patch the internals of keystonemiddleware (memcache interface). Change-Id: I1859ba9e3941eb5400f4cece5f88a5e747836fea