The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
If the endpoint is passed in, make sure keystone uses it instead of
looking up the endpoint in the auth plugin.
Original fix: 9e28993ee6
Closes-Bug: #1654344
Change-Id: I4b42ab9d87c790eef1953f995260b6b232a63445
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>
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
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 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
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
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
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
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 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
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
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
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
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
This reverts commit a98c1f3617.
The new usage of session doesn't work with resources or events.
Conflicts:
heatclient/tests/test_shell.py
Closes-Bug: #1349467
Change-Id: Ib5b0db81454abe647aca6461dd7bd5f197267fb8
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
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
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
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
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
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
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 the logging level for the client. Default to ERROR
unless -d is passed, then use DEBUG.
Closes-Bug: #1273800
Change-Id: Iea337bed55ca7da2fc95d0d3218a4895909423cd
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
This is not needed anymore since the logging is handled by
six.moves/httplib.
Change-Id: I4315860648258fb760ea22ca09d0083d7c9afb6c
Closes-Bug: #1266584
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
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
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
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
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