From 2027c9d9f83ae927a2487866975f0285bff01db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D0=B7=D0=B5=D1=84=D0=BE=D0=B2=D0=B8=D1=87=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=98=D0=B3=D0=BE=D1=80?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 13 Nov 2023 12:44:24 +0500 Subject: [PATCH 1/7] fix display field for peer group serializers --- netbox_bgp/api/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox_bgp/api/serializers.py b/netbox_bgp/api/serializers.py index d0a0c61..324519e 100644 --- a/netbox_bgp/api/serializers.py +++ b/netbox_bgp/api/serializers.py @@ -62,7 +62,7 @@ class BGPPeerGroupSerializer(NetBoxModelSerializer): class Meta: model = BGPPeerGroup - fields = ['id', 'name', 'description', 'import_policies', 'export_policies'] + fields = ['id', 'display', 'name', 'description', 'import_policies', 'export_policies'] class NestedBGPPeerGroupSerializer(WritableNestedSerializer): @@ -70,7 +70,7 @@ class NestedBGPPeerGroupSerializer(WritableNestedSerializer): class Meta: model = BGPPeerGroup - fields = ['id', 'url', 'name', 'description'] + fields = ['id', 'display', 'url', 'name', 'description'] validators = [] From da7dfb515debc391ba4fe6ecca2a22aba349fc62 Mon Sep 17 00:00:00 2001 From: Oliver Elliott Date: Mon, 27 Nov 2023 12:31:57 +0000 Subject: [PATCH 2/7] Permit regex per Junos usage --- netbox_bgp/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_bgp/models.py b/netbox_bgp/models.py index 6443479..dec6a5f 100644 --- a/netbox_bgp/models.py +++ b/netbox_bgp/models.py @@ -104,7 +104,7 @@ class Community(BGPBase): """ value = models.CharField( max_length=64, - validators=[RegexValidator(r'\d+:\d+')] + validators=[RegexValidator(r'[\d\.\*]+:[\d\.\*]+')] ) class Meta: From c1a8de15230c4c80835ae803b3d35a4633baf0bb Mon Sep 17 00:00:00 2001 From: pl0xym0r <148605740+pl0xym0r@users.noreply.github.com> Date: Thu, 21 Dec 2023 14:48:05 +0100 Subject: [PATCH 3/7] add site on html template --- netbox_bgp/templates/netbox_bgp/bgpsession.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/netbox_bgp/templates/netbox_bgp/bgpsession.html b/netbox_bgp/templates/netbox_bgp/bgpsession.html index 4e302fe..a8247cf 100644 --- a/netbox_bgp/templates/netbox_bgp/bgpsession.html +++ b/netbox_bgp/templates/netbox_bgp/bgpsession.html @@ -66,6 +66,16 @@
{% endif %} + + Site + + {% if object.site %} + {{ object.site }} + {% else %} + None + {% endif %} + + Local AS From 34fea57247d9d7e201e408a96cfb82184379869a Mon Sep 17 00:00:00 2001 From: Ingvald Lorentzen Date: Thu, 4 Jan 2024 13:46:18 +0100 Subject: [PATCH 4/7] Increase max NetBox version to v3.7.x --- netbox_bgp/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_bgp/__init__.py b/netbox_bgp/__init__.py index e1cb453..e30191d 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.5.0' - max_version = '3.6.99' + max_version = '3.7.99' default_settings = { 'device_ext_page': 'right', 'top_level_menu' : False, From e19e6ce3d08caed34e19dd8481b0afe81b093549 Mon Sep 17 00:00:00 2001 From: Ingvald Lorentzen Date: Thu, 4 Jan 2024 14:08:45 +0100 Subject: [PATCH 5/7] Bump package and NetBox version Update compat matrix --- Makefile | 2 +- README.md | 1 + netbox_bgp/version.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5a21f7b..b8cbc36 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PYTHON_VER?=3.8 -NETBOX_VER?=v3.6.1 +NETBOX_VER?=v3.7.0 NAME=netbox-bgp diff --git a/README.md b/README.md index b788d88..917a038 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This plugin provide following Models: | NetBox 3.4 | >= 0.9.0 | | NetBox 3.5 | >= 0.10.0 | | NetBox 3.6 | >= 0.11.0 | +| NetBox 3.7 | >= 0.12.0 | ## Installation diff --git a/netbox_bgp/version.py b/netbox_bgp/version.py index fee46bd..ea370a8 100644 --- a/netbox_bgp/version.py +++ b/netbox_bgp/version.py @@ -1 +1 @@ -__version__ = "0.11.1" +__version__ = "0.12.0" From 81bba105348c78560aa1aba92f7d960b9a825eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D0=B7=D0=B5=D1=84=D0=BE=D0=B2=D0=B8=D1=87=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=98=D0=B3=D0=BE=D1=80?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 9 Jan 2024 17:54:33 +0500 Subject: [PATCH 6/7] upd serializers --- netbox_bgp/api/serializers.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/netbox_bgp/api/serializers.py b/netbox_bgp/api/serializers.py index 324519e..d228aca 100644 --- a/netbox_bgp/api/serializers.py +++ b/netbox_bgp/api/serializers.py @@ -32,7 +32,7 @@ def to_representation(self, value): class RoutingPolicySerializer(NetBoxModelSerializer): class Meta: model = RoutingPolicy - fields = ['id', 'name', 'description'] + fields = ['id', 'name', 'description', 'tags', 'custom_fields'] class NestedRoutingPolicySerializer(WritableNestedSerializer): @@ -170,7 +170,7 @@ class Meta: class PrefixListSerializer(NetBoxModelSerializer): class Meta: model = PrefixList - fields = ['id', 'name', 'description', 'family'] + fields = ['id', 'name', 'display','description', 'family', 'tags', 'custom_fields'] class RoutingPolicyRuleSerializer(NetBoxModelSerializer): @@ -193,7 +193,11 @@ class RoutingPolicyRuleSerializer(NetBoxModelSerializer): class Meta: model = RoutingPolicyRule - fields = ['id', 'index', 'action', 'match_ip_address', 'routing_policy', 'match_community'] + fields = [ + 'id', 'index', 'display' ,'action', 'match_ip_address', + 'routing_policy', 'match_community', 'match_custom', 'set_actions', + 'match_ipv6_address', 'description', 'tags', 'custom_fields', + ] class PrefixListRuleSerializer(NetBoxModelSerializer): From 334e6cb9f85fe9f7217496225162b6e3a42f887c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D0=B7=D0=B5=D1=84=D0=BE=D0=B2=D0=B8=D1=87=20=D0=9D?= =?UTF-8?q?=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=98=D0=B3=D0=BE=D1=80?= =?UTF-8?q?=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 9 Jan 2024 18:33:25 +0500 Subject: [PATCH 7/7] fix serialziers --- netbox_bgp/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_bgp/api/serializers.py b/netbox_bgp/api/serializers.py index d228aca..7195f19 100644 --- a/netbox_bgp/api/serializers.py +++ b/netbox_bgp/api/serializers.py @@ -132,7 +132,7 @@ class NestedBGPSessionSerializer(WritableNestedSerializer): class Meta: model = BGPSession - fields = ['id', 'url', 'name', 'description'] + fields = ['id', 'url', 'name', 'display','description'] validators = []