switches: try to improve the lacp deconfiguration situation

This commit is contained in:
Astro 2016-11-29 00:44:23 +01:00
parent d80943b491
commit 4c15782650
2 changed files with 6 additions and 2 deletions

View File

@ -68,8 +68,6 @@ send "lacp enable\r"
send "undo lacp enable\r"
{%- endif %}
expect "]"
send "undo port link-aggregation group\r"
expect "]"
send "port link-aggregation group {{ group }}\r"
expect "]"
send "port link-type trunk\r"
@ -89,6 +87,8 @@ expect "{{ hostname }}]"
{%- for port in conf['ports'] %}
send "interface {{ port }}\r"
expect "]"
send "undo port link-aggregation group\r"
expect "]"
send "port link-type access\r"
expect "]"
send "port access vlan {{ pillar['vlans'][name] }}\r"

View File

@ -75,6 +75,10 @@ expect "(config)# "
{%- endfor %}
{%- elif conf['mode'] == 'access' %}
send "no trunk {{ conf['ports'] }}\r"
expect "(config)# "
send "vlan {{ pillar['vlans'][name] }} untagged {{ conf['ports'] }}\r"
expect "(config)# "