netbox-plugin-dns 1.2.1__py3-none-any.whl → 1.2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of netbox-plugin-dns might be problematic. Click here for more details.

Files changed (33) hide show
  1. netbox_dns/__init__.py +2 -1
  2. netbox_dns/choices/record.py +37 -8
  3. netbox_dns/forms/record.py +9 -4
  4. netbox_dns/forms/record_template.py +9 -4
  5. netbox_dns/forms/zone.py +8 -1
  6. netbox_dns/models/__init__.py +0 -5
  7. netbox_dns/models/nameserver.py +1 -0
  8. netbox_dns/models/record.py +1 -0
  9. netbox_dns/models/view.py +1 -0
  10. netbox_dns/models/zone.py +1 -0
  11. netbox_dns/templates/netbox_dns/nameserver.html +2 -0
  12. netbox_dns/templates/netbox_dns/record.html +20 -20
  13. netbox_dns/templates/netbox_dns/recordtemplate.html +6 -6
  14. netbox_dns/templates/netbox_dns/view.html +2 -0
  15. netbox_dns/templates/netbox_dns/zone.html +12 -5
  16. netbox_dns/templates/netbox_dns/zonetemplate.html +2 -4
  17. netbox_dns/templatetags/__init__.py +0 -0
  18. netbox_dns/templatetags/netbox_dns.py +10 -0
  19. netbox_dns/utilities/conversions.py +25 -0
  20. netbox_dns/validators/dns_name.py +10 -1
  21. netbox_dns/views/nameserver.py +1 -0
  22. netbox_dns/views/record.py +1 -0
  23. netbox_dns/views/record_template.py +1 -0
  24. netbox_dns/views/registrar.py +1 -0
  25. netbox_dns/views/registration_contact.py +1 -0
  26. netbox_dns/views/view.py +1 -0
  27. netbox_dns/views/zone.py +1 -0
  28. netbox_dns/views/zone_template.py +1 -0
  29. {netbox_plugin_dns-1.2.1.dist-info → netbox_plugin_dns-1.2.3.dist-info}/METADATA +13 -2
  30. {netbox_plugin_dns-1.2.1.dist-info → netbox_plugin_dns-1.2.3.dist-info}/RECORD +33 -31
  31. {netbox_plugin_dns-1.2.1.dist-info → netbox_plugin_dns-1.2.3.dist-info}/LICENSE +0 -0
  32. {netbox_plugin_dns-1.2.1.dist-info → netbox_plugin_dns-1.2.3.dist-info}/WHEEL +0 -0
  33. {netbox_plugin_dns-1.2.1.dist-info → netbox_plugin_dns-1.2.3.dist-info}/top_level.txt +0 -0
netbox_dns/__init__.py CHANGED
@@ -7,7 +7,7 @@ from ipam.choices import IPAddressStatusChoices
7
7
 
8
8
  from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices, ZoneStatusChoices
9
9
 
10
- __version__ = "1.2.1"
10
+ __version__ = "1.2.3"
11
11
 
12
12
 
13
13
  def _check_list(setting):
@@ -36,6 +36,7 @@ class DNSConfig(PluginConfig):
36
36
  ZoneStatusChoices.STATUS_ACTIVE,
37
37
  ZoneStatusChoices.STATUS_DYNAMIC,
38
38
  ],
39
+ "filter_record_types": [],
39
40
  "record_active_status": [
40
41
  RecordStatusChoices.STATUS_ACTIVE,
41
42
  ],
@@ -1,24 +1,44 @@
1
1
  from dns import rdatatype, rdataclass
2
2
 
3
3
  from django.utils.translation import gettext_lazy as _
4
+ from django.core.exceptions import ImproperlyConfigured
4
5
 
6
+ from netbox.plugins.utils import get_plugin_config
5
7
  from utilities.choices import ChoiceSet
6
8
 
7
9
 
8
- def initialize_choice_names(cls):
9
- for choice in cls.CHOICES:
10
- setattr(cls, choice[0], choice[0])
11
- return cls
12
-
13
-
14
10
  __all__ = (
15
11
  "RecordTypeChoices",
12
+ "RecordSelectableTypeChoices",
16
13
  "RecordClassChoices",
17
14
  "RecordStatusChoices",
18
15
  )
19
16
 
20
17
 
21
- @initialize_choice_names
18
+ def define_choice_attributes(filter_name=None):
19
+ try:
20
+ if filter_name is not None:
21
+ filter_choices = get_plugin_config("netbox_dns", filter_name, [])
22
+ else:
23
+ filter_choices = []
24
+ except ImproperlyConfigured:
25
+ filter_choices = []
26
+
27
+ def decorator(cls):
28
+ choices = []
29
+ for choice in cls._choices:
30
+ if choice[0] not in filter_choices:
31
+ setattr(cls, choice[0], choice[0])
32
+ choices.append(choice)
33
+ cls._choices = choices
34
+ cls.CHOICES = choices
35
+
36
+ return cls
37
+
38
+ return decorator
39
+
40
+
41
+ @define_choice_attributes()
22
42
  class RecordTypeChoices(ChoiceSet):
23
43
  CHOICES = [
24
44
  (rdtype.name, rdtype.name)
@@ -30,7 +50,16 @@ class RecordTypeChoices(ChoiceSet):
30
50
  ]
31
51
 
32
52
 
33
- @initialize_choice_names
53
+ @define_choice_attributes(filter_name="filter_record_types")
54
+ class RecordSelectableTypeChoices(ChoiceSet):
55
+ CHOICES = [
56
+ (rdtype.name, rdtype.name)
57
+ for rdtype in sorted(rdatatype.RdataType, key=lambda a: a.name)
58
+ if not rdatatype.is_metatype(rdtype)
59
+ ]
60
+
61
+
62
+ @define_choice_attributes()
34
63
  class RecordClassChoices(ChoiceSet):
