Skip to content
Merged
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
8 changes: 6 additions & 2 deletions ansible/templates/minigraph_link_meta.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{%- endif -%}

{%- if device_conn is defined and inventory_hostname in device_conn and
device_conn[inventory_hostname].values() | selectattr('autoneg', 'defined') | selectattr('autoneg', 'equalto', 'on') | list | length > 0 -%}
device_conn[inventory_hostname].values() | selectattr('autoneg', 'defined') | selectattr('autoneg', 'in', ['on', 'off']) | list | length > 0 -%}
{% set ns.link_metadata_defined = True %}
{%- endif -%}
{% if ns.link_metadata_defined %}
Expand Down Expand Up @@ -61,13 +61,17 @@
{% if device_conn is defined and inventory_hostname in device_conn %}
{% for iface_name in device_conn[inventory_hostname].keys() %}
{% if iface_name in device_conn[inventory_hostname] and 'autoneg' in device_conn[inventory_hostname][iface_name] %}
{% if 'on' in device_conn[inventory_hostname][iface_name]['autoneg'] %}
{% if device_conn[inventory_hostname][iface_name]['autoneg'] in ['on', 'off'] %}
<a:LinkMetadata>
<a:Name i:nil="true"/>
<a:Properties>
<a:DeviceProperty>
<a:Name>AutoNegotiation</a:Name>
{% if device_conn[inventory_hostname][iface_name]['autoneg'] in ['on'] %}
<a:Value>True</a:Value>
{% else %}
<a:Value>False</a:Value>
{% endif %}
</a:DeviceProperty>
{% if msft_an_enabled is defined %}
<a:DeviceProperty>
Expand Down
Loading