Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ansible][minigraph] add support for adding autonegotiation in minigraph templates and fanout EOS #13990

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
28 changes: 28 additions & 0 deletions ansible/templates/minigraph_link_meta.j2
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,31 @@
</Link>
</LinkMetadataDeclaration>
{% endif %}

{% if autoneg is defined %}
wangxin marked this conversation as resolved.
Show resolved Hide resolved
<LinkMetadataDeclaration>
<Link xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
{% 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) %}
<a:LinkMetadata>
<a:Name i:nil="true"/>
<a:Properties>
<a:DeviceProperty>
<a:Name>AutoNegotiation</a:Name>
<a:Value>True</a:Value>
</a:DeviceProperty>
<a:DeviceProperty>
<a:Name>FECDisabled</a:Name>
<a:Reference i:nil="true"/>
<a:Value>True</a:Value>
</a:DeviceProperty>
</a:Properties>
<a:Key>{{ vms[index] }}:{{ vm_intfs[if_index] }};{{ inventory_hostname }}:{{ port_alias[dut_intfs[if_index]] }}</a:Key>
</a:LinkMetadata>
{% endfor %}
{% endfor %}
</Link>
</LinkMetadataDeclaration>
{% endif %}
7 changes: 7 additions & 0 deletions ansible/templates/minigraph_meta.j2
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@
<a:Value>{{ switch_type }}</a:Value>
</a:DeviceProperty>
{% endif %}
{% if autoneg is defined %}
<a:DeviceProperty>
<a:Name>AutoNegotiation</a:Name>
<a:Reference i:nil="true"/>
<a:Value>{{ autoneg }}</a:Value>
</a:DeviceProperty>
{% endif %}
{% if num_asics == 1 and switch_type is defined and switch_type == 'voq' %}
<a:DeviceProperty>
<a:Name>SwitchId</a:Name>
Expand Down
Loading