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")
fec_disable = link.get("FECDisable", False)

if start_device not in links:
links[start_device] = {}
Expand All @@ -314,11 +315,13 @@ def csv_to_graph_facts(self):
"peerdevice": end_device,
"peerport": end_port,
"speed": band_width,
"fec_disable": fec_disable
}
links[end_device][end_port] = {
"peerdevice": start_device,
"peerport": start_port,
"speed": band_width,
"fec_disable": fec_disable
}

if autoneg_mode:
Expand Down
16 changes: 14 additions & 2 deletions ansible/templates/minigraph_link_meta.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{%- set ns = namespace(link_metadata_defined=False) -%}

{%- if 'dualtor' in topo or
(macsec_card is defined and enable_macsec 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 %}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean all existing ixia topo need to update their links.csv file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdszhang this will make sure that this FEC feature toggle only available to IXIA, they don't need to update their links.csv but if they want to use, they can toggle it on.

{%- endif -%}

Expand Down Expand Up @@ -82,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
Loading