12 lines
463 B
Django/Jinja
12 lines
463 B
Django/Jinja
# https://docs.nvidia.com/networking-ethernet-software/cumulus-linux/Layer-1-and-Switch-Ports/Interface-Configuration-and-Management/Switch-Port-Attributes/#breakout-ports
|
|
{% for interface in interfaces | selectattr('name', 'match', '^swp[0-9]+$') %}
|
|
{{ interface.name|regex_replace('^swp', '') }}=
|
|
{%- if interfaces|selectattr('name', 'match', '^'+interface.name+'s[0-9]+$') %}
|
|
4x
|
|
{% elif not interface.enabled %}
|
|
disabled
|
|
{% else %}
|
|
1x
|
|
{% endif %}
|
|
{% endfor %}
|