{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {# Lazy-loaded fragment: L2 switchport state (M34). Drift vs the native NetBox interface. #} {% include "netbox_nso_plugin/categories/_adapter_error.html" %} {% if switchport_states %}

Switchport mode/VLAN observed by NSO, compared against the native NetBox interface (mode/untagged_vlan/tagged_vlans).

{% include "netbox_nso_plugin/categories/_table_filter.html" with fid="flt-switchport" placeholder="Filter by interface / mode…" show_status=True %}
{% for s in switchport_states %} {% endfor %}
InterfaceModeUntaggedTaggedStatus
{{ s.interface.name }} {% if s.mode %}{{ s.mode }}{% else %}{% endif %} {% if s.untagged_vlan %}{{ s.untagged_vlan.vid }}{% else %}{% endif %} {% with tagged=s.tagged_vlans.all %}{% if tagged %}{% for v in tagged %}{{ v.vid }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}{% endif %}{% endwith %} {% include "netbox_nso_plugin/categories/_state_badge.html" with status=s.status %} {% url 'plugins:netbox_nso_plugin:switchport_accept' pk=s.pk as accept_url %}{% include "netbox_nso_plugin/categories/_accept_cell.html" with accept_url=accept_url status=s.status title="Make NetBox the source of truth for this switchport (committed to the device on Apply)" %}
{% else %}

No switchports reported for this device.

{% endif %}