Skip to content

Commit 2d4d222

Browse files
committed
chore: disable fec on minigraph for ixia
Signed-off-by: Austin Pham <[email protected]>
1 parent 3983ab0 commit 2d4d222

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

ansible/library/conn_graph_facts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ def csv_to_graph_facts(self):
300300
vlan_ID = link["VlanID"]
301301
vlan_mode = link["VlanMode"]
302302
autoneg_mode = link.get("AutoNeg")
303+
force_fec = link.get("force_fec", False)
303304

304305
if start_device not in links:
305306
links[start_device] = {}
@@ -314,11 +315,13 @@ def csv_to_graph_facts(self):
314315
"peerdevice": end_device,
315316
"peerport": end_port,
316317
"speed": band_width,
318+
"force_fec": force_fec
317319
}
318320
links[end_device][end_port] = {
319321
"peerdevice": start_device,
320322
"peerport": start_port,
321323
"speed": band_width,
324+
"force_fec": force_fec
322325
}
323326

324327
if autoneg_mode:

ansible/templates/minigraph_link_meta.j2

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{%- set ns = namespace(link_metadata_defined=False) -%}
22

3-
{%- if 'dualtor' in topo or (macsec_card is defined and macsec_card == True and 't2' in topo) -%}
3+
{%- if 'dualtor' in topo or (macsec_card is defined and macsec_card == True and 't2' in topo) or ("ixia" in topo) -%}
44
{% set ns.link_metadata_defined = True %}
55
{%- endif -%}
66

@@ -81,6 +81,19 @@
8181
</a:LinkMetadata>
8282
{% endif %}
8383
{% endif %}
84+
{% if device_conn[inventory_hostname][iface_name]["force_fec"] %}
85+
<a:LinkMetadata>
86+
<a:Name i:nil="true"/>
87+
<a:Properties>
88+
<a:DeviceProperty>
89+
<a:Name>FECDisabled</a:Name>
90+
<a:Reference i:nil="true"/>
91+
<a:Value>True</a:Value>
92+
</a:DeviceProperty>
93+
</a:Properties>
94+
<a:Key>{{ device_conn[inventory_hostname][iface_name]["peerdevice"] }}:{{ device_conn[inventory_hostname][iface_name]["peerport"]}};{{ inventory_hostname }}:{{ port_name_map[iface_name] }}</a:Key>
95+
</a:LinkMetadata>
96+
{% endif %}
8497
{% endfor %}
8598
{% endif %}
8699
{% if ns.link_metadata_defined %}

0 commit comments

Comments
 (0)