Metadata-Version: 2.4
Name: netbox-cisco-support-api
Version: 1.0.4
Summary: NetBox plugin for Cisco Support information including product details, EoX dates, bugs, and security advisories
Author-email: Jeremy Worden <jeremy.worden@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/sieteunoseis/netbox-cisco-support
Project-URL: Repository, https://github.com/sieteunoseis/netbox-cisco-support.git
Project-URL: Issues, https://github.com/sieteunoseis/netbox-cisco-support/issues
Project-URL: Changelog, https://github.com/sieteunoseis/netbox-cisco-support/blob/main/CHANGELOG.md
Keywords: netbox,cisco,support,eox,psirt,bugs
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Dynamic: license-file

# NetBox Cisco Support Plugin

<img src="https://raw.githubusercontent.com/sieteunoseis/netbox-cisco-support/main/docs/icon.png" alt="NetBox Cisco Support Plugin" width="100" align="right">

![NetBox Version](https://img.shields.io/badge/NetBox-4.0+-blue)
![Python Version](https://img.shields.io/badge/Python-3.10+-green)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![CI](https://github.com/sieteunoseis/netbox-cisco-support/actions/workflows/ci.yml/badge.svg)](https://github.com/sieteunoseis/netbox-cisco-support/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/netbox-cisco-support-api)](https://pypi.org/project/netbox-cisco-support-api/)

A NetBox plugin that displays Cisco Support information for devices, including:
- **Product Information** - Product name, series, category, and orderable status
- **End-of-Life (EoX)** - Key lifecycle dates with migration recommendations
- **Security Advisories (PSIRT)** - Cisco security advisories affecting the product
- **Known Bugs** - Critical bugs (severity 1-3) from Cisco Bug Search
- **Software Recommendations** - Suggested software releases

## Features

- **Serial Number Based** - Tab only appears on devices with a valid serial number
- **Manufacturer Filtering** - Configurable pattern to match Cisco manufacturers
- **Direct Cisco API Integration** - Uses Cisco Support APIs with OAuth2 authentication
- **Caching** - API responses are cached to reduce load and improve performance
- **Visual Status Indicators** - Color-coded badges for EoX dates and advisory severity

## Requirements

- NetBox 4.0.0 or higher
- Python 3.10 or higher
- Cisco API credentials (from [Cisco API Console](https://apidocs-prod.cisco.com/))

## Installation

### Via pip (recommended)

```bash
pip install netbox-cisco-support-api
```

### From source

```bash
git clone https://github.com/sieteunoseis/netbox-cisco-support.git
cd netbox-cisco-support
pip install .
```

## Configuration

Add the plugin to your NetBox `configuration.py`:

```python
PLUGINS = [
    'netbox_cisco_support',
]

PLUGINS_CONFIG = {
    'netbox_cisco_support': {
        # Required: Cisco API credentials
        'cisco_client_id': 'your-client-id',
        'cisco_client_secret': 'your-client-secret',

        # Optional: Manufacturer matching pattern (regex, case-insensitive)
        # Default: r'cisco'
        'manufacturer_pattern': r'cisco',

        # Optional: API request timeout in seconds
        'timeout': 30,

        # Optional: Cache duration for API responses in seconds
        'cache_timeout': 300,
    }
}
```

Restart NetBox after making configuration changes.

## Getting Cisco API Credentials

1. Go to [Cisco API Console](https://apidocs-prod.cisco.com/)
2. Sign in with your Cisco CCO ID
3. Register a new application
4. Request access to the following APIs:
   - Product Information API
   - End of Life (EoX) API
   - Bug API
   - PSIRT (Security Advisory) API
   - Software Suggestion API
5. Copy your Client ID and Client Secret

## Usage

Once configured, the "Cisco Support" tab will automatically appear on device detail pages that meet these requirements:

1. Device has a **serial number** assigned
2. Device manufacturer matches the `manufacturer_pattern` (default: "cisco")

The tab displays:
- Product information from the serial number lookup
- End-of-Life status with key dates
- Security advisories affecting the product
- Known bugs (severity 1-3)
- Software recommendations

## Screenshots

### Device Cisco Support Tab
![Cisco Support Device Tab](docs/screenshot-device.png)

## Development

### Setup

```bash
git clone https://github.com/sieteunoseis/netbox-cisco-support.git
cd netbox-cisco-support
pip install -e .
```

### Code Quality

```bash
# Format code
black netbox_cisco_support/
isort netbox_cisco_support/

# Lint
flake8 netbox_cisco_support/
```

## License

Apache License 2.0 - See [LICENSE](LICENSE) for details.

## Author

Jeremy Worden ([@sieteunoseis](https://github.com/sieteunoseis))

## Links

- [GitHub Repository](https://github.com/sieteunoseis/netbox-cisco-support)
- [PyPI Package](https://pypi.org/project/netbox-cisco-support/)
- [Cisco Support APIs](https://developer.cisco.com/docs/support-apis/)
