summaryrefslogtreecommitdiff
path: root/keystoneclient/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* handles keyboard interruptRakesh H S2015-01-281-1/+3
| | | | | | | | | | When an user intentionally provides an keyboard interrupt, keystoneclient throws the entire traceback on to the terminal instead of handling it. keystoneclient will now handle the keyboard interrrupt and provides an crisp message on to the terminal. Change-Id: I1026d259fd0688dd2b950b1bdb135d219da2a60a Closes-Bug: #1367283
* Use oslo.utils and oslo.serializationSteve Martinelli2014-10-151-2/+2
| | | | | | | Left timeutils and strutils in openstack/common since they are used in openstack/common/apiclient and memorycache. Change-Id: Idb5f09c159d907dfba84cd1f7501f650318af7d9
* Do not iterate action.choices if it is noneChristian Berendt2014-09-211-0/+2
| | | | | | | | | Do not iterate action.choices in the method add_arguments in the class OpenStackHelpFormatter if action.choices is not iterable because it is none. Change-Id: Ie7110adb798326e5856fddfb6a7365c663b84998 Closes-Bug: #1372152
* Revert "Use oslo.utils"Matt Riedemann2014-08-171-2/+2
| | | | | | | | | This reverts commit 68c2fad55a71ca511ff959e589aa0a3f3dbd4b78. Looks like this broke the stable branches. :( Change-Id: I9d190e211ecfa80d573a6c48c0b485f3506fe947 Closes-Bug: #1357652
* Use oslo.utilsBrant Knudson2014-08-051-2/+2
| | | | | | | keystoneclient was using utility function from oslo-incubator rather than oslo.utils. Change-Id: I2909a2150b9556e54ef88e72358fda1cf8b7cc1c
* Merge "Calculate a suitable column width for positional arguments"Jenkins2014-07-251-0/+12
|\
| * Calculate a suitable column width for positional argumentsChristian Berendt2014-07-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overwrite the method add_arguments in the class OpenStackHelpFormatter to calculate a suitable columnt width (max_help_position) for the positional arguments. example output before this patch: ec2-credentials-create Create EC2-compatible credentials for user per tenant. ec2-credentials-delete Delete EC2-compatible credentials. ec2-credentials-get Display EC2-compatible credentials. ec2-credentials-list List EC2-compatible credentials for a user. example output after this patch: ec2-credentials-create Create EC2-compatible credentials for user per tenant. ec2-credentials-delete Delete EC2-compatible credentials. ec2-credentials-get Display EC2-compatible credentials. ec2-credentials-list List EC2-compatible credentials for a user. Change-Id: Ibd5d3502022d2afcfd4f57fef9a0bbf23d34b767 Closes-Bug: #1326471
* | Reorder the old compatibility argumentsVishvananda Ishaya2014-07-231-4/+5
|/ | | | | | | | | | | | The registration for --os-cert, os-cacert, and os-key were moved recently into a new method. We need to register the new versions (which have default values set) before the old compatible versions (--os_cert, etc.) that have no default values set or the default values which pull from the env variables (OS_CERT, etc.) get ignored. Change-Id: I4bfb89d02909176be420dd978f8235d94978c494 Closes-bug: 1347957
* Session loading from CLI optionsJamie Lennox2014-07-021-52/+6
| | | | | | | | We will want this to standardize session loading amongst the various CLIs. Implements: blueprint standard-client-params Change-Id: Icc740db6d471a0953b7946e00e6317802b6d2255
* Merge "Added help text for the debug option"Jenkins2014-06-171-1/+4
|\
| * Added help text for the debug optionAndre Naehring2014-06-131-1/+4
| | | | | | | | | | | | | | | | This adds a short help text for --debug on the command line. Prior to this short help text the debug option was hidden. Change-Id: I2e641ec496e596fcc4879855ac750d957522be88 Closes-Bug: #1328813
* | Set the iso8601 log level to WARNliu-sheng2014-06-121-0/+2
|/ | | | | | | | | | | | When use "--debug" parameter in other projects's CLI, it may display useless iso8601 debug info, this is because other client's CLI will call keystoneclient to get token, and keystoneclient will display the iso8601 debug info. set the iso8601 log level to "WARN" to avoid this issue. Change-Id: Id90c86f0e7c8e9ae47ca53667f469d111d6ae373 Closes-bug: #1324470
* CLI always configures loggingBrant Knudson2014-04-161-1/+5
| | | | | | | | | | | | | | When the keystone CLI wound up logging something and --debug wasn't set, a message was printed that 'No handlers could be found for logger <whatever>'. This is because Python logging was only configured when the --debug option was set. This change makes it so that logging is always configured. If --debug is used then the level is DEBUG and if it's not used then the level is WARNING. Change-Id: Ib01d1072acff0d6ede468b0ecab4f871459014ee Closes-Bug: #936404
* Improve help stringsAndreas Jaeger2014-03-071-17/+19
| | | | | | | | | Improve consistency of help strings: * Add "." at end of help strings and descriptions. * Improve descriptions. * Fix capitalization. Change-Id: I291acea95871734a30192c2e4564267326f9c0a7
* Remove redundant default value None for dict.getZhiQiang Fan2014-02-221-1/+1
| | | | | | The default value for dict.get is None, no need to specify again. Change-Id: I9f0204e59bd4c1642586bddfef0c75e0a7730925
* Merge "Adjust import items according to hacking import rule"Jenkins2014-01-301-2/+2
|\
| * Adjust import items according to hacking import ruleEric Guo2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adjust import items and add missing blank lines acording to http://docs.openstack.org/developer/hacking/#imports {{stdlib imports in human alphabetical order}} \n {{third-party lib imports in human alphabetical order}} \n {{project imports in human alphabetical order}} \n \n {{begin your code}} hacking project also enforce some checks for import group. Let make the change in keytoneclient Change-Id: Ic83bd5ee426905588f4a2d555851a9a01fc69f02
* | Fix E12x warnings found by Pep8 1.4.6Dirk Mueller2014-01-231-2/+2
|/ | | | | | | These are missed due to bugs in 1.4.5. Closes-Bug: #1267994 Change-Id: Ic7b37abf757a9b7b0c8306c941949dee93b83e08
* Remove debug specific handlingJamie Lennox2013-12-201-1/+0
| | | | | | | | | | | | | | | | I think debug handling was initially done this way for CLI handling where we wanted to make sure only the correct information was printed to the console. However as logging.basicConfig sets up a stream handler on the root logging object I can't see any purpose to the debug handling in the actual HTTPClient. Further than this it is completely wrong that a client library is messing with it's logging level, this should be handled by an application. The debug flag is maintained and deprecated in HTTPClient and removed from the session object. There has been no release since the addition of session so there is no problem with compatibility. Change-Id: Ib00f3d93d099ed1a9dd25f17121610a7289f0061
* Fix --debug handling in the shellThomas Herve2013-12-091-0/+4
| | | | | | | | This sets the debug level globally on root logger so that every debug calls are logged. Change-Id: Ia8d61f213b2bc6c4bcb1038e7ff6ac0104581b4b Closes-Bug: #1259210
* Merge "Fix typo in keystoneclient"Jenkins2013-12-031-2/+2
|\
| * Fix typo in keystoneclienthuangtianhua2013-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | hypen-separated --> hyphen-separated initialzied --> initialized did't --> didn't sematics --> semantics Change-Id: I79841b76fdf7a267e325b8b9d917900ccb393c02 Closes-Bug: #1254660
* | Warn user about unsupported API versionTristan Cacqueray2013-12-021-0/+4
|/ | | | | | | | Prints a warning when the user tries to use an unsupported API. Also provides a test case to check it still does fall back to 2.0. Change-Id: Idabd150f52d27a9d065cf570f6367459126f98be Closes-bug: #1256987
* Remove SERVICE_TOKEN and SERVICE_ENDPOINT env varsTom Fifield2013-10-191-14/+0
| | | | | | | | | | | | | | | | | | From the code itself: deprecated command line options for essex compatibility. To be removed in Grizzly release cycle. so this patch removes these deprecated env vars that have been moved into the OS_* namespace since Folsom, and updates the tests that probably should have been using the non-deprecated option anyway :) The fact these are still in there are causing some confusion, we actually had a bug report over in docs claiming OS_SERVICE_TOKEN should be replaced with SERVICE_TOKEN! Change-Id: I205748be225dbacc3a528724cf3722d8bf7f8d9f
* Merge "python3: Refactor dict for python2/python3 compat"Jenkins2013-10-161-1/+1
|\
| * python3: Refactor dict for python2/python3 compatChuck Short2013-10-111-1/+1
| | | | | | | | | | | | | | | | | | Python3 changed the behavior of dict.keys such that it is now returns a dict_keys object, which is iterable but not indexable. You can get the python2 result back with an explicit call to list. Change-Id: Ic504d3929398aa82ac87d1735cf4cedea2dfc5d1 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | Replace OpenStack LLC with OpenStack Foundation0.4.1ZhiQiang Fan2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | Some files still use trademark OpenStack LLC in header, which should be changed to OpenStack Foundation. NOTE: tools/install_venv.py is not touched, should sync with oslo Change-Id: I01d4f6b64cf1a152c4e190407799ce7d53de845f Fixes-Bug: #1214176
* | Fixes print error for keystone action with non-English characterschenxiao2013-09-261-1/+3
|/ | | | | | | | | | When processing keystone tenant-delete action with non-English characters, printing the exception traceback will result in a UnicodeEncodeError, so should encode text with safe_encode. Fixes bug #1231472 Change-Id: Ic2599c51513189c132e31aa87d0d15df81802688
* Deprecation warning should be 'pending'Dolph Mathews2013-09-051-3/+3
| | | | | | Until python-openstackclient is ready for more mainstream users. Change-Id: Ic90daa38cd7e8e2f6d6b23c30c3d83935cf6c1a6
* Deprecation warning for the CLIDolph Mathews2013-09-031-1/+5
| | | | | | | | | keystoneclient/shell.py's docstr is rendered by argparse as the description for: $ keystone --help Change-Id: I7355cdf533800086027824fb729eb52cdd8bbc33
* Fix and enable Gating on H404Dirk Mueller2013-08-151-5/+3
| | | | | | | Enable gating on the Hacking H404 check - docstring should start with a summary. Change-Id: I80612a15bd11f689e9e9f4dc2ff812138630ddbd
* flake8: fix alphabetical imports and enable H306Dolph Mathews2013-08-011-2/+2
| | | | Change-Id: I0f4fcc9796e8529e7217dc24abe95660633cad33
* Use Python 3.x compatible print syntaxDirk Mueller2013-06-231-3/+5
| | | | | | | | 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
* Cleanup shell's authentication check.Jamie Lennox2013-06-121-67/+55
| | | | | | | | The original logic for whether shell had enough information to authenticate a user was confusing and will be very difficult to extend to other forms of authentication. Change-Id: I88763a651e494e60070a30f0824505acb09310cb
* Suggestion of a new arguments display in the help, to reflect required onesChristophe Sauthier2013-05-251-1/+2
| | | | | | Fix bug 1182130 Change-Id: I9823d057aff11e7d90c8098ea31cdbf4d709c39f
* help text improvementsAlan Pevec2013-03-081-5/+6
| | | | | | | | | from comments in Ibbc7fab2033d8f037262b465b98d1713579adfc2 v2: synced to the README manpage will be updated in https://review.openstack.org/#/c/20976 Change-Id: I33006a4b935b9272fd99775936a17b3cfd08e294
* Allow request timeout to be specified.Joshua Harlow2013-01-181-3/+28
| | | | | | | | | Add a new cli argument (--timeout) which is by default 600 seconds which will be set in the requests library so that timeouts can occur correctly. Change-Id: I845c55dfb6f6b8345663ccdb5b150a2655f20026
* Make it possible to debug by running module.0.2.1Adam Young2012-12-201-0/+4
| | | | Change-Id: I6ac6f18c4737b19e03a9be07718f8b64d43953c2
* Use requests module for HTTP/HTTPSDean Troyer2012-12-181-19/+13
| | | | | | | | | | | | | * Implement correct certificate verification * Add requests to tools/pip-requires * Fix OS_CACERT env var help text * Add info to README * Rework tests to use requests Pinned requests module to < 1.0 as 1.0.2 is now current in pipi as of 17Dec2012. Change-Id: I120d2c12d6f20ebe2fd7182ec8988cc73f623b80
* modify ca-certificate default valueWu Wenxiang2012-12-151-1/+1
| | | | | | | | modify the value from env[OS_CA_CERT] to env[OS_CACERT] to ensure the help message and codes keep consistent. Fixes: bug 1086278 Change-Id: I0a502069cd3743f812c8145cbce73cd091e57de6
* Rename --no_cache to --os_cache.Dan Prince2012-12-071-7/+6
| | | | | | | | | | | | Some changes to make keystoneclient more backwards compatible by disabling key caching by default. This patch renames the CLI option for when to use the auth token cache to --os-cache and sets it to False by default. It also changes the ENV variable to OS_CACHE (instead of OS_NO_CACHE). Change-Id: I6e549feec6ee7500e398a1eceb5bb44cd7d40347
* bug-1040361: use keyring to store tokensGuang Yee2012-12-041-1/+37
| | | | | | | User can optionally turn off keyring by specifying the --no-cache option. It can also be disabled with environment variable OS-NO-CACHE. Change-Id: I8935260bf7fd6befa14798da9b4d02c81e65c417
* Add --version CLI opt and __version__ module attrBrian Waldon2012-11-281-0/+5
| | | | Change-Id: I8c39a797e79429dd21c5caf093b076a4b1757de0
* Merge "Check for auth URL before password (bug 1076235)"0.2.0Jenkins2012-11-161-5/+5
|\
| * Check for auth URL before password (bug 1076235)Dolph Mathews2012-11-071-5/+5
| | | | | | | | Change-Id: I9cebbf199e8cf3d9dd7de532b30da9f732a6dab1
* | Merge "check creds before token/endpoint (bug 1076233)"Jenkins2012-11-161-14/+14
|\ \ | |/
| * check creds before token/endpoint (bug 1076233)Dolph Mathews2012-11-071-14/+14
| | | | | | | | Change-Id: I09894b3fd94d18b192efca8742b09c3ceaad9895
* | Merge "Update README and CLI help"Jenkins2012-11-161-16/+29
|\ \
| * | Update README and CLI helpDolph Mathews2012-11-141-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | - Provide more verbose help for config options - Suppress deprecated options from help - Updated options & docs in README file Change-Id: Ic0dc2575a15f2cff513c5013266e8f8112e167a2
* | | Merge "Warn about bypassing auth on CLI (bug 1076225)"Jenkins2012-11-161-3/+15
|\ \ \ | |/ / |/| / | |/