35
64
  CHOICES = [
36
65
  (rdclass.name, rdclass.name)
@@ -21,7 +21,7 @@ from tenancy.models import Tenant, TenantGroup
21
21
  from tenancy.forms import TenancyForm, TenancyFilterForm
22
22
 
23
23
  from netbox_dns.models import View, Zone, Record
24
- from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices
24
+ from netbox_dns.choices import RecordSelectableTypeChoices, RecordStatusChoices
25
25
  from netbox_dns.utilities import name_to_unicode
26
26
 
27
27
 
@@ -57,6 +57,11 @@ class RecordForm(TenancyForm, NetBoxModelForm):
57
57
  },
58
58
  label=_("Zone"),
59
59
  )
60
+ type = forms.ChoiceField(
61
+ choices=add_blank_choice(RecordSelectableTypeChoices),
62
+ required=True,
63
+ label=_("Type"),
64
+ )
60
65
 
61
66
  disable_ptr = forms.BooleanField(
62
67
  required=False,
@@ -123,7 +128,7 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
123
128
  )
124
129
 
125
130
  type = forms.MultipleChoiceField(
126
- choices=RecordTypeChoices,
131
+ choices=RecordSelectableTypeChoices,
127
132
  required=False,
128
133
  label=_("Type"),
129
134
  )
@@ -210,7 +215,7 @@ class RecordImportForm(NetBoxModelImportForm):
210
215
  help_text=_("This field is required if the zone is not in the default view"),
211
216
  )
212
217
  type = CSVChoiceField(
213
- choices=RecordTypeChoices,
218
+ choices=RecordSelectableTypeChoices,
214
219
  required=True,
215
220
  label=_("Type"),
216
221
  )
@@ -268,7 +273,7 @@ class RecordBulkEditForm(NetBoxModelBulkEditForm):
268
273
  label=_("Zone"),
269
274
  )
270
275
  type = forms.ChoiceField(
271
- choices=add_blank_choice(RecordTypeChoices),
276
+ choices=add_blank_choice(RecordSelectableTypeChoices),
272
277
  required=False,
273
278
  label=_("Type"),
274
279
  )
@@ -21,7 +21,7 @@ from tenancy.models import Tenant, TenantGroup
21
21
  from tenancy.forms import TenancyForm, TenancyFilterForm
22
22
 
23
23
  from netbox_dns.models import RecordTemplate, ZoneTemplate
24
- from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices
24
+ from netbox_dns.choices import RecordSelectableTypeChoices, RecordStatusChoices
25
25
  from netbox_dns.utilities import name_to_unicode
26
26
 
27
27
 
@@ -41,6 +41,11 @@ class RecordTemplateForm(TenancyForm, NetBoxModelForm):
41
41
  if initial_record_name:
42
42
  self.initial["record_name"] = name_to_unicode(initial_record_name)
43
43
 
44
+ type = forms.ChoiceField(
45
+ choices=add_blank_choice(RecordSelectableTypeChoices),
46
+ required=True,
47
+ label=_("Type"),
48
+ )
44
49
  disable_ptr = forms.BooleanField(
45
50
  required=False,
46
51
  label=_("Disable PTR"),
@@ -103,7 +108,7 @@ class RecordTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
103
108
  )
104
109
 
105
110
  type = forms.MultipleChoiceField(
106
- choices=RecordTypeChoices,
111
+ choices=RecordSelectableTypeChoices,
107
112
  required=False,
108
113
  label=_("Type"),
109
114
  )
@@ -142,7 +147,7 @@ class RecordTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
142
147
 
143
148
  class RecordTemplateImportForm(NetBoxModelImportForm):
144
149
  type = CSVChoiceField(
145
- choices=RecordTypeChoices,
150
+ choices=RecordSelectableTypeChoices,
146
151
  required=True,
147
152
  label=_("Type"),
148
153
  )
@@ -187,7 +192,7 @@ class RecordTemplateBulkEditForm(NetBoxModelBulkEditForm):
187
192
  model = RecordTemplate
188
193
 
189
194
  type = forms.ChoiceField(
190
- choices=add_blank_choice(RecordTypeChoices),
195
+ choices=add_blank_choice(RecordSelectableTypeChoices),
191
196
  required=False,
192
197
  label=_("Type"),
193
198
  )
netbox_dns/forms/zone.py CHANGED
@@ -35,7 +35,7 @@ from netbox_dns.models import (
35
35
  ZoneTemplate,
36
36
  )
37
37
  from netbox_dns.choices import ZoneStatusChoices
38
- from netbox_dns.utilities import name_to_unicode
38
+ from netbox_dns.utilities import name_to_unicode, network_to_reverse
39
39
  from netbox_dns.fields import RFC2317NetworkFormField
40
40
  from netbox_dns.validators import validate_ipv4, validate_prefix, validate_rfc2317
41
41
 
@@ -307,6 +307,13 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
307
307
  else self.initial["default_ttl"]
308
308
  )
309
309
 
310
+ def clean_name(self):
311
+ name = self.cleaned_data["name"]
312
+ if reverse_name := network_to_reverse(name):
313
+ return reverse_name
314
+ else:
315
+ return name
316
+
310
317
  class Meta:
311
318
  model = Zone
312
319
 
@@ -6,8 +6,3 @@ from .registration_contact import *
6
6
  from .registrar import *
7
7
  from .zone_template import *
8
8
  from .record_template import *
9
-
10
- # +
11
- # Backwards compatibility fix, will be removed in version 1.1
12
- # -
13
- from netbox_dns.choices import *
@@ -50,6 +50,7 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
50
50
  clone_fields = (
51
51
  "name",
52
52
  "description",
53
+ "tenant",
53
54
  )
54
55
 
55
56
  class Meta:
@@ -227,6 +227,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
227
227
  "ttl",
228
228
  "disable_ptr",
229
229
  "description",
230
+ "tenant",
230
231
  )
231
232
 
232
233
  class Meta:
