Package: netbox-device-support-plugin
NetBox Cisco Support PluginThisREADME.mddocumentation contains the following sections:Plugin OverviewCompatibilityInstallationEnable the PluginConfigure the PluginRebuild and Restart NetBox-DockerRun Database MigrationsSync the Cisco Support DataHow it worksPlugin ScreenshotsLanguages and ToolsPlugin OverviewThisNetBoxtracks with the data from the Cisco support APIs
the device support status, the device type EoX status as well as the recommended software release. Each
Cisco device and Cisco device type have a detail view with all data. There is also a list view with filter
options for all devices or device types. All data can also be received and updated over the NetBox REST API.There is a Python script callessync_cisco_support_datawhich can be used as below to update all fields
which contains data from the Cisco support APIs. This script can be executed for example inside a Azure
DevOps Build Pipeline once a day as these data don't change that often.The Python scriptsync_cisco_support_datawill do requests to the Cisco support APIs to update the following fields:ModelCiscoDeviceTypeSupport::warning:Verbose model field names listedModel properties are not documented as they can't be editedName *:warning:PID *:warning:Has EoX ErrorEoX ErrorEoX Announcement DateEnd of Sale DateEnd of Sw-Maint. DateEnd of Sec-Vul. DateEnd of Routine-Fail. Analysis DateEnd of Service Cont. RenewalEnd of Svc-Attach. DateLast Date of Support*:warning:Overwritten by custom model save() functionModelCiscoDeviceSupport::warning:Verbose model field names listedModel properties are not documented as they can't be editedName *:warning:Serial *:warning:PID *:warning:API Status *:warning:Is CoveredSerial OwnerCoverage End DateService Contract NumberService Line DescriptionWarranty TypeWarranty End DateRecommended ReleaseHas EoX Error *:warning:EoX Error *:warning:EoX Announcement Date *:warning:End of Sale Date *:warning:End of Sw-Maint. Date *:warning:End of Sec-Vul. Date *:warning:End of Routine-Fail. Analysis Date *:warning:End of Service Cont. Renewal *:warning:End of Svc-Attach. Date *:warning:Last Date of Support *:warning:*:warning:Overwritten by custom model save() functionThere are some view fields which provide additional information which can't be updated directly with the help
of the Cisco support APIs. These fields should be updated with a external script over the NetBox REST API
(for example with a Azure DevOps Build Pipeline).The following fields can't be updated directly by the Python scriptsync_cisco_support_data.ModelCiscoDeviceSupport::warning:Verbose model field names listedModel properties are not documented as they can't be editedContract Supplier *:warning:Partner Contract StatusPartner Service LevelPartner Customer NumberPartner Coverage End DateDesired ReleaseDesired Release Status *:warning:Current ReleaseCurrent Release Status *:warning:*:warning:Overwritten by custom model save() functionNo Edit ViewsManual edit of fields only in the NetBox Django admin portal
At the moment there are no edit views to edit field of any data model of this plugin. The because the
idea of this plugin is not to change fields manually (only automated by Python or REST API). If you want
to change field manually, at the moment this can only be done in the NetBox Django admin portal.Compatibility:warning:NetBox 3.5: This plugin is for NetBox 3.5This plugin is compatible withNetBox3.5.0 and later.NetBox VersionPlugin Version3.50.0.1InstallationThe installation and configuration steps are for theNetBox-Dockerinstallation. To install this plugin make sure you followed the prerequisites for using NetBox plugins with
NetBox-Docker:Using Netbox PluginsThe plugin is available as a Python package in pypi and can be installed with pip.pipinstallnetbox_device_support_pluginAdd the plugin to theplugin_requirements.txtorrequirements.txtof your NetBox-Docker project.# Netbox Cisco Support Pluginnetbox-device-support-pluginEnable the PluginEnable thenetbox-device-support-pluginplugin in/netbox-docker/configuration/plugins.pyand add the
plugin configuration also in the same file.# Enable installed plugins. Add the name of each plugin to the list.PLUGINS=["netbox_napalm_plugin","netbox_device_support_plugin",]Configure the PluginIn order to get valid API response data, several requirements must be fulfilled:ACisco API ID and secret(with access to the APIs "EoX V5 API",
"Serial Number to Information API Version 2" and "Software Suggestion") must have been created and
configured insideplugins.pyThe following plugin configuration options are mandatory for the Cisco support API.CISCO_SUPPORT_API_CLIENT_ID: String - Client ID of your plugin installation.
Generate it insideCisco API ConsoleCISCO_SUPPORT_API_CLIENT_SECRET: String - Client Secret of your plugin installation.
Generate it insideCisco API ConsoleAdd thenetbox-device-support-pluginplugin configuration in/netbox-docker/configuration/plugins.py.# 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_device_support_plugin":{"CISCO_SUPPORT_API_CLIENT_ID":environ.get("CISCO_SUPPORT_API_CLIENT_ID",""),"CISCO_SUPPORT_API_CLIENT_SECRET":environ.get("CISCO_SUPPORT_API_CLIENT_SECRET",""),},}A manufacturer calledCiscomust have been configured inside NetBox. If your manufacturer is named
differently, change it inside the plugin configuration inplugins.py:PLUGINS_CONFIG={"netbox_device_support_plugin":{...,"MANUFACTURER":"Cisco Systems"# Optional setting for definiing the manufacturer}}Optional theTEMPLATE_EXTENSION_PLACEMENTcan be changed inside the plugin configuration inplugins.py:PLUGINS_CONFIG={"netbox_device_support_plugin":{...,"TEMPLATE_EXTENSION_PLACEMENT":"left"# Optional setting render the content on the left or right side}}Rebuild and Restart NetBox-DockerDelete the NetBox-Docker project completly.dockercomposedown-vRebuild the NetBox-Docker project to install the new added plugin.dockercomposebuild--no-cache
dockercomposeup-dRun Database MigrationsRestore the database and run the Django database migration to your existing NetBox database.python3manage.pymigrateSync the Cisco Support DataIn order thatsync_cisco_support_dataworks correctly, several requirements must be fulfilled: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.Run the previously described Python script the first time to sync all Cisco support API data.python3manage.pysync_cisco_support_data.pyExecute a Azure DevOps Build Pipeline which runssync_cisco_support_data.pyto periodically refresh the
data or create a cronjob which to the same a bit more old school.How it worksCalling thesync_cisco_support_datamethod will catch all device types for the configured manufacturer.Each device typesPart numberwill be send to Cisco EoX API. API answer will be saved inside aCiscoDeviceTypeSupportmodel. OneCiscoDeviceTypeSupportper device type.Afterwards all devices for the configured manufacturer will be gathered.Each devicesSerial numberwill be send to Cisco SN2Info coverage API. API answer will be saved inside
aCiscoDeviceSupportmodel. OneCiscoDeviceSupportper 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.Field Coloring: Expired timestamps or no data will be colored red, timestamps which will expire in the next
calendar year will be colored yellow for planning or forecast reasons.Progress Bar: The progress bars will visualize the timestamps duration to the expiration date. The
progress bar color will be green until the timestamp will expire in the next calendar year. Then the color
will change to yellow. The color will finally change to red when the timestamp expire within 60 days.Plugin ScreenshotsDevice Detail ViewDevice Type Detail ViewDevice List ViewDevice Type List ViewLanguages and ToolsAPIs can also be amusing to provide a programming joke ...... or an interesting quote.