HP-procurve-2824: make link-aggregation groups static

This commit is contained in:
Astro 2020-11-27 20:11:38 +01:00
parent ccefecff86
commit 95c36fbbe6
2 changed files with 4 additions and 4 deletions

View File

@ -503,6 +503,7 @@ switches:
ports: ports:
switch-b1: switch-b1:
mode: bond mode: bond
group: 2
ports: 21-24 ports: 21-24
vlans: vlans:
- mgmt - mgmt
@ -590,6 +591,7 @@ switches:
# Saal A Buehne # Saal A Buehne
switch-a1: switch-a1:
mode: bond mode: bond
group: 1
ports: 15-16 ports: 15-16
vlans: vlans:
- mgmt - mgmt

View File

@ -70,18 +70,16 @@ expect "(config)# "
{%- endfor %} {%- endfor %}
{%- set group = 0 %}
{%- for name, conf in switch['ports'].items() %} {%- for name, conf in switch['ports'].items() %}
{%- if conf['mode'] == 'bond' %} {%- if conf['mode'] == 'bond' %}
{%- set group = group + 1 %}
send "interface {{ conf['ports'] }} lacp active\r" send "interface {{ conf['ports'] }} lacp active\r"
expect "(config)# " expect "(config)# "
send "trunk {{ conf['ports'] }} trk{{ group }} lacp\r" send "trunk {{ conf['ports'] }} trk{{ conf['group'] }} lacp\r"
expect "(config)# " expect "(config)# "
{%- for vlan_name in conf['vlans'] %} {%- for vlan_name in conf['vlans'] %}
send "vlan {{ pillar['vlans'][vlan_name] }} tagged trk{{ group }}\r" send "vlan {{ pillar['vlans'][vlan_name] }} tagged trk{{ conf['group'] }}\r"
expect "(config)# " expect "(config)# "
{%- endfor %} {%- endfor %}