Skip to content
Merged
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 %}
<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