From 6b1de4c3e3d12019202c56bced11b04bb9fea3ca Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Mon, 5 Aug 2024 23:27:40 +0000 Subject: [PATCH 01/18] [ansible][minigraph] add support for adding autonegotiation in minigraph templates Signed-off-by: Vaibhav Dahiya --- ansible/templates/minigraph_link_meta.j2 | 28 ++++++++++++++++++++++++ ansible/templates/minigraph_meta.j2 | 7 ++++++ 2 files changed, 35 insertions(+) diff --git a/ansible/templates/minigraph_link_meta.j2 b/ansible/templates/minigraph_link_meta.j2 index d74f4a87cc4..bb65c491f05 100644 --- a/ansible/templates/minigraph_link_meta.j2 +++ b/ansible/templates/minigraph_link_meta.j2 @@ -52,3 +52,31 @@ {% endif %} + +{% if autoneg is defined %} + + +{% for index in range(vms_number) %} +{% set vm_intfs=vm_topo_config['vm'][vms[index]]['intfs'][dut_index|int]|sort %} +{% set dut_intfs=vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int]|sort %} +{% for if_index in range(vm_intfs | length) %} + + + + + AutoNegotiation + True + + + FECDisabled + + True + + + {{ vms[index] }}:{{ vm_intfs[if_index] }};{{ inventory_hostname }}:{{ port_alias[dut_intfs[if_index]] }} + +{% endfor %} +{% endfor %} + + +{% endif %} diff --git a/ansible/templates/minigraph_meta.j2 b/ansible/templates/minigraph_meta.j2 index f9b14197c2f..34bc7eaf9fe 100644 --- a/ansible/templates/minigraph_meta.j2 +++ b/ansible/templates/minigraph_meta.j2 @@ -136,6 +136,13 @@ {{ switch_type }} {% endif %} +{% if autoneg is defined %} + + AutoNegotiation + + {{ autoneg }} + +{% endif %} {% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %} SwitchId From 5f38d56bf1ab4e0091dc0876e1660d6bdbda9cad Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Thu, 15 Aug 2024 00:46:49 +0000 Subject: [PATCH 02/18] add changes for topo files Signed-off-by: Vaibhav Dahiya --- ansible/templates/minigraph_link_meta.j2 | 23 ++++++++++------------- ansible/vars/topo_t0-116.yml | 2 ++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ansible/templates/minigraph_link_meta.j2 b/ansible/templates/minigraph_link_meta.j2 index bb65c491f05..c0d13f370e8 100644 --- a/ansible/templates/minigraph_link_meta.j2 +++ b/ansible/templates/minigraph_link_meta.j2 @@ -56,26 +56,23 @@ {% if autoneg is defined %} -{% for index in range(vms_number) %} -{% set vm_intfs=vm_topo_config['vm'][vms[index]]['intfs'][dut_index|int]|sort %} -{% set dut_intfs=vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int]|sort %} -{% for if_index in range(vm_intfs | length) %} +{% for if_index in vm_topo_config['autoneg_interfaces']['intfs'] %} +{% set autoneg_intf = "Ethernet" ~ if_index ~ "/1" %} - AutoNegotiation - True + AutoNegotiation + True + + + FECDisabled + + True - - FECDisabled - - True - - {{ vms[index] }}:{{ vm_intfs[if_index] }};{{ inventory_hostname }}:{{ port_alias[dut_intfs[if_index]] }} + {{ device_conn[inventory_hostname][port_alias_map[autoneg_intf]]['peerdevice'] }}:{{ device_conn[inventory_hostname][port_alias_map[autoneg_intf]]['peerport'] }};{{ inventory_hostname }}:{{ autoneg_intf }} -{% endfor %} {% endfor %} diff --git a/ansible/vars/topo_t0-116.yml b/ansible/vars/topo_t0-116.yml index dcc114a7340..6b9f306e848 100644 --- a/ansible/vars/topo_t0-116.yml +++ b/ansible/vars/topo_t0-116.yml @@ -134,6 +134,8 @@ topology: - 31 vm_offset: 3 DUT: + autoneg_interfaces: + intfs: [13, 14, 15, 16, 17, 18, 19, 20] vlan_configs: default_vlan_config: one_vlan_a one_vlan_a: From f631fac805650067590f2e1813497b47f3753787 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Thu, 15 Aug 2024 00:49:58 +0000 Subject: [PATCH 03/18] add more changes Signed-off-by: Vaibhav Dahiya --- ansible/library/topo_facts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/library/topo_facts.py b/ansible/library/topo_facts.py index 0b2207bd050..b6d8ffb3555 100644 --- a/ansible/library/topo_facts.py +++ b/ansible/library/topo_facts.py @@ -334,6 +334,8 @@ def get_topo_config(self, topo_name, hwsku, testbed_name, asics_present, card_ty if 'DUT' in topo_definition['topology']: vm_topo_config['DUT'] = topo_definition['topology']['DUT'] + if 'autoneg_interfaces' in vm_topo_config['DUT']: + vm_topo_config['autoneg_interfaces'] = topo_definition['topology']['DUT']['autoneg_interfaces'] else: vm_topo_config['DUT'] = {} From 851573774b65d5e8e9c3cabbe0c3d4535128805e Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Tue, 3 Sep 2024 21:04:26 +0000 Subject: [PATCH 04/18] add fanout settings Signed-off-by: Vaibhav Dahiya --- ansible/TestbedProcessing.py | 3 ++- ansible/library/conn_graph_facts.py | 3 +++ ansible/roles/fanout/templates/arista_7060_deploy.j2 | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ansible/TestbedProcessing.py b/ansible/TestbedProcessing.py index a61f069c378..101dbe12081 100755 --- a/ansible/TestbedProcessing.py +++ b/ansible/TestbedProcessing.py @@ -311,7 +311,7 @@ def makeTestbed(data, outfile): def makeSonicLabLinks(data, outfile): - csv_columns = "StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode,SlotId" + csv_columns = "StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode,Autoneg,SlotId" topology = data csv_file = outfile @@ -331,6 +331,7 @@ def makeSonicLabLinks(data, outfile): bandWidth = element.get("Bandwidth") vlanID = element.get("VlanID") vlanMode = element.get("VlanMode") + AutoNeg = element.get("AutoNeg") slotId = element.get("SlotId") # catch empty values diff --git a/ansible/library/conn_graph_facts.py b/ansible/library/conn_graph_facts.py index 5c4a3bf9e44..86e22b07edb 100755 --- a/ansible/library/conn_graph_facts.py +++ b/ansible/library/conn_graph_facts.py @@ -299,6 +299,7 @@ def csv_to_graph_facts(self): band_width = link["BandWidth"] vlan_ID = link["VlanID"] vlan_mode = link["VlanMode"] + autoneg_mode = link["AutoNeg"] if start_device not in links: links[start_device] = {} @@ -313,11 +314,13 @@ def csv_to_graph_facts(self): "peerdevice": end_device, "peerport": end_port, "speed": band_width, + "autoneg": autoneg_mode, } links[end_device][end_port] = { "peerdevice": start_device, "peerport": start_port, "speed": band_width, + "autoneg": autoneg_mode, } port_vlans[start_device][start_port] = { diff --git a/ansible/roles/fanout/templates/arista_7060_deploy.j2 b/ansible/roles/fanout/templates/arista_7060_deploy.j2 index b32bed638bf..f02491fd6b9 100644 --- a/ansible/roles/fanout/templates/arista_7060_deploy.j2 +++ b/ansible/roles/fanout/templates/arista_7060_deploy.j2 @@ -36,14 +36,18 @@ interface defaults {% for intf in device_port_vlans[inventory_hostname] %} interface {{ intf }} description {{ device_conn[inventory_hostname][intf]['peerdevice'] }}-{{ device_conn[inventory_hostname][intf]['peerport'] }} +{% if device_conn[inventory_hostname][intf]['autoneg'] == "on" %} + speed auto {{ device_conn[inventory_hostname][intf]['speed'] }}full +{% else %} speed force {{ device_conn[inventory_hostname][intf]['speed'] }}full +{% endif %} {% if device_port_vlans[inventory_hostname][intf]['mode'] == 'Trunk' %} switchport mode trunk switchport trunk allowed vlan {{ device_port_vlans[inventory_hostname][intf]['vlanids'] }} {% else %} switchport mode dot1q-tunnel switchport access vlan {{ device_port_vlans[inventory_hostname][intf]['vlanids'] }} -{% if device_conn[inventory_hostname][intf]['speed'] == "100000" %} +{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg'] == "off" %} error-correction encoding reed-solomon {% else %} no error-correction encoding From 68e4662fda021f0e4ee440afa194ee16d549889b Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Thu, 5 Sep 2024 20:16:21 +0000 Subject: [PATCH 05/18] add changes Signed-off-by: Vaibhav Dahiya --- ansible/templates/minigraph_link_meta.j2 | 2 +- ansible/templates/minigraph_meta.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/templates/minigraph_link_meta.j2 b/ansible/templates/minigraph_link_meta.j2 index c0d13f370e8..3776ad43442 100644 --- a/ansible/templates/minigraph_link_meta.j2 +++ b/ansible/templates/minigraph_link_meta.j2 @@ -53,7 +53,7 @@ {% endif %} -{% if autoneg is defined %} +{% if autoneg_enabled is defined %} {% for if_index in vm_topo_config['autoneg_interfaces']['intfs'] %} diff --git a/ansible/templates/minigraph_meta.j2 b/ansible/templates/minigraph_meta.j2 index 34bc7eaf9fe..326961e4393 100644 --- a/ansible/templates/minigraph_meta.j2 +++ b/ansible/templates/minigraph_meta.j2 @@ -136,7 +136,7 @@ {{ switch_type }} {% endif %} -{% if autoneg is defined %} +{% if autoneg_enabled is defined %} AutoNegotiation From 7fcd21980181ac97780062fdf805b087f21baccd Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Thu, 5 Sep 2024 20:20:07 +0000 Subject: [PATCH 06/18] add columns Signed-off-by: Vaibhav Dahiya --- ansible/TestbedProcessing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/TestbedProcessing.py b/ansible/TestbedProcessing.py index 101dbe12081..6e5b3862ec4 100755 --- a/ansible/TestbedProcessing.py +++ b/ansible/TestbedProcessing.py @@ -311,7 +311,7 @@ def makeTestbed(data, outfile): def makeSonicLabLinks(data, outfile): - csv_columns = "StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode,Autoneg,SlotId" + csv_columns = "StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode,AutoNeg,SlotId" topology = data csv_file = outfile @@ -347,10 +347,13 @@ def makeSonicLabLinks(data, outfile): vlanMode = "" if not slotId: slotId = "" + if not AutoNeg: + AutoNeg = "" row = startDevice + "," + startPort + "," + endDevice + "," + \ endPort + "," + str(bandWidth) + \ "," + str(vlanID) + "," + vlanMode + \ + "," + str(AutoNeg) + \ "," + str(slotId) f.write(row + "\n") except IOError: From 20af2148cf4bc3d28670a6855fc21e5de607e07b Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Sun, 8 Sep 2024 20:56:25 +0000 Subject: [PATCH 07/18] add fixes Signed-off-by: Vaibhav Dahiya --- ansible/library/conn_graph_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/library/conn_graph_facts.py b/ansible/library/conn_graph_facts.py index 86e22b07edb..abc6dfbe16e 100755 --- a/ansible/library/conn_graph_facts.py +++ b/ansible/library/conn_graph_facts.py @@ -299,7 +299,7 @@ def csv_to_graph_facts(self): band_width = link["BandWidth"] vlan_ID = link["VlanID"] vlan_mode = link["VlanMode"] - autoneg_mode = link["AutoNeg"] + autoneg_mode = link.get("AutoNeg", "off") if start_device not in links: links[start_device] = {} From 461180a76455f44b5f868f2a602c7d6c182971d1 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Wed, 11 Sep 2024 00:39:15 +0000 Subject: [PATCH 08/18] add all changes Signed-off-by: Vaibhav Dahiya --- ansible/roles/fanout/templates/arista_7060_deploy.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/fanout/templates/arista_7060_deploy.j2 b/ansible/roles/fanout/templates/arista_7060_deploy.j2 index f02491fd6b9..dd74d43ab7b 100644 --- a/ansible/roles/fanout/templates/arista_7060_deploy.j2 +++ b/ansible/roles/fanout/templates/arista_7060_deploy.j2 @@ -36,7 +36,7 @@ interface defaults {% for intf in device_port_vlans[inventory_hostname] %} interface {{ intf }} description {{ device_conn[inventory_hostname][intf]['peerdevice'] }}-{{ device_conn[inventory_hostname][intf]['peerport'] }} -{% if device_conn[inventory_hostname][intf]['autoneg'] == "on" %} +{% if device_conn[inventory_hostname][intf]['autoneg']|lower == "on" %} speed auto {{ device_conn[inventory_hostname][intf]['speed'] }}full {% else %} speed force {{ device_conn[inventory_hostname][intf]['speed'] }}full @@ -47,7 +47,7 @@ interface {{ intf }} {% else %} switchport mode dot1q-tunnel switchport access vlan {{ device_port_vlans[inventory_hostname][intf]['vlanids'] }} -{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg'] == "off" %} +{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg']|lower == "off" %} error-correction encoding reed-solomon {% else %} no error-correction encoding From a9ead6d3fd3ecc6e4323ca54f4f15f03cd128351 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Mon, 23 Sep 2024 15:11:57 +0000 Subject: [PATCH 09/18] change port assignment Signed-off-by: Vaibhav Dahiya --- ansible/vars/topo_t0-116.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/vars/topo_t0-116.yml b/ansible/vars/topo_t0-116.yml index 6b9f306e848..44ef9623e98 100644 --- a/ansible/vars/topo_t0-116.yml +++ b/ansible/vars/topo_t0-116.yml @@ -135,7 +135,7 @@ topology: vm_offset: 3 DUT: autoneg_interfaces: - intfs: [13, 14, 15, 16, 17, 18, 19, 20] + intfs: [13, 14, 15, 16] vlan_configs: default_vlan_config: one_vlan_a one_vlan_a: From c359d2c4840aadcc6ba13d4e861b502e3acc3385 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Fri, 27 Sep 2024 22:58:06 +0000 Subject: [PATCH 10/18] add all Signed-off-by: Vaibhav Dahiya --- ansible/templates/minigraph_link_meta.j2 | 2 +- ansible/templates/minigraph_meta.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/templates/minigraph_link_meta.j2 b/ansible/templates/minigraph_link_meta.j2 index 3776ad43442..8b70d6773da 100644 --- a/ansible/templates/minigraph_link_meta.j2 +++ b/ansible/templates/minigraph_link_meta.j2 @@ -53,7 +53,7 @@ {% endif %} -{% if autoneg_enabled is defined %} +{% if msft_an_enabled is defined %} {% for if_index in vm_topo_config['autoneg_interfaces']['intfs'] %} diff --git a/ansible/templates/minigraph_meta.j2 b/ansible/templates/minigraph_meta.j2 index 326961e4393..99a8274bff4 100644 --- a/ansible/templates/minigraph_meta.j2 +++ b/ansible/templates/minigraph_meta.j2 @@ -136,7 +136,7 @@ {{ switch_type }} {% endif %} -{% if autoneg_enabled is defined %} +{% if msft_an_enabled is defined %} AutoNegotiation From e0b9105f4807fadc8f48a6b0cd78a9738e683f2d Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Sun, 29 Sep 2024 18:58:49 +0000 Subject: [PATCH 11/18] add Signed-off-by: Vaibhav Dahiya --- ansible/templates/minigraph_meta.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/templates/minigraph_meta.j2 b/ansible/templates/minigraph_meta.j2 index 99a8274bff4..e57765273c4 100644 --- a/ansible/templates/minigraph_meta.j2 +++ b/ansible/templates/minigraph_meta.j2 @@ -140,7 +140,7 @@ AutoNegotiation - {{ autoneg }} + {{ msft_an_enabled }} {% endif %} {% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %} From ae22beadf3b8c7f43844c98c23d49ec47dec5961 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Tue, 1 Oct 2024 19:45:58 +0000 Subject: [PATCH 12/18] add dependency Signed-off-by: Vaibhav Dahiya --- ansible/templates/minigraph_link_meta.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/templates/minigraph_link_meta.j2 b/ansible/templates/minigraph_link_meta.j2 index 8b70d6773da..b6420c01995 100644 --- a/ansible/templates/minigraph_link_meta.j2 +++ b/ansible/templates/minigraph_link_meta.j2 @@ -58,6 +58,7 @@ {% for if_index in vm_topo_config['autoneg_interfaces']['intfs'] %} {% set autoneg_intf = "Ethernet" ~ if_index ~ "/1" %} +{% if device_conn[inventory_hostname][port_alias_map[autoneg_intf]]['autoneg']|lower == "on" %} @@ -73,6 +74,7 @@ {{ device_conn[inventory_hostname][port_alias_map[autoneg_intf]]['peerdevice'] }}:{{ device_conn[inventory_hostname][port_alias_map[autoneg_intf]]['peerport'] }};{{ inventory_hostname }}:{{ autoneg_intf }} +{% endif %} {% endfor %} From 7cc9a7d7fc74570508c45339d78c55ee645c51b5 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Tue, 1 Oct 2024 23:38:42 +0000 Subject: [PATCH 13/18] add t0 topology as well Signed-off-by: Vaibhav Dahiya --- ansible/vars/topo_t0.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/vars/topo_t0.yml b/ansible/vars/topo_t0.yml index 5a547e0e9e8..58118cff347 100644 --- a/ansible/vars/topo_t0.yml +++ b/ansible/vars/topo_t0.yml @@ -51,6 +51,8 @@ topology: - 31 vm_offset: 3 DUT: + autoneg_interfaces: + intfs: [7, 8, 9, 10] vlan_configs: default_vlan_config: one_vlan_a one_vlan_a: From 37797079328e6b11a10040eee174de99371db076 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Wed, 2 Oct 2024 07:40:34 +0000 Subject: [PATCH 14/18] cosmetic Signed-off-by: Vaibhav Dahiya --- ansible/library/topo_facts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/library/topo_facts.py b/ansible/library/topo_facts.py index b6d8ffb3555..ac61b58a0b8 100644 --- a/ansible/library/topo_facts.py +++ b/ansible/library/topo_facts.py @@ -334,6 +334,7 @@ def get_topo_config(self, topo_name, hwsku, testbed_name, asics_present, card_ty if 'DUT' in topo_definition['topology']: vm_topo_config['DUT'] = topo_definition['topology']['DUT'] + # Add AutoNeg interfaces if 'autoneg_interfaces' in vm_topo_config['DUT']: vm_topo_config['autoneg_interfaces'] = topo_definition['topology']['DUT']['autoneg_interfaces'] else: From 99e8e5b88d3b9bd9f958d1b58516d8c3949940a8 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Wed, 2 Oct 2024 17:18:28 +0000 Subject: [PATCH 15/18] fix comments Signed-off-by: Vaibhav Dahiya --- ansible/library/topo_facts.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/library/topo_facts.py b/ansible/library/topo_facts.py index ac61b58a0b8..b6d8ffb3555 100644 --- a/ansible/library/topo_facts.py +++ b/ansible/library/topo_facts.py @@ -334,7 +334,6 @@ def get_topo_config(self, topo_name, hwsku, testbed_name, asics_present, card_ty if 'DUT' in topo_definition['topology']: vm_topo_config['DUT'] = topo_definition['topology']['DUT'] - # Add AutoNeg interfaces if 'autoneg_interfaces' in vm_topo_config['DUT']: vm_topo_config['autoneg_interfaces'] = topo_definition['topology']['DUT']['autoneg_interfaces'] else: From 7ac510cca0483acd7a4f44c4150b0dad3a70e4df Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Wed, 2 Oct 2024 22:32:49 +0000 Subject: [PATCH 16/18] add comment Signed-off-by: Vaibhav Dahiya --- ansible/roles/fanout/templates/arista_7060_deploy.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/roles/fanout/templates/arista_7060_deploy.j2 b/ansible/roles/fanout/templates/arista_7060_deploy.j2 index dd74d43ab7b..6ea3c73e59d 100644 --- a/ansible/roles/fanout/templates/arista_7060_deploy.j2 +++ b/ansible/roles/fanout/templates/arista_7060_deploy.j2 @@ -47,9 +47,10 @@ interface {{ intf }} {% else %} switchport mode dot1q-tunnel switchport access vlan {{ device_port_vlans[inventory_hostname][intf]['vlanids'] }} -{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg']|lower == "off" %} +# TODO: Add a var/check in fanout devices if autoneg is enabled with the below check +{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg']|lower == "off" %} error-correction encoding reed-solomon -{% else %} +{% else %} no error-correction encoding {% endif %} {% endif %} From dc6fa54af3e849a84a11cd63510011a0879f6807 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Thu, 3 Oct 2024 02:46:35 +0000 Subject: [PATCH 17/18] add another comment Signed-off-by: Vaibhav Dahiya --- ansible/roles/fanout/templates/arista_7060_deploy.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/fanout/templates/arista_7060_deploy.j2 b/ansible/roles/fanout/templates/arista_7060_deploy.j2 index 6ea3c73e59d..ea14e2e63ec 100644 --- a/ansible/roles/fanout/templates/arista_7060_deploy.j2 +++ b/ansible/roles/fanout/templates/arista_7060_deploy.j2 @@ -36,6 +36,7 @@ interface defaults {% for intf in device_port_vlans[inventory_hostname] %} interface {{ intf }} description {{ device_conn[inventory_hostname][intf]['peerdevice'] }}-{{ device_conn[inventory_hostname][intf]['peerport'] }} +# TODO: Add an additional var/check in fanout devices if autoneg is enabled with the below check {% if device_conn[inventory_hostname][intf]['autoneg']|lower == "on" %} speed auto {{ device_conn[inventory_hostname][intf]['speed'] }}full {% else %} @@ -47,7 +48,7 @@ interface {{ intf }} {% else %} switchport mode dot1q-tunnel switchport access vlan {{ device_port_vlans[inventory_hostname][intf]['vlanids'] }} -# TODO: Add a var/check in fanout devices if autoneg is enabled with the below check +# TODO: Add an additional var/check in fanout devices if autoneg is enabled with the below check {% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg']|lower == "off" %} error-correction encoding reed-solomon {% else %} From b78563cb48edd0ee6b00b9bb47e64c6c9b824cf1 Mon Sep 17 00:00:00 2001 From: Vaibhav Dahiya Date: Thu, 3 Oct 2024 08:11:32 +0000 Subject: [PATCH 18/18] format Signed-off-by: Vaibhav Dahiya --- ansible/roles/fanout/templates/arista_7060_deploy.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/fanout/templates/arista_7060_deploy.j2 b/ansible/roles/fanout/templates/arista_7060_deploy.j2 index ea14e2e63ec..23d9bcb2b49 100644 --- a/ansible/roles/fanout/templates/arista_7060_deploy.j2 +++ b/ansible/roles/fanout/templates/arista_7060_deploy.j2 @@ -49,9 +49,9 @@ interface {{ intf }} switchport mode dot1q-tunnel switchport access vlan {{ device_port_vlans[inventory_hostname][intf]['vlanids'] }} # TODO: Add an additional var/check in fanout devices if autoneg is enabled with the below check -{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg']|lower == "off" %} +{% if device_conn[inventory_hostname][intf]['speed'] == "100000" and device_conn[inventory_hostname][intf]['autoneg']|lower == "off" %} error-correction encoding reed-solomon -{% else %} +{% else %} no error-correction encoding {% endif %} {% endif %}