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/__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, diff --git a/netbox_bgp/api/serializers.py b/netbox_bgp/api/serializers.py index d0a0c61..7195f19 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): @@ -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 = [] @@ -132,7 +132,7 @@ class NestedBGPSessionSerializer(WritableNestedSerializer): class Meta: model = BGPSession - fields = ['id', 'url', 'name', 'description'] + fields = ['id', 'url', 'name', 'display','description'] validators = [] @@ -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): 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: 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 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"