netbox-plugin-dns 1.0.5__py3-none-any.whl → 1.0.7__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 (75) hide show
  1. netbox_dns/__init__.py +1 -1
  2. netbox_dns/api/nested_serializers.py +18 -17
  3. netbox_dns/api/serializers_/contact.py +1 -1
  4. netbox_dns/api/serializers_/nameserver.py +1 -1
  5. netbox_dns/api/serializers_/record.py +2 -1
  6. netbox_dns/api/serializers_/record_template.py +2 -1
  7. netbox_dns/api/serializers_/registrar.py +1 -1
  8. netbox_dns/api/serializers_/view.py +1 -1
  9. netbox_dns/api/serializers_/zone.py +2 -1
  10. netbox_dns/api/serializers_/zone_template.py +2 -1
  11. netbox_dns/api/views.py +0 -28
  12. netbox_dns/choices/record.py +1 -1
  13. netbox_dns/choices/zone.py +1 -1
  14. netbox_dns/fields/address.py +1 -1
  15. netbox_dns/fields/network.py +1 -1
  16. netbox_dns/fields/rfc2317.py +4 -1
  17. netbox_dns/filtersets/contact.py +1 -1
  18. netbox_dns/filtersets/nameserver.py +1 -1
  19. netbox_dns/filtersets/record.py +2 -2
  20. netbox_dns/filtersets/record_template.py +1 -1
  21. netbox_dns/filtersets/registrar.py +1 -1
  22. netbox_dns/filtersets/view.py +1 -1
  23. netbox_dns/filtersets/zone.py +1 -1
  24. netbox_dns/filtersets/zone_template.py +1 -1
  25. netbox_dns/forms/contact.py +1 -1
  26. netbox_dns/forms/nameserver.py +14 -3
  27. netbox_dns/forms/record.py +2 -2
  28. netbox_dns/forms/record_template.py +1 -1
  29. netbox_dns/forms/registrar.py +1 -1
  30. netbox_dns/forms/view.py +1 -1
  31. netbox_dns/forms/zone.py +17 -6
  32. netbox_dns/forms/zone_template.py +1 -1
  33. netbox_dns/graphql/schema.py +16 -40
  34. netbox_dns/migrations/0007_alter_ordering_options.py +25 -0
  35. netbox_dns/mixins/object_modification.py +3 -1
  36. netbox_dns/models/contact.py +10 -4
  37. netbox_dns/models/nameserver.py +9 -4
  38. netbox_dns/models/record.py +19 -5
  39. netbox_dns/models/record_template.py +5 -2
  40. netbox_dns/models/registrar.py +8 -2
  41. netbox_dns/models/view.py +10 -3
  42. netbox_dns/models/zone.py +19 -13
  43. netbox_dns/models/zone_template.py +10 -6
  44. netbox_dns/tables/contact.py +1 -2
  45. netbox_dns/tables/nameserver.py +2 -8
  46. netbox_dns/tables/record.py +11 -31
  47. netbox_dns/tables/record_template.py +1 -18
  48. netbox_dns/tables/registrar.py +1 -3
  49. netbox_dns/tables/view.py +2 -9
  50. netbox_dns/tables/zone.py +1 -16
  51. netbox_dns/tables/zone_template.py +3 -17
  52. netbox_dns/urls/contact.py +10 -32
  53. netbox_dns/urls/nameserver.py +14 -38
  54. netbox_dns/urls/record.py +7 -19
  55. netbox_dns/urls/record_template.py +18 -27
  56. netbox_dns/urls/registrar.py +11 -35
  57. netbox_dns/urls/view.py +8 -22
  58. netbox_dns/urls/zone.py +8 -46
  59. netbox_dns/urls/zone_template.py +16 -26
  60. netbox_dns/validators/dns_name.py +10 -1
  61. netbox_dns/validators/dns_value.py +1 -1
  62. netbox_dns/validators/rfc2317.py +1 -1
  63. netbox_dns/views/contact.py +2 -2
  64. netbox_dns/views/nameserver.py +9 -4
  65. netbox_dns/views/record.py +10 -3
  66. netbox_dns/views/record_template.py +2 -2
  67. netbox_dns/views/registrar.py +1 -2
  68. netbox_dns/views/view.py +7 -2
  69. netbox_dns/views/zone.py +8 -7
  70. netbox_dns/views/zone_template.py +3 -3
  71. {netbox_plugin_dns-1.0.5.dist-info → netbox_plugin_dns-1.0.7.dist-info}/METADATA +1 -1
  72. netbox_plugin_dns-1.0.7.dist-info/RECORD +137 -0
  73. netbox_plugin_dns-1.0.5.dist-info/RECORD +0 -136
  74. {netbox_plugin_dns-1.0.5.dist-info → netbox_plugin_dns-1.0.7.dist-info}/LICENSE +0 -0
  75. {netbox_plugin_dns-1.0.5.dist-info → netbox_plugin_dns-1.0.7.dist-info}/WHEEL +0 -0
