action #160826
Updated by okurz 3 months ago
## Observation
#160646-3 shows that we generate a lot of empty lines with https://gitlab.suse.de/openqa/salt-states-openqa/-/blob/master/openqa/openvswitch.sls?ref_type=heads#L96-128
This can be optimized by using `{%-` and `-%}` at a lot more places to avoid linebreak generation for e.g. if-statements of set commands. Care must be taken to not remove linebreaks where they are actually needed to produce valid yaml which results in a working shell script.
## Acceptance criteria
* **AC1:** The rendered openvswitch state definition is more readable
## Acceptance tests
* **AT1-1:** `salt 'worker29.oqa.prg2.suse.org' cp.get_template salt://openqa/openvswitch.sls /tmp/openvswitch` https://progress.opensuse.org/issues/160646#note-3 shows no redundant blank lines
## Suggestions
* Add a `-`, e.g. `{%- for remote in otherworkers -%}`
https://progress.opensuse.org/issues/160826
Optimize gre_tunnel_preup.sh generation jinja template
## Observation
#160646-3 shows that we generate a lot of empty lines with https://gitlab.suse.de/openqa/salt-states-openqa/-/blob/master/openqa/openvswitch.sls?ref_type=heads#L96-128
This can be optimized by using `{%-` and `-%}` at a lot more places to avoid linebreak generation for e.g. if-statements of set commands. Care must be taken to not remove linebreaks where they are actually needed to produce valid yaml which results in a working shell script.
## Acceptance criteria
* **AC1:** The rendered openvswitch state definition is more readable
## Acceptance tests
* **AT1-1:** `salt 'worker29.oqa.prg2.suse.org' cp.get_template salt://openqa/openvswitch.sls /tmp/openvswitch` shows no redundant blank lines
## Suggestions
* Add a `-`, e.g. `{%- for remote in otherworkers -%}`
Back