Commit Graph

12 Commits

Author SHA1 Message Date
Takashi Kajinami 0235a734e4 Fix python shebang
The current shebang requires /usr/bin/python which is not available in
Ubuntu Jammy by default.

Change-Id: I142472eb20591fc752db9ca06c954d362cd3e405
2023-10-17 16:02:20 +00:00
likui 7b525d8eeb Remove six
The Python 2.7 Support has been support
So remove hacking rules for compatibility between python 2 and 3

Change-Id: Ia0fe869b80d330551cc9dac06c23001faf229542
2020-11-16 06:52:57 +00:00
Sorin Sbarnea ce85c96692 Make heat-config logging more human friendly
Address problem where the logs made by heat-config where barely readable
as they contained wrapped stdout/stderr lines. By printing the value in
beautified YAML format, we make it possible for the humans to read them.

As a safety measure if conversion fails it fallsback to original string.

Change-Id: I64b2beb6eb2927c683f5188b000a7210be7da592
Partial-Bug: #1787912
2018-12-10 15:44:34 +00:00
Quique Llorente 294969926f Added missing json 'encode' function
At python3 strings are not byte arrays, we have to encode them.

Change-Id: Ia9254fdeab853ab663d93973dc1fae1e5dbc26ab
2018-11-08 13:02:14 +01:00
Quique Llorente 73e2125532 Replace basestring with six.string_types
openstack/heat-templates has the issue but heat-agents was missing it

Change-Id: Id6da9285eeeb12b86164a080271d3f9ba40177dd
2018-11-06 15:24:17 +01:00
Steven Hardy e2f3df268d Expose error when a hook script raises an exception
Currently this can result in errors being ignored so it's not clear
to the user that something failed.

Change-Id: Idf6badecbfa72150f3506a485eed9ae2cb5858f7
Story: 2002084
Task: 19753
2018-05-22 17:53:53 +01:00
Dan Prince 1179f411de whitelist os-apply-config group in 55-heat-config
This patch whitelists the os-apply-config 'group' from getting logged
as an error message because there is no hook script. This is a legacy
group used in TripleO for several things.

Change-Id: If128d8e707548815defc72212c59ad53348b5adf
Closes-bug: #1715497
2017-09-06 17:30:01 -04:00
Thomas Herve 25cd394bbe Add py3.5 support
Depends-On: Ibda89b467b461b8833515f50a0cf1cc3064cb917
Change-Id: I68ac61b7d1d0d180a7696ae2f0f75b1a4a969995
2017-07-17 13:43:43 +00:00
Jenkins a49c1f6d5e Merge "Prevent trailing whitespace in rendered JSON" 2017-01-23 21:36:44 +00:00
Martin André 9ce538b6ff Prevent trailing whitespace in rendered JSON
On python <3.4 the separator for json.dump() defaulted to (', ', ': ')
which may cause trailing whitespaces in rendered JSON files when used
with indent. This change sets the separator to (',', ': ') to prevent
trailing whitespaces with older versions of python.

See https://docs.python.org/2/library/json.html#basic-usage

Change-Id: I81fabd54659bdb28da43fb4900f19dd94a70336c
2017-01-13 12:07:51 +01:00
Alex Schultz f20bf0a15f Switch no hook message to an error
If the end host does not have the appropriate heat-agent hook installed,
the message for this is printed out as a warning. It's more likely that
this is an error condition if a user is configuring a stack to be
deployed with a specific tool and it is not installed when the stack is
run.  As a UX improvement, let's increase the level from warning to
error to increase visibility for the operator.

Change-Id: Ief87d526cc5941179cea3f8ffcac47c3dabaf71b
Related-Bug: #1651785
2017-01-09 17:00:28 -07:00
Thomas Herve d802d177c7 Move elements at the top level 2017-01-04 16:57:10 +01:00