netbox-plugin-dns 1.2.9__py3-none-any.whl → 1.3b2__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.
- netbox_dns/__init__.py +1 -1
- netbox_dns/api/nested_serializers.py +54 -49
- netbox_dns/api/serializers_/dnssec_key_template.py +21 -13
- netbox_dns/api/serializers_/dnssec_policy.py +88 -40
- netbox_dns/api/serializers_/nameserver.py +21 -13
- netbox_dns/api/serializers_/record.py +45 -37
- netbox_dns/api/serializers_/record_template.py +21 -12
- netbox_dns/api/serializers_/registrar.py +14 -5
- netbox_dns/api/serializers_/registration_contact.py +13 -5
- netbox_dns/api/serializers_/view.py +28 -19
- netbox_dns/api/serializers_/zone.py +87 -63
- netbox_dns/api/serializers_/zone_template.py +40 -34
- netbox_dns/choices/dnssec_key_template.py +4 -0
- netbox_dns/filtersets/dnssec_key_template.py +10 -4
- netbox_dns/filtersets/dnssec_policy.py +1 -0
- netbox_dns/filtersets/nameserver.py +9 -4
- netbox_dns/filtersets/record.py +14 -13
- netbox_dns/filtersets/record_template.py +13 -12
- netbox_dns/filtersets/registrar.py +1 -0
- netbox_dns/filtersets/registration_contact.py +1 -0
- netbox_dns/filtersets/view.py +10 -4
- netbox_dns/filtersets/zone.py +22 -21
- netbox_dns/filtersets/zone_template.py +10 -9
- netbox_dns/forms/dnssec_key_template.py +97 -46
- netbox_dns/forms/dnssec_policy.py +130 -110
- netbox_dns/forms/nameserver.py +71 -36
- netbox_dns/forms/record.py +96 -78
- netbox_dns/forms/record_template.py +87 -59
- netbox_dns/forms/registrar.py +55 -39
- netbox_dns/forms/registration_contact.py +64 -41
- netbox_dns/forms/view.py +98 -51
- netbox_dns/forms/zone.py +259 -250
- netbox_dns/forms/zone_template.py +151 -101
- netbox_dns/graphql/enums.py +41 -0
- netbox_dns/graphql/filter_lookups.py +13 -0
- netbox_dns/graphql/filters/__init__.py +12 -0
- netbox_dns/graphql/filters/dnssec_key_template.py +63 -0
- netbox_dns/graphql/filters/dnssec_policy.py +123 -0
- netbox_dns/graphql/filters/nameserver.py +32 -0
- netbox_dns/graphql/filters/record.py +89 -0
- netbox_dns/graphql/filters/record_template.py +55 -0
- netbox_dns/graphql/filters/registrar.py +30 -0
- netbox_dns/graphql/filters/registration_contact.py +27 -0
- netbox_dns/graphql/filters/view.py +28 -0
- netbox_dns/graphql/filters/zone.py +146 -0
- netbox_dns/graphql/filters/zone_template.py +97 -0
- netbox_dns/models/dnssec_key_template.py +24 -27
- netbox_dns/models/dnssec_policy.py +17 -21
- netbox_dns/models/nameserver.py +26 -30
- netbox_dns/models/record.py +42 -46
- netbox_dns/models/record_template.py +30 -34
- netbox_dns/models/registrar.py +13 -17
- netbox_dns/models/registration_contact.py +33 -37
- netbox_dns/models/view.py +16 -20
- netbox_dns/models/zone.py +75 -77
- netbox_dns/models/zone_template.py +35 -39
- netbox_dns/tables/dnssec_key_template.py +13 -12
- netbox_dns/tables/dnssec_policy.py +18 -15
- netbox_dns/tables/nameserver.py +10 -8
- netbox_dns/tables/record.py +29 -21
- netbox_dns/tables/record_template.py +21 -17
- netbox_dns/tables/registrar.py +15 -9
- netbox_dns/tables/registration_contact.py +15 -9
- netbox_dns/tables/view.py +24 -12
- netbox_dns/tables/zone.py +23 -21
- netbox_dns/tables/zone_template.py +17 -13
- netbox_dns/views/dnssec_key_template.py +0 -9
- netbox_dns/views/dnssec_policy.py +0 -9
- netbox_dns/views/nameserver.py +0 -9
- netbox_dns/views/record.py +0 -9
- netbox_dns/views/record_template.py +0 -3
- netbox_dns/views/registrar.py +0 -3
- netbox_dns/views/registration_contact.py +0 -3
- netbox_dns/views/view.py +0 -9
- netbox_dns/views/zone.py +0 -10
- netbox_dns/views/zone_template.py +0 -4
- {netbox_plugin_dns-1.2.9.dist-info → netbox_plugin_dns-1.3b2.dist-info}/METADATA +4 -3
- {netbox_plugin_dns-1.2.9.dist-info → netbox_plugin_dns-1.3b2.dist-info}/RECORD +81 -69
- netbox_dns/graphql/filters.py +0 -88
- {netbox_plugin_dns-1.2.9.dist-info → netbox_plugin_dns-1.3b2.dist-info}/WHEEL +0 -0
- {netbox_plugin_dns-1.2.9.dist-info → netbox_plugin_dns-1.3b2.dist-info}/licenses/LICENSE +0 -0
- {netbox_plugin_dns-1.2.9.dist-info → netbox_plugin_dns-1.3b2.dist-info}/top_level.txt +0 -0
|
@@ -2,7 +2,6 @@ from dns import name as dns_name
|
|
|
2
2
|
from dns.exception import DNSException
|
|
3
3
|
|
|
4
4
|
from django.db import models
|
|
5
|
-
from django.urls import reverse
|
|
6
5
|
from django.utils.translation import gettext_lazy as _
|
|
7
6
|
from django.core.exceptions import ValidationError
|
|
8
7
|
|
|
@@ -19,6 +18,40 @@ __all__ = (
|
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
class ZoneTemplate(NetBoxModel):
|
|
21
|
+
class Meta:
|
|
22
|
+
verbose_name = _("Zone Template")
|
|
23
|
+
verbose_name_plural = _("Zone Templates")
|
|
24
|
+
|
|
25
|
+
ordering = ("name",)
|
|
26
|
+
|
|
27
|
+
clone_fields = (
|
|
28
|
+
"description",
|
|
29
|
+
"nameservers",
|
|
30
|
+
"record_templates",
|
|
31
|
+
"dnssec_policy",
|
|
32
|
+
"registrar",
|
|
33
|
+
"registrant",
|
|
34
|
+
"admin_c",
|
|
35
|
+
"tech_c",
|
|
36
|
+
"billing_c",
|
|
37
|
+
"tenant",
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
template_fields = (
|
|
41
|
+
"soa_mname",
|
|
42
|
+
"soa_rname",
|
|
43
|
+
"dnssec_policy",
|
|
44
|
+
"registrar",
|
|
45
|
+
"registrant",
|
|
46
|
+
"admin_c",
|
|
47
|
+
"tech_c",
|
|
48
|
+
"billing_c",
|
|
49
|
+
"tenant",
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
def __str__(self):
|
|
53
|
+
return str(self.name)
|
|
54
|
+
|
|
22
55
|
name = models.CharField(
|
|
23
56
|
verbose_name=_("Template Name"),
|
|
24
57
|
unique=True,
|
|
@@ -112,44 +145,6 @@ class ZoneTemplate(NetBoxModel):
|
|
|
112
145
|
null=True,
|
|
113
146
|
)
|
|
114
147
|
|
|
115
|
-
clone_fields = (
|
|
116
|
-
"description",
|
|
117
|
-
"nameservers",
|
|
118
|
-
"record_templates",
|
|
119
|
-
"dnssec_policy",
|
|
120
|
-
"registrar",
|
|
121
|
-
"registrant",
|
|
122
|
-
"admin_c",
|
|
123
|
-
"tech_c",
|
|
124
|
-
"billing_c",
|
|
125
|
-
"tenant",
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
template_fields = (
|
|
129
|
-
"soa_mname",
|
|
130
|
-
"soa_rname",
|
|
131
|
-
"dnssec_policy",
|
|
132
|
-
"registrar",
|
|
133
|
-
"registrant",
|
|
134
|
-
"admin_c",
|
|
135
|
-
"tech_c",
|
|
136
|
-
"billing_c",
|
|
137
|
-
"tenant",
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
class Meta:
|
|
141
|
-
verbose_name = _("Zone Template")
|
|
142
|
-
verbose_name_plural = _("Zone Templates")
|
|
143
|
-
|
|
144
|
-
ordering = ("name",)
|
|
145
|
-
|
|
146
|
-
def __str__(self):
|
|
147
|
-
return str(self.name)
|
|
148
|
-
|
|
149
|
-
# TODO: Remove in version 1.3.0 (NetBox #18555)
|
|
150
|
-
def get_absolute_url(self):
|
|
151
|
-
return reverse("plugins:netbox_dns:zonetemplate", kwargs={"pk": self.pk})
|
|
152
|
-
|
|
153
148
|
def apply_to_zone_data(self, data):
|
|
154
149
|
fields_changed = False
|
|
155
150
|
for field in self.template_fields:
|
|
@@ -188,6 +183,7 @@ class ZoneTemplate(NetBoxModel):
|
|
|
188
183
|
@register_search
|
|
189
184
|
class ZoneTemplateIndex(SearchIndex):
|
|
190
185
|
model = ZoneTemplate
|
|
186
|
+
|
|
191
187
|
fields = (
|
|
192
188
|
("name", 100),
|
|
193
189
|
("tenant", 300),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import django_tables2 as tables
|
|
2
2
|
from django.utils.translation import gettext_lazy as _
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
from netbox.tables import (
|
|
6
5
|
NetBoxTable,
|
|
7
6
|
ChoiceFieldColumn,
|
|
@@ -16,6 +15,19 @@ __all__ = ("DNSSECKeyTemplateTable",)
|
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
class DNSSECKeyTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
18
|
+
class Meta(NetBoxTable.Meta):
|
|
19
|
+
model = DNSSECKeyTemplate
|
|
20
|
+
|
|
21
|
+
fields = ("description",)
|
|
22
|
+
|
|
23
|
+
default_columns = (
|
|
24
|
+
"name",
|
|
25
|
+
"type",
|
|
26
|
+
"algorithm",
|
|
27
|
+
"key_size",
|
|
28
|
+
"tags",
|
|
29
|
+
)
|
|
30
|
+
|
|
19
31
|
name = tables.Column(
|
|
20
32
|
verbose_name=_("Name"),
|
|
21
33
|
linkify=True,
|
|
@@ -35,14 +47,3 @@ class DNSSECKeyTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
35
47
|
tags = TagColumn(
|
|
36
48
|
url_name="plugins:netbox_dns:dnsseckeytemplate_list",
|
|
37
49
|
)
|
|
38
|
-
|
|
39
|
-
class Meta(NetBoxTable.Meta):
|
|
40
|
-
model = DNSSECKeyTemplate
|
|
41
|
-
fields = ("description",)
|
|
42
|
-
default_columns = (
|
|
43
|
-
"name",
|
|
44
|
-
"type",
|
|
45
|
-
"algorithm",
|
|
46
|
-
"key_size",
|
|
47
|
-
"tags",
|
|
48
|
-
)
|
|
@@ -20,6 +20,19 @@ __all__ = (
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class DNSSECPolicyTable(TenancyColumnsMixin, NetBoxTable):
|
|
23
|
+
class Meta(NetBoxTable.Meta):
|
|
24
|
+
model = DNSSECPolicy
|
|
25
|
+
|
|
26
|
+
fields = ("description",)
|
|
27
|
+
|
|
28
|
+
default_columns = (
|
|
29
|
+
"name",
|
|
30
|
+
"description",
|
|
31
|
+
"status",
|
|
32
|
+
"use_nsec3",
|
|
33
|
+
"tags",
|
|
34
|
+
)
|
|
35
|
+
|
|
23
36
|
name = tables.Column(
|
|
24
37
|
verbose_name=_("Name"),
|
|
25
38
|
linkify=True,
|
|
@@ -88,21 +101,20 @@ class DNSSECPolicyTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
88
101
|
url_name="plugins:netbox_dns:dnssecpolicy_list",
|
|
89
102
|
)
|
|
90
103
|
|
|
104
|
+
|
|
105
|
+
class DNSSECPolicyDisplayTable(TenancyColumnsMixin, NetBoxTable):
|
|
91
106
|
class Meta(NetBoxTable.Meta):
|
|
92
107
|
model = DNSSECPolicy
|
|
108
|
+
|
|
93
109
|
fields = ("description",)
|
|
110
|
+
|
|
94
111
|
default_columns = (
|
|
95
112
|
"name",
|
|
96
113
|
"description",
|
|
97
114
|
"status",
|
|
98
|
-
"use_nsec3",
|
|
99
115
|
"tags",
|
|
100
116
|
)
|
|
101
117
|
|
|
102
|
-
|
|
103
|
-
class DNSSECPolicyDisplayTable(TenancyColumnsMixin, NetBoxTable):
|
|
104
|
-
actions = ActionsColumn(actions="")
|
|
105
|
-
|
|
106
118
|
name = tables.Column(
|
|
107
119
|
verbose_name=_("Name"),
|
|
108
120
|
linkify=True,
|
|
@@ -119,13 +131,4 @@ class DNSSECPolicyDisplayTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
119
131
|
tags = TagColumn(
|
|
120
132
|
url_name="plugins:netbox_dns:dnssecpolicy_list",
|
|
121
133
|
)
|
|
122
|
-
|
|
123
|
-
class Meta(NetBoxTable.Meta):
|
|
124
|
-
model = DNSSECPolicy
|
|
125
|
-
fields = ("description",)
|
|
126
|
-
default_columns = (
|
|
127
|
-
"name",
|
|
128
|
-
"description",
|
|
129
|
-
"status",
|
|
130
|
-
"tags",
|
|
131
|
-
)
|
|
134
|
+
actions = ActionsColumn(actions="")
|
netbox_dns/tables/nameserver.py
CHANGED
|
@@ -11,6 +11,16 @@ __all__ = ("NameServerTable",)
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class NameServerTable(TenancyColumnsMixin, NetBoxTable):
|
|
14
|
+
class Meta(NetBoxTable.Meta):
|
|
15
|
+
model = NameServer
|
|
16
|
+
|
|
17
|
+
fields = ("description",)
|
|
18
|
+
|
|
19
|
+
default_columns = (
|
|
20
|
+
"name",
|
|
21
|
+
"tags",
|
|
22
|
+
)
|
|
23
|
+
|
|
14
24
|
name = tables.Column(
|
|
15
25
|
verbose_name=_("Name"),
|
|
16
26
|
linkify=True,
|
|
@@ -21,11 +31,3 @@ class NameServerTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
21
31
|
|
|
22
32
|
def render_name(self, value, record):
|
|
23
33
|
return record.display_name
|
|
24
|
-
|
|
25
|
-
class Meta(NetBoxTable.Meta):
|
|
26
|
-
model = NameServer
|
|
27
|
-
fields = ("description",)
|
|
28
|
-
default_columns = (
|
|
29
|
-
"name",
|
|
30
|
-
"tags",
|
|
31
|
-
)
|
netbox_dns/tables/record.py
CHANGED
|
@@ -68,6 +68,24 @@ class RecordBaseTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
class RecordTable(RecordBaseTable):
|
|
71
|
+
class Meta(NetBoxTable.Meta):
|
|
72
|
+
model = Record
|
|
73
|
+
|
|
74
|
+
fields = (
|
|
75
|
+
"status",
|
|
76
|
+
"description",
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
default_columns = (
|
|
80
|
+
"name",
|
|
81
|
+
"zone",
|
|
82
|
+
"ttl",
|
|
83
|
+
"type",
|
|
84
|
+
"value",
|
|
85
|
+
"tags",
|
|
86
|
+
"active",
|
|
87
|
+
)
|
|
88
|
+
|
|
71
89
|
status = ChoiceFieldColumn(
|
|
72
90
|
verbose_name=_("Status"),
|
|
73
91
|
)
|
|
@@ -82,24 +100,22 @@ class RecordTable(RecordBaseTable):
|
|
|
82
100
|
linkify=True,
|
|
83
101
|
)
|
|
84
102
|
|
|
103
|
+
|
|
104
|
+
class ManagedRecordTable(RecordBaseTable):
|
|
85
105
|
class Meta(NetBoxTable.Meta):
|
|
86
106
|
model = Record
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
)
|
|
107
|
+
|
|
108
|
+
fields = ()
|
|
109
|
+
|
|
91
110
|
default_columns = (
|
|
92
111
|
"name",
|
|
93
112
|
"zone",
|
|
94
113
|
"ttl",
|
|
95
114
|
"type",
|
|
96
115
|
"value",
|
|
97
|
-
"tags",
|
|
98
116
|
"active",
|
|
99
117
|
)
|
|
100
118
|
|
|
101
|
-
|
|
102
|
-
class ManagedRecordTable(RecordBaseTable):
|
|
103
119
|
address_record = tables.Column(
|
|
104
120
|
verbose_name=_("Address Record"),
|
|
105
121
|
linkify=True,
|
|
@@ -115,18 +131,6 @@ class ManagedRecordTable(RecordBaseTable):
|
|
|
115
131
|
)
|
|
116
132
|
actions = ActionsColumn(actions=("changelog",))
|
|
117
133
|
|
|
118
|
-
class Meta(NetBoxTable.Meta):
|
|
119
|
-
model = Record
|
|
120
|
-
fields = ()
|
|
121
|
-
default_columns = (
|
|
122
|
-
"name",
|
|
123
|
-
"zone",
|
|
124
|
-
"ttl",
|
|
125
|
-
"type",
|
|
126
|
-
"value",
|
|
127
|
-
"active",
|
|
128
|
-
)
|
|
129
|
-
|
|
130
134
|
def render_related_ip_address(self, record):
|
|
131
135
|
if record.ipam_ip_address is not None:
|
|
132
136
|
address = record.ipam_ip_address
|
|
@@ -151,11 +155,11 @@ class ManagedRecordTable(RecordBaseTable):
|
|
|
151
155
|
|
|
152
156
|
|
|
153
157
|
class RelatedRecordTable(RecordBaseTable):
|
|
154
|
-
actions = ActionsColumn(actions=())
|
|
155
|
-
|
|
156
158
|
class Meta(NetBoxTable.Meta):
|
|
157
159
|
model = Record
|
|
160
|
+
|
|
158
161
|
fields = ()
|
|
162
|
+
|
|
159
163
|
default_columns = (
|
|
160
164
|
"name",
|
|
161
165
|
"zone",
|
|
@@ -163,11 +167,15 @@ class RelatedRecordTable(RecordBaseTable):
|
|
|
163
167
|
"value",
|
|
164
168
|
)
|
|
165
169
|
|
|
170
|
+
actions = ActionsColumn(actions=())
|
|
171
|
+
|
|
166
172
|
|
|
167
173
|
class DelegationRecordTable(RecordBaseTable):
|
|
168
174
|
class Meta(NetBoxTable.Meta):
|
|
169
175
|
model = Record
|
|
176
|
+
|
|
170
177
|
fields = ()
|
|
178
|
+
|
|
171
179
|
default_columns = (
|
|
172
180
|
"name",
|
|
173
181
|
"zone",
|
|
@@ -15,6 +15,23 @@ __all__ = (
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class RecordTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
18
|
+
class Meta(NetBoxTable.Meta):
|
|
19
|
+
model = RecordTemplate
|
|
20
|
+
|
|
21
|
+
fields = (
|
|
22
|
+
"status",
|
|
23
|
+
"description",
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
default_columns = (
|
|
27
|
+
"name",
|
|
28
|
+
"record_name",
|
|
29
|
+
"ttl",
|
|
30
|
+
"type",
|
|
31
|
+
"value",
|
|
32
|
+
"tags",
|
|
33
|
+
)
|
|
34
|
+
|
|
18
35
|
name = tables.Column(
|
|
19
36
|
verbose_name=_("Name"),
|
|
20
37
|
linkify=True,
|
|
@@ -47,31 +64,16 @@ class RecordTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
47
64
|
def render_unicode_value(self, value):
|
|
48
65
|
return value_to_unicode(value)
|
|
49
66
|
|
|
50
|
-
class Meta(NetBoxTable.Meta):
|
|
51
|
-
model = RecordTemplate
|
|
52
|
-
fields = (
|
|
53
|
-
"status",
|
|
54
|
-
"description",
|
|
55
|
-
)
|
|
56
|
-
default_columns = (
|
|
57
|
-
"name",
|
|
58
|
-
"record_name",
|
|
59
|
-
"ttl",
|
|
60
|
-
"type",
|
|
61
|
-
"value",
|
|
62
|
-
"tags",
|
|
63
|
-
)
|
|
64
|
-
|
|
65
67
|
|
|
66
68
|
class RecordTemplateDisplayTable(RecordTemplateTable):
|
|
67
|
-
actions = ActionsColumn(actions="")
|
|
68
|
-
|
|
69
69
|
class Meta(NetBoxTable.Meta):
|
|
70
70
|
model = RecordTemplate
|
|
71
|
+
|
|
71
72
|
fields = (
|
|
72
73
|
"status",
|
|
73
74
|
"description",
|
|
74
75
|
)
|
|
76
|
+
|
|
75
77
|
default_columns = (
|
|
76
78
|
"name",
|
|
77
79
|
"record_name",
|
|
@@ -79,3 +81,5 @@ class RecordTemplateDisplayTable(RecordTemplateTable):
|
|
|
79
81
|
"type",
|
|
80
82
|
"value",
|
|
81
83
|
)
|
|
84
|
+
|
|
85
|
+
actions = ActionsColumn(actions="")
|
netbox_dns/tables/registrar.py
CHANGED
|
@@ -10,16 +10,9 @@ __all__ = ("RegistrarTable",)
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class RegistrarTable(NetBoxTable):
|
|
13
|
-
name = tables.Column(
|
|
14
|
-
verbose_name=_("Name"),
|
|
15
|
-
linkify=True,
|
|
16
|
-
)
|
|
17
|
-
tags = TagColumn(
|
|
18
|
-
url_name="plugins:netbox_dns:registrar_list",
|
|
19
|
-
)
|
|
20
|
-
|
|
21
13
|
class Meta(NetBoxTable.Meta):
|
|
22
14
|
model = Registrar
|
|
15
|
+
|
|
23
16
|
fields = (
|
|
24
17
|
"description",
|
|
25
18
|
"iana_id",
|
|
@@ -28,4 +21,17 @@ class RegistrarTable(NetBoxTable):
|
|
|
28
21
|
"abuse_email",
|
|
29
22
|
"abuse_phone",
|
|
30
23
|
)
|
|
31
|
-
|
|
24
|
+
|
|
25
|
+
default_columns = (
|
|
26
|
+
"name",
|
|
27
|
+
"iana_id",
|
|
28
|
+
"referral_url",
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
name = tables.Column(
|
|
32
|
+
verbose_name=_("Name"),
|
|
33
|
+
linkify=True,
|
|
34
|
+
)
|
|
35
|
+
tags = TagColumn(
|
|
36
|
+
url_name="plugins:netbox_dns:registrar_list",
|
|
37
|
+
)
|
|
@@ -10,16 +10,9 @@ __all__ = ("RegistrationContactTable",)
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class RegistrationContactTable(NetBoxTable):
|
|
13
|
-
contact_id = tables.Column(
|
|
14
|
-
verbose_name=_("Contact ID"),
|
|
15
|
-
linkify=True,
|
|
16
|
-
)
|
|
17
|
-
tags = TagColumn(
|
|
18
|
-
url_name="plugins:netbox_dns:registrationcontact_list",
|
|
19
|
-
)
|
|
20
|
-
|
|
21
13
|
class Meta(NetBoxTable.Meta):
|
|
22
14
|
model = RegistrationContact
|
|
15
|
+
|
|
23
16
|
fields = (
|
|
24
17
|
"name",
|
|
25
18
|
"description",
|
|
@@ -35,4 +28,17 @@ class RegistrationContactTable(NetBoxTable):
|
|
|
35
28
|
"fax_ext",
|
|
36
29
|
"email",
|
|
37
30
|
)
|
|
38
|
-
|
|
31
|
+
|
|
32
|
+
default_columns = (
|
|
33
|
+
"contact_id",
|
|
34
|
+
"name",
|
|
35
|
+
"email",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
contact_id = tables.Column(
|
|
39
|
+
verbose_name=_("Contact ID"),
|
|
40
|
+
linkify=True,
|
|
41
|
+
)
|
|
42
|
+
tags = TagColumn(
|
|
43
|
+
url_name="plugins:netbox_dns:registrationcontact_list",
|
|
44
|
+
)
|
netbox_dns/tables/view.py
CHANGED
|
@@ -14,6 +14,19 @@ __all__ = (
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class ViewTable(TenancyColumnsMixin, NetBoxTable):
|
|
17
|
+
class Meta(NetBoxTable.Meta):
|
|
18
|
+
model = View
|
|
19
|
+
|
|
20
|
+
fields = (
|
|
21
|
+
"description",
|
|
22
|
+
"ip_address_filter",
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
default_columns = (
|
|
26
|
+
"name",
|
|
27
|
+
"default_view",
|
|
28
|
+
)
|
|
29
|
+
|
|
17
30
|
name = tables.Column(
|
|
18
31
|
verbose_name=_("Name"),
|
|
19
32
|
linkify=True,
|
|
@@ -23,21 +36,11 @@ class ViewTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
23
36
|
)
|
|
24
37
|
tags = TagColumn(url_name="plugins:netbox_dns:view_list")
|
|
25
38
|
|
|
26
|
-
class Meta(NetBoxTable.Meta):
|
|
27
|
-
model = View
|
|
28
|
-
fields = ("description", "ip_address_filter")
|
|
29
|
-
default_columns = ("name", "default_view")
|
|
30
|
-
|
|
31
39
|
|
|
32
40
|
class RelatedViewTable(TenancyColumnsMixin, NetBoxTable):
|
|
33
|
-
actions = ActionsColumn(actions=())
|
|
34
|
-
|
|
35
|
-
name = tables.Column(
|
|
36
|
-
linkify=True,
|
|
37
|
-
)
|
|
38
|
-
|
|
39
41
|
class Meta(NetBoxTable.Meta):
|
|
40
42
|
model = View
|
|
43
|
+
|
|
41
44
|
fields = (
|
|
42
45
|
"name",
|
|
43
46
|
"description",
|
|
@@ -45,4 +48,13 @@ class RelatedViewTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
45
48
|
"tenant_group",
|
|
46
49
|
"tags",
|
|
47
50
|
)
|
|
48
|
-
|
|
51
|
+
|
|
52
|
+
default_columns = (
|
|
53
|
+
"name",
|
|
54
|
+
"description",
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
name = tables.Column(
|
|
58
|
+
linkify=True,
|
|
59
|
+
)
|
|
60
|
+
actions = ActionsColumn(actions=())
|
netbox_dns/tables/zone.py
CHANGED
|
@@ -19,6 +19,27 @@ __all__ = (
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class ZoneTable(TenancyColumnsMixin, NetBoxTable):
|
|
22
|
+
class Meta(NetBoxTable.Meta):
|
|
23
|
+
model = Zone
|
|
24
|
+
|
|
25
|
+
fields = (
|
|
26
|
+
"description",
|
|
27
|
+
"soa_rname",
|
|
28
|
+
"soa_serial",
|
|
29
|
+
"inline_signing",
|
|
30
|
+
"rfc2317_parent_managed",
|
|
31
|
+
"registry_domain_id",
|
|
32
|
+
"expiration_date",
|
|
33
|
+
"domain_status",
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
default_columns = (
|
|
37
|
+
"name",
|
|
38
|
+
"view",
|
|
39
|
+
"status",
|
|
40
|
+
"tags",
|
|
41
|
+
)
|
|
42
|
+
|
|
22
43
|
name = tables.Column(
|
|
23
44
|
verbose_name=_("Name"),
|
|
24
45
|
linkify=True,
|
|
@@ -78,28 +99,9 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
78
99
|
def render_name(self, value, record):
|
|
79
100
|
return record.display_name
|
|
80
101
|
|
|
81
|
-
class Meta(NetBoxTable.Meta):
|
|
82
|
-
model = Zone
|
|
83
|
-
fields = (
|
|
84
|
-
"description",
|
|
85
|
-
"soa_rname",
|
|
86
|
-
"soa_serial",
|
|
87
|
-
"inline_signing",
|
|
88
|
-
"rfc2317_parent_managed",
|
|
89
|
-
"registry_domain_id",
|
|
90
|
-
"expiration_date",
|
|
91
|
-
"domain_status",
|
|
92
|
-
)
|
|
93
|
-
default_columns = (
|
|
94
|
-
"name",
|
|
95
|
-
"view",
|
|
96
|
-
"status",
|
|
97
|
-
"tags",
|
|
98
|
-
)
|
|
99
|
-
|
|
100
102
|
|
|
101
103
|
class ZoneDisplayTable(ZoneTable):
|
|
102
|
-
actions = ActionsColumn(actions=("changelog",))
|
|
103
|
-
|
|
104
104
|
class Meta(ZoneTable.Meta):
|
|
105
105
|
pass
|
|
106
|
+
|
|
107
|
+
actions = ActionsColumn(actions=("changelog",))
|
|
@@ -14,6 +14,19 @@ __all__ = (
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class ZoneTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
17
|
+
class Meta(NetBoxTable.Meta):
|
|
18
|
+
model = ZoneTemplate
|
|
19
|
+
|
|
20
|
+
fields = (
|
|
21
|
+
"soa_rname",
|
|
22
|
+
"description",
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
default_columns = (
|
|
26
|
+
"name",
|
|
27
|
+
"tags",
|
|
28
|
+
)
|
|
29
|
+
|
|
17
30
|
name = tables.Column(
|
|
18
31
|
verbose_name=_("Name"),
|
|
19
32
|
linkify=True,
|
|
@@ -50,25 +63,16 @@ class ZoneTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
50
63
|
linkify=True,
|
|
51
64
|
)
|
|
52
65
|
|
|
53
|
-
class Meta(NetBoxTable.Meta):
|
|
54
|
-
model = ZoneTemplate
|
|
55
|
-
fields = (
|
|
56
|
-
"soa_rname",
|
|
57
|
-
"description",
|
|
58
|
-
)
|
|
59
|
-
default_columns = (
|
|
60
|
-
"name",
|
|
61
|
-
"tags",
|
|
62
|
-
)
|
|
63
|
-
|
|
64
66
|
|
|
65
67
|
class ZoneTemplateDisplayTable(ZoneTemplateTable):
|
|
66
|
-
actions = ActionsColumn(actions="")
|
|
67
|
-
|
|
68
68
|
class Meta(NetBoxTable.Meta):
|
|
69
69
|
model = ZoneTemplate
|
|
70
|
+
|
|
70
71
|
fields = ("description",)
|
|
72
|
+
|
|
71
73
|
default_columns = (
|
|
72
74
|
"name",
|
|
73
75
|
"description",
|
|
74
76
|
)
|
|
77
|
+
|
|
78
|
+
actions = ActionsColumn(actions="")
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from netbox.views import generic
|
|
2
2
|
from utilities.views import register_model_view
|
|
3
|
-
from tenancy.views import ObjectContactsView
|
|
4
3
|
|
|
5
4
|
from netbox_dns.filtersets import DNSSECKeyTemplateFilterSet
|
|
6
5
|
from netbox_dns.forms import (
|
|
@@ -50,13 +49,11 @@ class DNSSECKeyTemplateView(generic.ObjectView):
|
|
|
50
49
|
class DNSSECKeyTemplateEditView(generic.ObjectEditView):
|
|
51
50
|
queryset = DNSSECKeyTemplate.objects.all()
|
|
52
51
|
form = DNSSECKeyTemplateForm
|
|
53
|
-
default_return_url = "plugins:netbox_dns:dnsseckeytemplate_list"
|
|
54
52
|
|
|
55
53
|
|
|
56
54
|
@register_model_view(DNSSECKeyTemplate, "delete")
|
|
57
55
|
class DNSSECKeyTemplateDeleteView(generic.ObjectDeleteView):
|
|
58
56
|
queryset = DNSSECKeyTemplate.objects.all()
|
|
59
|
-
default_return_url = "plugins:netbox_dns:dnsseckeytemplate_list"
|
|
60
57
|
|
|
61
58
|
|
|
62
59
|
@register_model_view(DNSSECKeyTemplate, "bulk_import", detail=False)
|
|
@@ -64,7 +61,6 @@ class DNSSECKeyTemplateBulkImportView(generic.BulkImportView):
|
|
|
64
61
|
queryset = DNSSECKeyTemplate.objects.all()
|
|
65
62
|
model_form = DNSSECKeyTemplateImportForm
|
|
66
63
|
table = DNSSECKeyTemplateTable
|
|
67
|
-
default_return_url = "plugins:netbox_dns:dnsseckeytemplate_list"
|
|
68
64
|
|
|
69
65
|
|
|
70
66
|
@register_model_view(DNSSECKeyTemplate, "bulk_edit", path="edit", detail=False)
|
|
@@ -80,8 +76,3 @@ class DNSSECKeyTemplateBulkDeleteView(generic.BulkDeleteView):
|
|
|
80
76
|
queryset = DNSSECKeyTemplate.objects.all()
|
|
81
77
|
filterset = DNSSECKeyTemplateFilterSet
|
|
82
78
|
table = DNSSECKeyTemplateTable
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
@register_model_view(DNSSECKeyTemplate, "contacts")
|
|
86
|
-
class DNSSECKeyTemplateContactsView(ObjectContactsView):
|
|
87
|
-
queryset = DNSSECKeyTemplate.objects.all()
|