summaryrefslogtreecommitdiff
path: root/keystoneclient/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Use oslo.utils and oslo.serializationSteve Martinelli2014-10-151-3/+3
| | | | | | | Left timeutils and strutils in openstack/common since they are used in openstack/common/apiclient and memorycache. Change-Id: Idb5f09c159d907dfba84cd1f7501f650318af7d9
* Revert "Use oslo.utils"Matt Riedemann2014-08-171-3/+3
| | | | | | | | | This reverts commit 68c2fad55a71ca511ff959e589aa0a3f3dbd4b78. Looks like this broke the stable branches. :( Change-Id: I9d190e211ecfa80d573a6c48c0b485f3506fe947 Closes-Bug: #1357652
* Use oslo.utilsBrant Knudson2014-08-051-3/+3
| | | | | | | keystoneclient was using utility function from oslo-incubator rather than oslo.utils. Change-Id: I2909a2150b9556e54ef88e72358fda1cf8b7cc1c
* Fix tests to use UUID strings rather than ints for IDsBrant Knudson2014-06-021-7/+1
| | | | | | | Several tests were using ints rather than strings for IDs. The ints were changed to UUID strings. Change-Id: I65312509c72078c08ca284e313104e926d9885ba
* Sync with oslo-incubator 2640847Brant Knudson2014-05-051-2/+8
| | | | | | | | | | | | | | | Sync with oslo-incubator commit 2640847e3df7720457103d2111846c27fc8fdcd5 . First, remove the existing code to cleanup: $ rm -r keyestoneclient/openstack/* Then, sync from oslo-incubator: $ python update.py ../python-keystoneclient Change-Id: Ic94906002e0257ffc56245e49890e7ee2f3b4a2a
* fixed typos found by RETF rulesChristian Berendt2014-05-031-1/+1
| | | | | | rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos Change-Id: I67fb3e0d02c931cb7e605ac74ea8272956afa8e1
* Hash functions support different hash algorithmsBrant Knudson2014-04-091-2/+2
| | | | | | | | | | The token hash functions always used MD5. With this change, the hash function can be passed in to the hash functions. SecurityImpact Related-Bug: #1174499 Change-Id: Ia08c2d6252bb034087a244b47d5bcbea7dcfa70b
* Add a positional decoratorJamie Lennox2014-03-241-0/+161
| | | | | | | | | | | | | | | This decorator allow us to define that certain parameters are strictly keyword arguments only, without sacrificing the convenience of having those arguments listed in the function definition. This will mean that we are no longer trapped maintaining backwards compatibility for the order of keyword arguments. The enforcement levels should allow us to start putting warnings on existing functions and strict enforcement on new functions. Partial-Bug: #1295881 Change-Id: Ic0a196874930e7be8362df50594471ab8037c5b2
* Merge "Using common method 'bool_from_string' from oslo strutils"0.6.0Jenkins2014-02-131-7/+0
|\
| * Using common method 'bool_from_string' from oslo strutilsllg82122014-01-221-7/+0
| | | | | | | | | | | | | | | | | | Using common method 'bool_from_string' from oslo strutils to replace utils.string_to_bool. partially implements blueprint common-client-library-2 Change-Id: I22ee9c5a4b48e85606e033ab87d4adb72b665ee6
* | Remove vim headerEric Guo2014-02-081-2/+0
|/ | | | | | | | We don't need vim modelines in each source file, it can be set in user's vimrc. Change-Id: Ic7a61430a0a320ce6b0c4518d9f5d988e35f8aae Closes-Bug: #1229324
* Do not try to call decode() on a text stringCyril Roelandt2014-01-031-1/+1
| | | | | | | This fixes a call to 'isinstance' that only worked on Python2. Closes-Bug: #1265879 Change-Id: I886da95f1ad2a8314de92be8aecb354ee3124e6d
* Merge "Fix typo in keystoneclient"Jenkins2013-12-031-1/+1
|\
| * Fix typo in keystoneclienthuangtianhua2013-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | hypen-separated --> hyphen-separated initialzied --> initialized did't --> didn't sematics --> semantics Change-Id: I79841b76fdf7a267e325b8b9d917900ccb393c02 Closes-Bug: #1254660
* | Encode the text before print it to consoleLei Zhang2013-11-251-2/+3
|/ | | | | Closes-Bug: #1250490 Change-Id: I516806a0f8a136bb66c64dcdcd07cee6d297e619
* python3: Make iteritems py3k compatChuck Short2013-10-101-1/+2
| | | | | | | | Use six.iteritems to replace dictionary.iteritems() on python2 or dictionary.items() on python3. Change-Id: I972f065414e22d287bd7e00ab2c6e754f17afb75 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Decode the non-english username str to unicodeYangLei2013-09-061-0/+2
| | | | | | | | | convert the non-english username str to unicode, then the converted username can match the username from db. Fixes bug #1221576 Change-Id: I9e5f941fe43f081d75750e3f4754e8beea8210db
* Fixing potential NameErrorsMorgan Fainberg2013-08-301-1/+1
| | | | | | | | | | 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 "Fix License Headers and Enable Gating on H102"Jenkins2013-08-291-0/+14
|\
| * Fix License Headers and Enable Gating on H102Morgan Fainberg2013-08-271-0/+14
| | | | | | | | | | | | | | | | Add ASLv2 headers to files that were missing it. fixes bug #1211587 Change-Id: Iede918e1ce84993cee4ecbb2d9c2606627fa412e
* | remove the UUID check for useridsMichael Solberg2013-08-271-4/+2
|/ | | | | Change-Id: I548d8ea292f737a6b5b0dddd8271a0cf690392a0 Fixes: bug #1189933
* Fix and enable Gating on H404Dirk Mueller2013-08-151-7/+6
| | | | | | | Enable gating on the Hacking H404 check - docstring should start with a summary. Change-Id: I80612a15bd11f689e9e9f4dc2ff812138630ddbd
* Fix and enable gating on H402Dirk Mueller2013-07-121-1/+1
| | | | | | Docstring summaries need punctuation. Change-Id: I1b740c13d5fedf9a625ca0807c908f651ee08406
* Use Python 3.x compatible print syntaxDirk Mueller2013-06-231-2/+2
| | | | | | | | Adding an extra pair of braces helps here to let Python 3.x interpret it as print function, while not confusing the Python 2.x print operator. Change-Id: I05af267ecfbcc80753726743fdf82c330350afcb
* Merge "Allow secure user password update."Jenkins2013-05-211-1/+22
|\
| * Allow secure user password update.Pradeep Kilambi2013-05-201-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | This patch allows the ability for user password to be updated via a command prompt so the password doesnt show up in the bash history. The prompted password is asked twice to verify the match. If user cntl-D's the prompt a message appears suggesting user to use either of the options to update the password. Fixes: bug#938315 Change-Id: I4271ae569b922f33c34f9b015a7ee6f760414e39
* | Restore compatibility with PrettyTable < 0.7.2Dirk Mueller2013-04-291-2/+4
|/ | | | | | | | PrettyTable 0.7.2 defaults to print a table even if the resultset is empty. Restore previous behavior to be in line with older prettytable releases. Change-Id: Idd1d0c2c2f41966076517cbc8819ba9a5e097306
* Add name arguments to keystone command.Ken'ichi Ohmichi2013-01-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | This patch adds name arguments to the following subcommands: * role-delete * role-get * service-delete * service-get * tenant-delete * tenant-get * tenant-update * user-delete * user-get * user-password-update * user-role-add * user-role-list * user-role-remove * user-update Fixes bug 1100648 Change-Id: I73c08c0ba553a72ec57ff3a684a00be4ef1294a6
* Fix keystoneclient user-list output orderMasayuki Igawa2012-12-111-2/+4
| | | | | | | | | | | | keystone user-list output is ordered by 'id' now. But this order(by 'id') is not human-friendly. Sorting by 'name' is easy to identify a user. This patch fixes this problem. Fixes bug 1073437 Change-Id: I00b1f46c248544157e09b2efccfff63a1f0426aa
* Add auth-token code to keystoneclient, along with supporting filesHenry Nash2012-11-121-0/+7
| | | | | | | | | | | | | | | This step in the process duplicates the auth-token code to keystoneclient but, for the moment, leaves a copy in its origional location in keystone. Testing for auth-token is also copied across, as is the cms support file. Although no other project will yet pick up the code here in the client, since the paste.ini files haev not yet been updated, it would work if anyone did reference it. Once the client code is in, the next step is to update all the other project paste files, and then finally retire the code from keystone. Change-Id: I88853a373d406020d54b61cba5a5e887380e3b3e
* Merge "updating keystoneclient doc theme"Jenkins2012-10-011-2/+3
|\
| * updating keystoneclient doc themeJoe Heck2012-10-011-2/+3
| | | | | | | | | | | | | | | | | | | | adding in openstack theming enabling last update from git removing old manual references to API, converted entirely to autodoc updated .gitignore fixed docstring warnings and errors Change-Id: Id22ddc446331d52cbf56c3462d8b532fc37f64ac
* | pep8 1.3.1 cleanupJoe Heck2012-09-291-1/+1
|/ | | | Change-Id: Ie4f3747b488829b4c05076bc02c377b5da939e10
* Add wrap option to keystone token-get for humansJoe Gordon2012-09-251-1/+14
| | | | | | | | | When using Keystone PKI, a token ID can be over 3200 chars long. Add optional --wrap option to make 'keystone token-get' human readable fix bug 1053728 Change-Id: Ic3dffa773f9b8fc227a8fe7592a3d87e8e22e510
* Don't call PrettyTable add_row with a tuple.Dan Prince2012-06-291-1/+1
| | | | | | | | | | | | | | | | | | | Updates the print_dict function in utils.py so that it doesn't try to append a tuple with add_row. According to pydoc add_row should get passed a list (not a tuple): Arguments: row - row of data, should be a list with as many elements as the table has fields This fixes a TypeError which can occur with the existing code: TypeError: can only concatenate list (not "tuple") to list Fixes LP Bug #1019409. Change-Id: I16f745afa872106c3bc44c33d88db2a5aacd776c
* Do not display None in pretty tables for fields with no valueVincent Untz2012-06-261-1/+6
| | | | | | | | | Fields that are present but unset in a backend (like the email field for a user created with no email in the KVS backend with the keystone command line) will appear as "None" when listed, instead of as an empty field. Change-Id: I86dc0a204847518e61ba9f6f46d4637d897cfac1
* Remove printtDean Troyer2012-05-071-2/+2
| | | | | | | | prettyprint 0.6 removed printt at the last minute, replace with get_string Fixes bug 995811 Change-Id: Iaabe47c1ae9270d9d00f804388a1837767cb20f1
* Backslash continuations (python-keystoneclient)Zhongyue Luo2012-03-171-2/+2
| | | | | | | | Fixes bug #940023 Backslash continuations removal for python-keystoneclient Change-Id: I816fc39ced20bb8ba8a42d3f07a03da94a76f8ea
* enabled treated as string (bug 953678)Dolph Mathews2012-03-141-0/+3
| | | | Change-Id: I897797b3fb264647c486e6c10eab8edd00eadbcc
* Improve usability of CLI.jakedahn2012-02-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | * Fixes bug #936422 * Fixes bug #932223 * Depends on bcwaldon's review: https://review.openstack.org/#change,4305 * This review proposes making changes outlined in this spreadsheet: https://docs.google.com/spreadsheet/ccc?key=0Ak6TA47h_6fwdGZwRE5WWEJBdEhnckpMTG5RcWFjY3c#gid=0 This cleans up the CLI, normalizing commands and arguments, correcting optional and required arguments and flags. * included https://review.openstack.org/4270 here per Brian's request Note that some commands have changed names to conform to noun-verb form: user-update-password -> user-password-update add-user-role -> user-role-add remove-user-role -> user-role-remove ec2-create-credentials -> ec2-credentials-create ec2-list-credentials -> ec2-credentials-list ec2-delete-credentials -> ec2-credentials-delete token -> token-get Change-Id: I8128fa105a1b8002199211f9e475b1a7a6229b8c
* Support for version and extension discoveryessex-3Ziad Sawalha2012-01-201-0/+21
| | | | | | | | | | | | | | | | | | | | | | | - Supports unauthenticated call to Keystone to discover supported API versions - Added command-line support (usage: keystone discover) - Added client support (keystoneclient.genenric client). Client returns dicts, whereas shell command prints formated output. - Added tests for genenric client - Replicates 'nove discover' in python-novaclient - Starts to address blueprint keystone-client - keystone discover output looks like this: $ keystone discover Keystone found at http://localhost:35357 - supports version v1.0 (DEPRECATED) here http://localhost:35357/v1.0 - supports version v1.1 (CURRENT) here http://localhost:35357/v1.1 - supports version v2.0 (BETA) here http://localhost:35357/v2.0 - and HP-IDM: HP Token Validation Extension - and OS-KSADM: Openstack Keystone Admin - and OS-KSCATALOG: Openstack Keystone Catalog Change-Id: Id16d34dac094c780d36afb3e31c98c318b6071ac
* Initial commit.Gabriel Hurley2011-10-251-0/+69