Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible/library/conn_graph_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {}
Expand All @@ -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] = {
Expand Down
15 changes: 14 additions & 1 deletion ansible/templates/minigraph_link_meta.j2
Original file line number Diff line number Diff line change
@@ -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 -%}

Expand Down Expand Up @@ -81,6 +81,19 @@
</a:LinkMetadata>
{% endif %}
{% endif %}
{% if device_conn[inventory_hostname][iface_name]["fec_disable"] %}
<a:LinkMetadata>
<a:Name i:nil="true"/>
<a:Properties>
<a:DeviceProperty>
<a:Name>FECDisabled</a:Name>
<a:Reference i:nil="true"/>
<a:Value>True</a:Value>
</a:DeviceProperty>
</a:Properties>
<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>
</a:LinkMetadata>
{% endif %}
{% endfor %}
{% endif %}
{% if ns.link_metadata_defined %}
Expand Down