Skip to content

Commit

Permalink
nclu-switch: Fix order in template
Browse files Browse the repository at this point in the history
Currently description is applied first to the interface, but if it's a
virtual one - it won't exist before running the configuration commands.

Story: 2010279
Task: 46232

Change-Id: I40212b40a4d391272f4063f42e8a7043b3d58fd7
(cherry picked from commit cfb5c00)
  • Loading branch information
mnasiadka committed Sep 8, 2022
1 parent 8c9bd40 commit 20e2350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ansible/roles/nclu-switch/templates/nclu-config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
{% endfor %}

{% for interface, config in nclu_switch_interface_config.items() %}
{% if config.description is defined %}
add {{ config.type | default("interface") }} {{ interface }} alias {{ config.description }}
{% endif %}
{% for line in config.config %}
add {{ config.type | default("interface") }} {{ interface }} {{ line }}
{% endfor %}
{% if config.description is defined %}
add {{ config.type | default("interface") }} {{ interface }} alias {{ config.description }}
{% endif %}
{% endfor %}
6 changes: 6 additions & 0 deletions releasenotes/notes/nclu-order-dc4cb33d633b73a2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue with nclu-switch command ordering, when description was
applied first to a non-existent (virtual) interface. See `story 2010279
<https://storyboard.openstack.org/#!/story/2010279>`__ for details.

0 comments on commit 20e2350

Please sign in to comment.