Implementing Cisco Support APIs into NetBox
Project description
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="mail@example.com"
3 14 * * 6 /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 /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 Consolecisco_client_secret: String - Client Secret of your plugin installation. Generate it inside Cisco API Console
Screenshots
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file netbox-cisco-support-0.5.tar.gz.
File metadata
- Download URL: netbox-cisco-support-0.5.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a910df7ee16831b405fb3f8ada5bc1d42ed8d24f5e46aa7b6082cd8a2b43407
|
|
| MD5 |
0a96a42218f9497c20d6c0eb6ebc6489
|
|
| BLAKE2b-256 |
7191c0c71eed5e5d29df05f295ddfdad4f4ff6bc5e93eee4628a44fb04ed97d3
|