Timo Reimann wrote a handy NetBox plugin to collect and display support expiry information (End-of-Sale, End-of-Support, etc.) as well as the current Contract and Warranty coverage dates for all Cisco devices defined in a NetBox installation. His README does a good job showing the process for setting up the plugin, so I won’t repeat all the details here.

The general process is:

  1. register an app with Cisco and obtain the API ID and secret.
  2. install the plugin (pip install netbox-cisco-support)
  3. enable the plugin (add to PLUGINS in configuration.py)
  4. configure the plugin (add to PLUGINS_CONFIG in configuration.py)
  5. apply the Django migrations (manage.py migrate)
  6. collect the EoX data (manage.py sync_eox_data)

If all goes well, there will now be two additional tables in the UI device page for on any device whose manufacturer matches the manufacturer value in PLUGINS_CONFIG (default Cisco).

(Cisco Catalyst 3850)
Device under warranty with no support contract

(Cisco Catalyst 3850)

(Cisco Nexus 7009)
Device under active contract

(Cisco Nexus 7009)

To keep the plugin working across upgrades, add the plugin to your local_requirements.txt. Also, add a cron entry to periodically update the EoX data.

This was all pretty straightforward to me, but I thought I’d elaborate on step 1, obtaining the API credentials. If you are either a Smart Net Total Care (SNTC) customer or a Partner Support Services (PSS) partner, you are entitled to access these APIs. If you are not already registered, you should be able to self-register at Smart Services Portal. All you’ll need is the serial number for one of your devices and its associated support contract number.

Smart Net Total Care portal

You should then be able to log into the Cisco API Console, go to My Apps & Keys and click “Register New App”. Fill in the name, check “Client Credentials” and choose “EOX V5 API” and “Serial Number to Information API Version 2”, check the “I agree to the terms of service” checkbox and click “Register”.

Showing only the items needed
Register a new App

Showing only the items needed

Once the App is registered, you will see the “KEY” and “CLIENT SECRET” on the My Apps & Keys page. These correspond to the cisco_client_id and cisco_client_secret values set in the PLUGINS_CONFIG variable of configuration.py.

Credentials for the registered App
PLUGINS_CONFIG = {
    "netbox_cisco_support" : {
            "manufacturer" : "Cisco Systems",
            "cisco_client_id" : "q3ceu3gp8h8t6ss2ku59aeec",
            "cisco_client_secret" : "AqH6jqxveEruuA556TtVsSDj",
        },
}

Another great (python) tool I’ve found for interacting with these APIs is Dennis Roth’s cisco_support package. This makes it very easy to perform ad-hoc queries of the data, or integrate these API requests into an existing workflow.

from cisco_support import EoX

eox = EoX(client_key, client_secret)

b = eox.getByProducsIDs(['15216-OADM1-35=', 'M92S1K9-1.3.3C'])