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