tripleo-common/tripleo_common/utils
Sofer Athlan-Guyot 280ed7a59f Properly collect tasks with or conditional in step file.
Tasks with or conditional (step == 1 or step == 0) were not showing up
in the step file.

To make sure we collect the tasks properly we refactor the filter
logic:
 1. make all conditional a big string with no spaces and no Boolean
 2. use findall to collect all the conditional step
 3. if step found and it does belong to the current step add it.
 4. if step found and it doesn't belong to the current step remove it.
 5. if step condition not found, let strict decide.
 6. if strict remove it else add it (default behavior)

We also add a unit test related to that filtering.

Backport unit tests were adjusted to accommodate the new interface to
_write_tasks_per_step[1]

[1] See I2781cae14663094d531ad70c3d412b3153b46612

Change-Id: I815443fa7cfd54c9884aff751caf701fd77a8f3a
Closes-Bug: #1887135
(cherry picked from commit 5493304944)
(cherry picked from commit 4c4ba31248)
2020-08-03 22:07:40 +00:00
..
locks Make upload workers faster on processing layers 2019-11-19 10:04:55 +00:00
__init__.py Initial workflow implementation of tripleo-common 2015-12-07 12:38:42 -05:00
common.py Image Uploader - get_undercloud_registry IPv6 2019-07-10 15:02:31 +02:00
config.py Properly collect tasks with or conditional in step file. 2020-08-03 22:07:40 +00:00
glance.py create_or_find_kernel_and_ramdisk docstring fixes 2019-09-04 14:19:41 -04:00
image.py Make upload workers faster on processing layers 2019-11-19 10:04:55 +00:00
keystone.py nova-less-deploy: deploy_instances and undeploy_instances workflows 2019-01-16 12:41:42 +01:00
nodes.py Catch exception if servers are in error state with no bm_node attached 2020-07-07 11:20:15 +00:00
overcloudrc.py Prevent duplicated hosts in overcloudrc no_proxy 2020-04-20 10:48:51 +09:00
parameters.py Add convert_docker_params function 2019-04-10 10:02:53 -04:00
passwords.py Do not rotate CephX secrets 2020-06-09 11:36:05 +00:00
plan.py Handle secret strings correctly 2019-03-01 22:46:05 +00:00
process.py Fix bashate and flake8 errors 2019-06-14 19:23:53 +01:00
roles.py linters refresh w/ afferent bugfixes 2020-05-13 01:57:00 +00:00
safe_import.py Make gitpython and eventlet work with eventlet 0.25.1 2019-10-03 10:03:45 +00:00
swift.py utils/swift/download_container: python3 adjustment 2019-03-08 10:56:40 -07:00
tarball.py Open tarball in binary mode 2018-08-21 16:16:57 -06:00
time_functions.py Add GUI logging workflows 2017-08-08 08:55:55 +02:00
validations.py Processing available Ansible variables as 'parameters' not as 'metadata' 2019-07-08 13:02:31 +02:00