switches: prettify 3com-4200G link-aggreation group numbers

This commit is contained in:
Astro 2016-12-06 03:34:04 +01:00
parent b5e0a77c65
commit ac8d0c7ef8
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,6 @@ expect "{{ hostname }}]"
{%- set group = 0 %}
{%- for name, conf in switch['ports'].items() %}
{%- if conf['mode'] == 'trunk' or conf['mode'] == 'bond' %}
{%- set group = group + 1 %}
{%- for port in conf['ports'] %}
send "interface {{ port }}\r"
expect "]"
@ -67,6 +66,7 @@ send "undo lacp enable\r"
{%- endif %}
expect "]"
{%- if conf['mode'] == 'bond' %}
{%- set group = group + 1 %}
send "port link-aggregation group {{ group }}\r"
{%- else %}
send "undo port link-aggregation group\r"