Package: netbox-cisco-support
NetBox Cisco Support API PluginNetBoxplugin using Cisco Support APIs to gather EoX and Contract coverage information for Cisco devices.CompatibilityThis plugin in compatible withNetBox3.0.3 and later.InstallationThe plugin is available as a Python package in pypi and can be installed with pip$ source /opt/netbox/venv/bin/activate
(venv) $ pip install netbox-cisco-supportEnable the plugin in/opt/netbox/netbox/netbox/configuration.py:# Enable installed plugins. Add the name of each plugin to the list.
PLUGINS = ['netbox_cisco_support']

# Plugins configuration settings. These settings are used by various plugins that the user may have installed.
# Each key in the dictionary is the name of an installed plugin and its value is a dictionary of settings.
PLUGINS_CONFIG = {
    'netbox_cisco_support': {
        'cisco_client_id': 'bar',     # Client ID of your plugin installation. Generate it inside Cisco API Console
        'cisco_client_secret': 'bazz' # Client Secret of your plugin installation. Generate it inside Cisco API Console
    }
}Restart NetBox and addnetbox-cisco-supportto yourlocal_requirements.txt(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py migrate
# sudo systemctl restart netboxSync Cisco EoX data for the first time(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py sync_eox_dataTo periodically refresh EoX data create a cronjob which callssync_eox_dataperiodically$ cat /etc/cron.d/netbox_sync_eox_data

# Update Cisco EoX Data every Saturday at 14:03
MAILTO="mail@example.com"
3 14 * * 6 root /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py sync_eox_dataor log into /tmp file$ cat /etc/cron.d/netbox_sync_eox_data

# Update Cisco EoX Data every Saturday at 14:03
3 14 * * 6 root /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py sync_eox_data > /tmp/netbox_sync_eox_dataConfigurationThe following options are available:cisco_client_id: String - Client ID of your plugin installation. Generate it insideCisco API Consolecisco_client_secret: String - Client Secret of your plugin installation. Generate it insideCisco API ConsoleRequirementsIn order to get the correct data using the API, several requirements must be fulfilled:ACisco API ID and secret(with access to the APIs "EOX V5 API" and "Serial Number to Information API Version 2") must have been created and configured insideconfiguration.pyA manufacturer calledCiscomust have been configured inside NetBox. If your manufacturer is named differently, change if insideconfiguration.py:PLUGINS_CONFIG = {
    'netbox_cisco_support': {
        ...,
        'manufacturer': 'Cisco Systems' # Optional setting to specify the manufacturer (Cisco by default)
    }
}All devices types for manufacturer Cisco must have filled the optionalPart numberfield inside NetBox with the correct Base PID for that Cisco product.All devices with devices types from manufacturer Cisco must have filled theSerial Numberfield inside NetBox with a valid Cisco serial number for that Cisco product.If you want full visibility, the support contracts for all your devices needs to be associated with the CCO ID which has been used for created the API ID and secret. Otherwise you will only get a coverage true/false answer, but no detailed information regarding end of support contract coverage.How it worksCalling the sync_eox_data method will catch all device types for the configured manufacturerEach device typesPart numberwill be send to Cisco EoX API. API answer will be saved inside aCiscoDeviceTypeSupportmodel. One CiscoDeviceTypeSupport per device.Afterwards all devices for the configured manufacturer will be gatheredEach devicesSerial numberwill be send to Cisco sn2info coverage API. API answer will be saved inside aCiscoDeviceSupportmodel. One CiscoDeviceSupport per device.The device type template will be extended to display this data. Information will be shown, if aCiscoDeviceTypeSupportobject for that device type exists.The device template will be exteneded to display device and device type information. Information will be shown, if aCiscoDeviceSupportobject for that device exists. Additionally device type information will be shown, if aCiscoDeviceTypeSupportobject for the parent device type exists.Coloring: Expired timestamps will be colored red, timestamps which will expire in the next calendar year will be colored yellow for planning / forecast reasons.Screenshots