summaryrefslogtreecommitdiff
path: root/heatclient/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove sixTakashi Kajinami2022-05-091-2/+1
| | | | | | | This library no longer supports Python 2, thus usage of six can be removed. Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
* Stop to use the __future__ module.Hervé Beraud2020-06-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: Ifbca4f0b72663e026a92061c213e728cf755772c
* Update hacking for Python3ussuri-em2.1.0Andreas Jaeger2020-03-311-0/+1
| | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
* Merge "Trivial:remove unused code"Jenkins2017-02-071-1/+0
|\
| * Trivial:remove unused codeshizhihui2016-11-201-1/+0
| | | | | | | | Change-Id: I8eac6869f0fe05ca348452e67d2b4855f11fbe60
* | Merge "Make method import_versioned_module work"Jenkins2017-01-101-1/+2
|\ \
| * | Make method import_versioned_module workshizhihui2016-11-091-1/+2
| |/ | | | | | | | | | | | | | | | | | | Oslo.utils 3.17 provides similar function, just use it. For more information: [1] http://docs.openstack.org/developer/oslo.utils/history.html Closes-Bug: #1627313 Change-Id: Ie738e910cc72535fe97295d7e118eda2412ecd15
* | Make sure the --heat-url option is respected, part 2Jason Dunsmore2017-01-061-1/+2
|/ | | | | | | | | | If the endpoint is passed in, make sure keystone uses it instead of looking up the endpoint in the auth plugin. Original fix: 9e28993ee6fb814f014bc73a5611681ca3bb2c65 Closes-Bug: #1654344 Change-Id: I4b42ab9d87c790eef1953f995260b6b232a63445
* Graduate to oslo.i18n and cleanup incubator usageChuck Short2016-11-081-1/+1
| | | | | | | | | Graduate from Oslo Incubator to oslo.i18n library. Cleanup of unused Oslo Incubator utils. Added optional enable_lazy() usage. Change-Id: I5ec02477f3f52f4d7097669120581e82cced3748 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Don't use endpoint_override with sessiontamilhce2016-09-091-10/+4
| | | | | | | | | | | | | We should not use endpoint_override by default and rather use service_type with session. This also refactors some of the associated code. However, if one wants to override the endpoint they can pass endpoint_override to the client constructor along with session. Change-Id: I7c27d8ff827de3b4bb3e70457c0b6a3f47b6d7bb Co-Authored-By: Rabi Mishra <ramishra@redhat.com> Closes-Bug: #1621505
* Remove redundant auth discoveryrabi2016-05-181-114/+23
| | | | | | | This removes the redundant auth discovery and use generic auth plugins. Change-Id: Ibf96a188363467e74879018e31c0d8729c6cdeee
* switch to keystoneauthSteve Martinelli2016-05-181-7/+6
| | | | | | | | | move heatclient to keystoneauth as keystoneclient's auth session, plugins and adapter code has been deprecated [1]. [1] http://docs.openstack.org/releasenotes/python-keystoneclient/mitaka.html#deprecation-notes Change-Id: Iedd7ceb97d39ab3ecccf8786aad8b5f45d15175e
* Support OS_KEY/OS_CERT environment variablescedric.brandily2016-04-011-0/+2
| | | | | | | | | | | heatclient allows to provide client certificate/key using --os-key/cert options but not using usual environment variables. This change uses OS_KEY/OS_CERT environment variables as default values for client certificate/key. Closes-Bug: #1564930 Change-Id: Ie7a4dce2a9b0e498ee3b9f6cb36a8988ea3a13fc
* Misspelling in messageHerman Ge2016-01-131-1/+1
| | | | | | | | | | | | | | Misspelling in following message: "# refactor this code once this functionality is avaible in" Should be: "# refactor this code once this functionality is available in" Totally 1 occurrence in python-heatclient base code. Change-Id: Icc6148125e63bbd16811dad77718267dc8092605
* use keystoneclient exceptions instead of oslo-incubator codeSteve Martinelli2015-12-271-1/+1
| | | | | | | | | | depending on any oslo-incubator code from another project is dangerous. keystoneclient makes its exceptions public and it's not recommended to use any code from keystoneclient.openstack.common.apiclient since it's maintained by oslo-incubator. Change-Id: Id1f5d1ddc5b297c9547c6d16d3ee70496c7852f4
* Enable pep8 E126 testricolin2015-12-011-4/+2
| | | | | | Enable E126 continuation line over-indented for hanging indent. Change-Id: I12ca2d8d610574dfcd528b0e613ec0328f4fb45e
* Enable pep8 E128 testricolin2015-12-011-54/+53
| | | | | | Enable E128 continuation line under-indented for visual indent Change-Id: If662f729e7aacdd439b38c5e5630d74afefebcc6
* Migrate to new oslo_xxx namespacetengqm2015-03-231-3/+2
| | | | | | | | This patch migrates the namespace of oslo packages from oslo.foobar to oslo_foobar. The oslo_incubator code need to be resynced, which will be submitted in another patch. Change-Id: Id77207750556b71f20797a0ee6f2cafd62ea30e1
* Fix non-working endpoint type argumentAdrien Vergé2015-02-161-2/+2
| | | | | | | | | | | | Whatever the endpoint type passed with --os-endpoint-type or OS_ENDPOINT_TYPE, the publicURL is always used (instead of, for instance, adminURL or internalURL). This patch passes the user-defined endpoint type to keystoneclient's get_endpoint() so that the correct endpoint is chosen from the catalog. Change-Id: Iee9f0e576d5fba3b4bf1dd267dfee233b0a7ea8f Closes-Bug: #1422487
* Add transtlation markers for error messagesTetiana Lashchova2014-12-101-14/+14
| | | | | Change-Id: Ic44073880b7e65b6530a7314a5a2d65eb4aadb09 Partial-Bug: #1269930
* Add transtlation markers for help messagesTetiana Lashchova2014-12-101-58/+106
| | | | | Change-Id: I20a487952b8c4e4cc74a69e731e84672daff22e4 Partial-Bug: #1269930
* Remove remaining deprecated oslo-incubator modulesSteven Hardy2014-12-041-1/+1
| | | | | | | | | Remove remaining reference to gettextutils and remove the module, as it no longer exists in oslo-incubator. Also remove timeutils for the same reason, it's not referenced by any remaining code. Closes-Bug: #1380629 Change-Id: Ie3ad3fe73fd5e73dd6ede0c375eb2077d95bda3f
* Convert importutils to oslo.utilsSteven Hardy2014-12-031-1/+1
| | | | | Change-Id: I58dfdc608bcddd0fce9df818033b2cb33eee3296 Partial-Bug: #1380629
* Merge "Convert strutils to oslo.utils.encodeutils"Jenkins2014-12-021-2/+3
|\
| * Convert strutils to oslo.utils.encodeutilsSteven Hardy2014-11-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the encode/decode functions from oslo-incubator to use oslo.utils encodeutils, as the incubator functions are now deprecated. Also syncs oslo-incubator to 62394a3 to purge usage of strutils from the openstack/common modules. Note includes oslo fix https://review.openstack.org/#/c/133290/ which we need or the python3 tests won't pass. Change-Id: I630fe3f3ce14ae745a8417bfe6552acd31341c9c Partial-Bug: #1380629
* | Fix H302 errorsTetiana Lashchova2014-11-261-1/+1
|/ | | | Change-Id: I0354b4c99fb6d22ede85ec711fb81c2bb3627f99
* Pass auth_url if os_no_client_auth specifiedVijayaguru Guruchave2014-10-151-0/+1
| | | | | | | | | | | The standalone auth_password middleware expects 'X-Auth-Url' header in the request. The recent version of heatclient doesn't pass the required header which is retrieved from the option '--os-auth-url', though we explicitly specify it in the commandline. Let's pass the argument 'auth_url' and get heatclient working in standalone mode. Change-Id: I3e67f4699c61c3ce5c42f25e3c8b137f8ba8a2e3 Closes-bug: #1380658
* Add support for OSprofilerAngus Salkeld2014-09-161-0/+24
| | | | | | | | To be able to create profiling traces for Heat, the client should be able to send special HTTP header that contains trace info. Change-Id: I2ff833fac2dfe3bb0fcbd6a31c210db2935b72f1 Closes-bug: #1363782
* Merge "handles keyboard interrupt"Jenkins2014-09-131-0/+3
|\
| * handles keyboard interruptRakesh H S2014-09-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | When an user intentionally provides an keyboard interrupt, heatclient throws the entire traceback on to the terminal instead of handling it. heatclient will now handle the keyboard interrrupt and provides an crisp message on to the terminal. Change-Id: Iaa30048e7948d7db1d5b256dd59ca2e0dd842df9 Closes-Bug: #1367283
* | Re-add keystone v3 auth with fixesDavid Hu2014-09-041-143/+332
|/ | | | | | | | | | | | | | | | | | The first part of the commit is to re-propose the v3 auth changes. https://review.openstack.org/#/c/92728/ The second part of the commit is to address the unexpected keyword argument 'follow_redirect' and missing endpoint issue in certain code path such as 'heat event-list' or 'heat resource-metadata'. With the fix, follow_redirect argument is consumed by SessionClient. Heat endpoint is now passed from Heatclient shell to SessionClient. Unit tests were added and updated to cover the issue. Change-Id: I0cdf837c924afe9cbd8826bdca5dd611c183efeb Closes-Bug: #1349467 Closes-Bug: #1348297
* Revert "Add keystone v3 auth support"Thomas Herve2014-07-281-337/+145
| | | | | | | | | | | This reverts commit a98c1f3617604c4871263ff9cc986b27f302ef46. The new usage of session doesn't work with resources or events. Conflicts: heatclient/tests/test_shell.py Closes-Bug: #1349467 Change-Id: Ib5b0db81454abe647aca6461dd7bd5f197267fb8
* Add keystone v3 auth supportDavid Hu2014-07-171-145/+337
| | | | | | | | | This change enables the heat client to use the keystone v3 API (in addition to v2). This allows user domains and tenant/project domains to be specified. This is necessary because keystone v2 API is deprecated as of Icehouse. Change-Id: Id19c4e52b12b379746a36b1f9fb61eb2825c78f3
* Improve --debug logging outputSteve Baker2014-06-251-1/+3
| | | | | | | | | | This change makes the following improvements to the output of a heat command with the --debug option set: * Silences spurious logging from iso8601 and urllib3.connectionpool * Removes the line number from the logging format, since the intent of --debug is to show the user what network requests are occuring. Change-Id: Iccbae01a1a5b85db0770a4f56c3b48788dc3008a Closes-bug: #1324470
* Heat client does not support OS_CACERT optionRob Crittenden2014-04-231-1/+10
| | | | | | | | | This option is standard in OpenStack clients to pass in the location of any extra CA certificate bundle needed to negotiate an SSL connection with SSL-secured services. Change-Id: If675b36bf6bbd1df216277129b147c32555de0d0 Closes-Bug: 1308087
* Deprecate create/adopt --create-timeout in favor of --timeoutSteven Hardy2014-03-121-1/+1
| | | | | | | | | | | | | | | | | | | Replace the --create-timeout option with a more generic and intuitive --timeout option, which can also later be used for update. Since users may be using this option and it does currently work, leave the old -c/--create-timeout option for now, but mark deprecated in the usage and output a warning message if users use it. To make this warning visible the default loglevel is changed to WARNING. Note neither timeout contains an integer default now, we rely on the server-side default (which is 60mins anyway) as this make the fallback to support the previous option easier and potentially to provide an easier way to solve heat bug #1290603. Partial-Bug: #1290456 Related-Bug: #1290603 Change-Id: Ia8c8d61b259ffa1f8a59d29a3e7fa7d9c128984f
* Rename --timeout global option and make it workSteven Hardy2014-03-101-4/+7
| | | | | | | | | | | | | | | | The --timeout option doesn't work for standalone use-cases when you specify no-client-auth, and it's also confusing since it's easily misinterpreted as an option related to the heat timeouts provided to stack-create and in future stack-update. So take this opportunity to rename the option to --api-timeout, which hopefully more accurately reflects it's purpose, and don't pass a default (just let requests use the global default socket timeout) as it seems relatively unlikely users will wait for 10 minutes before pressing Ctrl-C on interactive shell requests. Change-Id: I52480f0d128735bf5f312fc88f4078f27717baf2 Partial-Bug: #1290456
* Enable --help for each commandJUNJIE NAN2014-03-021-1/+1
| | | | | | | Now heat stack-create --help outputs same with heat --help. It should output the help message for stack-create instead of the global one. Change-Id: I1b451ddb4ecba3bb3294ff3219a5ecad394ada9e
* Improve help stringsAndreas Jaeger2014-02-101-22/+22
| | | | | | | | | | Follow oslo.config style guide for help strings better to create consistent help strings: * Finish help strings with "." * Add missing spaces between words Change-Id: I6191842c253b254768bcc5c22fcfb435296f3945 Co-Authored-By: Shilla Saebi<shilla.saebi@gmail.com>
* Configure logging regardless of debug flagRandall Burt2014-01-301-6/+6
| | | | | | | | Configure the logging level for the client. Default to ERROR unless -d is passed, then use DEBUG. Closes-Bug: #1273800 Change-Id: Iea337bed55ca7da2fc95d0d3218a4895909423cd
* Raise traceback on error when using CLI and -debugChmouel Boudjnah2014-01-161-3/+8
| | | | | | | | When --debug is specified to the CLI don't just print the simple error message but actually reraise that error. Change-Id: I616eda8e033342cff7f3412e3a414a7530ef3848 Closes-Bug: #1268202
* Remove ununsed httplib2 requirementChmouel Boudjnah2014-01-061-3/+0
| | | | | | | | This is not needed anymore since the logging is handled by six.moves/httplib. Change-Id: I4315860648258fb760ea22ca09d0083d7c9afb6c Closes-Bug: #1266584
* Misc typos in Heat clientanusha-rayani-72013-12-171-1/+1
| | | | | | Closes-Bug: #1256000 Change-Id: I1f607dd2c0499c1824442542a17e17bef8a0f020
* Supports bash_completion for heatclientZhiQiang Fan2013-12-161-0/+29
| | | | | | | | | | | bash_completion feature can improve CLI user experience, projects like nova, keystone, and cinder already support it. NOTE: this patch just provides simple functionality, which means cache for IDs and names is not used (like nova). Closes-Bug: #1260939 Change-Id: I327e884e1c5907c9ff6f31131c70aee659cca58e
* Add back --token-only for invocation compatibility0.2.6Steve Baker2013-12-051-0/+8
| | | | | | | | | | This unused option should remain so that scripts that use it do not break. It is suppressed so it will not appear in the help. Closes-Bug:1250731 Change-Id: I1180d8797d1e4c79dba92952931311cce50a1d3f
* Add --include-pass option for grizzly backwards compatchenhaiq2013-12-051-2/+9
| | | | | | | | | Set X-Auth-User, X-Auth-Key on all stack commands to allow the latest python-heatclient to work on grizzly heat. Partial-Bug:1250731 Change-Id: I29d4785cf3520e809252b5aeab25cf471a88cde8
* Merge "Honor endpoint_type when requesting keystone for a token"Jenkins2013-11-281-1/+2
|\
| * Honor endpoint_type when requesting keystone for a tokenJordanP2013-11-181-1/+2
| | | | | | | | | | | | | | The parameter 'endpoint_type' must be taken into account in case one has different public and internal Heat endpoint Change-Id: I63ffbec321e187f42405e1e70781065a274004d2
* | Make tokens work with --os-no-client-authSteven Hardy2013-11-271-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently --os-no-client-auth assumes you'll only ever want to pass a username and password to the standalone auth_password middleware, but it's also valid to pass a token and endpoint, which can then be used to either connect to a normal (non-standalone) Heat without needing the client to connect to keystone, or pass a token to custom auth middleware in standalone mode where tokens are accepted. e.g: heat --os-no-client-auth --heat-url http://127.0.0.1:8004/v1/<tenant ID> --os-auth-token <a token> stack-list Change-Id: Ie22c85ba5b3b987505f4d6204b4dd6ff03e0d912 Closes-Bug: #1252248
* | Fix shell operation with --os-auth-tokenSteven Hardy2013-11-271-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the --os-auth-token/env[OS_AUTH_TOKEN] case doesn't work, as we always expect a username/password to create the connection to keystone. This enables the client to be used with only a token and tenant (which is required for keystoneclient to retrieve the catalog) specified, e.g: heat --os-auth-url http://127.0.0.1:35357/v2.0/ \ --os-auth-token <a keystone token> \ --os-tenant-id <tenant ID> stack-list Change-Id: I478ce178f44e42c68153f1b347c6144f0a133f5b Partial-Bug: #1252248