ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.
Closes-Bug: #1936667
Change-Id: Ie312cb884537ec541bf2111fe8a647e939b6519e
The oslo_utils.fnmatch module was added to solve an issue in py2.7 but
it is no longer required because py2.7 is no longer supported.
The module was deprecated since oslo.utils 4.9.1[1] and the stdlib's
fnmatch module should be used instead.
[1] 4c893c92f551c9dd2a7cfbe7ae8171ad8139df0b
Change-Id: I95535adeb45363500b3ed9729bb61cb4308d23b9
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Change-Id: I82c745f5b1236844deec4538be84037a64eebeee
This is to:
1. Add missing print format for "%(hook_type)".
2. Add ws between words in log message "notavailable".
Change-Id: Iaee8697c95f66bff0536db9a266158a3cbc89412
SessionClient is subclassed from keystoneauth LegacyJsonAdapter.
LegacyJsonAdapter does not set the Content-Type explicitly
and results in decodeing issues in some cases.
Change-Id: Idf23022b394607c332490331fc4b216de6ff1313
Story: 2005237
Task: 30027
We don't seem to set the header for region name when using session
client. It's used to look for service endpoints in the catalog.
Change-Id: I10cfdfb88b3f09e4ceb69b1020e82c4eba733804
Story: #2003806
Task: 26550
When an application load heatclient, the default pyyaml behavior change.
This ensures only heatclient use it's custom pyyaml stuffs.
This currently breaks the telemetry gate if the tempest heat plugin is
loaded with the telemetry.
Change-Id: I5d7d1a1999e762f2285a0effc081252570f24de8
If files-container option is specified:
- All template/env files would be fetched by the heat engine
relative to the files_container and no local files other
than the root template would be sent to server.
- Relative path of environment files would be sent in the
environment_files list.
Also adds the option to template validate.
Change-Id: I1a703ab8798a003365be650886bb78be5af472b7
Story: #1755453
Task: 19319
Parameters of an existing stack can be updated with
openstack stack update <stack> --existing --parameter <parameter>=<newvalue>
Example : openstack stack update stack1 --parameter p1=v1
If the --existing option is skipped, it leads to the below error
Need to specify exactly one of --template-file, --template-url or --template-object
This error is misleading as the user might think that stack update
cannot be performed without specifying a new template.
Modify the error message with --existing option.
Change-Id: Idce88bde848378e00b1c873245600ba205939668
Closes-Bug: #1723864
When you comment all the elements in a YAML mapping, you end up with
None instead of an empty mapping, which can have bad side effect when
handling multiple environemnents. Let's handle that by ignoring the
latest None value.
Change-Id: I77ffabeb8d4cd2886ef4f41351e42ebe487b5d4b
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
Change-Id: I3913e8876b34e112140788d7a405da6eedfb5f29
When retrieving events from nested stacks, we used to do a query per
stack and thus get the stack that way. We changed it to do only one API
call, but didn't fix the way the stack name was set. We need to use the
event links to retrieve the stack name, instead of the root stack.
Closes-Bug: #1676896
Change-Id: I09ab1cc2c6aaab02036b124b1dfa561dd6132083
if endpoint_type is provided, map it to interface for
SessionClient as this endpoint_type is ignored.
Change-Id: If5bd96578e5bc4389b9eee6e53c598f6ffaf0d8d
Closes-Buf: #1665858
This causes a huge amount of spam on anything that does an equality
check, like tests. We should just remove it.
Change-Id: Ibb1a2132ab784ae357d965bd0997f419be568651
Closes-Bug: 1653975
At present when using session with heatclient, you've to
specify the service_type. Use the only service_type
'orchestration', if not specified.
Change-Id: I994698784e5b30471f6d863034fa21aa8963fd9f
Partial-Bug: #1646539
In poll_for_events, we retrieve the stack to check its status. As it
stands we resolve the outputs as well, which is costly and useless in
this scenario. We can simpley get the stack to retrieve its status
without outputs.
Change-Id: Idc2327f6be15a679d502b0cd3e9d8980fdf1e22a
Related-Bug: #1638908
Number of projects like rally pass endpoint rather than
endpoint_override when using session with heatclient.
Use endpoint as endpoint_override when not specified.
Make it backward compatible.
Change-Id: Iff977424a15ac2ce3ffdf8d7c98d5e72d25c1e91
Closes-Bug: #1643507
Move the required module to heatclient/common.
- heatclient/openstack/common/apiclient/base.py
It also moves some required functions and exceptions from
heatclient/openstack/common/cliutils.py and
heatclient/openstack/common/exceptions.py.
Change-Id: I68704c7fab9417492d8390ad05a9797f78d46907
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>
If an environment file has an *empty* section, as in:
parameter_defaults:
This would ultimately fail in deep_update (in
heatclient/common/template_utils.py), which would get called with old
== None. This patch handles this situation by explicitly setting old
= {} if deep_update is called with old == None.
Change-Id: Ia7bee87cdb99e29c63c9dc163f8490fef3f24f24
Closes-bug: 1631408
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
The resource name path was introduced in the 'openstack stack failures'
command and is a user-friendly way of referring to a deeply nested
resource.
This change modifies the event log formatter to build and display the
resource name path for each event based only off data in previous
events.
For building the full resource path, and omitting ugly stack names
from the resource path, the following heat change is needed
Ib8feb7752bd5736785d142216312bb35629b3601. However the output is still
improved slightly when running against an older heat which does not
have this change.
Change-Id: I86b687fc516da215a6baeef8b365a520d12a8ab1
Closes-Bug: #1619415
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.
http://docs.openstack.org/developer/hacking/#imports
Change-Id: I9b7c8c7e37ee9861a63489f5b8fd611f2d31946e
This adds parameter_merge_strategies section to environment.
This also adds the missing section parameter_encrypted_names.
We use a server side module and a client side module that have
deviated over a period of time. This patch syncs them. We probably
should move these to a library and use use them for both server and
client in the future.
Change-Id: I9b20a7cedd416b6d8b788a30f66e472b85babf4a
Blueprint: environment-merging
This will allow library calls to have more control over the depth of
events which are logged.
Change-Id: Iecb8c89745f916c50936e013a62176d586cfcc63
Closes-Bug: #1616682
Base classes of commands are defined in cliff,
but have been encapsulated again in osc-lib for
all plugin clients. So use osc-lib instead of
cliff.
Change-Id: I0e430457af3033ebf56e47f85c0cfd71d2227cf7
This change does the following:
- cleans up the usage of get_events so that marker and limit are only
specified in their dedicated arguments, not also in event_args
(also, specifying only in event_args still works)
- first attempts server-side nested_depth support
- falls back to the old recursive approach if the response data lacks a
link with the ref root_stack
Since there is a fallback for old heat APIs, the client change can
land before or after the heat change
I27e1ffb770e00a7f929c081b2a505e2007f5d584
Change-Id: I43d12ec61ec359222184f07c170de3c97481f1ba
Closes-Bug: #1588561