netbox_dns/models/view.py CHANGED
@@ -64,6 +64,7 @@ class View(ObjectModificationMixin, ContactsMixin, NetBoxModel):
64
64
  clone_fields = (
65
65
  "name",
66
66
  "description",
67
+ "tenant",
67
68
  )
68
69
 
69
70
  @classmethod
netbox_dns/models/zone.py CHANGED
@@ -271,6 +271,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
271
271
  "soa_expire",
272
272
  "soa_minimum",
273
273
  "description",
274
+ "tenant",
274
275
  )
275
276
 
276
277
  class Meta:
@@ -23,6 +23,7 @@
23
23
  <td style="word-break:break-all;">{{ object.description }}</td>
24
24
  </tr>
25
25
  {% endif %}
26
+ {% if object.tenant %}
26
27
  <tr>
27
28
  <th scope="row">{% trans "Tenant" %}</th>
28
29
  <td>
@@ -32,6 +33,7 @@
32
33
  {{ object.tenant|linkify|placeholder }}
33
34
  </td>
34
35
  </tr>
36
+ {% endif %}
35
37
  </table>
36
38
  </div>
37
39
  {% include 'inc/panels/custom_fields.html' %}
@@ -63,17 +63,6 @@
63
63
  <td><a href="{% url 'plugins:netbox_dns:zone_records' pk=object.zone.pk %}">{{ object.zone }}</a></td>
64
64
  {% endif %}
65
65
  </tr>
66
- {% if not object.managed or object.tenant %}
67
- <tr>
68
- <th scope="row">{% trans "Tenant" %}</th>
69
- <td>
70
- {% if object.tenant.group %}
71
- {{ object.tenant.group|linkify }} /
72
- {% endif %}
73
- {{ object.tenant|linkify|placeholder }}
74
- </td>
75
- </tr>
76
- {% endif %}
77
66
  <tr>
78
67
  <th scope="row">{% trans "Type" %}</th>
79
68
  <td>{{ object.type }}</td>
@@ -82,16 +71,33 @@
82
71
  <th scope="row">{% trans "Value" %}</th>
83
72
  <td style="word-break:break-all;">{{ object.value }}</td>
84
73
  </tr>
74
+ {% if unicode_value %}
75
+ <tr>
76
+ <th scope="row">{% trans "Unicode Value" %}</th>
77
+ <td style="word-break:break-all;">{{ unicode_value }}</td>
78
+ </tr>
79
+ {% endif %}
85
80
  {% if cname_warning %}
86
81
  <tr class="text-warning">
87
82
  <th scope="row">{% trans "Warning" %}</th>
88
83
  <td>{{ cname_warning }}</td>
89
84
  </tr>
90
85
  {% endif %}
91
- {% if unicode_value %}
86
+ {% if object.description %}
92
87
  <tr>
93
- <th scope="row">{% trans "Unicode Value" %}</th>
94
- <td style="word-break:break-all;">{{ unicode_value }}</td>
88
+ <th scope="row">{% trans "Description" %}</th>
89
+ <td style="word-break:break-all;">{{ object.description }}</td>
90
+ </tr>
91
+ {% endif %}
92
+ {% if object.tenant %}
93
+ <tr>
94
+ <th scope="row">{% trans "Tenant" %}</th>
95
+ <td>
96
+ {% if object.tenant.group %}
97
+ {{ object.tenant.group|linkify }} /
98
+ {% endif %}
99
+ {{ object.tenant|linkify|placeholder }}
100
+ </td>
95
101
  </tr>
96
102
  {% endif %}
97
103
  <tr>
@@ -132,12 +138,6 @@
132
138
  <th scope="row">Status</th>
133
139
  <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
134
140
  </tr>
135
- {% if object.description %}
136
- <tr>
137
- <th scope="row">{% trans "Description" %}</th>
138
- <td style="word-break:break-all;">{{ object.description }}</td>
139
- </tr>
140
- {% endif %}
141
141
  </table>
142
142
  </div>
143
143
  {% if cname_target_table %}
@@ -25,6 +25,12 @@
25
25
  <td style="word-break:break-all;">{{ unicode_name }}</td>
26
26
  </tr>
27
27
  {% endif %}
28
+ {% if object.description %}
29
+ <tr>
30
+ <th scope="row">{% trans "Description" %}</th>
31
+ <td style="word-break:break-all;">{{ object.description }}</td>
32
+ </tr>
33
+ {% endif %}
28
34
  {% if object.tenant %}
29
35
  <tr>
30
36
  <th scope="row">{% trans "Tenant" %}</th>
@@ -64,12 +70,6 @@
64
70
  <th scope="row">{% trans "Status" %}</th>
65
71
  <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
66
72
  </tr>
67
- {% if object.description %}
68
- <tr>
69
- <th scope="row">{% trans "Description" %}</th>
70
- <td style="word-break:break-all;">{{ object.description }}</td>
71
- </tr>
72
- {% endif %}
73
73
  </table>
74
74
  </div>
75
75
  {% include 'inc/panels/custom_fields.html' %}
@@ -21,6 +21,7 @@
21
21
  <td style="word-break:break-all;">{{ object.description }}</td>
22
22
  </tr>
23
23
  {% endif %}
24
+ {% if object.tenant %}
24
25
  <tr>
25
26
  <th scope="row">{% trans "Tenant" %}</th>
26
27
  <td>
@@ -30,6 +31,7 @@
30
31
  {{ object.tenant|linkify|placeholder }}
31
32
  </td>
32
33
  </tr>
34
+ {% endif %}
33
35
  </table>
34
36
  </div>
35
37
  {% include 'inc/panels/custom_fields.html' %}
@@ -1,6 +1,8 @@
1
1
  {% extends 'netbox_dns/zone/base.html' %}
2
2
  {% load helpers %}
3
3
  {% load i18n %}
4
+ {% load netbox_dns %}
5
+ {% load tz %}
4
6
 
