<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-heatclient.git/heatclient/common/template_utils.py, branch master</title>
<subtitle>opendev.org: openstack/python-heatclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/'/>
<entry>
<title>Remove six</title>
<updated>2022-05-09T17:01:25+00:00</updated>
<author>
<name>Takashi Kajinami</name>
<email>tkajinam@redhat.com</email>
</author>
<published>2022-05-09T05:48:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=23e647539cb9c6872d9f72de99c21e113fded77c'/>
<id>23e647539cb9c6872d9f72de99c21e113fded77c</id>
<content type='text'>
This library no longer supports Python 2, thus usage of six can be
removed.

Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This library no longer supports Python 2, thus usage of six can be
removed.

Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace deprecated import of ABCs from collections</title>
<updated>2021-12-16T07:21:36+00:00</updated>
<author>
<name>Takashi Kajinami</name>
<email>tkajinam@redhat.com</email>
</author>
<published>2021-07-16T15:51:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=796a8f5a9642a8ee0a455f59bbabe94e038fac4f'/>
<id>796a8f5a9642a8ee0a455f59bbabe94e038fac4f</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Add files-container option for stack create and update</title>
<updated>2018-08-29T13:02:03+00:00</updated>
<author>
<name>rabi</name>
<email>ramishra@redhat.com</email>
</author>
<published>2018-03-12T02:22:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=bd2bfaa514cfc6769b74bd0c213c58bcc1eef6ea'/>
<id>bd2bfaa514cfc6769b74bd0c213c58bcc1eef6ea</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Modify error message encountered during stack update</title>
<updated>2017-10-27T15:03:25+00:00</updated>
<author>
<name>PriyaDuggirala</name>
<email>priyaduggirala02@gmail.com</email>
</author>
<published>2017-10-26T14:24:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=f73c2a4177377b710a02577feea38560b00a24bf'/>
<id>f73c2a4177377b710a02577feea38560b00a24bf</id>
<content type='text'>
Parameters of an existing stack can be updated with
openstack stack update &lt;stack&gt; --existing --parameter &lt;parameter&gt;=&lt;newvalue&gt;
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parameters of an existing stack can be updated with
openstack stack update &lt;stack&gt; --existing --parameter &lt;parameter&gt;=&lt;newvalue&gt;
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't override sections in deep_update</title>
<updated>2017-10-05T08:56:10+00:00</updated>
<author>
<name>Thomas Herve</name>
<email>therve@redhat.com</email>
</author>
<published>2017-10-03T14:10:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=2a8ce0d0656f47331a164163f9e3b302de4d3c88'/>
<id>2a8ce0d0656f47331a164163f9e3b302de4d3c88</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace six.iteritems() with .items()</title>
<updated>2017-03-31T09:46:54+00:00</updated>
<author>
<name>M V P Nitesh</name>
<email>m.nitesh@nectechnologies.in</email>
</author>
<published>2017-03-31T09:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=61aa092ce5cdee495e6faf63c36419e5583d3627'/>
<id>61aa092ce5cdee495e6faf63c36419e5583d3627</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Graduate to oslo.i18n and cleanup incubator usage</title>
<updated>2016-11-08T02:59:09+00:00</updated>
<author>
<name>Chuck Short</name>
<email>chuck.short@canonical.com</email>
</author>
<published>2016-10-26T23:30:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=29d6c613f674bec9f36a6207ba1b9f50886863e8'/>
<id>29d6c613f674bec9f36a6207ba1b9f50886863e8</id>
<content type='text'>
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 &lt;chuck.short@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;chuck.short@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>handle empty sections in environment files</title>
<updated>2016-10-07T15:10:29+00:00</updated>
<author>
<name>Lars Kellogg-Stedman</name>
<email>lars@redhat.com</email>
</author>
<published>2016-10-07T15:05:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=0d218c92beb8f0fa11a18c2dc56bb92ed7feb785'/>
<id>0d218c92beb8f0fa11a18c2dc56bb92ed7feb785</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix obscure error message when no template given to OSC</title>
<updated>2016-05-02T03:58:24+00:00</updated>
<author>
<name>Paul Breaux</name>
<email>p.breaux@f5.com</email>
</author>
<published>2016-05-02T03:46:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=f5d4721e5ff9ef1ff1bffec79ea8e024275d6798'/>
<id>f5d4721e5ff9ef1ff1bffec79ea8e024275d6798</id>
<content type='text'>
This is an internal-only fix, as it does not change any external APIs. A
bit of obfuscation was occurring in the
'template_utils.process_template_path' function call. First we try to
retrieve the template from a urllib call. If that fails, then we try to
make a request with the custom request_object function. If the
request_object function failed to retrieve the template as well, it
would report back 'ERROR: None'. I left both of the calls in this
function, but I made the first exception bubble up back to the caller,
since it is more helpful to the user.

The new error message should report back the following when a template
cannot be found:

&lt;urlopen error [Errno 2] No such file or directory:
'/root/python-heatclient/test.yaml'&gt;

Closed Bug: #1570229

Change-Id: I29e19172322c18559aa476744f7ff3530e689bd0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an internal-only fix, as it does not change any external APIs. A
bit of obfuscation was occurring in the
'template_utils.process_template_path' function call. First we try to
retrieve the template from a urllib call. If that fails, then we try to
make a request with the custom request_object function. If the
request_object function failed to retrieve the template as well, it
would report back 'ERROR: None'. I left both of the calls in this
function, but I made the first exception bubble up back to the caller,
since it is more helpful to the user.

The new error message should report back the following when a template
cannot be found:

&lt;urlopen error [Errno 2] No such file or directory:
'/root/python-heatclient/test.yaml'&gt;

Closed Bug: #1570229

Change-Id: I29e19172322c18559aa476744f7ff3530e689bd0
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix regression handling relative paths in environment</title>
<updated>2016-03-21T17:07:49+00:00</updated>
<author>
<name>Steven Hardy</name>
<email>shardy@redhat.com</email>
</author>
<published>2016-03-21T17:03:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/openstack/python-heatclient.git/commit/?id=f13d36ae0114e159663ea2a3fa07260df9d9407d'/>
<id>f13d36ae0114e159663ea2a3fa07260df9d9407d</id>
<content type='text'>
7627e1bae53747e1471caf632dfc1b6edf2e26cf introduced new code to add the
environment to the files mapping, so server side resolution of multiple
environments is possible.

However, the environment added is wrong when you're handling those with
relative paths inside, we must add the resolved version or the keys
don't map to keys in the files map, an you get an error when we try
to locate the file on the server.

Evidently we lack adequate functional test coverage of this, which can
be addressed via a heat patch, but I added a unit test illustrating
the problem.

Change-Id: I3bd2cd48623e4ad1b4067f4cefc7ddff30b9e88d
Closes-Bug: #1560106
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
7627e1bae53747e1471caf632dfc1b6edf2e26cf introduced new code to add the
environment to the files mapping, so server side resolution of multiple
environments is possible.

However, the environment added is wrong when you're handling those with
relative paths inside, we must add the resolved version or the keys
don't map to keys in the files map, an you get an error when we try
to locate the file on the server.

Evidently we lack adequate functional test coverage of this, which can
be addressed via a heat patch, but I added a unit test illustrating
the problem.

Change-Id: I3bd2cd48623e4ad1b4067f4cefc7ddff30b9e88d
Closes-Bug: #1560106
</pre>
</div>
</content>
</entry>
</feed>
