diff --git a/Makefile b/Makefile index e1aae91..e6e9662 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PYTHON_VER?=3.8 -NETBOX_VER?=v3.2.9 +NETBOX_VER?=v3.3.3 NAME=netbox-bgp diff --git a/README.md b/README.md index 96d38ce..c4b66a9 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This plugin provide following Models: * BGP Communities * BGP Sessions * Routing Policy -* Prefix Lists (new in 0.7.0) +* Prefix Lists ## Compatibility @@ -17,6 +17,7 @@ This plugin provide following Models: | NetBox 3.0 | 0.4.3 | | NetBox 3.1 | 0.5.0 | | NetBox 3.2 | >= 0.6.0 | +| NetBox 3.3 | >= 0.8.1 | ## Installation diff --git a/netbox_bgp/__init__.py b/netbox_bgp/__init__.py index 847c1f5..319ef50 100644 --- a/netbox_bgp/__init__.py +++ b/netbox_bgp/__init__.py @@ -12,7 +12,7 @@ class BGPConfig(PluginConfig): base_url = 'bgp' required_settings = [] min_version = '3.2.0' - max_version = '3.2.99' + max_version = '3.3.99' default_settings = { 'device_ext_page': 'right', } diff --git a/netbox_bgp/api/serializers.py b/netbox_bgp/api/serializers.py index f278349..46a01d6 100644 --- a/netbox_bgp/api/serializers.py +++ b/netbox_bgp/api/serializers.py @@ -1,7 +1,13 @@ from rest_framework.serializers import HyperlinkedIdentityField, ValidationError from rest_framework.relations import PrimaryKeyRelatedField -from netbox.api import ChoiceField, WritableNestedSerializer +# for netbox 3.3 +try: + from netbox.api import ChoiceField, WritableNestedSerializer +except ImportError: + from netbox.api.fields import ChoiceField + from netbox.api.serializers.nested import WritableNestedSerializer + from netbox.api.serializers import NetBoxModelSerializer from dcim.api.nested_serializers import NestedSiteSerializer, NestedDeviceSerializer from tenancy.api.nested_serializers import NestedTenantSerializer @@ -10,7 +16,7 @@ from netbox_bgp.models import ( BGPSession, RoutingPolicy, BGPPeerGroup, - Community, RoutingPolicyRule, PrefixList, PrefixListRule, + Community, RoutingPolicyRule, PrefixList, PrefixListRule, ) from netbox_bgp.choices import CommunityStatusChoices, SessionStatusChoices diff --git a/netbox_bgp/version.py b/netbox_bgp/version.py index 777f190..8088f75 100644 --- a/netbox_bgp/version.py +++ b/netbox_bgp/version.py @@ -1 +1 @@ -__version__ = "0.8.0" +__version__ = "0.8.1"