Skip to content

Commit 98f051c

Browse files
committed
add netbox 4.2.0 compatibility
1 parent ef17d76 commit 98f051c

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
test:
2+
# netbox/manage.py test -v netbox_scripthelper.tests
23
python -m unittest discover --verbose tests
34

45
coverage:

netbox_scripthelper/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ class ScriptHelperConfig(PluginConfig):
99
name = 'netbox_scripthelper'
1010
verbose_name = 'NetBox ScriptHelper'
1111
description = 'Collections of utilities for Netbox custom scripts.'
12-
version = '0.3.1'
12+
version = '0.3.2'
1313
author = 'Andrey Shalashov'
1414
author_email = 'avshalashov@yandex.ru'
1515
base_url = 'scripthelper'
1616
required_settings = []
1717
default_settings = {}
1818
django_apps = []
1919
min_version = '3.3.0'
20-
max_version = '4.1.99'
20+
max_version = '4.2.99'
2121

2222

2323
config = ScriptHelperConfig

netbox_scripthelper/tests/tests_views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from ipam.models import VLANGroup, VLAN, Prefix, IPAddress
1010
from netbox_scripthelper.api.views import filter_results
11+
from django.db.backends.postgresql.psycopg_any import NumericRange
1112

1213

1314
class TestFilterResults(unittest.TestCase):
@@ -38,8 +39,8 @@ class TestAvailablesVLANS(TestCase):
3839

3940
@classmethod
4041
def setUpTestData(cls):
41-
VLANGroup.objects.create(name='TestVG1', slug='testvg1', min_vid=100, max_vid=1000)
42-
vg2 = VLANGroup.objects.create(name='TestVG2', slug='testvg2', min_vid=10, max_vid=15)
42+
VLANGroup.objects.create(name='TestVG1', slug='testvg1', vid_ranges=[NumericRange(100, 1000, bounds='[]')])
43+
vg2 = VLANGroup.objects.create(name='TestVG2', slug='testvg2', vid_ranges=[NumericRange(10, 15, bounds='[]')])
4344
VLAN.objects.create(name='TestVlan2', vid=12, group=vg2)
4445

4546
@override_settings(EXEMPT_VIEW_PERMISSIONS=['*'], LOGIN_REQUIRED=False)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='netbox_scripthelper',
5-
version='0.3.1',
5+
version='0.3.2',
66
description='Collections of utilities for Netbox custom scripts.',
77
url='https://github.com/k1nky/netbox-scripthelper-plugin',
88
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)