@@ -7,7 +7,7 @@ from netbox.search import SearchIndex, register_search
7
7
  from taggit.managers import TaggableManager
8
8
 
9
9
 
10
- __ALL__ = (
10
+ __all__ = (
11
11
  "Contact",
12
12
  "ContactIndex",
13
13
  )
@@ -87,7 +87,7 @@ class Contact(NetBoxModel):
87
87
  related_name="netbox_dns_contact_set",
88
88
  )
89
89
 
90
- clone_fields = [
90
+ clone_fields = (
91
91
  "name",
92
92
  "description",
93
93
  "organization",
@@ -102,7 +102,7 @@ class Contact(NetBoxModel):
102
102
  "fax_ext",
103
103
  "email",
104
104
  "tags",
105
- ]
105
+ )
106
106
 
107
107
  def get_absolute_url(self):
108
108
  return reverse("plugins:netbox_dns:contact", kwargs={"pk": self.pk})
@@ -114,7 +114,13 @@ class Contact(NetBoxModel):
114
114
  return self.contact_id
115
115
 
116
116
  class Meta:
117
- ordering = ("name", "contact_id")
117
+ verbose_name = "Contact"
118
+ verbose_name_plural = "Contacts"
119
+
120
+ ordering = (
121
+ "name",
122
+ "contact_id",
123
+ )
118
124
 
119
125
  @property
120
126
  def zones(self):
@@ -7,6 +7,7 @@ from django.urls import reverse
7
7
 
8
8
  from netbox.models import NetBoxModel
9
9
  from netbox.search import SearchIndex, register_search
10
+ from netbox.models.features import ContactsMixin
10
11
 
