Skip to content

Commit ed79ad1

Browse files
authored
[ansible][minigraph] Fix minigraph template for devices which have autoneg enabled but the topo file does not contain autoneg interfaces (#15134)
This pull request updates the Jinja2 template minigraph_link_meta.j2 by modifying the generation of the section. Key Changes: * The condition has been changed from simply checking if msft_an_enabled is defined to also checking if vm_topo_config.get('autoneg_interfaces') is not None. * This ensures that the section is only included if both msft_an_enabled is defined and the autoneg_interfaces attribute in vm_topo_config exists and is not None. This ensures if some testbeds/devices have msft_an_enabled they do not end up treated as autoneg devices unless the topo file contains the AN interface list Signed-off-by: Vaibhav Dahiya <vdahiya@microsoft.com>
1 parent ad3bffb commit ed79ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ansible/templates/minigraph_link_meta.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</LinkMetadataDeclaration>
5454
{% endif %}
5555

56-
{% if msft_an_enabled is defined %}
56+
{% if msft_an_enabled is defined and vm_topo_config.get('autoneg_interfaces') is not none %}
5757
<LinkMetadataDeclaration>
5858
<Link xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
5959
{% for if_index in vm_topo_config['autoneg_interfaces']['intfs'] %}

0 commit comments

Comments
 (0)