Implementing Cisco Support APIs into NetBox

Overview

NetBox Cisco Support API Plugin

NetBox plugin using Cisco Support APIs to gather EoX and Contract coverage information for Cisco devices.

Compatibility

This plugin in compatible with NetBox 3.0.3 and later.

Installation

The 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-support

Enable 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 add netbox-cisco-support to your local_requirements.txt

(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py migrate
# sudo systemctl restart netbox

Sync Cisco EoX data for the first time

(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py sync_eox_data

To periodically refresh EoX data create a cronjob which calls sync_eox_data periodically

$ cat /etc/cron.d/netbox_sync_eox_data

# Update Cisco EoX Data every Saturday at 14:03
MAILTO="[email protected]"
3 14 * * 6 root /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py sync_eox_data

or 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_data

Configuration

The following options are available:

  • cisco_client_id: String - Client ID of your plugin installation. Generate it inside Cisco API Console
  • cisco_client_secret: String - Client Secret of your plugin installation. Generate it inside Cisco API Console

Requirements

In order to get the correct data using the API, several requirements must be fulfilled:

  1. A Cisco API ID and secret must have been created and configured inside configuration.py
  2. A manufacturer called Cisco must have been configured inside NetBox. If your manufacturer is named differently, change if inside configuration.py:
PLUGINS_CONFIG = {
    'netbox_cisco_support': {
        ...,
        'manufacturer': 'Cisco Systems' # Optional setting for definiing the manufacturer
    }
}
  1. All devices types for manufacturer Cisco must have filled the optional Part number field inside NetBox with the correct Base PID for that Cisco product.
  2. All devices with devices types from manufacturer Cisco must have filled the Serial Number field inside NetBox with a valid Cisco serial number for that Cisco product.
  3. 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 works

  1. Calling the sync_eox_data method will catch all device types for the configured manufacturer
  2. Each device types Part number will be send to Cisco EoX API. API answer will be saved inside a CiscoDeviceTypeSupport model. One CiscoDeviceTypeSupport per device.
  3. Afterwards all devices for the configured manufacturer will be gathered
  4. Each devices Serial number will be send to Cisco sn2info coverage API. API answer will be saved inside a CiscoDeviceSupport model. One CiscoDeviceSupport per device.
  5. The device type template will be extended to display this data. Information will be shown, if a CiscoDeviceTypeSupport object for that device type exists.
  6. The device template will be exteneded to display device and device type information. Information will be shown, if a CiscoDeviceSupport object for that device exists. Additionally device type information will be shown, if a CiscoDeviceTypeSupport object for the parent device type exists.
  7. 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

Screenshot

Owner
Timo Reimann
Infrastructure architect at CTS Eventim Solutions GmbH
Timo Reimann
Heroku Cloudflare App Domain

Heroku Cloudflare App Domain Creating branded herokuapp.com-like domains using Cloudflare, based on the app name (eg my-app-prod.example.com). Feature

Torchbox 2 Oct 04, 2022
Serves some data over HTTP, once. Based on the built-in Python module http.server

serve-me-once Serves some data over HTTP, once. Based on the built-in Python module http.server.

Peder Bergebakken Sundt 2 Jan 06, 2022
WebRTC and ORTC implementation for Python using asyncio

aiortc What is aiortc? aiortc is a library for Web Real-Time Communication (WebRTC) and Object Real-Time Communication (ORTC) in Python. It is built o

3.2k Jan 07, 2023
Script and library to wait for a DNS authority server to get its configuration.

DNSWait dnswait is a small script to wait for the "propagation" of a namserver configuration. Installing It's as easy as: python -m pip install dnswai

Julien Palard 14 Jan 17, 2022
Find information about an IP address, such as its location, ISP, hostname, region, country, and city.

Find information about an IP address, such as its location, ISP, hostname, region, country, and city. An IP address can be traced, tracked, and located.

Sachit Yadav 2 Jul 09, 2022
Dark Utilities - Cloudflare Uam Bypass

Dark Utilities - Cloudflare Uam Bypass

Inplex-sys 26 Dec 14, 2022
Docker container for demoing Wi-Fi calling stack.

VoWiFiLocalDemo - Docker container that runs StrongSwan and Kamailio to demonstrate how Wi-Fi calling works on smartphones.

18 Nov 12, 2022
Build surface water network for MODFLOW's SFR Package

Surface water network Creates surface water network, which can be used to create MODFLOW's SFR. Python packages Python 3.6+ is required. Required geop

Mike Taves 20 Nov 22, 2022
A simple tcpdump sidecar injector to demonstrate Kubernetes's Mutating Webhook

k8s-tcpdump-webhook A simple tcpdump sidecar injector to demonstrate Kubernetes's Mutating Webhook Build and Deploy Build docker image; docker build -

Bilal Ünal 2 Sep 01, 2022
track IP Address

ipX Table of Contents ipX Welcome Features Uses Author πŸ“ License Welcome find the location of an IP address. Specifically, you can get the following

Ali Shahid 15 Sep 26, 2022
simple subdomain finder

Subdomain-finder Simple SubDomain finder using python which is easy to use just download and run it Wordlist you can use your own wordlist but here i

AsjadOwO 5 Sep 24, 2021
Terminal based chat - networking project with sockets in python

Terminal based chat - networking project with sockets in python

2 Jan 24, 2022
ProxyBroker is an open source tool that asynchronously finds public proxies from multiple sources and concurrently checks them

ProxyBroker is an open source tool that asynchronously finds public proxies from multiple sources and concurrently checks them. Features F

Denis 3.2k Jan 04, 2023
sync application configuration and settings across multiple multiplatform devices

sync application configuration and settings across multiple multiplatform devices ✨ Key Features β€’ βš—οΈ Installation β€’ πŸ“‘ How To Use β€’ πŸ€” FAQ β€’ πŸ› οΈ Setu

Souvik 6 Aug 25, 2022
This is a python based command line Network Scanner utility, which input as an argument for the exact IP address or the relative IP Address range you wish to do the Network Scan for and returns all the available IP addresses with their MAC addresses on your current Network.

This is a python based command line Network Scanner utility, which input as an argument for the exact IP address or the relative IP Address range you wish to do the Network Scan for and returns all t

Abhinandan Khurana 1 Feb 09, 2022
Start a simple TCP Listener on a specified IP Address and Port Number and receive incoming connections.

About Start a simple TCP Listener on a specified IP Address and Port Number and receive incoming connections. Download Clone using git in terminal(git

AgentGeneric 5 Feb 24, 2022
An advanced real time threat intelligence framework to identify threats and malicious web traffic on the basis of IP reputation and historical data.

ARTIF is a new advanced real time threat intelligence framework built that adds another abstraction layer on the top of MISP to identify threats and malicious web traffic on the basis of IP reputatio

CRED 225 Dec 31, 2022
Mass Reverse IP Dibuat Dengan Python 3 Dan Ada Fitur Filter.

Reverse IP Tools Description. Reverse IP is a method to map an IP address to a sub domain. This tool is made in the python 3 programming language. Fea

Wan Naz ID 6 Oct 24, 2022
Visualize the electric field of a point charge network.

ElectriPy ⚑ Visualize the electric field of a point charges network. πŸ”Œ Installation Install ElectriPy package: $ pip install electripy You are all d

Dylan Tintenfich 29 Aug 29, 2022
(A)sync client for sms.ru with pydantic responses

🚧 aioSMSru Send SMS Check SMS status Get SMS cost Get balance Get limit Get free limit Get my senders Check login/password Add to stoplist Remove fro

Eugene Mayer 4 Jul 03, 2022