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
Python 3 tool for finding unclaimed groups on Roblox. Supports multi-threading, multi-processing and HTTP proxies.

roblox-group-scanner Python 3 tool for finding unclaimed groups on Roblox. Supports multi-threading, multi-processing and HTTP proxies. Usage usage: s

h0nda 43 May 11, 2022
A Simple but Powerful cross-platform port scanning & and network automation tool.

DEDMAP is a Simple but Powerful, Clever and Flexible Cross-Platform Port Scanning tool made with ease to use and convenience in mind. Both TCP

Anurag Mondal 30 Dec 16, 2022
A pure python implementation of multicast DNS service discovery

python-zeroconf Documentation. This is fork of pyzeroconf, Multicast DNS Service Discovery for Python, originally by Paul Scott-Murphy (https://github

Jakub Stasiak 483 Dec 29, 2022
Rufus is a Dos tool written in Python3.

๐ŸฆŽ Rufus ๐ŸฆŽ Rufus is a simple but powerful Denial of Service tool written in Python3. The type of the Dos attack is TCP Flood, the power of the attack

Billy 88 Dec 20, 2022
A Network tool kit for scanning active IP addresses and open ports

Network scanner A small project that I wrote on the fly for (IT351) Computer Networks University Course to identify and label the devices in my networ

Mohamed Abdelrahman 10 Nov 07, 2022
PySocks lets you send traffic through SOCKS proxy servers.

PySocks lets you send traffic through SOCKS proxy servers. It is a modern fork of SocksiPy with bug fixes and extra features. Acts as a drop-i

1.1k Dec 07, 2022
KoreaVPN - Create a VPN App for Mac Using Automator

VPN app ๋งŒ๋“ค๊ธฐ (a.k.a. KoreaVPN) VPN์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ๋“ค์–ด๊ฐ€๋Š” 10์ดˆ์˜ ์‹œ๊ฐ„์„ ์•„๋ผ๊ณ , ๊ท€์ฐฎ์Œ์„ ์ตœ์†Œํ™” ํ•˜๊ธฐ ์œ„ํ•ด ํฌ๋กค๋ง

DongHee 6 Jan 17, 2022
The OUCH Project - OUCH Server/Client

This software simulates OUCH Server/Client communication through a script which initialises a central server and another script which simulates clients connecting to the server.

Jahin Z. 2 Dec 10, 2022
Compare the contents of your hosted and proxy repositories for coordinate collisions

Nexus Repository Manager dependency/namespace confusion checker This repository contains a script to check if you have artifacts containing the same n

Sonatype Community 59 Mar 31, 2022
A Scapy implementation of SMS-SUBMIT and (U)SIM Application Toolkit command packets.

A Scapy implementation of SMS-SUBMIT and (U)SIM Application Toolkit command packets.

mnemonic 83 Dec 11, 2022
A lightweight python script that can monitor the T-Mobile Home Internet Nokia 5G Gateway for band and connectivity and reboot as needed.

tmo-monitor A lightweight Python 3 script that can monitor the T-Mobile Home Internet Nokia 5G Gateway for band and connectivity and reboot as needed.

61 Dec 17, 2022
NetMiaou is an crossplatform hacking tool that can do reverse shells, send files, create an http server or send and receive tcp packet

NetMiaou is an crossplatform hacking tool that can do reverse shells, send files, create an http server or send and receive tcp packet

TRIKKSS 5 Oct 05, 2022
Eclipse zenoh Python API

Eclipse zenoh Python API Eclipse zenoh is an extremely efficient and fault-tolerant Named Data Networking (NDN) protocol that is able to scale down to

26 Jan 05, 2023
Azure-function-proxy - Basic proxy as an azure function serverless app

azure function proxy (for phishing) here are config files for using *[.]azureweb

17 Nov 09, 2022
Using AWS's API Gateway + Lambda + Python to run a simple websocket application. For learning/testing

Using AWS's API Gateway + Lambda + Python to run a simple websocket application. For learning/testing. The AWS Resources seemed overly complex and were missing some critical gotchas in setting up a s

Seth Miller 15 Dec 23, 2022
Base on browser-time to get har from network, and use python to analyze the data .

base on browser-time to get har from network, and use python to analyze the data

1 Dec 20, 2021
RollerScanner โ€” Fast Port Scanner Written On Python

RollerScanner RollerScanner โ€” Fast Port Scanner Written On Python Installation You should clone this repository using: git clone https://github.com/Ma

68 Nov 09, 2022
Takes a file of hosts or domains and outputs the IP address of each host/domain in the file.

Takes a file of hosts or domains and outputs the IP address of each host/domain in the file. Installation $ git clone https://github.com/whoamisec75/i

whoami security 2 May 10, 2022
A p2p chat app for zephyr

A p2p chat app for zephyr

L3gacy B3ta 4 Jun 02, 2021
Easy to use gRPC-web client in python

pyease-grpc Easy to use gRPC-web client in python Tutorial This package provides a requests like interface to make calls to gRPC-Web servers.

Sudipto Chandra 4 Dec 03, 2022