5
7
  {% block content %}
6
8
  <div class="row">
@@ -34,6 +36,7 @@
34
36
  <td style="word-break:break-all;">{{ object.description }}</td>
35
37
  </tr>
36
38
  {% endif %}
39
+ {% if object.tenant %}
37
40
  <tr>
38
41
  <th scope="row">{% trans "Tenant" %}</th>
39
42
  <td>
@@ -43,6 +46,7 @@
43
46
  {{ object.tenant|linkify|placeholder }}
44
47
  </td>
45
48
  </tr>
49
+ {% endif %}
46
50
  <tr>
47
51
  <th scope="row">{% trans "Status" %}</th>
48
52
  <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
@@ -89,10 +93,6 @@
89
93
  <th scope="row">{% trans "Default TTL" %}</th>
90
94
  <td>{{ object.default_ttl }}</td>
91
95
  </tr>
92
- <tr>
93
- <th scope="row">{% trans "Description" %}</th>
94
- <td>{{ object.description }}</td>
95
- </tr>
96
96
  </table>
97
97
  </div>
98
98
 
@@ -118,7 +118,14 @@
118
118
  {% if object.soa_serial_auto %}
119
119
  <tr>
120
120
  <th scope="row">{% trans "Serial (auto-generated)" %}</th>
121
- <td>{{ object.soa_serial }}</td>
121
+ <td>
122
+ <table style="width: 100%;">
123
+ <tr>
124
+ <td>{{ object.soa_serial }}</td>
125
+ <td align="right" class="text-muted">{{ object.soa_serial|epoch_to_utc|isodatetime }}</td>
126
+ </tr>
127
+ </table>
128
+ </td>
122
129
  </tr>
123
130
  {% else %}
124
131
  <tr>
@@ -21,6 +21,7 @@
21
21
  <td style="word-break:break-all;">{{ object.description }}</td>
22
22
  </tr>
23
23
  {% endif %}
24
+ {% if object.tenant %}
24
25
  <tr>
25
26
  <th scope="row">{% trans "Tenant" %}</th>
26
27
  <td>
@@ -30,6 +31,7 @@
30
31
  {{ object.tenant|linkify|placeholder }}
31
32
  </td>
32
33
  </tr>
34
+ {% endif %}
33
35
  <tr>
34
36
  <th scope="row">{% trans "Nameservers" %}</th>
35
37
  <td>
@@ -40,10 +42,6 @@
40
42
  </table>
41
43
  </td>
42
44
  </tr>
43
- <tr>
44
- <th scope="row">{% trans "Description" %}</th>
45
- <td>{{ object.description }}</td>
46
- </tr>
47
45
  </table>
48
46
  </div>
49
47
 
File without changes
@@ -0,0 +1,10 @@
1
+ from datetime import datetime, timezone
2
+
3
+ from django import template
4
+
5
+ register = template.Library()
6
+
7
+
8
+ @register.filter(name="epoch_to_utc")
9
+ def epoch_to_utc(epoch):
10
+ return datetime.fromtimestamp(epoch, tz=timezone.utc)
@@ -13,6 +13,7 @@ __all__ = (
13
13
  "name_to_unicode",
14
14
  "value_to_unicode",
15
15
  "normalize_name",
16
+ "network_to_reverse",
16
17
  )
17
18
 
18
19
 
@@ -81,3 +82,27 @@ def normalize_name(name):
81
82
 
82
83
  except DNSException as exc:
83
84
  raise NameFormatError from exc
85
+
86
+
87
+ def network_to_reverse(network):
88
+ try:
89
+ ip_network = IPNetwork(network)
90
+ except AddrFormatError:
91
+ return
92
+
93
+ if ip_network.first == ip_network.last:
94
+ return
95
+
96
+ labels = None
97
+ match ip_network.version:
98
+ case 4:
99
+ if not ip_network.prefixlen % 8:
100
+ labels = 3 + ip_network.prefixlen // 8
101
+ case 6:
102
+ if not ip_network.prefixlen % 4:
103
+ labels = 3 + ip_network.prefixlen // 4
104
+ case _:
105
+ return
106
+
107
+ if labels:
108
+ return ".".join(ip_network[0].reverse_dns.split(".")[-labels:])
@@ -1,4 +1,5 @@
1
1
  import re
2
+ from socket import inet_aton
2
3
 
3
4
  from django.core.exceptions import ValidationError
4
5
  from django.utils.translation import gettext as _
@@ -28,7 +29,7 @@ def _get_label(tolerate_leading_underscores=False, always_tolerant=False):
28
29
 
29
30
  tolerate_underscores = get_plugin_config(
30
31
  "netbox_dns", "tolerate_underscores_in_labels"
31
- ) or get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames")
32
+ )
32
33
 
33
34
  if tolerate_leading_underscores:
34
35
  if tolerate_underscores:
@@ -95,6 +96,14 @@ def validate_domain_name(
95
96
  ):
96
97
  return
97
98
 
99
+ try:
100
+ inet_aton(name)
101
+ raise ValidationError(
102
+ _("{name} is not a valid DNS domain name").format(name=name)
103
+ )
104
+ except OSError:
105
+ pass
106
+
98
107
  label, zone_label = _get_label(always_tolerant=always_tolerant)
99
108
  if zone_name:
100
109
  regex = rf"^{zone_label}(\.{zone_label})*\.?$"
@@ -83,6 +83,7 @@ class NameServerBulkEditView(generic.BulkEditView):
83
83
  @register_model_view(NameServer, "bulk_delete", path="delete", detail=False)
84
84
  class NameServerBulkDeleteView(generic.BulkDeleteView):
85
85
  queryset = NameServer.objects.all()
86
+ filterset = NameServerFilterSet
86
87
  table = NameServerTable
87
88
 
88
89
 
