switch-c1: add lacp toggle
This commit is contained in:
parent
735c473161
commit
8bd4c2c8ac
|
@ -604,6 +604,7 @@ switches:
|
||||||
mode: bond
|
mode: bond
|
||||||
group: 1
|
group: 1
|
||||||
ports: 15-16
|
ports: 15-16
|
||||||
|
lacp: no
|
||||||
vlans:
|
vlans:
|
||||||
- mgmt
|
- mgmt
|
||||||
- pub
|
- pub
|
||||||
|
|
|
@ -73,10 +73,16 @@ expect "(config)# "
|
||||||
{%- for name, conf in switch['ports'].items() %}
|
{%- for name, conf in switch['ports'].items() %}
|
||||||
{%- if conf['mode'] == 'bond' %}
|
{%- if conf['mode'] == 'bond' %}
|
||||||
|
|
||||||
|
{%- if not conf.get('lacp', False) %}
|
||||||
|
send "trunk {{ conf['ports'] }} trk{{ conf['group'] }} trunk\r"
|
||||||
|
expect "(config)# "
|
||||||
|
|
||||||
|
{%- else %}
|
||||||
send "interface {{ conf['ports'] }} lacp active\r"
|
send "interface {{ conf['ports'] }} lacp active\r"
|
||||||
expect "(config)# "
|
expect "(config)# "
|
||||||
send "trunk {{ conf['ports'] }} trk{{ conf['group'] }} lacp\r"
|
send "trunk {{ conf['ports'] }} trk{{ conf['group'] }} lacp\r"
|
||||||
expect "(config)# "
|
expect "(config)# "
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
{%- for vlan_name in conf['vlans'] %}
|
{%- for vlan_name in conf['vlans'] %}
|
||||||
send "vlan {{ pillar['vlans'][vlan_name] }} tagged trk{{ conf['group'] }}\r"
|
send "vlan {{ pillar['vlans'][vlan_name] }} tagged trk{{ conf['group'] }}\r"
|
||||||
|
|
Loading…
Reference in New Issue