Name | netbox-cisco-maintenance JSON |
Version |
0.0.249
JSON |
| download |
home_page | |
Summary | Implementing Cisco maintenance information with the Cisco Support APIs into NetBox |
upload_time | 2023-06-19 14:15:43 |
maintainer | |
docs_url | None |
author | Willi Kubny |
requires_python | |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# NetBox Cisco Maintenance
[NetBox](https://github.com/netbox-community/netbox) plugin to show Cisco maintenance and software release data.
## Compatibility
This plugin in compatible with [NetBox](https://netbox.readthedocs.org/) 3.5.0 and later.
## Installation
The plugin is available as a Python package in pypi and can be installed with pip
```bash
pip install netbox_cisco_support_plugin
```
Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`:
```python
# Enable installed plugins. Add the name of each plugin to the list.
PLUGINS = ["netbox_cisco_support_plugin"]
# 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_plugin": {
"CISCO_SUPPORT_API_CLIENT_ID": "bar", # Client ID of your plugin installation. Generate it inside Cisco API Console
"CISCO_SUPPORT_API_CLIENT_SECRET": "bazz" # Client Secret of your plugin installation. Generate it inside Cisco API Console
}
}
```
Restart NetBox and add `netbox-cisco-support-plugin` to your `local_requirements.txt`
```bash
python3 manage.py migrate
```
Sync Cisco EoX data for the first time
```bash
python3 manage.py sync_eox_data
```
To periodically refresh EoX data create a cronjob which calls `sync_eox_data` periodically
```bash
$ cat /etc/cron.d/netbox_sync_eox_data
# Update Cisco EoX Data every Saturday at 14:03
MAILTO="mail@example.com"
3 14 * * 6 root /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py sync_eox_data
```
Or log into /tmp file
```bash
$ 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_SUPPORT_API_CLIENT_ID`: String - Client ID of your plugin installation.
Generate it inside [Cisco API Console](https://apiconsole.cisco.com/)
* `CISCO_SUPPORT_API_CLIENT_SECRET`: String - Client Secret of your plugin installation.
Generate it inside [Cisco API Console](https://apiconsole.cisco.com/)
## Requirements
In order to get the correct data using the API, several requirements must be fulfilled:
1. A [Cisco API ID and secret](https://apiconsole.cisco.com/) (with access to the APIs "EoX V5 API" and "Serial Number to Information API Version 2") 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`:
```python
PLUGINS_CONFIG = {
"netbox_cisco_support_plugin": {
...,
"manufacturer": "Cisco Systems" # Optional setting for definiing the manufacturer
}
}
```
3. 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.
4. 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.
5. 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](screenshot.png)
Raw data
{
"_id": null,
"home_page": "",
"name": "netbox-cisco-maintenance",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Willi Kubny",
"author_email": "willi.kubny@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/22/43/b755ef80f9213e1318c32bbe2062933f4d62102ec0392112ef6bc34957a8/netbox-cisco-maintenance-0.0.249.tar.gz",
"platform": null,
"description": "# NetBox Cisco Maintenance\n[NetBox](https://github.com/netbox-community/netbox) plugin to show Cisco maintenance and software release data.\n\n## Compatibility\nThis plugin in compatible with [NetBox](https://netbox.readthedocs.org/) 3.5.0 and later.\n\n## Installation\nThe plugin is available as a Python package in pypi and can be installed with pip\n\n```bash\npip install netbox_cisco_support_plugin\n```\n\nEnable the plugin in `/opt/netbox/netbox/netbox/configuration.py`:\n\n```python\n# Enable installed plugins. Add the name of each plugin to the list.\nPLUGINS = [\"netbox_cisco_support_plugin\"]\n\n# Plugins configuration settings. These settings are used by various plugins that the user may have installed.\n# Each key in the dictionary is the name of an installed plugin and its value is a dictionary of settings.\nPLUGINS_CONFIG = {\n \"netbox_cisco_support_plugin\": {\n \"CISCO_SUPPORT_API_CLIENT_ID\": \"bar\", # Client ID of your plugin installation. Generate it inside Cisco API Console\n \"CISCO_SUPPORT_API_CLIENT_SECRET\": \"bazz\" # Client Secret of your plugin installation. Generate it inside Cisco API Console\n }\n}\n```\n\nRestart NetBox and add `netbox-cisco-support-plugin` to your `local_requirements.txt`\n\n```bash\npython3 manage.py migrate\n```\n\nSync Cisco EoX data for the first time\n```bash\npython3 manage.py sync_eox_data\n```\n\nTo periodically refresh EoX data create a cronjob which calls `sync_eox_data` periodically\n```bash\n$ cat /etc/cron.d/netbox_sync_eox_data\n\n# Update Cisco EoX Data every Saturday at 14:03\nMAILTO=\"mail@example.com\"\n3 14 * * 6 root /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py sync_eox_data\n```\n\nOr log into /tmp file\n```bash\n$ cat /etc/cron.d/netbox_sync_eox_data\n\n# Update Cisco EoX Data every Saturday at 14:03\n3 14 * * 6 root /opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py sync_eox_data > /tmp/netbox_sync_eox_data\n```\n\n## Configuration\nThe following options are available:\n* `CISCO_SUPPORT_API_CLIENT_ID`: String - Client ID of your plugin installation.\nGenerate it inside [Cisco API Console](https://apiconsole.cisco.com/)\n* `CISCO_SUPPORT_API_CLIENT_SECRET`: String - Client Secret of your plugin installation.\nGenerate it inside [Cisco API Console](https://apiconsole.cisco.com/)\n\n## Requirements\nIn order to get the correct data using the API, several requirements must be fulfilled:\n1. A [Cisco API ID and secret](https://apiconsole.cisco.com/) (with access to the APIs \"EoX V5 API\" and \"Serial Number to Information API Version 2\") must have been created and configured inside `configuration.py`\n2. A manufacturer called `Cisco` must have been configured inside NetBox. If your manufacturer is named differently, change if inside `configuration.py`:\n```python\nPLUGINS_CONFIG = {\n \"netbox_cisco_support_plugin\": {\n ...,\n \"manufacturer\": \"Cisco Systems\" # Optional setting for definiing the manufacturer\n }\n}\n```\n3. 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.\n4. 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.\n5. 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.\n\n## How it works\n1. Calling the sync_eox_data method will catch all device types for the configured manufacturer\n2. 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.\n3. Afterwards all devices for the configured manufacturer will be gathered\n4. 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.\n5. The device type template will be extended to display this data. Information will be shown, if a `CiscoDeviceTypeSupport` object for that device type exists.\n6. 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.\n7. Coloring: Expired timestamps will be colored red, timestamps which will expire in the next calendar year will be colored yellow for planning / forecast reasons.\n## Screenshots\n![Screenshot](screenshot.png)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Implementing Cisco maintenance information with the Cisco Support APIs into NetBox",
"version": "0.0.249",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7c19c95ed23552037d1f89e11ac1fd9b0e401d0845db4b704f9ea490426037a9",
"md5": "6eda38c9a9d80929cdc65f365f99e9a1",
"sha256": "5ff409ef6e1d03c5f3caa2125310deb179142fd63db85a4361183e26a7b6eb92"
},
"downloads": -1,
"filename": "netbox_cisco_maintenance-0.0.249-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6eda38c9a9d80929cdc65f365f99e9a1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 29335,
"upload_time": "2023-06-19T14:15:41",
"upload_time_iso_8601": "2023-06-19T14:15:41.922292Z",
"url": "https://files.pythonhosted.org/packages/7c/19/c95ed23552037d1f89e11ac1fd9b0e401d0845db4b704f9ea490426037a9/netbox_cisco_maintenance-0.0.249-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2243b755ef80f9213e1318c32bbe2062933f4d62102ec0392112ef6bc34957a8",
"md5": "5943752619efaf5ebbe100b00ed0a5c0",
"sha256": "cd966dc293d6c0b8b0fd596c528ee065183019e74132ee472c8b16f23501bc98"
},
"downloads": -1,
"filename": "netbox-cisco-maintenance-0.0.249.tar.gz",
"has_sig": false,
"md5_digest": "5943752619efaf5ebbe100b00ed0a5c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20326,
"upload_time": "2023-06-19T14:15:43",
"upload_time_iso_8601": "2023-06-19T14:15:43.728361Z",
"url": "https://files.pythonhosted.org/packages/22/43/b755ef80f9213e1318c32bbe2062933f4d62102ec0392112ef6bc34957a8/netbox-cisco-maintenance-0.0.249.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-19 14:15:43",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "netbox-cisco-maintenance"
}