@@ -198,6 +198,7 @@ class RecordBulkEditView(generic.BulkEditView):
198
198
  @register_model_view(Record, "bulk_delete", path="delete", detail=False)
199
199
  class RecordBulkDeleteView(generic.BulkDeleteView):
200
200
  queryset = Record.objects.filter(managed=False)
201
+ filterset = RecordFilterSet
201
202
  table = RecordTable
202
203
 
203
204
 
@@ -90,4 +90,5 @@ class RecordTemplateBulkEditView(generic.BulkEditView):
90
90
  @register_model_view(RecordTemplate, "bulk_delete", path="delete", detail=False)
91
91
  class RecordTemplateBulkDeleteView(generic.BulkDeleteView):
92
92
  queryset = RecordTemplate.objects.all()
93
+ filterset = RecordTemplateFilterSet
93
94
  table = RecordTemplateTable
@@ -72,6 +72,7 @@ class RegistrarBulkEditView(generic.BulkEditView):
72
72
  @register_model_view(Registrar, "bulk_delete", path="delete", detail=False)
73
73
  class RegistrarBulkDeleteView(generic.BulkDeleteView):
74
74
  queryset = Registrar.objects.all()
75
+ filterset = RegistrarFilterSet
75
76
  table = RegistrarTable
76
77
 
77
78
 
@@ -73,6 +73,7 @@ class RegistrationContactBulkEditView(generic.BulkEditView):
73
73
  @register_model_view(RegistrationContact, "bulk_delete", path="delete", detail=False)
74
74
  class RegistrationContactBulkDeleteView(generic.BulkDeleteView):
75
75
  queryset = RegistrationContact.objects.all()
76
+ filterset = RegistrationContactFilterSet
76
77
  table = RegistrationContactTable
77
78
 
78
79
 
netbox_dns/views/view.py CHANGED
@@ -76,6 +76,7 @@ class ViewBulkEditView(generic.BulkEditView):
76
76
  @register_model_view(View, "bulk_delete", path="delete", detail=False)
77
77
  class ViewBulkDeleteView(generic.BulkDeleteView):
78
78
  queryset = View.objects.all()
79
+ filterset = ViewFilterSet
79
80
  table = ViewTable
80
81
 
81
82
 
netbox_dns/views/zone.py CHANGED
@@ -101,6 +101,7 @@ class ZoneBulkEditView(generic.BulkEditView):
101
101
  @register_model_view(Zone, "bulk_delete", path="delete", detail=False)
102
102
  class ZoneBulkDeleteView(generic.BulkDeleteView):
103
103
  queryset = Zone.objects.all()
104
+ filterset = ZoneFilterSet
104
105
  table = ZoneTable
105
106
 
106
107
 
@@ -80,4 +80,5 @@ class ZoneTemplateBulkEditView(generic.BulkEditView):
80
80
  @register_model_view(ZoneTemplate, "bulk_delete", path="delete", detail=False)
81
81
  class ZoneTemplateBulkDeleteView(generic.BulkDeleteView):
82
82
  queryset = ZoneTemplate.objects.all()
83
+ filterset = ZoneTemplateFilterSet
83
84
  table = ZoneTemplateTable
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: netbox-plugin-dns
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary: NetBox DNS is a NetBox plugin for managing DNS data.
5
5
  Author-email: Peter Eckel <pete@netbox-dns.org>
6
6
  Project-URL: Homepage, https://github.com/peteeckel/netbox-plugin-dns
@@ -66,9 +66,20 @@ For integration with a large number of DNS server implementations integration to
66
66
 
67
67
  ## Requirements
68
68
 
69
- * NetBox 4.0.0 or higher
69
+ * NetBox 4.2.0 or higher
70
70
  * Python 3.10 or higher
71
71
 
72
+ ## Compatibility with NetBox Versions
73
+
74
+ NetBox Version | NetBox DNS Version | Comment
75
+ -------------- | ------------------ | -------
76
+ 3.5 | 0.22 |
77
+ 3.6 | 0.22 |
78
+ 3.7 | 0.22 |
79
+ 4.0 - 4.1 | 1.0 | Supports legacy IPAM Coupling
80
+ 4.0 - 4.1 | 1.1 | Supports IPAM DNSsync
81
+ 4.2 | 1.2 |
82
+
72
83
  ## Installation & Configuration
73
84
 
74
85
  ### Installation
@@ -1,4 +1,4 @@
1
- netbox_dns/__init__.py,sha256=y1gmAAuUkeTAfa-FMptZlEVfTPn-5U2YC_Mre2RV1pE,3018
1
+ netbox_dns/__init__.py,sha256=SxQkUEgRHEb5inend06jFceNW7xYaqbIBvrnxPCD9hA,3053
2
2
  netbox_dns/apps.py,sha256=JCW5eS-AQBUubDJve1DjP-IRFKTFGQh1NLGWzJpC5MI,151
3
3
  netbox_dns/navigation.py,sha256=36clAzlWftW94_VZ3EHu8_btzzA_dah50CLTfoov-O4,6226
4
4
  netbox_dns/template_content.py,sha256=T06L7-m4eGrLMeGsCvPpQLAGfn3S2FL7z0Cd1hhbisY,4225
@@ -18,7 +18,7 @@ netbox_dns/api/serializers_/view.py,sha256=nnWeQugoqMdn-NGGC7ykbVPwmBrcBma_ZKwdD
18
18
  netbox_dns/api/serializers_/zone.py,sha256=ELAis8nj9PZlge6zqTQ23P0vC4IJBDa3hh5kZ9T8G_4,5003
19
19
  netbox_dns/api/serializers_/zone_template.py,sha256=w0TsrqS_DgIIAUozCC-gc9lsQ67lpVkvbyphyuRzq6Q,3847
20
20
  netbox_dns/choices/__init__.py,sha256=jOVs2VGV5SVADRlqVnrFeAy26i8BIeEAbGpiX7K8bL8,42
