summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/policy.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.identityStephen Finucane2023-05-101-12/+28
| | | | | | | | | | Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I2eeade1ce6653be8e9179ecc40105182c5ff5f16 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Replace six.iteritems() with .items()lihaijing2020-01-091-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 Co-Authored-By: Akihiro Motoki <amotoki@gmail.com> Change-Id: I4b9edb326444264c0f6c4ad281acaac356a07e85 Implements: blueprint replace-iteritems-with-items
* Handle log message interpolation by the logger in identity/Gábor Antal2017-02-131-2/+1
| | | | | | | | | | According to OpenStack Guideline[1], logged string message should be interpolated by the logger. [1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages Change-Id: I1d6588093616099a9eef0947c09e038b9e53493a Related-Bug: #1596829
* translate all command help strings3.4.0Steve Martinelli2016-11-171-5/+5
| | | | | | | | | | | | | | Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
* Support bulk deletion for delete commands in identityv3Huanxuan Ao2016-07-191-3/+24
| | | | | | | | | | | | | | | | | | | | | | | Support bulk deletion for delete commands in the list below identity/v3/consumer identity/v3/credential identity/v3/domain identity/v3/ec2creds identity/v3/endpoint identity/v3/federation_protocol identity/v3/identity_provider identity/v3/mapping identity/v3/policy identity/v3/region identity/v3/service_provider identity/v3/service The unit test in identityv3 need to be refactored, so I add some functional tests instead. I will add all unit tests at one time after the refactor completed. Change-Id: I82367570f59817b47c87b6c7bfeae95ccfe5c50e Closes-Bug: #1592906
* Make set/unset commands pass normally when nothing specified in identityv3Huanxuan Ao2016-07-141-5/+0
| | | | | Change-Id: I554b41969f96b62a2c6d37024caa56b1441d5ed1 Partial-bug: #1588588
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: utilsDean Troyer2016-06-131-2/+3
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* Fix i18n support problems in identityTang Chen2016-06-071-10/+11
| | | | | Change-Id: I3b48d17850343051239b5b69e8b890dba32d3ac8 Partial-bug: #1574965
* take_action() method from command.Command shouldn't returnMohan Muppidi2016-02-291-2/+0
| | | | | | | | | | | | command.Command and command.Showone are base classes implemented in cliff framework. Showone extends Command to allow take_action() to return data to be formatted using a user-selectable formatter. Most of the classes which are extended from Command in openstackclient/identity/v3/ in some cases return data or return nothing where it is not necessary, this commit fixes most of them. Change-Id: I84c72ea4d6680f8bdbef5449316dd9a8af8c8286 Closes-Bug: 1550892
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-23/+4
| | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-011-5/+5
| | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
* Command doc: policySteve Martinelli2015-01-121-29/+34
| | | | | | | Also tweaked a bunch of the code to not show 'blob', but 'rules' instead. Change-Id: I6db798d272ff416a77f169c0e912d2096fa02504
* Remove 'links' section from several v3 Identity objectsSteve Martinelli2014-10-111-0/+2
| | | | | | | | | | | | | | | The links field in the returned objects from the v3 Identity API aren't really useful, so let's remove them. Managed to remove most of them from the core API. I'll likely remove the extension/contribution (oauth/federation) related ones in another patch. Also in this patch the code for setting services and projects was changed. Though not incorrect, it was not needed to copy the entire returned object, we should just need to pass in the fields we want to update. Change-Id: I164ca9ad8b28fa10b291e9115ef40753e387c547
* replace string format arguments with function parametersChristian Berendt2014-05-201-5/+5
| | | | | | | | There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
* Merge "Pass arguments to v3 keystoneclient by kwarg"Jenkins2014-04-171-1/+1
|\
| * Pass arguments to v3 keystoneclient by kwargJamie Lennox2014-04-041-1/+1
| | | | | | | | | | | | | | | | | | Keystoneclient has added the positional decorator which emits a warning if arguments aren't passed by keyword. This means we are getting warnings in certain places in openstackclient. Change-Id: Ic5446cd6f122cbb56fce543011386d53bc31fe18 Closes-Bug: #1302199
* | move read_blob_file_contents to utilsSteve Martinelli2014-04-141-8/+2
|/ | | | | | | | Thinking ahead, a few other upcoming keystone features could benefit from reading contents from a file. Thus, moving the function from policy to utils. Change-Id: I713ab0e5a00c949ad996daf83b775a7c19044888
* Fix some help stringsAndreas Jaeger2014-02-211-1/+1
| | | | | | | | | | This fixes some errors and inconsistencies I found reviewing the help strings: * Capitalize help strings * Add missing space between words (in multi-line strings) * Improve wording Change-Id: I2fb31ab4191c330146e31c1a9651115a6657769a
* Begin Python 3 compatabilityDean Troyer2013-07-291-3/+4
| | | | | | | | | | | * use six.iteritems() * replace basestring with six.string_types * convert print statements to functions (they're all debugging and should be removed eventually anyway) * clean up OpenStack copyright: LLC -> Foundation Change-Id: Icb14212bcb408e63816bfec3922a697bc1a6c946
* Remove api = apiName calls from each methodSteve Martinelli2013-07-121-5/+0
| | | | | | | | | | | As discussed in https://review.openstack.org/#/c/36352/ for each command, we were setting api = identity or volume... etc, this was for an old way of calling commands that are is no longer used. Also removed openstackclient/common/command.py Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
* Add policy to identity v3Steve Martinelli2013-03-261-0/+186
use file for data blobs add create/set/delete/show/list policy for v3 Change-Id: I5f68ef89dfb2241ea1aca00736ee6df5f6f03a9b