{# Checkbox #} {% if perms.dcim.change_interface or perms.dcim.delete_interface %} {% endif %} {# Icon and name #} {{ iface }} {# LAG #} {% if iface.lag %} {{ iface.lag }} {% endif %} {# Description #} {{ iface.description|default:"—" }} {# 802.1Q mode #} {{ iface.get_mode_display|default:"—" }} {# Cable #} {% if iface.cable %} {{ iface.cable }} {% else %} — {% endif %} {# Connection or type #} {% if iface.is_lag %} LAG interface
{{ iface.member_interfaces.all|join:", "|default:"No members" }} {% elif iface.is_virtual %} Virtual interface {% elif iface.is_wireless %} Wireless interface {% elif iface.connected_endpoint.name %} {# Connected to an Interface #} {{ iface.connected_endpoint.device }} {{ iface.connected_endpoint }} {% elif iface.connected_endpoint.term_side %} {# Connected to a CircuitTermination #} {% with iface.connected_endpoint.get_peer_termination as peer_termination %} {% if peer_termination %} {% if peer_termination.connected_endpoint %} {{ peer_termination.connected_endpoint.device }}
via {{ iface.connected_endpoint.circuit }} {{ peer_termination.connected_endpoint }} {% else %} {{ peer_termination.site }} via {{ iface.connected_endpoint.circuit }} {% endif %} {% else %} {{ iface.connected_endpoint.circuit }} {% endif %} {% endwith %} {% else %} Not connected {% endif %} {# Buttons #} {% if show_graphs %} {% if iface.connected_endpoint %} {% endif %} {% endif %} {% if perms.ipam.add_ipaddress %} {% endif %} {% if perms.dcim.change_interface %} {% if not iface.is_virtual %} {% if iface.cable %} {% if iface.cable.status %} {% else %} {% endif %} {% else %} {% endif %} {% endif %} {% endif %} {% if perms.dcim.delete_interface %} {% if iface.connection or iface.circuit_termination %} {% else %} {% endif %} {% endif %} {% with ipaddresses=iface.ip_addresses.all %} {% if ipaddresses %} {# Placeholder #} {% if perms.dcim.change_interface or perms.dcim.delete_interface %} {% endif %} {# IP addresses table #} {% for ip in iface.ip_addresses.all %} {# IP address #} {# Primary/status/role #} {# VRF #} {# Description #} {# Buttons #} {% endfor %}
IP Address Status/Role VRF Description
{{ ip }} {% if device.primary_ip4 == ip or device.primary_ip6 == ip %} Primary {% endif %} {{ ip.get_status_display }} {% if ip.role %} {{ ip.get_role_display }} {% endif %} {% if ip.vrf %} {{ ip.vrf.name }} {% else %} Global {% endif %} {% if ip.description %} {{ ip.description }} {% else %} {% endif %} {% if perms.ipam.change_ipaddress %} {% endif %} {% if perms.ipam.delete_ipaddress %} {% endif %}
{% endif %} {% endwith %}