{% extends 'dcim/device/base.html' %} {% load helpers %} {% block content %}
{% if error %}
{{ error }}
{% elif client_data %}
Reachability Status
{% if client_data.connected %}
Reachable
{% else %}
{{ client_data.connection_status|default:"Unreachable" }}
{% if client_data.reachability_failure_reason %}
{{ client_data.reachability_failure_reason }}
{% endif %} {% endif %} {% if client_data.collection_status %}
{% if client_data.collection_status == "Managed" %} {{ client_data.collection_status }} {% elif client_data.collection_status == "In Progress" %} {{ client_data.collection_status }} {% elif client_data.collection_status == "Partial Collection Failure" or client_data.collection_status == "Could Not Synchronize" %} {{ client_data.collection_status }} {% else %} {{ client_data.collection_status }} {% endif %}
{% endif %} {% if client_data.uptime %}
Uptime:
{{ client_data.uptime }}
{% endif %}
Device Details {% if client_data.is_stack %} Stack ({{ client_data.stack_count }}) {% endif %}
{% if client_data.role %} {% endif %}
Hostname: {{ client_data.hostname }}
Management IP: {% if client_data.management_ip %} {{ client_data.management_ip }} {% else %} N/A {% endif %}
Serial Number{% if client_data.is_stack %}s{% endif %}: {% if client_data.is_stack and client_data.serial_list %} {% for serial in client_data.serial_list %}
{{ forloop.counter }} {{ serial }}
{% endfor %} {% else %} {{ client_data.serial_number|default:"N/A" }} {% endif %}
MAC Address: {% if client_data.mac_address %} {{ client_data.mac_address }} {% else %} N/A {% endif %}
Role: {{ client_data.role }}
Software & Platform
{% if client_data.software_type %} {% endif %}
Software Version: {{ client_data.software_version|default:"N/A" }}
Software Type: {{ client_data.software_type }}
Platform: {% if client_data.is_stack and client_data.platform_list|length > 1 %} {% for plat in client_data.platform_list %}
{{ forloop.counter }} {{ plat }}
{% endfor %} {% else %} {{ client_data.platform|default:"N/A" }} {% endif %}
Series: {{ client_data.series|default:"N/A" }}
Device Family: {{ client_data.device_family|default:"N/A" }}
{% if client_data.snmp_location or client_data.snmp_contact %}
Location & Contact
{% if client_data.snmp_location %}
SNMP Location:
{{ client_data.snmp_location }}
{% endif %} {% if client_data.snmp_contact %}
SNMP Contact:
{{ client_data.snmp_contact }}
{% endif %}
{% endif %} {% if client_data.boot_time or client_data.last_updated %}
Timestamps
{% if client_data.boot_time %}
Boot Time:
{{ client_data.boot_time }}
{% endif %} {% if client_data.last_updated %}
Last Updated in Catalyst Center:
{{ client_data.last_updated }}
{% endif %}
{% endif %} {% if client_data.compliance or client_data.advisories %}
{% if client_data.compliance %}
Compliance Status {% if client_data.compliance.overall_status == "NON_COMPLIANT" %} Non-Compliant {% else %} Compliant {% endif %}
{% for record in client_data.compliance.compliance_records %} {% empty %} {% endfor %}
Type Status
{{ record.type }} {% if record.status == "COMPLIANT" %} Compliant {% elif record.status == "NON_COMPLIANT" %} Non-Compliant {% elif record.status == "NOT_APPLICABLE" %} N/A {% elif record.status == "IN_PROGRESS" %} In Progress {% else %} {{ record.status }} {% endif %}
No compliance data available
{% endif %} {% if client_data.advisories %}
Security Advisories (PSIRT) {% if client_data.advisories.advisory_count > 0 %} {{ client_data.advisories.advisory_count }} Advisory{{ client_data.advisories.advisory_count|pluralize:",ies" }} {% else %} No Advisories {% endif %}
{% if client_data.advisories.advisory_count > 0 %}
Scan Status: {{ client_data.advisories.scan_status }}
{% if client_data.advisories.hidden_count > 0 %}
{{ client_data.advisories.hidden_count }} hidden advisory{{ client_data.advisories.hidden_count|pluralize:",ies" }}
{% endif %} {% else %}
No security advisories affect this device
{% endif %}
{% endif %}
{% endif %} {% if client_data.cached %}
Data from cache
{% endif %} {% else %}
No device data available from Catalyst Center. The device may not be in the inventory.
{% endif %} {% if client_data %}
Sync from Catalyst Center

Select fields to sync from Catalyst Center to NetBox. = already synced

Basic Fields
{% if client_data.management_ip %} {% with current_ip=object.primary_ip4.address.ip|default:"" new_ip=client_data.management_ip %}
{% endwith %} {% endif %} {% if client_data.sync_serial_number %} {% with current_serial=object.serial|default:"" new_serial=client_data.sync_serial_number %}
{% endwith %} {% endif %} {% if client_data.snmp_location %} {% with current_loc=object.comments|default:"" new_loc=client_data.snmp_location %}
{% endwith %} {% endif %}
Device Type & Platform
{% if client_data.platform %} {% with current_dt=object.device_type.model|default:"" new_dt=client_data.platform %}
{% endwith %} {% endif %} {% if client_data.software_type and client_data.software_version %} {% with current_plat=object.platform.name|default:"" new_plat_name=client_data.software_version %}
{% endwith %} {% endif %}
Catalyst Center Information
{% with cc_id=object.custom_field_data.cc_device_id|default:"" new_id=client_data.device_id|default:"" %} {% if new_id %}
{% endif %} {% endwith %} {% with cc_series=object.custom_field_data.cc_series|default:"" new_series=client_data.series|default:"" %} {% if new_series %}
{% endif %} {% endwith %} {% with cc_role=object.custom_field_data.cc_role|default:"" new_role=client_data.role|default:"" %} {% if new_role %}
{% endif %} {% endwith %}
Interfaces
Power over Ethernet
{% endif %} {% if catalyst_url %}
{% if client_data.device_id %} View in Catalyst Center {% else %} Open Catalyst Center {% endif %}
{% endif %} {% if client_data %} {% endif %}
{% endblock %}