diff --git a/ansible/library/conn_graph_facts.py b/ansible/library/conn_graph_facts.py index 2663e94114..d327832b56 100755 --- a/ansible/library/conn_graph_facts.py +++ b/ansible/library/conn_graph_facts.py @@ -300,6 +300,7 @@ def csv_to_graph_facts(self): vlan_ID = link["VlanID"] vlan_mode = link["VlanMode"] autoneg_mode = link.get("AutoNeg", "off") + fec_disable = link.get("FECDisable", False) if start_device not in links: links[start_device] = {} @@ -315,12 +316,14 @@ def csv_to_graph_facts(self): "peerport": end_port, "speed": band_width, "autoneg": autoneg_mode, + "fec_disable": fec_disable } links[end_device][end_port] = { "peerdevice": start_device, "peerport": start_port, "speed": band_width, "autoneg": autoneg_mode, + "fec_disable": fec_disable } port_vlans[start_device][start_port] = { diff --git a/ansible/templates/minigraph_link_meta.j2 b/ansible/templates/minigraph_link_meta.j2 index 51dd83c2e7..ca1d598557 100644 --- a/ansible/templates/minigraph_link_meta.j2 +++ b/ansible/templates/minigraph_link_meta.j2 @@ -1,6 +1,6 @@ {%- set ns = namespace(link_metadata_defined=False) -%} -{%- if 'dualtor' in topo or (macsec_card is defined and macsec_card == True and 't2' in topo) -%} +{%- if 'dualtor' in topo or (macsec_card is defined and enable_macsec is defined and macsec_card == True and 't2' in topo) or ("ixia" in topo) -%} {% set ns.link_metadata_defined = True %} {%- endif -%} @@ -81,6 +81,19 @@ {% endif %} {% endif %} +{% if device_conn[inventory_hostname][iface_name]["fec_disable"] %} + + + + + FECDisabled + + True + + + {{ device_conn[inventory_hostname][iface_name]["peerdevice"] }}:{{ device_conn[inventory_hostname][iface_name]["peerport"]}};{{ inventory_hostname }}:{{ port_name_map[iface_name] }} + +{% endif %} {% endfor %} {% endif %} {% if ns.link_metadata_defined %}