summaryrefslogtreecommitdiff
path: root/keystoneclient/v2_0
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of positional decoratorMorgan Fainberg2017-08-071-2/+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 keystoneclient's dependance on the positional decorator. Change-Id: I9e691cc8b0c04992f4a8dabd67e1b413d3220d23
* Replace six.iteritems() with .items()M V P Nitesh2017-04-031-3/+2
| | | | | | | | | | | | 1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will more readable. 2.In py2, the performance about list should be negligible, see the link [2]. [1] https://wiki.openstack.org/wiki/Python3 [2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Change-Id: I18a6890935ebdbb589269379f21a0dd47d07eb3a
* Use exceptions from KeystoneauthJamie Lennox2016-08-241-1/+1
| | | | | | | | | | | | | As keystoneclient and other services rely more on keystoneauth we should assume that keystoneauth is our base auth library, not keystoneclient and start to default to the objects provided from there. This will make it easier to remove these objects when the time comes. For the session independant parts of keystoneclient we should use the exception names as provided by keystoneauth instead of the aliases in keystoneclient. Change-Id: Ic513046f8398a76c244e145d6cc3117cdf6bb4cd
* Use AUTH_INTERFACE object from keystoneauthJamie Lennox2016-08-242-4/+4
| | | | | | | | | | | | | | As keystoneclient and other services rely more on keystoneauth we should assume that keystoneauth is our base auth library, not keystoneclient and start to default to the objects provided from there. This will make it easier to remove these objects when the time comes. Use the AUTH_INTERFACE special object from keystoneauth in most places. This uses it everywhere that is actually session independant. For example it is not changed within the keystoneclient auth plugins themselves as they are directly compatible with keystoneauth. Change-Id: Ibc1224fca98c852106feb78c624b0b2f22b3a19d
* Do not send user ids as payloadBoris Bobrov2016-07-291-7/+3
| | | | | | | | User ids are already in the URL. Keystone doesn't consume ids in the body. Change-Id: Ie90ebd32fe584dd1b360dc75a828316b1a9aedde Closes-Bug: 1607751
* Fixing D105 PEP257Navid Pustchi2016-05-048-0/+8
| | | | | | | | Currently tox ignores D105. D105: Missing docstring in magic method. This change removes it and make keystoneclient docstring compliant with it. Change-Id: I34dfc164891880425f542f8f8aa3426ec8640c96
* Fixing D202 and D203 PEP257 violation.Navid Pustchi2016-05-046-7/+0
| | | | | | | | | Currently tox ignores D202 and D203. D202: No blank lines allowed after function docstring. D203: 1 blank required before class docstring. This change removes D202 and D203 ignores in tox and fix violations. Change-Id: I97ef88c9cfd56774e47f789cbbcf8ccfe85d7737
* Fixing D204, D205, and D207 PEP257 violation.Navid Pustchi2016-05-046-0/+10
| | | | | | | | | | Currently tox ignores D204, D205, and D207. D204: 1 blank required after class docstring. D205: Blank line required between one-line summary and description. D207: Docstring is under-indented. This change removes D204, D205, and D207 ignores in tox and fix violations. Change-Id: Id20d216fbd7647d468859b960088aac61c582d9b
* Fix D400 PEP257 violation.Navid Pustchi2016-04-231-1/+1
| | | | | | | | Currently tox ignores D400. D400: First line should end with a period. This change removes it and make keystoneclient docstrings compliant with it. Change-Id: I29ecb4c58bb03c0b9a3be0b7a74d18fb06a350f2
* Fix D401 PEP257 violation.Navid Pustchi2016-04-232-3/+3
| | | | | | | | Currently tox ignores D401. 401: First line should be in imperative mood. This change removes it and make keystoneclient docstrings compliant with it. Change-Id: If34ff12d18390b357342cf29f2d116dd3c86a44d
* remove CLI from keystoneclientSteve Martinelli2016-03-101-547/+0
| | | | | | | | | | | | | | | the CLI has been deprecated for a long time, and many docs and install guides recommend using OSC instead of `keystone`. - removes CLI - removes man page from docs - removes CLI tests - removes `bootstrap` from contrib - removes entrypoint from setup.cfg implements bp: remove-cli Change-Id: Icbe15814bc4faf33f513f9654440068795eae807
* Update Client examples to use sessionsBrant Knudson2016-02-281-12/+23
| | | | | | | | | | The docstring examples in the v2_0 and v3 Client classes showed passing username and password. Passing username and password is deprecated in favor of using keystoneauth session. The examples shouldn't use deprecated behavior otherwise we'll never get developers to stop using it. Change-Id: Ia79ed7a02a48553eba8eb83a654c3c75601fa07d
* Missing defaults in the create() method in the v2 ServiceManagerJude Job2016-01-271-1/+1
| | | | | | | | This patch include a new method for testing, without description value. Change-Id: Icd04e4479a341e7691fc562b3e09d5aa41a354e7 Closes-Bug: #1318438
* use positional library instead of utilsSteve Martinelli2016-01-251-2/+3
| | | | | | swap instances of utils.positional with the positional library. Change-Id: Id8a9961e68d287a802f25512fc970829e9feb5c2
* Remove "deprecated" internal methodBrant Knudson2015-12-297-10/+10
| | | | | | | This method says it's deprecated but it's an internal method, so there's no need to deprecate it, just remove it. Change-Id: I916b4a5c9dc2320a4bff7f966fd0c7d5a4957ff9
* Make __all__ immutableDolph Mathews2015-10-011-2/+2
| | | | | | | | | Using a mutable type implies that it's acceptable for the set of publicly-accessible attributes to be mutated at runtime, which defeats their intended purpose of documenting the public interface. Tuples are immutable. Change-Id: Ib3ab93224ba240040b08ece481ef5ba620c3f658
* Deprecate create v2_0 Client without sessionBrant Knudson2015-08-131-0/+14
| | | | | | | | | There was a comment to deprecate creating a v2_0 Client without a session. bp deprecations Change-Id: I71ff64754c8f90d184615eeec558718c11a1794a
* Stop using Manager.apiBrant Knudson2015-07-261-1/+2
| | | | | | | | | 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
* Proper deprecations for modulesBrant Knudson2015-07-261-1/+2
| | | | | | | | | Use debtcollector and update docs for deprecating the apiclient, apiclient.exceptions, middleware.s3_token, and v2_0.shell modules. bp deprecations Change-Id: I84e8eac39a209210542f19de08d4c3de15a9dcac
* Add get_token_data to token CRUDJamie Lennox2015-07-151-4/+14
| | | | | | | | | | | | | 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
* Switch from oslo.utils to oslo_utilsBrant Knudson2015-01-311-1/+1
| | | | | | | | oslo_utils moved out of the oslo namespace. bp drop-namespace-packages Change-Id: I72e67dc1f649ba137dd06f5ab7133858c6abd67d
* Add validate token for v2.0Brant Knudson2015-01-281-0/+32
| | | | | | | | There was no API to validate a token using v2.0. bp auth-token-use-client Change-Id: I22223f546e750457a0c9d851ef389f7983e5c205
* Merge "Add fetch revocations for v2.0"Jenkins2015-01-281-0/+10
|\
| * Add fetch revocations for v2.0Brant Knudson2014-12-161-0/+10
| | | | | | | | | | | | | | | | There was no API to fetch revocations using v2.0. bp auth-token-use-client Change-Id: Ica5aae5b9075180223268fb6b2ef11e00dfd057f
* | Merge "Updated service name to be optional in CLI"Jenkins2015-01-271-2/+2
|\ \
| * | Updated service name to be optional in CLIlin-hua-cheng2014-12-271-2/+2
| |/ | | | | | | | | | | | | | | | | Service name is optional in the API, updating the CLI for consistency. Change-Id: I94f0eb248a39d2f59edd00a5f90125a5c42525ed Closes-Bug: #1393977 Closes-Bug: #1404073
* | Correct failures for check W292Brant Knudson2015-01-131-1/+1
| | | | | | | | | | | | | | The new W292 "no newline at end of file" rule was failing and ignored. Now it's enforced. Change-Id: I71ba57a056b5b0c772482f5bd80f3e05dffa54d2
* | Add get certificates for v2.0Brant Knudson2014-12-292-0/+44
|/ | | | | | | | There was no API to fetch the PKI certificates using v2.0. bp auth-token-use-client Change-Id: I2b6f9af8b843d72271234fd4d26963b75a25a086
* Make keystoneclient use an adapterJamie Lennox2014-11-212-9/+11
| | | | | | | | | | | | | | | | | | | | | Apart from making keystoneclient follow the same patterns of using an adapter that we are trying to push onto other clients this severs the cyclical dependency between managers and the client object. There are a few changes that have had to be rolled into one to make the transition work. These can't be separated unfortunately as they are interdependent. * managers are now passed the adapter instead of the client. They therefore don't have reference to the other managers on the client. * The adapter has been subclassed to provide user_id as there are some managers that require user_id be provided for changing passwords etc. * client.auth_url has been replaced with a call to get_endpoint which is supported by the adapter. * management=True has been removed from all the managers and they now correctly set the interface they want. Change-Id: I49fbd50571f0c1484e1cbc3dcb2159d25b21b1bc
* Merge "Cleanup docs - raises class"Jenkins2014-11-181-2/+2
|\
| * Cleanup docs - raises classBrant Knudson2014-10-181-2/+2
| | | | | | | | | | | | | | | | | | The argument to the :raises: directive is the class name. If the class name is a valid reference it's rendered as a link to the class. This change cleans up the :raises: directives to use the reference correctly and use a valid class reference. Change-Id: I84188b60de0ab4c6b5b2fb5a203c43bfde094707
* | I18nBrant Knudson2014-10-283-26/+31
| | | | | | | | | | | | | | | | | | | | | | Keystoneclient didn't provide translated messages. With this change, the messages are marked for translation. DocImpact Implements: blueprint keystoneclient-i18n Change-Id: I85263a71671a1dffed524185266e6bb7ae559630
* | Correct use of noqaBrant Knudson2014-10-271-2/+1
| | | | | | | | | | | | | | The use of "#flake8: noqa" disables hacking checks for the entire file. Switched to use of "# noqa" and fixed hacking problems. Change-Id: I18785fb18bdce88e61e2451960e55aed0863c285
* | Use oslo.utils and oslo.serializationSteve Martinelli2014-10-151-1/+1
|/ | | | | | | Left timeutils and strutils in openstack/common since they are used in openstack/common/apiclient and memorycache. Change-Id: Idb5f09c159d907dfba84cd1f7501f650318af7d9
* Fix a doc_string errorjun xie2014-09-181-1/+1
| | | | Change-Id: Ib2ab829ed777a4f2fb13ec7426dffef99a4118ab
* Revert "Use oslo.utils"Matt Riedemann2014-08-171-1/+1
| | | | | | | | | This reverts commit 68c2fad55a71ca511ff959e589aa0a3f3dbd4b78. Looks like this broke the stable branches. :( Change-Id: I9d190e211ecfa80d573a6c48c0b485f3506fe947 Closes-Bug: #1357652
* Merge "Use oslo.utils"Jenkins2014-08-151-1/+1
|\
| * Use oslo.utilsBrant Knudson2014-08-051-1/+1
| | | | | | | | | | | | | | keystoneclient was using utility function from oslo-incubator rather than oslo.utils. Change-Id: I2909a2150b9556e54ef88e72358fda1cf8b7cc1c
* | Change unscoped token fallback to be session awareJamie Lennox2014-08-122-17/+27
|/ | | | | | | | | | | | The existing way of sending requests to the auth_url was to override the management_url for the duration of a single call. Aside from being ugly, this won't work with session objects where the management_url is ignored. The tests for this behaviour have been previously merged to ensure that the before and after behaviour remains unchanged. Change-Id: I879adcb25dd373ab4a7b77b6539974e22220aad4
* Don't log sensitive auth dataJamie Lennox2014-07-242-4/+5
| | | | | | | | | | | | | | | | Add the ability to turn off logging from the session object and then handle logging of auth requests within their own sections. This is a very simplistic ability to completely disable logging. Logging more filtered debugging can be added later. This new ability is utilized in this patch to prevent logging of requests that include passwords. This covers authenticate, password change, and user update requests that include passwords. SecurityImpact Change-Id: I3dabb94ab047e86b8730e73416c1a1c333688489 Closes-Bug: #1004114 Closes-Bug: #1327019
* Merge "Pass user and roles manager to tenant manager"Jenkins2014-07-112-14/+20
|\
| * Pass user and roles manager to tenant managerJamie Lennox2014-07-042-14/+20
| | | | | | | | | | | | | | | | | | | | | | This is part of breaking a cyclical dependency where the client has a reference to the manager but the manager has a reference to the client. To be able to pass in an adapter to the managers we need to remove the client specific usages of manager, including referring to other managers via the client. Change-Id: Ie238dda046ec8bbdaca749a691df3da63f5a9a63
* | Merge "Pass roles manager to user manager"Jenkins2014-07-112-3/+7
|\ \ | |/
| * Pass roles manager to user managerJamie Lennox2014-07-042-3/+7
| | | | | | | | | | | | | | | | | | | | | | This is part of breaking a cyclical dependency where the client has a reference to the manager but the manager has a reference to the client. To be able to pass in an adapter to the managers we need to remove the client specific usages of manager, including referring to other managers via the client. Change-Id: I8fba7ece05e33d519eb31994a072275598ba76ea
* | Merge "Keystoneclient create user API should have optional password."Jenkins2014-07-071-1/+2
|\ \ | |/ |/|
| * Keystoneclient create user API should have optional password.Juan Manuel Olle2014-07-011-1/+2
| | | | | | | | | | | | | | | | Password is optional in Keystone service. The create user API in keystoneclient should have password None as default value. Change-Id: Ic72867c9b86ca65e3237786e35bcb5bd44f5f053 Closes-Bug: #1273988
* | Make parameters in EndpointManager optionalHarry Rybacki2014-06-261-1/+2
| | | | | | | | | | | | | | | | Change adminurl and internalurl parameters in EndpointManager create() to optional parameters. Change-Id: I490e35b89f7ae7c6cdbced6ba8d3b82d5132c19d Closes-Bug: #1318436
* | Update keystoneclient code to account for hacking 0.9.2Steve Martinelli2014-06-193-4/+4
|/ | | | | | | | | | | | | | | | | | Fixed most of the errors reported back from hacking 0.9.2. Specifically: - E128 continuation line under-indented for visual indent - E251 unexpected spaces around keyword / parameter equals - E265 block comment should start with '# ' - H305 imports not grouped correctly - H307 like imports should be grouped together - H402 one line docstring needs punctuation - H904 Wrap long lines in parentheses instead of a backslash But opted to ignore the following for now: - E122: continuation line missing indentation or outdented - H405: multi line docstring summary not separated with an empty line Change-Id: Ib8e698d85fd598fa91435538657361a1f695ce89
* Remove _factory methods from auth pluginsJamie Lennox2014-06-091-8/+16
| | | | | | | | | | | | | This was a simple factory that would give compatibility for the existing client to load up the appropriate auth plugin. A more robust plugin loading mechanism is coming for this and having it available encourages other auth plugins that they should be using that where they shouldn't. Just remove it from the auth plugin class. It shouldn't be used by anyone else so lets keep it on the client objects. Blueprint: plugin-params Change-Id: I0618b646f302300d41c7dd7153a1c0bdc237a745
* Fix a misspelling in a commentMatt Fischer2014-05-281-1/+1
| | | | Change-Id: If049cef6def1249fd0f70e16385aa7a4167edbde