21
- netbox_dns/choices/record.py,sha256=wFS44WRyUwiN2ocx-A8ZzVXKpaD9Thb0MrOiMHiqNzU,1175
21
+ netbox_dns/choices/record.py,sha256=ZSpyiZE2YCsF2wF53A5DFWgwCIhkFhgOKt__RJ0KxSk,2084
22
22
  netbox_dns/choices/zone.py,sha256=Vblm5RUtNtPNkULh8U1NxBMme1iHPllD6B6LkQkWZW4,621
23
23
  netbox_dns/fields/__init__.py,sha256=U1nbFIwwtvr10pp3Sk91jEZeWkVQBSJtr0BVWYgOfiA,89
24
24
  netbox_dns/fields/address.py,sha256=qNLHmpwwJ3TevljG1QsUr_f2h6NrPsK6wr-R-Ti8eZI,1262
@@ -36,12 +36,12 @@ netbox_dns/filtersets/zone.py,sha256=zl39SOiYIZxAi3G1wx0s9UEIgh8hG9Bdb46qIXLwMr8
36
36
  netbox_dns/filtersets/zone_template.py,sha256=Sm40P33IhN0sOqtjz4JzoBbEK-dTLpfQqYGcM_Xb7KM,3870
37
37
  netbox_dns/forms/__init__.py,sha256=axENVF9vX9BtDKCNxrapRjye1NnygUg9BS0BBj6a0io,209
38
38
  netbox_dns/forms/nameserver.py,sha256=GJe3ece4yIGwMtLZ6wQihBrJu1dk_ZSiwX-vSU0fRa0,3397
39
- netbox_dns/forms/record.py,sha256=KctB0Qm62j3FKYj9gqzxEtQypwxpIhnJz4JnxejoI7o,8065
40
- netbox_dns/forms/record_template.py,sha256=iGlBOOsjkXnyLuRyA5DzSXe4syosxzgdWuACtmDq1Vs,6053
39
+ netbox_dns/forms/record.py,sha256=QNGLqWprhsGFTSlH2YAe-SHmCx1K1QbT_osAhCegyJg,8252
40
+ netbox_dns/forms/record_template.py,sha256=uN6ZSepNilQuqyfPpW-pMfmTRWo0IrDxp1LdOrlAo5A,6240
41
41
  netbox_dns/forms/registrar.py,sha256=GaRH3w5zlhrpwy_U0pxlrl1DrAEaMB78MUlnGxBRwZI,3949
42
42
  netbox_dns/forms/registration_contact.py,sha256=IhNAqElY7hOdpDG0jwWMdy3y2mB43xmjUhj3lsgJ3SE,5906
43
43
  netbox_dns/forms/view.py,sha256=GacwKHXSDvxQEs-d3ys7rietqA_MzpSd0XjWaSsIbU0,10339
44
- netbox_dns/forms/zone.py,sha256=8_-C2iy_ByMbjIea33xiGDYXhC69NdqhjQz-nOPwoMw,25011
44
+ netbox_dns/forms/zone.py,sha256=FEKDdlyK_dmaVNbqU6aTrqaHRv5DtDmTOtTacPLRopg,25222
45
45
  netbox_dns/forms/zone_template.py,sha256=49vhM-Lc4JAGZD-al4QpPDLfwmpu82JNuX-bxpwabmc,8609
46
46
  netbox_dns/graphql/__init__.py,sha256=jghYD6uOSAis6YyLbtI3YJGZfwPw1uL2FBRsHs1EhNk,514
47
47
  netbox_dns/graphql/filters.py,sha256=fHCjFIwbPBJJMk2W7HI8LhrfFhCtQtCM9IE8ZMgVafc,1766
@@ -80,14 +80,14 @@ netbox_dns/migrations/0029_record_fqdn.py,sha256=UAAU38ekKQyiYDOJlcrz6Qbk4bqZfSH
80
80
  netbox_dns/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  netbox_dns/mixins/__init__.py,sha256=LxTEfpod_RHCyMtnzDljv0_dwqp2z3Q6tqbXW8LTGD8,35
82
82
  netbox_dns/mixins/object_modification.py,sha256=AR64fU5f7g-scNAj9b54eSoS9dpjyOpqrxXVXPcOhY8,1807
83
- netbox_dns/models/__init__.py,sha256=5Ns9RaemTe5L0L3c6a38RxembWhV-sX9cqfjl05aPQw,313
84
- netbox_dns/models/nameserver.py,sha256=RmUubF05_K1GMOM7e_geoxXIrS8Xbs1al_xsfwmfd0Q,3389
85
- netbox_dns/models/record.py,sha256=tRzkjdiGIPulzlulQdzEZetObOL_9mhIunZREux6pDg,29397
83
+ netbox_dns/models/__init__.py,sha256=iTTJNgUfPAmU4n41usqDSGPvncd4Wpsb9f43ryVDDOs,209
84
+ netbox_dns/models/nameserver.py,sha256=GKCWPKqg8WLVQS6UYRUyTdVb_865p2io06yYp5Z9b80,3407
85
+ netbox_dns/models/record.py,sha256=7LCLc3mLbgHx5yCMzIItQTB5Jzg8P-1uWGhfYeGpN4U,29415
86
86
  netbox_dns/models/record_template.py,sha256=PC4369q_LIJkImp1_jhiTTwy083MXIGpGADnbDHMbqI,5104
87
87
  netbox_dns/models/registrar.py,sha256=bjgYgeUtWGg_seDRN1-VV4Pe450ZK85lbALo4J_Zuic,1890
88
88
  netbox_dns/models/registration_contact.py,sha256=AkpNy9KbFV9YrISdepqZA1ZfckZSA9u_vfPUAf5Z4H8,3773
