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
|
@@ -37,19 +37,9 @@ __all__ = (
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
class DNSSECKeyTemplateForm(TenancyForm, NetBoxModelForm):
|
|
40
|
-
lifetime = TimePeriodField(
|
|
41
|
-
required=False,
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
fieldsets = (
|
|
45
|
-
FieldSet("name", "description", name=_("Attributes")),
|
|
46
|
-
FieldSet("type", "lifetime", "algorithm", "key_size", name=_("Key Properties")),
|
|
47
|
-
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
48
|
-
FieldSet("tags", name=_("Tags")),
|
|
49
|
-
)
|
|
50
|
-
|
|
51
40
|
class Meta:
|
|
52
41
|
model = DNSSECKeyTemplate
|
|
42
|
+
|
|
53
43
|
fields = (
|
|
54
44
|
"name",
|
|
55
45
|
"description",
|
|
@@ -62,15 +52,65 @@ class DNSSECKeyTemplateForm(TenancyForm, NetBoxModelForm):
|
|
|
62
52
|
"tags",
|
|
63
53
|
)
|
|
64
54
|
|
|
55
|
+
fieldsets = (
|
|
56
|
+
FieldSet(
|
|
57
|
+
"name",
|
|
58
|
+
"description",
|
|
59
|
+
name=_("Attributes"),
|
|
60
|
+
),
|
|
61
|
+
FieldSet(
|
|
62
|
+
"type",
|
|
63
|
+
"lifetime",
|
|
64
|
+
"algorithm",
|
|
65
|
+
"key_size",
|
|
66
|
+
name=_("Key Properties"),
|
|
67
|
+
),
|
|
68
|
+
FieldSet(
|
|
69
|
+
"tenant_group",
|
|
70
|
+
"tenant",
|
|
71
|
+
name=_("Tenancy"),
|
|
72
|
+
),
|
|
73
|
+
FieldSet(
|
|
74
|
+
"tags",
|
|
75
|
+
name=_("Tags"),
|
|
76
|
+
),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
lifetime = TimePeriodField(
|
|
80
|
+
required=False,
|
|
81
|
+
)
|
|
82
|
+
|
|
65
83
|
|
|
66
84
|
class DNSSECKeyTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
67
85
|
model = DNSSECKeyTemplate
|
|
86
|
+
|
|
68
87
|
fieldsets = (
|
|
69
|
-
FieldSet(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
88
|
+
FieldSet(
|
|
89
|
+
"q",
|
|
90
|
+
"filter_id",
|
|
91
|
+
"tag",
|
|
92
|
+
),
|
|
93
|
+
FieldSet(
|
|
94
|
+
"name",
|
|
95
|
+
"description",
|
|
96
|
+
name=_("Attributes"),
|
|
97
|
+
),
|
|
98
|
+
FieldSet(
|
|
99
|
+
"policiy_id",
|
|
100
|
+
name=_("Policies"),
|
|
101
|
+
),
|
|
102
|
+
FieldSet(
|
|
103
|
+
"type",
|
|
104
|
+
"lifetime",
|
|
105
|
+
"algorithm",
|
|
106
|
+
"key_size",
|
|
107
|
+
name=_("Key Properties"),
|
|
108
|
+
),
|
|
109
|
+
FieldSet(
|
|
110
|
+
"tenant_group_id",
|
|
111
|
+
"tenant_id",
|
|
112
|
+
name=_("Tenancy"),
|
|
113
|
+
),
|
|
74
114
|
)
|
|
75
115
|
|
|
76
116
|
name = forms.CharField(
|
|
@@ -109,6 +149,20 @@ class DNSSECKeyTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
109
149
|
|
|
110
150
|
|
|
111
151
|
class DNSSECKeyTemplateImportForm(NetBoxModelImportForm):
|
|
152
|
+
class Meta:
|
|
153
|
+
model = DNSSECKeyTemplate
|
|
154
|
+
|
|
155
|
+
fields = (
|
|
156
|
+
"name",
|
|
157
|
+
"description",
|
|
158
|
+
"type",
|
|
159
|
+
"lifetime",
|
|
160
|
+
"algorithm",
|
|
161
|
+
"key_size",
|
|
162
|
+
"tenant",
|
|
163
|
+
"tags",
|
|
164
|
+
)
|
|
165
|
+
|
|
112
166
|
lifetime = TimePeriodField(
|
|
113
167
|
required=False,
|
|
114
168
|
label=_("Lifetime"),
|
|
@@ -120,23 +174,41 @@ class DNSSECKeyTemplateImportForm(NetBoxModelImportForm):
|
|
|
120
174
|
label=_("Tenant"),
|
|
121
175
|
)
|
|
122
176
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
177
|
+
|
|
178
|
+
class DNSSECKeyTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
|
179
|
+
model = DNSSECKeyTemplate
|
|
180
|
+
|
|
181
|
+
fieldsets = (
|
|
182
|
+
FieldSet(
|
|
127
183
|
"description",
|
|
184
|
+
name=_("Attributes"),
|
|
185
|
+
),
|
|
186
|
+
FieldSet(
|
|
128
187
|
"type",
|
|
129
188
|
"lifetime",
|
|
130
189
|
"algorithm",
|
|
131
190
|
"key_size",
|
|
191
|
+
name=_("Key Properties"),
|
|
192
|
+
),
|
|
193
|
+
FieldSet(
|
|
194
|
+
"tenant_group",
|
|
132
195
|
"tenant",
|
|
133
|
-
"
|
|
134
|
-
)
|
|
135
|
-
|
|
196
|
+
name=_("Tenancy"),
|
|
197
|
+
),
|
|
198
|
+
)
|
|
136
199
|
|
|
137
|
-
|
|
138
|
-
|
|
200
|
+
nullable_fields = (
|
|
201
|
+
"description",
|
|
202
|
+
"tenant",
|
|
203
|
+
"lifetime",
|
|
204
|
+
"key_size",
|
|
205
|
+
)
|
|
139
206
|
|
|
207
|
+
description = forms.CharField(
|
|
208
|
+
max_length=200,
|
|
209
|
+
required=False,
|
|
210
|
+
label=_("Description"),
|
|
211
|
+
)
|
|
140
212
|
type = forms.ChoiceField(
|
|
141
213
|
choices=add_blank_choice(DNSSECKeyTemplateTypeChoices),
|
|
142
214
|
required=False,
|
|
@@ -156,11 +228,6 @@ class DNSSECKeyTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
156
228
|
required=False,
|
|
157
229
|
label=_("Key Size"),
|
|
158
230
|
)
|
|
159
|
-
description = forms.CharField(
|
|
160
|
-
max_length=200,
|
|
161
|
-
required=False,
|
|
162
|
-
label=_("Description"),
|
|
163
|
-
)
|
|
164
231
|
tenant_group = DynamicModelChoiceField(
|
|
165
232
|
queryset=TenantGroup.objects.all(),
|
|
166
233
|
required=False,
|
|
@@ -171,19 +238,3 @@ class DNSSECKeyTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
171
238
|
required=False,
|
|
172
239
|
label=_("Tenant"),
|
|
173
240
|
)
|
|
174
|
-
|
|
175
|
-
fieldsets = (
|
|
176
|
-
FieldSet(
|
|
177
|
-
"description",
|
|
178
|
-
name=_("Attributes"),
|
|
179
|
-
),
|
|
180
|
-
FieldSet("type", "lifetime", "algorithm", "key_size", name=_("Key Properties")),
|
|
181
|
-
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
fields = (
|
|
185
|
-
"algorithm",
|
|
186
|
-
"key_size",
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
nullable_fields = ("description", "tenant", "lifetime", "key_size")
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from packaging.version import Version
|
|
2
|
-
|
|
3
1
|
from django import forms
|
|
4
2
|
from django.utils.translation import gettext_lazy as _
|
|
5
3
|
|
|
@@ -16,7 +14,6 @@ from utilities.forms.fields import (
|
|
|
16
14
|
DynamicModelChoiceField,
|
|
17
15
|
DynamicModelMultipleChoiceField,
|
|
18
16
|
)
|
|
19
|
-
from utilities.release import load_release_data
|
|
20
17
|
from utilities.forms.rendering import FieldSet
|
|
21
18
|
from utilities.forms.widgets import BulkEditNullBooleanSelect
|
|
22
19
|
from utilities.forms import BOOLEAN_WITH_BLANK_CHOICES, add_blank_choice
|
|
@@ -35,10 +32,39 @@ __all__ = (
|
|
|
35
32
|
"DNSSECPolicyBulkEditForm",
|
|
36
33
|
)
|
|
37
34
|
|
|
38
|
-
QUICK_ADD = Version(load_release_data().version) >= Version("4.2.5")
|
|
39
|
-
|
|
40
35
|
|
|
41
36
|
class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
37
|
+
class Meta:
|
|
38
|
+
model = DNSSECPolicy
|
|
39
|
+
|
|
40
|
+
fields = (
|
|
41
|
+
"name",
|
|
42
|
+
"description",
|
|
43
|
+
"status",
|
|
44
|
+
"key_templates",
|
|
45
|
+
"dnskey_ttl",
|
|
46
|
+
"purge_keys",
|
|
47
|
+
"publish_safety",
|
|
48
|
+
"retire_safety",
|
|
49
|
+
"signatures_jitter",
|
|
50
|
+
"signatures_refresh",
|
|
51
|
+
"signatures_validity",
|
|
52
|
+
"signatures_validity_dnskey",
|
|
53
|
+
"max_zone_ttl",
|
|
54
|
+
"zone_propagation_delay",
|
|
55
|
+
"create_cdnskey",
|
|
56
|
+
"cds_digest_types",
|
|
57
|
+
"parent_ds_ttl",
|
|
58
|
+
"parent_propagation_delay",
|
|
59
|
+
"use_nsec3",
|
|
60
|
+
"nsec3_iterations",
|
|
61
|
+
"nsec3_opt_out",
|
|
62
|
+
"nsec3_salt_size",
|
|
63
|
+
"tenant_group",
|
|
64
|
+
"tenant",
|
|
65
|
+
"tags",
|
|
66
|
+
)
|
|
67
|
+
|
|
42
68
|
fieldsets = (
|
|
43
69
|
FieldSet(
|
|
44
70
|
"name",
|
|
@@ -74,8 +100,15 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
74
100
|
"nsec3_salt_size",
|
|
75
101
|
name=_("Proof of Non-Existence"),
|
|
76
102
|
),
|
|
77
|
-
FieldSet(
|
|
78
|
-
|
|
103
|
+
FieldSet(
|
|
104
|
+
"tenant_group",
|
|
105
|
+
"tenant",
|
|
106
|
+
name=_("Tenancy"),
|
|
107
|
+
),
|
|
108
|
+
FieldSet(
|
|
109
|
+
"tags",
|
|
110
|
+
name=_("Tags"),
|
|
111
|
+
),
|
|
79
112
|
)
|
|
80
113
|
|
|
81
114
|
key_templates = DynamicModelMultipleChoiceField(
|
|
@@ -83,7 +116,7 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
83
116
|
required=False,
|
|
84
117
|
label=_("Key Templates"),
|
|
85
118
|
help_text=_("Select CSK or KSK/ZSK templates for signing"),
|
|
86
|
-
quick_add=
|
|
119
|
+
quick_add=True,
|
|
87
120
|
)
|
|
88
121
|
dnskey_ttl = TimePeriodField(
|
|
89
122
|
required=False,
|
|
@@ -146,41 +179,16 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
146
179
|
placeholder=DNSSECPolicy.get_fallback_setting("parent_propagation_delay"),
|
|
147
180
|
)
|
|
148
181
|
|
|
149
|
-
class Meta:
|
|
150
|
-
model = DNSSECPolicy
|
|
151
|
-
fields = (
|
|
152
|
-
"name",
|
|
153
|
-
"description",
|
|
154
|
-
"status",
|
|
155
|
-
"key_templates",
|
|
156
|
-
"dnskey_ttl",
|
|
157
|
-
"purge_keys",
|
|
158
|
-
"publish_safety",
|
|
159
|
-
"retire_safety",
|
|
160
|
-
"signatures_jitter",
|
|
161
|
-
"signatures_refresh",
|
|
162
|
-
"signatures_validity",
|
|
163
|
-
"signatures_validity_dnskey",
|
|
164
|
-
"max_zone_ttl",
|
|
165
|
-
"zone_propagation_delay",
|
|
166
|
-
"create_cdnskey",
|
|
167
|
-
"cds_digest_types",
|
|
168
|
-
"parent_ds_ttl",
|
|
169
|
-
"parent_propagation_delay",
|
|
170
|
-
"use_nsec3",
|
|
171
|
-
"nsec3_iterations",
|
|
172
|
-
"nsec3_opt_out",
|
|
173
|
-
"nsec3_salt_size",
|
|
174
|
-
"tenant_group",
|
|
175
|
-
"tenant",
|
|
176
|
-
"tags",
|
|
177
|
-
)
|
|
178
|
-
|
|
179
182
|
|
|
180
183
|
class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
181
184
|
model = DNSSECPolicy
|
|
185
|
+
|
|
182
186
|
fieldsets = (
|
|
183
|
-
FieldSet(
|
|
187
|
+
FieldSet(
|
|
188
|
+
"q",
|
|
189
|
+
"filter_id",
|
|
190
|
+
"tag",
|
|
191
|
+
),
|
|
184
192
|
FieldSet(
|
|
185
193
|
"name",
|
|
186
194
|
"description",
|
|
@@ -220,8 +228,15 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
220
228
|
"nsec3_salt_size",
|
|
221
229
|
name=_("Proof of Non-Existence"),
|
|
222
230
|
),
|
|
223
|
-
FieldSet(
|
|
224
|
-
|
|
231
|
+
FieldSet(
|
|
232
|
+
"tenant_group_id",
|
|
233
|
+
"tenant_id",
|
|
234
|
+
name=_("Tenancy"),
|
|
235
|
+
),
|
|
236
|
+
FieldSet(
|
|
237
|
+
"tags",
|
|
238
|
+
name=_("Tags"),
|
|
239
|
+
),
|
|
225
240
|
)
|
|
226
241
|
|
|
227
242
|
name = forms.CharField(
|
|
@@ -334,6 +349,35 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
334
349
|
|
|
335
350
|
|
|
336
351
|
class DNSSECPolicyImportForm(NetBoxModelImportForm):
|
|
352
|
+
class Meta:
|
|
353
|
+
model = DNSSECPolicy
|
|
354
|
+
|
|
355
|
+
fields = (
|
|
356
|
+
"name",
|
|
357
|
+
"description",
|
|
358
|
+
"key_templates",
|
|
359
|
+
"dnskey_ttl",
|
|
360
|
+
"purge_keys",
|
|
361
|
+
"publish_safety",
|
|
362
|
+
"retire_safety",
|
|
363
|
+
"signatures_jitter",
|
|
364
|
+
"signatures_refresh",
|
|
365
|
+
"signatures_validity",
|
|
366
|
+
"signatures_validity_dnskey",
|
|
367
|
+
"max_zone_ttl",
|
|
368
|
+
"zone_propagation_delay",
|
|
369
|
+
"create_cdnskey",
|
|
370
|
+
"cds_digest_types",
|
|
371
|
+
"parent_ds_ttl",
|
|
372
|
+
"parent_propagation_delay",
|
|
373
|
+
"use_nsec3",
|
|
374
|
+
"nsec3_iterations",
|
|
375
|
+
"nsec3_opt_out",
|
|
376
|
+
"nsec3_salt_size",
|
|
377
|
+
"tenant",
|
|
378
|
+
"tags",
|
|
379
|
+
)
|
|
380
|
+
|
|
337
381
|
status = CSVChoiceField(
|
|
338
382
|
choices=DNSSECPolicyStatusChoices,
|
|
339
383
|
required=False,
|
|
@@ -394,12 +438,17 @@ class DNSSECPolicyImportForm(NetBoxModelImportForm):
|
|
|
394
438
|
label=_("Tenant"),
|
|
395
439
|
)
|
|
396
440
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
441
|
+
|
|
442
|
+
class DNSSECPolicyBulkEditForm(NetBoxModelBulkEditForm):
|
|
443
|
+
model = DNSSECPolicy
|
|
444
|
+
|
|
445
|
+
fieldsets = (
|
|
446
|
+
FieldSet(
|
|
401
447
|
"description",
|
|
402
448
|
"key_templates",
|
|
449
|
+
name=_("Attributes"),
|
|
450
|
+
),
|
|
451
|
+
FieldSet(
|
|
403
452
|
"dnskey_ttl",
|
|
404
453
|
"purge_keys",
|
|
405
454
|
"publish_safety",
|
|
@@ -410,21 +459,52 @@ class DNSSECPolicyImportForm(NetBoxModelImportForm):
|
|
|
410
459
|
"signatures_validity_dnskey",
|
|
411
460
|
"max_zone_ttl",
|
|
412
461
|
"zone_propagation_delay",
|
|
462
|
+
name=_("Timing"),
|
|
463
|
+
),
|
|
464
|
+
FieldSet(
|
|
413
465
|
"create_cdnskey",
|
|
414
466
|
"cds_digest_types",
|
|
415
467
|
"parent_ds_ttl",
|
|
416
468
|
"parent_propagation_delay",
|
|
469
|
+
name=_("Parent Delegation"),
|
|
470
|
+
),
|
|
471
|
+
FieldSet(
|
|
417
472
|
"use_nsec3",
|
|
418
473
|
"nsec3_iterations",
|
|
419
474
|
"nsec3_opt_out",
|
|
420
475
|
"nsec3_salt_size",
|
|
476
|
+
name=_("Proof of Non-Existence"),
|
|
477
|
+
),
|
|
478
|
+
FieldSet(
|
|
479
|
+
"tenant_group",
|
|
421
480
|
"tenant",
|
|
422
|
-
"
|
|
423
|
-
)
|
|
424
|
-
|
|
481
|
+
name=_("Tenancy"),
|
|
482
|
+
),
|
|
483
|
+
)
|
|
425
484
|
|
|
426
|
-
|
|
427
|
-
|
|
485
|
+
nullable_fields = (
|
|
486
|
+
"description",
|
|
487
|
+
"tenant",
|
|
488
|
+
"dnskey_ttl",
|
|
489
|
+
"purge_keys",
|
|
490
|
+
"publish_safety",
|
|
491
|
+
"retire_safety",
|
|
492
|
+
"signatures_jitter",
|
|
493
|
+
"signatures_refresh",
|
|
494
|
+
"signatures_validity",
|
|
495
|
+
"signatures_validity_dnskey",
|
|
496
|
+
"max_zone_ttl",
|
|
497
|
+
"zone_propagation_delay",
|
|
498
|
+
"cds_digest_types",
|
|
499
|
+
"parent_ds_ttl",
|
|
500
|
+
"parent_propagation_delay",
|
|
501
|
+
"nsec3_iterations",
|
|
502
|
+
"nsec3_opt_out",
|
|
503
|
+
"nsec3_salt_size",
|
|
504
|
+
"cds_digest_types",
|
|
505
|
+
"parent_ds_ttl",
|
|
506
|
+
"parent_propagation_delay",
|
|
507
|
+
)
|
|
428
508
|
|
|
429
509
|
description = forms.CharField(
|
|
430
510
|
max_length=200,
|
|
@@ -523,66 +603,6 @@ class DNSSECPolicyBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
523
603
|
label=_("Tenant"),
|
|
524
604
|
)
|
|
525
605
|
|
|
526
|
-
fieldsets = (
|
|
527
|
-
FieldSet(
|
|
528
|
-
"description",
|
|
529
|
-
"key_templates",
|
|
530
|
-
name=_("Attributes"),
|
|
531
|
-
),
|
|
532
|
-
FieldSet(
|
|
533
|
-
"dnskey_ttl",
|
|
534
|
-
"purge_keys",
|
|
535
|
-
"publish_safety",
|
|
536
|
-
"retire_safety",
|
|
537
|
-
"signatures_jitter",
|
|
538
|
-
"signatures_refresh",
|
|
539
|
-
"signatures_validity",
|
|
540
|
-
"signatures_validity_dnskey",
|
|
541
|
-
"max_zone_ttl",
|
|
542
|
-
"zone_propagation_delay",
|
|
543
|
-
name=_("Timing"),
|
|
544
|
-
),
|
|
545
|
-
FieldSet(
|
|
546
|
-
"create_cdnskey",
|
|
547
|
-
"cds_digest_types",
|
|
548
|
-
"parent_ds_ttl",
|
|
549
|
-
"parent_propagation_delay",
|
|
550
|
-
name=_("Parent Delegation"),
|
|
551
|
-
),
|
|
552
|
-
FieldSet(
|
|
553
|
-
"use_nsec3",
|
|
554
|
-
"nsec3_iterations",
|
|
555
|
-
"nsec3_opt_out",
|
|
556
|
-
"nsec3_salt_size",
|
|
557
|
-
name=_("Proof of Non-Existence"),
|
|
558
|
-
),
|
|
559
|
-
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
560
|
-
)
|
|
561
|
-
|
|
562
|
-
nullable_fields = (
|
|
563
|
-
"description",
|
|
564
|
-
"tenant",
|
|
565
|
-
"dnskey_ttl",
|
|
566
|
-
"purge_keys",
|
|
567
|
-
"publish_safety",
|
|
568
|
-
"retire_safety",
|
|
569
|
-
"signatures_jitter",
|
|
570
|
-
"signatures_refresh",
|
|
571
|
-
"signatures_validity",
|
|
572
|
-
"signatures_validity_dnskey",
|
|
573
|
-
"max_zone_ttl",
|
|
574
|
-
"zone_propagation_delay",
|
|
575
|
-
"cds_digest_types",
|
|
576
|
-
"parent_ds_ttl",
|
|
577
|
-
"parent_propagation_delay",
|
|
578
|
-
"nsec3_iterations",
|
|
579
|
-
"nsec3_opt_out",
|
|
580
|
-
"nsec3_salt_size",
|
|
581
|
-
"cds_digest_types",
|
|
582
|
-
"parent_ds_ttl",
|
|
583
|
-
"parent_propagation_delay",
|
|
584
|
-
)
|
|
585
|
-
|
|
586
606
|
def clean_cds_digest_types(self, *args, **kwargs):
|
|
587
607
|
if not (
|
|
588
608
|
cds_digest_types := self.cleaned_data.get("cds_digest_types")
|
netbox_dns/forms/nameserver.py
CHANGED
|
@@ -31,6 +31,34 @@ __all__ = (
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class NameServerForm(TenancyForm, NetBoxModelForm):
|
|
34
|
+
class Meta:
|
|
35
|
+
model = NameServer
|
|
36
|
+
|
|
37
|
+
fields = (
|
|
38
|
+
"name",
|
|
39
|
+
"description",
|
|
40
|
+
"tags",
|
|
41
|
+
"tenant_group",
|
|
42
|
+
"tenant",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
fieldsets = (
|
|
46
|
+
FieldSet(
|
|
47
|
+
"name",
|
|
48
|
+
"description",
|
|
49
|
+
name=_("Nameserver"),
|
|
50
|
+
),
|
|
51
|
+
FieldSet(
|
|
52
|
+
"tenant_group",
|
|
53
|
+
"tenant",
|
|
54
|
+
name=_("Tenancy"),
|
|
55
|
+
),
|
|
56
|
+
FieldSet(
|
|
57
|
+
"tags",
|
|
58
|
+
name=_("Tags"),
|
|
59
|
+
),
|
|
60
|
+
)
|
|
61
|
+
|
|
34
62
|
def __init__(self, *args, **kwargs):
|
|
35
63
|
super().__init__(*args, **kwargs)
|
|
36
64
|
|
|
@@ -43,20 +71,30 @@ class NameServerForm(TenancyForm, NetBoxModelForm):
|
|
|
43
71
|
label=_("Name"),
|
|
44
72
|
)
|
|
45
73
|
|
|
46
|
-
fieldsets = (
|
|
47
|
-
FieldSet("name", "description", name=_("Nameserver")),
|
|
48
|
-
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
49
|
-
FieldSet("tags", name=_("Tags")),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
class Meta:
|
|
53
|
-
model = NameServer
|
|
54
|
-
fields = ("name", "description", "tags", "tenant_group", "tenant")
|
|
55
|
-
|
|
56
74
|
|
|
57
75
|
class NameServerFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
58
76
|
model = NameServer
|
|
59
77
|
|
|
78
|
+
fieldsets = (
|
|
79
|
+
FieldSet(
|
|
80
|
+
"q",
|
|
81
|
+
"filter_id",
|
|
82
|
+
"tag",
|
|
83
|
+
),
|
|
84
|
+
FieldSet(
|
|
85
|
+
"name",
|
|
86
|
+
"zone_id",
|
|
87
|
+
"soa_zone_id",
|
|
88
|
+
"description",
|
|
89
|
+
name=_("Attributes"),
|
|
90
|
+
),
|
|
91
|
+
FieldSet(
|
|
92
|
+
"tenant_group_id",
|
|
93
|
+
"tenant_id",
|
|
94
|
+
name=_("Tenancy"),
|
|
95
|
+
),
|
|
96
|
+
)
|
|
97
|
+
|
|
60
98
|
name = forms.CharField(
|
|
61
99
|
required=False,
|
|
62
100
|
label=_("Name"),
|
|
@@ -79,14 +117,18 @@ class NameServerFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
79
117
|
)
|
|
80
118
|
tag = TagFilterField(NameServer)
|
|
81
119
|
|
|
82
|
-
fieldsets = (
|
|
83
|
-
FieldSet("q", "filter_id", "tag"),
|
|
84
|
-
FieldSet("name", "zone_id", "soa_zone_id", "description", name=_("Attributes")),
|
|
85
|
-
FieldSet("tenant_group_id", "tenant_id", name=_("Tenancy")),
|
|
86
|
-
)
|
|
87
|
-
|
|
88
120
|
|
|
89
121
|
class NameServerImportForm(NetBoxModelImportForm):
|
|
122
|
+
class Meta:
|
|
123
|
+
model = NameServer
|
|
124
|
+
|
|
125
|
+
fields = (
|
|
126
|
+
"name",
|
|
127
|
+
"description",
|
|
128
|
+
"tenant",
|
|
129
|
+
"tags",
|
|
130
|
+
)
|
|
131
|
+
|
|
90
132
|
name = forms.CharField(
|
|
91
133
|
label=_("Name"),
|
|
92
134
|
)
|
|
@@ -97,19 +139,24 @@ class NameServerImportForm(NetBoxModelImportForm):
|
|
|
97
139
|
label=_("Tenant"),
|
|
98
140
|
)
|
|
99
141
|
|
|
100
|
-
class Meta:
|
|
101
|
-
model = NameServer
|
|
102
142
|
|
|
103
|
-
|
|
104
|
-
|
|
143
|
+
class NameServerBulkEditForm(NetBoxModelBulkEditForm):
|
|
144
|
+
model = NameServer
|
|
145
|
+
|
|
146
|
+
fieldsets = (
|
|
147
|
+
FieldSet(
|
|
105
148
|
"description",
|
|
149
|
+
"tenant_group",
|
|
106
150
|
"tenant",
|
|
107
151
|
"tags",
|
|
108
|
-
|
|
109
|
-
|
|
152
|
+
name=_("Attributes"),
|
|
153
|
+
),
|
|
154
|
+
)
|
|
110
155
|
|
|
111
|
-
|
|
112
|
-
|
|
156
|
+
nullable_fields = (
|
|
157
|
+
"description",
|
|
158
|
+
"tenant",
|
|
159
|
+
)
|
|
113
160
|
|
|
114
161
|
description = forms.CharField(
|
|
115
162
|
max_length=200,
|
|
@@ -126,15 +173,3 @@ class NameServerBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
126
173
|
required=False,
|
|
127
174
|
label=_("Tenant"),
|
|
128
175
|
)
|
|
129
|
-
|
|
130
|
-
fieldsets = (
|
|
131
|
-
FieldSet(
|
|
132
|
-
"description",
|
|
133
|
-
"tenant_group",
|
|
134
|
-
"tenant",
|
|
135
|
-
"tags",
|
|
136
|
-
name=_("Attributes"),
|
|
137
|
-
),
|
|
138
|
-
)
|
|
139
|
-
|
|
140
|
-
nullable_fields = ("description", "tenant")
|