Nautobot BGP Models App

raw JSON →
3.1.1 verified Fri May 01 auth: no python

Nautobot app that provides data models and views for modeling BGP configurations including Autonomous Systems, BGP Routing Instances, Peer Endpoints, Peerings, Address Families, and Communities. Current version 3.1.1 supports Python >=3.10,<3.15 and Nautobot 3.x. Released approximately every 2-3 months.

pip install nautobot-bgp-models
error ModuleNotFoundError: No module named 'nautobot_bgp_models'
cause App not installed or not enabled in Nautobot PLUGINS.
fix
Run pip install nautobot-bgp-models and add 'nautobot_bgp_models' to PLUGINS.
error nautobot.core.exceptions.AppImportError: App 'nautobot_bgp_models' requires Nautobot >= 3.0.0
cause Attempting to use nautobot-bgp-models >=3.0.0 with Nautobot 2.x.
fix
Upgrade Nautobot to >=3.0.0 or install nautobot-bgp-models <3.0.0.
error django.db.utils.IntegrityError: NOT NULL constraint failed: bgp_models_autonomoussystem.status_id
cause Creating an AutonomousSystem without a required 'status' field.
fix
Set status to an existing Status object (e.g., status=Status.objects.get(name='Active')).
error PeerEndpoint with local_ip on interface but no routing_instance
cause PeerEndpoint validation requires routing_instance when local_ip is associated with an interface (pre v2.3.2).
fix
Assign a RoutingInstance to the PeerEndpoint or upgrade to v2.3.2+ where this is no longer required.
breaking Nautobot 3.x required for nautobot-bgp-models >= 3.0.0. Versions 2.x require Nautobot 2.x. Check compatibility before upgrading.
fix Ensure Nautobot is upgraded to 3.0 or later before installing nautobot-bgp-models >= 3.0.0.
deprecated Python 3.9 support dropped in v2.4.0. Python 3.14 support added in v3.1.0.
fix Use Python 3.10+ for v2.4.0 through v3.1.0. Python 3.14 supported from v3.1.0.
gotcha PeerEndpoint validation requires a RoutingInstance when local_ip is assigned to an Interface (until v2.3.2 removed this requirement for non-interface IPs).
fix Upgrade to v2.3.2+ or ensure RoutingInstance is set when local_ip is not on an interface.
gotcha The app must be added to PLUGINS in your Nautobot configuration. Missing this will result in models not being available.
fix Add 'nautobot_bgp_models' to PLUGINS list in nautobot_config.py.

Basic usage: import models and create an AutonomousSystem.

from nautobot_bgp_models.models import AutonomousSystem, Peering
from nautobot.core.models.generics import PrimaryModel

# Example: creating an Autonomous System object
asn = AutonomousSystem.objects.create(
    asn=64500,
    description="Example AS",
    status_id=1  # Active status
)
print(f"Created ASN: {asn}")