nclu-switch: Fix order in template

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
This commit is contained in:
Michal Nasiadka 2022-08-31 10:10:02 +02:00 committed by Pierre Riteau
parent 6e2f5a1884
commit cfb5c004ea
2 changed files with 9 additions and 3 deletions

View File

@ -4,10 +4,10 @@
{% endfor %} {% endfor %}
{% for interface, config in nclu_switch_interface_config.items() %} {% 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 %} {% for line in config.config %}
add {{ config.type | default("interface") }} {{ interface }} {{ line }} add {{ config.type | default("interface") }} {{ interface }} {{ line }}
{% endfor %} {% endfor %}
{% if config.description is defined %}
add {{ config.type | default("interface") }} {{ interface }} alias {{ config.description }}
{% endif %}
{% endfor %} {% endfor %}

View File

@ -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.