Metadata-Version: 2.4
Name: netbox_cesnet_services_plugin
Version: 3.0.0
Summary: NetBox plugin for CESNET services.
Author-email: Jan Krupa <jan.krupa@cesnet.cz>, Jiri Vrany <jiri.vrany@cesnet.cz>
License: Apache-2.0
Project-URL: Repository, https://gitlab.cesnet.cz/701/netbox/netbox_cesnet_services_plugin
Keywords: netbox,netbox-plugin,cesnet-services
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Framework :: Django
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: geocoder
Requires-Dist: python-slugify
Requires-Dist: deepdiff
Requires-Dist: netutils
Requires-Dist: netbox-scripts-lib
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: djlint; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# NetBox cesnet_services Plugin

NetBox plugin for CESNET services.

* Free software: MIT
* Documentation: https://kani999.github.io/netbox-cesnet-services-plugin/


## Features

Enables CESNET services in Netbox. BGP connections, LLDP Neigbors, LLDP Leafs

## Compatibility

| NetBox Version | Plugin Version | Notes |
|----------------|----------------|-------|
|  4.5.4 – 4.6.99 |     3.0.0     | NetBox 4.6 support (Django 6.0) |
|     4.5.4+     |      2.1.0     | `last_seen` field, bulk ops, status badges |
|     4.5.4+     |      2.0.1     | GraphQL fix: `StrFilterLookup` replaces `FilterLookup[str]`; requires NetBox 4.5.4 |
|   4.5.0–4.5.3  |      2.0.0     | **Breaking change**: Filter system updated, NOT compatible with 4.4.x |
|     4.4.x      |      1.2.8     | Last version compatible with NetBox 4.4.x |
|     4.4.0      |      1.2.5     | |
|     4.3.1      |      1.2.4     | |
|     4.3.1      |      1.2.3     | |
|     4.2.8      |      1.2.2     | |

## Installing

For adding to a NetBox Docker setup see
[the general instructions for using netbox-docker with plugins](https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins).

### Prerequisites

- **NetBox 4.5.4 – 4.6.99** (for plugin version 3.0.0)
  - **Important**: Plugin version 3.0.0 requires NetBox 4.5.4 due to `StrFilterLookup` (ships with strawberry-graphql-django >= 0.79.0). Starting the plugin on NetBox 4.5.0–4.5.3 will raise an `ImportError`.
  - For NetBox 4.5.0–4.5.3, use plugin version 2.0.0
  - For NetBox 4.4.x, use plugin version 1.2.8 or earlier

### Installation

You can install with pip:

```bash
pip install netbox-cesnet-services-plugin
```

or by adding to your `local_requirements.txt` or `plugin_requirements.txt` (netbox-docker):

```bash
# For NetBox 4.5.4 – 4.6.99
netbox-cesnet-services-plugin==3.0.0

# For NetBox 4.5.4 only
# netbox-cesnet-services-plugin==2.1.0

# For NetBox 4.5.0–4.5.3
# netbox-cesnet-services-plugin==2.0.0

# For NetBox 4.4.x (use 1.2.8 or earlier)
# netbox-cesnet-services-plugin==1.2.8
```

### Configuration

Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
or if you use netbox-docker, your `/configuration/plugins.py` file.

You can optionally set device platforms for filtering choices in LLDPNeighbor form: 

```python
PLUGINS = [
    'netbox_cesnet_services_plugin'
]

PLUGINS_CONFIG = {
    "netbox_cesnet_services_plugin": {
        "platforms" : ["ios", "iosxe", "iosxr", "nxos", "nxos_ssh"],
        "bgp_last_seen_warning_days": 2,   # days until last_seen badge turns orange (default: 2)
        "bgp_last_seen_danger_days": 5,    # days until last_seen badge turns red (default: 5)
    },
}
```

## Credits

Based on the NetBox plugin tutorial:

- [demo repository](https://github.com/netbox-community/netbox-plugin-demo)
- [tutorial](https://github.com/netbox-community/netbox-plugin-tutorial)

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`netbox-community/cookiecutter-netbox-plugin`](https://github.com/netbox-community/cookiecutter-netbox-plugin) project template.