89
- netbox_dns/models/view.py,sha256=SbBsP-WYrJXBJG65PMmXE61uo0VvdLXPOuG1VxWziEs,4738
90
- netbox_dns/models/zone.py,sha256=iPjiZRpuxeFXqYDINBcjWYQTyJHjRk5UCs9Ap69HZG8,32249
89
+ netbox_dns/models/view.py,sha256=1OGbol3Ekg1G7c6kPRLwTaLW_ugzNozewnaN2SpyOqc,4756
90
+ netbox_dns/models/zone.py,sha256=gq2gnF_ykzZ9kLtiHSm1Lwku-uWU_iFv-0HPlH54JzI,32267
91
91
  netbox_dns/models/zone_template.py,sha256=kH16CdFk7OpjSiKfJb3bsBi--Shp2V1Fd7jVRJtbl_4,3945
92
92
  netbox_dns/signals/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
93
93
  netbox_dns/signals/ipam_dnssync.py,sha256=1zhlf4cMcJLlFosX7YzyqVYdFFHV4MFwTz5KCdL8xQc,7730
@@ -101,14 +101,14 @@ netbox_dns/tables/registration_contact.py,sha256=n_FKE90j6KNgPKRVq1WXg4vnOzFE238
101
101
  netbox_dns/tables/view.py,sha256=gsuWQWAk3RstNIKzBDOHNHR2D3ykX6WigYLMj0VhQFs,1148
102
102
  netbox_dns/tables/zone.py,sha256=_WihxcaUoQ2pgNyufXau8-yDqgIUMU6HAmbK5jxfIFM,1965
103
103
  netbox_dns/tables/zone_template.py,sha256=l9MC03E0UE_cZoh7YI4DsiccvaUxZZZwf-AAZ7OhgC4,1504
104
- netbox_dns/templates/netbox_dns/nameserver.html,sha256=cQM8p3aHgnmxY2L1951_kDULg2DPl3kpncPQBu6NGAk,1639
105
- netbox_dns/templates/netbox_dns/record.html,sha256=y2QhJ4fL8Hjd2dKTtENktQ9ru0ZdS_l-7T9_IqJQSy4,6572
106
- netbox_dns/templates/netbox_dns/recordtemplate.html,sha256=jQB42mBNlSt-Tq_uQFIyylEPQYqWP9BVD_W5As-M2Qc,3708
104
+ netbox_dns/templates/netbox_dns/nameserver.html,sha256=MawPiuAmjFrbv0zRi-7xkm8vr-dT1tlEno8EcoQ9peU,1714
105
+ netbox_dns/templates/netbox_dns/record.html,sha256=1KBT4xDooTX9kt1cUoPD2-6QnMizPmbItA0JAAgRzfw,6550
106
+ netbox_dns/templates/netbox_dns/recordtemplate.html,sha256=a29PAUl-KI_I1lxWpVdPp2loJtzgis9DG9erOWrOZM0,3708
107
107
  netbox_dns/templates/netbox_dns/registrar.html,sha256=4kJuj3biiDxQrIMQEQUEmF4iGRE4psr6Fh0CBP1evz8,2308
108
108
  netbox_dns/templates/netbox_dns/registrationcontact.html,sha256=sljVp_MrPSJRc2vJCPFXq9MiWOw4wjbr1kI_YStBntw,3094
109
- netbox_dns/templates/netbox_dns/view.html,sha256=TslfDC0ZzGU59iO_OcaX8jvt6fTjWot-wYRqRGRYvLE,3245
110
- netbox_dns/templates/netbox_dns/zone.html,sha256=9tMvBuZ0hyAIHJB4-tbKmLLHAJ00OzQIIvajqn3uu5s,6619
111
- netbox_dns/templates/netbox_dns/zonetemplate.html,sha256=z_VJEkf_yNjL9xoVMHG4VHQvuXwBSarA_SoPbjutBgA,3667
109
+ netbox_dns/templates/netbox_dns/view.html,sha256=1MuzOYNQezRrryNjlklgxErjGTFoVnwqcxf4qceuglw,3320
110
+ netbox_dns/templates/netbox_dns/zone.html,sha256=Ci8MbZgd34vJh67F44_f7Tb4VvV4N14-H-Zh6-qDZsM,6894
111
+ netbox_dns/templates/netbox_dns/zonetemplate.html,sha256=rN8fSO7hp2KHTiExstMTyNEhniJFZgkpCFs8UHPAri0,3570
112
112
  netbox_dns/templates/netbox_dns/record/managed.html,sha256=uwpxQTxyfAXkWqThLT-T2ZssKNUhXTDDMnLWJSVuDNU,119
113
113
  netbox_dns/templates/netbox_dns/record/related.html,sha256=R59aPhE4CyIZtTH0ncwDyS6_wAe_Y-oZjuN_j4qk8iA,1158
114
114
  netbox_dns/templates/netbox_dns/view/button.html,sha256=EMOB5x78XpyfN1qi-pY1CKKKLjyHo9rFUa4Uhq6rFMc,322
@@ -122,25 +122,27 @@ netbox_dns/templates/netbox_dns/zone/managed_record.html,sha256=LOchMAJyfMZIICE6
122
122
  netbox_dns/templates/netbox_dns/zone/record.html,sha256=Y_gg9EUIqjSYxmIZKufAK8jyg9A54J-BoewNxUBoO1Y,2238
123
123
  netbox_dns/templates/netbox_dns/zone/registration.html,sha256=PqniHrO-LnXstIKyjn3fJk69ysjfrrt3U4kZAJqidXI,1265
124
124
  netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html,sha256=rWlmb3zRQbLYQ_1dsa0twwu6y1dRj2tfFVEERH07p-s,517
125
+ netbox_dns/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
126
+ netbox_dns/templatetags/netbox_dns.py,sha256=DND1DMPzv636Rak3M6Hor_Vw6pjqUfSTquofIw4dIsA,223
125
127
  netbox_dns/utilities/__init__.py,sha256=cSGf-nGaRWx9b-Xrh3dLMJYoWNsZ6FF-qdmV4F1uOgg,74
