summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v2_0
Commit message (Collapse)AuthorAgeFilesLines
* Replace six.iteritems() with .items()lihaijing2020-01-098-25/+17
| | | | | | | | | | | | | | | | 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
* Merge "Use cliff formattable columns in identity commands"Zuul2019-06-233-27/+51
|\
| * Use cliff formattable columns in identity commandsAkihiro Motoki2019-06-223-27/+51
| | | | | | | | | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: Ia13314a012b3a7363ffb24a13c79c6ecdff1ed7b
* | Remove deprecated identity commands and argsSean McGinnis2019-05-192-172/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following were deprecated over two years ago and can now be removed/changed: * Remove ``service create`` option ``--type`` * Remove ``role list`` options ``--project`` and ``--user`` * Remove ``user role list`` command These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I29e2fc9516dffbfd83eef0bc91e834dde99b4105 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Fix RuntimeError when showing project which has extra propertiesYang Youseok2018-06-091-1/+1
|/ | | | | | | | If you use python3, items() returns iterator which is not allowed to remove item during iteration. Fix to iterate by copied list. Change-Id: I64c037d04e2b127d8f19f56cab65122af89a7200 Closes-Bug: 1740232
* Merge "Add sort support to project list"Jenkins2017-03-161-0/+9
|\
| * Add sort support to project listTom Jose Kalapura2017-03-081-0/+9
| | | | | | | | | | | | | | | | Add sort support to project list by sorting items in the client side. By default list will be sorted by name. Change-Id: I00011406846b4003aff075eeeb88ac18fa5e2820 Closes-Bug: #1596818
* | Handle log message interpolation by the logger in identity/Gábor Antal2017-02-133-6/+6
| | | | | | | | | | | | | | | | | | | | 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
* | Error handling for delete commands in identityHuanxuan Ao2017-01-033-15/+56
| | | | | | | | | | | | | | | | | | Add missing multi deletion error handling for identity delete commands. All delete commands in identity support error handling now. Change-Id: I05626dcb5e516a423d610906347b02236ba7eeaf
* | translate all command help strings3.4.0Steve Martinelli2016-11-179-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Warning for empty password set for user create/setqtang2016-10-191-0/+8
|/ | | | | | | Raise warning when empty password set for user Change-Id: If03516f3f1290e4c329fe3d1277dee0512de0410 Closes-Bug: #1607959
* format token expires time to prevent json loading datetime dataSteve Martinelli2016-09-051-1/+3
| | | | | | | | | | | | When output to shell, the token issue time is fine; however when selecting the json formatter (via the --format json) option, an exception is raised when formatting the dataetime data. Rather than pass in the datetime data, we should format the data with the ISO 8601 formatting. Closes-Bug: 1619937 Change-Id: Iffebb2d5413fabfd283dfa94fc560fc37270f9dd
* Fix up last-minute imports to use osc-libDean Troyer2016-08-181-3/+4
| | | | Change-Id: I1ed2983cf574ebd565eeac4f8199fbc3a2e29c8e
* Add assignment list to v2 identity and deprecate alternate listingHenry Nash2016-07-222-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | The current identity role list command (both v2 and v3) is overloaded with listing roles as well as assignments (if you provide user, group, project or domain options). This is in addition to the v3 assignment list command designed for this purpose. This overloading complicates the fact that roles can now be domain specific (i.e. have a domain attribute), so the command 'role list --domain <domain-name' will soon become ambigious (this is in a follow on patch). This patch: - Adds a v2 assignments list, with support for pulling the user and project from the auth credentials - For comapability, adds the same auth support to the existing v3 assignments list - Deprecates the use of role list and user role list to list assignments Change-Id: I65bafdef4f8c89e863dab101369d0d629fa818b8 Partial-Bug: 1605774
* Remove execute permission on a few filesSongmingYan2016-07-223-0/+0
| | | | | | | Some files have execute permission unnecessarily. Change them from 755 to 644. Change-Id: I471ebd1c3d123ad4a7376f7f5996f53f8c2d9b0b
* Modify some help and error messages in ec2creds identityv2Huanxuan Ao2016-07-121-2/+2
| | | | | | | | Usually we use "(s)" to show about multi deletion in help message. In addition, I think "EC2 credentials" is better than "EC2 keys" in the error message. Change-Id: I6a6461291542701d87a55d9ea0ea1fda6db04601
* Correct reraising of exceptionqinchunhua2016-07-073-10/+10
| | | | | | | | | When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: I5fb6dea5da7fb6e1e2b339a713c7d37f8c99e407
* Support multi-delete for commands in identity V2sunyajing2016-06-233-12/+71
| | | | | | | | Commands are "ec2 credentials delete", "service delete", "endpoint delete". Also update their unit tests and functional tests. Partial-Bug: #1592906 Change-Id: I1a0b7160b803a523646d09d030e6f112c81c4c24
* Standardize logger usage of catalog in identitysunyajing2016-06-231-2/+6
| | | | | Change-Id: I5307f949b3a350e41840a4a5c191ceacf1b3b291 Partially-Implements: blueprint log-usage
* Merge "Standardize logger usage"Jenkins2016-06-204-5/+24
|\
| * Standardize logger usageTang Chen2016-06-204-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use file logger for all command specific logs. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html After this patch, all self.log and self.app.log will be standardized to LOG(). NOTE: In shell.py, we got the log in class OpenStackShell, which is also known as self.app.log in other classes. This logger is used to record non-command-specific logs. So we leave it as-is. Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896 Implements: blueprint log-usage
* | Modify help msg and docs in identitysunyajing2016-06-172-2/+2
|/ | | | | | | | Migrate 'change', 'update' to 'modify', migrate 'user to delete' to 'user(s) to delete', migrate '(name or ID)' to '(type, name or ID)'. Change-Id: Ie425e178bb5ddf773e6e793fcd91c78e9c4a5053
* Merge "Make set/unset command in identity and image pass normally when ↵Jenkins2016-06-172-25/+5
|\ | | | | | | nothing specified"
| * Make set/unset command in identity and image pass normally when nothing ↵sunyajing2016-06-172-25/+5
| | | | | | | | | | | | | | | | | | specified Also update its unit tests. Change-Id: I82b90658b0d4247cdc9a650f14aceda640a32059 Partial-bug: #1588588
* | Merge "Fix help msg of identity endpoint"Jenkins2016-06-161-2/+2
|\ \ | |/ |/|
| * Fix help msg of identity endpointsunyajing2016-06-161-2/+2
| | | | | | | | | | | | | | <service> argument of `endpoint create` command doesn't mean `new endpoint service`, but an existent service that the new endpoint attached to. Change-Id: I846fdb501bdea14499f42288186f375a3b2b5951
* | osc-lib: commandDean Troyer2016-06-138-9/+9
| | | | | | | | | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* | osc-lib: parseractionsDean Troyer2016-06-131-1/+1
| | | | | | | | | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* | osc-lib: utilsDean Troyer2016-06-137-11/+9
| | | | | | | | | | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* | osc-lib: exceptionsDean Troyer2016-06-133-5/+5
| | | | | | | | | | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* | Moving authentication from keystoneclient to keystoneauthNavid Pustchi2016-06-093-27/+42
|/ | | | | | | | | | | | | | | | | Currently OpenStackClient uses keystoneclient for authentication. This change will update OpenStackClient to use keystoneauth for authentication. All dependant test have been updated. Updating how auth_ref is set in the tests to use KSA fixtures had some racy side-effects. The user_role_list tests failed when they picked up an auth_ref that was a fixture. This exposed a weakness in ListUserRole that needed to be fixed at the same time re handling of unscoped tokens and options. Change-Id: I4ddb2dbbb3bf2ab37494468eaf65cef9213a6e00 Closes-Bug: 1533369
* Fix i18n support problems in identityTang Chen2016-06-075-11/+14
| | | | | Change-Id: I3b48d17850343051239b5b69e8b890dba32d3ac8 Partial-bug: #1574965
* Merge "fix endpoint show help"Jenkins2016-05-261-2/+3
|\
| * fix endpoint show helpsunyajing2016-05-261-2/+3
| | | | | | | | | | | | endpoint show command can also work on service name or type or ID option Change-Id: I43c8df4bc093d4130cf33fd2520736ce9077dc82
* | keystone: fix catalog output when region is unsetJulien Danjou2016-05-251-1/+3
| | | | | | | | | | | | | | | | | | | | If no region is set in Keystone, null is deserialized as None and the region has None has value, which triggers a type error when building the output string. This patch fixes that. Change-Id: I7637dc2595655cf452f38308f99fe66ac782e16d
* | remove #noqa from i18n importsSteve Martinelli2016-05-138-8/+8
|/ | | | | | hacking checks no longer fail on `import _` Change-Id: Idd60f0a0e71e5081691eacb39e5091ab08fcce6d
* Trivial: Remove useless returnTang Chen2016-03-076-9/+0
| | | | | | If a function returns nothing, do not add return in the end. Change-Id: I298b8717462f68d3076a1619d674775be2a94c42
* Support unscoped token requestguang-yee2016-02-191-1/+5
| | | | | | | | Make scope check optional for the "token issue" command as unscoped token is a valid Keystone V2/V3 API. Change-Id: Ie1cded4dbfdafd3a78c0ebdf89e3f66762509930 Closes-Bug: #1543214
* log take_action parameters in a single placeAkihiro Motoki2016-02-028-161/+31
| | | | | | | | | | | | 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
* Implementation for project unset cmd for python-openstackclient.Jude Job2016-01-041-0/+56
| | | | | | | | | This patch introduces a unit test class TestProjectUnset for testing unset cmd. Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Change-Id: Ib4a414d2313e3d37e48d1cb3639f064231aec508 Closes-Bug: #1486597
* Switch to ksa SessionDean Troyer2015-12-023-8/+8
| | | | | | | | * Change session imports to keystoneauth1 * Change keystoneclient.exception imports to keystoneauth1 * Change exceptions raised from internal API from keystoneclient to openstack.common Change-Id: I046d89f561d6fe04baae53726f9749d2e7fe2056
* Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-018-32/+33
| | | | | | | | | 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
* only return endpoints that have urlGuojian Shao2015-07-161-2/+4
| | | | | Change-Id: I97a502252c0c377fce573e92b83c0122812f6f80 Closes-Bug: #1474656
* openstack catalog list always returns publicURL for internalURL and adminURLMartin Schuppert2015-07-081-1/+1
| | | | | | | | With this change 'openstack catalog list' returns the correspoding URL for publicURL, internalURL and adminURL in _format_endpoints . Change-Id: I5d946c9d70a2d3c22a7cc77067fec8e2e9aa4940 Closes-Bug: 1472629
* Clean up ec2 credentials help textDean Troyer2015-06-031-7/+11
| | | | | | | Re-sync the text in v2 and v3 help and the docs Depends-On: If4ac5356ade8cff347bb9eb9f88d1ace82bb7275 Change-Id: Iabef2f271fcf46748295c29713fea1811dcab29c
* Fix catalog list when region name is absentDean Troyer2015-03-061-1/+2
| | | | | | | | Some service catalogs in the wild have services without region names defined. Let's be nice and stuff in a default value indicating this state. Closes-Bug: #1429211 Change-Id: I3ebe2534dc6e3438aaeddc7757fb2db4117eae4b
* Fix identity v2 catalog listTerryHowe2015-03-041-1/+2
| | | | | | | The v2 catalog list was only printing the last endpoint in the catalog. Change-Id: I5401a11eedb3be1513c86261329de50c8ad82720
* Update service clist commands for v2 and v3Dean Troyer2015-01-161-7/+7
| | | | | | | | | | | | Changes to the 'service list' commands for Identity v2 and v3: * Document support for --long * Add Description to v3 output with --long * v3 output is now (ID, Name, Type), with (Description, Enabled) added with --long * Change v2 output to match v3 output, with the absense of Enabled. * Update doc to match Closes-Bug: #1411337 Change-Id: I999e3df22f61350cdeba63bbb7d01145c2ffeeaf
* Merge "Rework role list v2 for --user and --project"Jenkins2015-01-131-2/+67
|\
| * Rework role list v2 for --user and --projectSteve Martinelli2015-01-101-2/+67
| | | | | | | | | | | | | | | | | | `os user role list` does the same as v3's `os role list`. We should rework v2's `role list` to basically call `os user role list` under the covers. Closes-Bug: #1409179 Change-Id: I9839f6be139d6a6a3f6bbf79957e218dd8e03fe3