{% extends 'generic/object.html' %} {% load helpers %} {% block title %}Catalyst Center Neighbor Discovery{% endblock %} {% block header %}

Catalyst Center Neighbor Discovery

{% endblock %} {% block content %}
Discover CDP/LLDP Neighbors
{% if catalyst_url and device_id %} Catalyst Center {% endif %}
{% if error %} {% endif %} {% if device_id and neighbors %} {# Summary stats #}
Neighbors for {{ device_name }}
{{ stats.total }} total {% if stats.connected %} {{ stats.connected }} connected {% endif %} {% if stats.missing %} {{ stats.missing }} missing cable {% endif %} {% if stats.unknown %} {{ stats.unknown }} unknown {% endif %} {% if stats.mismatch %} {{ stats.mismatch }} mismatch {% endif %}
{% csrf_token %}
{% for neighbor in neighbors %} {% endfor %}
Protocol Local Interface Neighbor Remote Interface Platform Cable Status
{% if neighbor.cable_status == "missing" and neighbor.nb_local_interface_id and neighbor.nb_remote_interface_id %} {% endif %} {{ neighbor.protocol }} {% if neighbor.nb_local_interface %} {{ neighbor.nb_local_interface.name }} {% if neighbor.local_match_info %}
{{ neighbor.local_match_info }} {% endif %} {% else %} {{ neighbor.local_interface }} {% if neighbor.local_interface_normalized != neighbor.local_interface %} ({{ neighbor.local_interface_normalized }}) {% endif %} {% endif %}
{% if neighbor.nb_neighbor_url %} {{ neighbor.nb_neighbor_device.name }} {% if neighbor.device_match_method == "vc" %}
via VC "{{ neighbor.nb_neighbor_vc.name }}" {% elif neighbor.device_match_method == "fqdn" %}
matched by FQDN {% endif %} {% else %} {{ neighbor.device_id }} {% if neighbor.cc_device_id %}
in Catalyst Center
Import {% else %} (not in NetBox or CC) {% endif %} {% if neighbor.matched_device_type %}
{{ neighbor.matched_device_type.model }} {% elif not neighbor.cc_device_id %}
Create {% endif %} {% endif %} {% if neighbor.ip_address %}
{{ neighbor.ip_address }} {% endif %}
{% if neighbor.nb_remote_interface %} {{ neighbor.nb_remote_interface.name }} {% if neighbor.remote_match_info %}
{{ neighbor.remote_match_info }} {% endif %} {% else %} {{ neighbor.remote_interface }} {% if neighbor.remote_interface_normalized != neighbor.remote_interface %} ({{ neighbor.remote_interface_normalized }}) {% endif %} {% endif %}
{{ neighbor.platform|truncatechars:50 }} {% if neighbor.matched_device_type %}
{{ neighbor.matched_device_type }} {% endif %}
{% if neighbor.cable_status == "connected" %} Connected {% elif neighbor.cable_status == "missing" %} No Cable {% elif neighbor.cable_status == "mismatch" %} Mismatch {% elif neighbor.cable_status == "partial" %} Partial Match {% else %} Unknown {% endif %}
{% if stats.missing > 0 %} {% endif %}
{% elif device_id and not error %}

No neighbors discovered for {{ device_name }}

{% endif %} {% endblock %}