11
12
  from netbox_dns.utilities import (
12
13
  name_to_unicode,
@@ -20,13 +21,13 @@ from netbox_dns.mixins import ObjectModificationMixin
20
21
  from .record import Record
21
22
 
22
23
 
23
- __ALL__ = (
24
+ __all__ = (
24
25
  "NameServer",
25
26
  "NameServerIndex",
26
27
  )
27
28
 
28
29
 
29
- class NameServer(ObjectModificationMixin, NetBoxModel):
30
+ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
30
31
  name = models.CharField(
31
32
  unique=True,
32
33
  max_length=255,
@@ -43,13 +44,17 @@ class NameServer(ObjectModificationMixin, NetBoxModel):
43
44
  null=True,
44
45
  )
45
46
 
46
- clone_fields = ["name", "description"]
47
+ clone_fields = (
48
+ "name",
49
+ "description",
50
+ )
47
51
 
48
52
  class Meta:
49
- ordering = ("name",)
50
53
  verbose_name = "Nameserver"
51
54
  verbose_name_plural = "Nameservers"
52
55
 
56
+ ordering = ("name",)
57
+
53
58
  def __str__(self):
54
59
  try:
55
60
  return dns_name.from_text(self.name, origin=None).to_unicode()
@@ -9,6 +9,7 @@ from django.db.models import Q, ExpressionWrapper, BooleanField, Min
9
9
  from django.urls import reverse
10
10
 
11
11
  from netbox.models import NetBoxModel
12
+ from netbox.models.features import ContactsMixin
12
13
  from netbox.search import SearchIndex, register_search
13
14
  from netbox.plugins.utils import get_plugin_config
14
15
  from utilities.querysets import RestrictedQuerySet
@@ -24,7 +25,8 @@ from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices
24
25
  # -
25
26
  from netbox_dns.models import zone
26
27
 
27
- __ALL__ = (
28
+
29
+ __all__ = (
28
30
  "Record",
29
31
  "RecordIndex",
30
32
  )
@@ -61,7 +63,7 @@ class RecordManager(models.Manager.from_queryset(RestrictedQuerySet)):
61
63
  )
62
64
 
63
65
 
64
- class Record(ObjectModificationMixin, NetBoxModel):
66
+ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
65
67
  ACTIVE_STATUS_LIST = (RecordStatusChoices.STATUS_ACTIVE,)
66
68
 
67
69
  unique_ptr_qs = Q(
@@ -154,7 +156,7 @@ class Record(ObjectModificationMixin, NetBoxModel):
154
156
  objects = RecordManager()
155
157
  raw_objects = RestrictedQuerySet.as_manager()
156
158
 
157
- clone_fields = [
159
+ clone_fields = (
158
160
  "zone",
159
161
  "type",
160
162
  "name",
@@ -163,10 +165,20 @@ class Record(ObjectModificationMixin, NetBoxModel):
163
165
  "ttl",
164
166
  "disable_ptr",
165
167
  "description",
166
- ]
168
+ )
167
169
 
168
170
  class Meta:
169
- ordering = ("zone", "name", "type", "value", "status")
171
+ verbose_name = "Record"
172
+ verbose_name_plural = "Records"
173
+
174
+ ordering = (
175
+ "fqdn",
176
+ "zone",
177
+ "name",
178
+ "type",
179
+ "value",
180
+ "status",
181
+ )
170
182
 
171
183
  def __str__(self):
172
184
  try:
@@ -519,6 +531,7 @@ class Record(ObjectModificationMixin, NetBoxModel):
519
531
  )
520
532
  .exclude(ttl=self.ttl)
521
533
  .exclude(type=RecordTypeChoices.PTR, managed=True)
534
+ .exclude(status=RecordStatusChoices.STATUS_INACTIVE)
522
535
  )
523
536
 
524
537
  if not records.exists():
@@ -553,6 +566,7 @@ class Record(ObjectModificationMixin, NetBoxModel):
553
566
  .exclude(pk=self.pk)
554
567
  .exclude(ttl=ttl)
555
568
  .exclude(type=RecordTypeChoices.PTR, managed=True)
569
+ .exclude(status=RecordStatusChoices.STATUS_INACTIVE)
556
570
  )
557
571
 
558
572
  for record in records:
@@ -15,7 +15,7 @@ from netbox_dns.validators import validate_generic_name, validate_record_value
15
15
  from .record import Record
16
16
 
17
17
 
18
- __ALL__ = (
18
+ __all__ = (
19
19
  "RecordTemplate",
20
20
  "RecordTemplateIndex",
21
21
  )
@@ -85,7 +85,10 @@ class RecordTemplate(NetBoxModel):
85
85
  )
86
86
 
87
87
  class Meta:
88
- ordering = ["name"]
88
+ verbose_name = "Record Template"
89
+ verbose_name_plural = "Record Templates"
90
+
91
+ ordering = ("name",)
89
92
 
90
93
  def __str__(self):
91
94
  return str(self.name)
@@ -5,7 +5,7 @@ from netbox.models import NetBoxModel
5
5
  from netbox.search import SearchIndex, register_search
6
6
 
7
7
 
