From 95c36fbbe6c6345fac9876f817178b26f9d62b4a Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 27 Nov 2020 20:11:38 +0100 Subject: [PATCH] HP-procurve-2824: make link-aggregation groups static --- salt-pillar/switches/init.sls | 2 ++ salt/switches/HP-procurve-2824.expect | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/salt-pillar/switches/init.sls b/salt-pillar/switches/init.sls index 58b69f5..dc5c4a5 100644 --- a/salt-pillar/switches/init.sls +++ b/salt-pillar/switches/init.sls @@ -503,6 +503,7 @@ switches: ports: switch-b1: mode: bond + group: 2 ports: 21-24 vlans: - mgmt @@ -590,6 +591,7 @@ switches: # Saal A Buehne switch-a1: mode: bond + group: 1 ports: 15-16 vlans: - mgmt diff --git a/salt/switches/HP-procurve-2824.expect b/salt/switches/HP-procurve-2824.expect index 2c9e026..780f512 100644 --- a/salt/switches/HP-procurve-2824.expect +++ b/salt/switches/HP-procurve-2824.expect @@ -70,18 +70,16 @@ expect "(config)# " {%- endfor %} -{%- set group = 0 %} {%- for name, conf in switch['ports'].items() %} {%- if conf['mode'] == 'bond' %} -{%- set group = group + 1 %} send "interface {{ conf['ports'] }} lacp active\r" expect "(config)# " -send "trunk {{ conf['ports'] }} trk{{ group }} lacp\r" +send "trunk {{ conf['ports'] }} trk{{ conf['group'] }} lacp\r" expect "(config)# " {%- 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)# " {%- endfor %}