126
- netbox_dns/utilities/conversions.py,sha256=NS37SoMqXc13wNWRkKnLfyQbVi6QKD33fu5ovTKRo74,1979
128
+ netbox_dns/utilities/conversions.py,sha256=FXvYCo7WLtvcf63zoQBkb4rr_TxxzXz8imZAfKGpk7E,2596
127
129
  netbox_dns/utilities/dns.py,sha256=QKST49UkCw7n2GyrN3wU5ap6Cw98t1SZxFYJlyG2x70,315
128
130
  netbox_dns/utilities/ipam_dnssync.py,sha256=tFphPVluDUS3-4NsUW1_D1dDksA3AgIozf7JAoTIE_w,9533
129
131
  netbox_dns/validators/__init__.py,sha256=Mr8TvmcJTa8Pubj8TzbFBKfbHhEmGcr5JdQvczEJ39A,72
130
- netbox_dns/validators/dns_name.py,sha256=D2SVUHkDAdENspDTzvW4qeWdKC_2KcueqNioqgoHrfA,3628
132
+ netbox_dns/validators/dns_name.py,sha256=Sil68Av49jfZPzgFMV_1qEcLnuuAWXmbxfAJPDXUsGg,3766
131
133
  netbox_dns/validators/dns_value.py,sha256=-mc62mth-hlbPUPe_RlCR7vo1KSD6_gQDXiE8rjB-Cc,5206
132
134
  netbox_dns/validators/rfc2317.py,sha256=uKkwxpakiFFKdYA0qy8WSlEnbFwJD4MDw6gGV4F6skg,706
133
135
  netbox_dns/views/__init__.py,sha256=axENVF9vX9BtDKCNxrapRjye1NnygUg9BS0BBj6a0io,209
134
- netbox_dns/views/nameserver.py,sha256=2PaOHtcjaZm0FQMYTmiys-uqQsCBP_RKamW2Jj3rJOY,3896
135
- netbox_dns/views/record.py,sha256=TJsebzLhp3Dnu6SmioJiSN-zRFVSh1RptqgGL5SRUTU,6464
136
- netbox_dns/views/record_template.py,sha256=ZX0tOkFnUsv7h8ImBxDt9aIaRtNjXoUxXopMc73W5-I,3094
137
- netbox_dns/views/registrar.py,sha256=vIdflAmaqvUykvJfBV2Y8nhsvUZrU43nENUBM6WzM2g,2773
138
- netbox_dns/views/registration_contact.py,sha256=u__0w4Nm1_5lnAeFXfTY-cD86facWxIolEfC-SrxXyk,3551
139
- netbox_dns/views/view.py,sha256=a6-wdMyTWoZekiR2VnM3VNSOjX-8L3Qjqqi973UobAA,3391
140
- netbox_dns/views/zone.py,sha256=H7UPN4T_sn_3ijvXi7t8iteJFs6qqEtVzhvchKOOzCM,7133
141
- netbox_dns/views/zone_template.py,sha256=vNXG96D6uZJo4KRdsgsTL3d9JzRtiDJg4_h4_3gjAfk,2667
142
- netbox_plugin_dns-1.2.1.dist-info/LICENSE,sha256=I3tDu11bZfhFm3EkV4zOD5TmWgLjnUNLEFwrdjniZYs,1112
143
- netbox_plugin_dns-1.2.1.dist-info/METADATA,sha256=GAb1unCGj5FYGlaPyeTAVUCP4Bs5BWw90ndmMzaCOeQ,7223
144
- netbox_plugin_dns-1.2.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
145
- netbox_plugin_dns-1.2.1.dist-info/top_level.txt,sha256=sA1Rwl1mRKvMC6XHe2ylZ1GF-Q1NGd08XedK9Y4xZc4,11
146
- netbox_plugin_dns-1.2.1.dist-info/RECORD,,
136
+ netbox_dns/views/nameserver.py,sha256=6lHg8fqBjc_SoITzFj1FiRARpPF7nSn9knAZxe9x5Rg,3932
137
+ netbox_dns/views/record.py,sha256=quFf9BIQJIb8uodD8-7HBmOHBH7xe-Vu8UMr3Q5jZNo,6496
138
+ netbox_dns/views/record_template.py,sha256=CbSyckBvyEvcZCeZgK3q0fJsa1_5HbwUflh_iM7JjH0,3134
139
+ netbox_dns/views/registrar.py,sha256=Um_2wnzmP2bqbdMUhBPhny2My0R8fMXScQ9GLiTCrvg,2808
140
+ netbox_dns/views/registration_contact.py,sha256=c9KrNkfFNsb55pL74A5rN1CNx32M82V6mdwBYduNxas,3596
141
+ netbox_dns/views/view.py,sha256=VfrKaLC9D_KNZNmRyFVohRlmMlMbtblAuPgNg0LNyf8,3421
142
+ netbox_dns/views/zone.py,sha256=W66Miyaf4RKW-8z5wMrerrtmHclhht3h-lPqTWFpiOw,7163
143
+ netbox_dns/views/zone_template.py,sha256=IIW1lr6RQmhShtqJu6A6LnHdxdBrkkZQHxIDSTqQeyc,2705
144
+ netbox_plugin_dns-1.2.3.dist-info/LICENSE,sha256=I3tDu11bZfhFm3EkV4zOD5TmWgLjnUNLEFwrdjniZYs,1112
145
+ netbox_plugin_dns-1.2.3.dist-info/METADATA,sha256=i_uFK9pSBeoBpPTNaT8o53wWBO_sJVDB_GYL2GWZQkM,7635
146
+ netbox_plugin_dns-1.2.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
147
+ netbox_plugin_dns-1.2.3.dist-info/top_level.txt,sha256=sA1Rwl1mRKvMC6XHe2ylZ1GF-Q1NGd08XedK9Y4xZc4,11
148
+ netbox_plugin_dns-1.2.3.dist-info/RECORD,,