8
- __ALL__ = (
8
+ __all__ = (
9
9
  "Registrar",
10
10
  "RegistrarIndex",
11
11
  )
@@ -59,7 +59,13 @@ class Registrar(NetBoxModel):
59
59
  return str(self.name)
60
60
 
61
61
  class Meta:
62
- ordering = ("name", "iana_id")
62
+ verbose_name = "Registrar"
63
+ verbose_name_plural = "Registrars"
64
+
65
+ ordering = (
66
+ "name",
67
+ "iana_id",
68
+ )
63
69
 
64
70
 
65
71
  @register_search
netbox_dns/models/view.py CHANGED
@@ -3,6 +3,7 @@ from django.urls import reverse
3
3
  from django.core.exceptions import ValidationError
4
4
 
5
5
  from netbox.models import NetBoxModel
6
+ from netbox.models.features import ContactsMixin
6
7
  from netbox.search import SearchIndex, register_search
7
8
  from netbox.context import current_request
8
9
  from utilities.exceptions import AbortRequest
@@ -10,13 +11,13 @@ from utilities.exceptions import AbortRequest
10
11
  from netbox_dns.mixins import ObjectModificationMixin
11
12
 
12
13
 
13
- __ALL__ = (
14
+ __all__ = (
14
15
  "View",
15
16
  "ViewIndex",
16
17
  )
17
18
 
18
19
 
19
- class View(ObjectModificationMixin, NetBoxModel):
20
+ class View(ObjectModificationMixin, ContactsMixin, NetBoxModel):
20
21
  name = models.CharField(
21
22
  unique=True,
22
23
  max_length=255,
@@ -36,7 +37,10 @@ class View(ObjectModificationMixin, NetBoxModel):
36
37
  null=True,
37
38
  )
38
39
 
39
- clone_fields = ["name", "description"]
40
+ clone_fields = (
41
+ "name",
42
+ "description",
43
+ )
40
44
 
41
45
  @classmethod
42
46
  def get_default_view(cls):
@@ -49,6 +53,9 @@ class View(ObjectModificationMixin, NetBoxModel):
49
53
  return str(self.name)
50
54
 
51
55
  class Meta:
56
+ verbose_name = "View"
57
+ verbose_name_plural = "Views"
58
+
52
59
  ordering = ("name",)
53
60
 
54
61
  def delete(self, *args, **kwargs):
netbox_dns/models/zone.py CHANGED
@@ -19,6 +19,7 @@ from django.dispatch import receiver
19
19
  from django.conf import settings
20
20
 
21
21
  from netbox.models import NetBoxModel
22
+ from netbox.models.features import ContactsMixin
22
23
  from netbox.search import SearchIndex, register_search
23
24
  from netbox.plugins.utils import get_plugin_config
24
25
  from utilities.querysets import RestrictedQuerySet
@@ -34,6 +35,7 @@ from netbox_dns.utilities import (
34
35
  )
35
36
  from netbox_dns.validators import (
36
37
  validate_fqdn,
38
+ validate_rname,
37
39
  validate_domain_name,
38
40
  )
39
41
  from netbox_dns.mixins import ObjectModificationMixin
@@ -43,7 +45,7 @@ from .view import View
43
45
  from .nameserver import NameServer
44
46
 
45
47
 
46
- __ALL__ = (
48
+ __all__ = (
47
49
  "Zone",
48
50
  "ZoneIndex",
49
51
  )
@@ -66,7 +68,7 @@ class ZoneManager(models.Manager.from_queryset(RestrictedQuerySet)):
66
68
  )
67
69
 
68
70
 
69
- class Zone(ObjectModificationMixin, NetBoxModel):
71
+ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
70
72
  ACTIVE_STATUS_LIST = (ZoneStatusChoices.STATUS_ACTIVE,)
71
73
 
72
74
  def __init__(self, *args, **kwargs):
@@ -245,7 +247,7 @@ class Zone(ObjectModificationMixin, NetBoxModel):
245
247
 
246
248
  objects = ZoneManager()
247
249
 
248
- clone_fields = [
250
+ clone_fields = (
249
251
  "view",
250
252
  "name",
251
253
  "status",
@@ -259,9 +261,12 @@ class Zone(ObjectModificationMixin, NetBoxModel):
259
261
  "soa_expire",
260
262
  "soa_minimum",
261
263
  "description",
262
- ]
264
+ )
263
265
 
264
266
  class Meta:
267
+ verbose_name = "Zone"
268
+ verbose_name_plural = "Zones"
269
+
265
270
  ordering = (
266
271
  "view",
267
272
  "name",
@@ -618,7 +623,7 @@ class Zone(ObjectModificationMixin, NetBoxModel):
618
623
  raise ValidationError("soa_rname not set and no default value defined")
619
624
  try:
620
625
  dns_name.from_text(self.soa_rname, origin=dns_name.root)
621
- validate_fqdn(self.soa_rname)
626
+ validate_rname(self.soa_rname)
622
627
  except (DNSException, ValidationError) as exc:
623
628
  raise ValidationError(
624
629
  {
@@ -638,7 +643,7 @@ class Zone(ObjectModificationMixin, NetBoxModel):
638
643
  old_zone = Zone.objects.get(pk=self.pk)
639
644
  if not self.soa_serial_auto:
640
645
  self.check_soa_serial_increment(old_zone.soa_serial, self.soa_serial)
641
- else:
646
+ elif not old_zone.soa_serial_auto:
642
647
  try:
643
648
  self.check_soa_serial_increment(
644
649
  old_zone.soa_serial, self.get_auto_serial()
@@ -800,10 +805,11 @@ class Zone(ObjectModificationMixin, NetBoxModel):
800
805
  address_record.ptr_record.delete()
801
806
 
802
807
  ptr_records = self.record_set.filter(address_record__isnull=False)
803
- update_records = [
804
- address_record.pk
805
- for address_record in Record.objects.filter(ptr_record__in=ptr_records)
806
- ]
808
+ update_records = list(
809
+ Record.objects.filter(ptr_record__in=ptr_records).values_list(
810
+ "pk", flat=True
811
+ )
812
+ )
807
813
 
808
814
  cname_records = {
809
815
  ptr_record.rfc2317_cname_record
@@ -818,9 +824,9 @@ class Zone(ObjectModificationMixin, NetBoxModel):
818
824
  cname_zone.save_soa_serial()
819
825
  cname_zone.update_soa_record()
820
826
 
821
- rfc2317_child_zones = [
822
- child_zone.pk for child_zone in self.rfc2317_child_zones.all()
823
- ]
827
+ rfc2317_child_zones = list(
828
+ self.rfc2317_child_zones.all().values_list("pk", flat=True)
829
+ )
824
830
 
825
831
  if get_plugin_config("netbox_dns", "feature_ipam_coupling"):
826
832
  for ip in IPAddress.objects.filter(
@@ -5,7 +5,7 @@ from netbox.models import NetBoxModel
5
5
  from netbox.search import SearchIndex, register_search
6
6
 
7
7
 
8
- __ALL__ = (
8
+ __all__ = (
9
9
  "ZoneTemplate",
10
10
  "ZoneTemplateIndex",
11
11
  )
@@ -82,28 +82,32 @@ class ZoneTemplate(NetBoxModel):
82
82
  null=True,
83
83
  )
84
84
 
85
- clone_fields = [
85
+ clone_fields = (
86
86
  "description",
87
87
  "nameservers",
88
+ "record_templates",
88
89
  "tenant",
89
90
  "registrar",
90
91
  "registrant",
91
92
  "admin_c",
92
93
  "tech_c",
93
94
  "billing_c",
94
- ]
95
+ )
95
96
 
96
- template_fields = [
97
+ template_fields = (
97
98
  "tenant",
98
99
  "registrar",
99
100
  "registrant",
100
101
  "admin_c",
101
102
  "tech_c",
102
103
  "billing_c",
103
- ]
104
+ )
104
105
 
105
106
  class Meta:
106
- ordering = ["name"]
107
+ verbose_name = "Zone Template"
108
+ verbose_name_plural = "Zone Templates"
109
+
110
+ ordering = ("name",)
107
111
 
108
112
  def __str__(self):
109
113
  return str(self.name)
@@ -5,7 +5,7 @@ from netbox.tables import NetBoxTable, TagColumn
5
5
  from netbox_dns.models import Contact
6
6
 
7
7
 
8
- __ALL__ = ("ContactTable",)
8
+ __all__ = ("ContactTable",)
9
9
 
10
10
 
11
11
  class ContactTable(NetBoxTable):
@@ -19,7 +19,6 @@ class ContactTable(NetBoxTable):
19
19
  class Meta(NetBoxTable.Meta):
20
20
  model = Contact
21
21
  fields = (
22
- "contact_id",
23
22
  "name",
24
23
  "description",
25
24
  "organization",
@@ -6,7 +6,7 @@ from tenancy.tables import TenancyColumnsMixin
6
6
  from netbox_dns.models import NameServer
7
7
 
8
8
 
9
- __ALL__ = ("NameServerTable",)
9
+ __all__ = ("NameServerTable",)
10
10
 
11
11
 
12
12
  class NameServerTable(TenancyColumnsMixin, NetBoxTable):
@@ -22,13 +22,7 @@ class NameServerTable(TenancyColumnsMixin, NetBoxTable):
22
22
 
23
23
  class Meta(NetBoxTable.Meta):
24
24
  model = NameServer
25
- fields = (
26
- "name",
27
- "description",
28
- "tags",
29
- "tenant",
30
- "tenant_group",
31
- )
25
+ fields = ("description",)
32
26
  default_columns = (
33
27
  "name",
34
28
  "tags",
@@ -12,7 +12,7 @@ from netbox_dns.models import Record
12
12
  from netbox_dns.utilities import value_to_unicode
13
13
 
14
14
 
15
- __ALL__ = (
15
+ __all__ = (
16
16
  "RecordTable",
17
17
  "ManagedRecordTable",
18
18
  "RelatedRecordTable",
@@ -23,10 +23,18 @@ class RecordBaseTable(TenancyColumnsMixin, NetBoxTable):
23
23
  zone = tables.Column(
24
24
  linkify=True,
25
25
  )
26
+ view = tables.Column(
27
+ accessor="zone__view",
28
+ linkify=True,
29
+ )
26
30
  type = tables.Column()
27
31
  name = tables.Column(
28
32
  linkify=True,
29
33
  )
34
+ fqdn = tables.Column(
35
+ verbose_name="FQDN",
36
+ linkify=True,
37
+ )
30
38
  value = tables.TemplateColumn(
31
39
  template_code="{{ value|truncatechars:64 }}",
32
40
  )
@@ -65,20 +73,8 @@ class RecordTable(RecordBaseTable):
65
73
  class Meta(NetBoxTable.Meta):
66
74
  model = Record
67
75
  fields = (
68
- "name",
69
- "zone",
70
- "ttl",
71
- "type",
72
- "value",
73
- "unicode_value",
74
76
  "status",
75
- "disable_ptr",
76
- "ptr_record",
77
- "tags",
78
- "active",
79
77
  "description",
80
- "tenant",
81
- "tenant_group",
82
78
  )
83
79
  default_columns = (
84
80
  "name",
@@ -104,17 +100,7 @@ class ManagedRecordTable(RecordBaseTable):
104
100
 
105
101
  class Meta(NetBoxTable.Meta):
106
102
  model = Record
107
- fields = (
108
- "name",
109
- "zone",
110
- "ttl",
111
- "type",
112
- "value",
113
- "unicode_value",
114
- "address_record",
115
- "ipam_ip_address",
116
- "active",
117
- )
103
+ fields = ()
118
104
  default_columns = (
119
105
  "name",
120
106
  "zone",
@@ -130,13 +116,7 @@ class RelatedRecordTable(RecordBaseTable):
130
116
 
131
117
  class Meta(NetBoxTable.Meta):
132
118
  model = Record
133
- fields = (
134
- "name",
135
- "zone",
136
- "type",
137
- "value",
138
- "unicode_value",
139
- )
119
+ fields = ()
140
120
  default_columns = (
141
121
  "name",
142
122
  "zone",
@@ -7,7 +7,7 @@ from netbox_dns.models import RecordTemplate
7
7
  from netbox_dns.utilities import value_to_unicode
8
8
 
9
9
 
10
- __ALL__ = (
10
+ __all__ = (
11
11
  "RecordTemplateTable",
12
12
  "RecordTemplateDisplayTable",
13
13
  )
@@ -43,18 +43,8 @@ class RecordTemplateTable(TenancyColumnsMixin, NetBoxTable):
43
43
  class Meta(NetBoxTable.Meta):
44
44
  model = RecordTemplate
45
45
  fields = (
46
- "name",
47
- "record_name",
48
- "ttl",
49
- "type",
50
- "value",
51
- "unicode_value",
52
46
  "status",
53
- "disable_ptr",
54
- "tags",
55
47
  "description",
56
- "tenant",
57
- "tenant_group",
58
48
  )
59
49
  default_columns = (
60
50
  "name",
@@ -72,14 +62,7 @@ class RecordTemplateDisplayTable(RecordTemplateTable):
72
62
  class Meta(NetBoxTable.Meta):
73
63
  model = RecordTemplate
74
64
  fields = (
75
- "name",
76
- "record_name",
77
- "ttl",
78
- "type",
79
- "value",
80
- "unicode_value",
81
65
  "status",
82
- "disable_ptr",
83
66
  "description",
84
67
  )
85
68
  default_columns = (
@@ -5,7 +5,7 @@ from netbox.tables import NetBoxTable, TagColumn
5
5
  from netbox_dns.models import Registrar
6
6
 
7
7
 
8
- __ALL__ = ("RegistrarTable",)
8
+ __all__ = ("RegistrarTable",)
9
9
 
10
10
 
11
11
  class RegistrarTable(NetBoxTable):
@@ -19,13 +19,11 @@ class RegistrarTable(NetBoxTable):
19
19
  class Meta(NetBoxTable.Meta):
20
20
  model = Registrar
21
21
  fields = (
22
- "name",
23
22
  "description",
24
23
  "iana_id",
25
24
  "referral_url",
26
25
  "whois_server",
27
26
  "abuse_email",
28
27
  "abuse_phone",
29
- "tags",
30
28
  )
31
29
  default_columns = ("name", "iana_id", "referral_url")
netbox_dns/tables/view.py CHANGED
@@ -6,7 +6,7 @@ from tenancy.tables import TenancyColumnsMixin
6
6
  from netbox_dns.models import View
7
7
 
8
8
 
9
- __ALL__ = ("ViewTable",)
9
+ __all__ = ("ViewTable",)
10
10
 
11
11
 
12
12
  class ViewTable(TenancyColumnsMixin, NetBoxTable):
@@ -20,12 +20,5 @@ class ViewTable(TenancyColumnsMixin, NetBoxTable):
20
20
 
21
21
  class Meta(NetBoxTable.Meta):
22
22
  model = View
23
- fields = (
24
- "name",
25
- "default_view",
26
- "description",
27
- "tenant",
28
- "tenant_group",
29
- "tags",
30
- )
23
+ fields = ("description",)
31
24
  default_columns = ("name", "default_view")
netbox_dns/tables/zone.py CHANGED
@@ -10,7 +10,7 @@ from tenancy.tables import TenancyColumnsMixin
10
10
  from netbox_dns.models import Zone
11
11
 
12
12
 
13
- __ALL__ = ("ZoneTable",)
13
+ __all__ = ("ZoneTable",)
14
14
 
15
15
 
16
16
  class ZoneTable(TenancyColumnsMixin, NetBoxTable):
@@ -58,26 +58,11 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
58
58
  class Meta(NetBoxTable.Meta):
59
59
  model = Zone
60
60
  fields = (
61
- "name",
62
- "view",
63
- "status",
64
61
  "description",
65
- "tags",
66
- "default_ttl",
67
- "soa_mname",
68
62
  "soa_rname",
69
63
  "soa_serial",
70
- "rfc2317_prefix",
71
64
  "rfc2317_parent_managed",
72
- "rfc2317_parent_zone",
73
- "registrar",
74
65
  "registry_domain_id",
75
- "registrant",
76
- "admin_c",
77
- "tech_c",
78
- "billing_c",
79
- "tenant",
80
- "tenant_group",
81
66
  )
82
67
  default_columns = (
83
68
  "name",
@@ -6,7 +6,7 @@ from tenancy.tables import TenancyColumnsMixin
6
6
  from netbox_dns.models import ZoneTemplate
7
7
 
8
8
 
9
- __ALL__ = (
9
+ __all__ = (
10
10
  "ZoneTemplateTable",
11
11
  "ZoneTemplateDisplayTable",
12
12
  )
@@ -37,18 +37,7 @@ class ZoneTemplateTable(TenancyColumnsMixin, NetBoxTable):
37
37
 
38
38
  class Meta(NetBoxTable.Meta):
39
39
  model = ZoneTemplate
40
- fields = (
41
- "name",
42
- "description",
43
- "tags",
44
- "registrar",
45
- "registrant",
46
- "admin_c",
47
- "tech_c",
48
- "billing_c",
49
- "tenant",
50
- "tenant_group",
51
- )
40
+ fields = ("description",)
52
41
  default_columns = (
53
42
  "name",
54
43
  "tags",
@@ -60,10 +49,7 @@ class ZoneTemplateDisplayTable(ZoneTemplateTable):
60
49
 
61
50
  class Meta(NetBoxTable.Meta):
62
51
  model = ZoneTemplate
63
- fields = (
64
- "name",
65
- "description",
66
- )
52
+ fields = ("description",)
67
53
  default_columns = (
68
54
  "name",
69
55
  "description",