netbox-plugin-dns 1.3b1__py3-none-any.whl → 1.3.1__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 +3 -2
- netbox_dns/api/nested_serializers.py +54 -49
- netbox_dns/api/serializers_/dnssec_key_template.py +22 -13
- netbox_dns/api/serializers_/dnssec_policy.py +89 -40
- netbox_dns/api/serializers_/nameserver.py +25 -13
- netbox_dns/api/serializers_/record.py +46 -38
- 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 -62
- netbox_dns/api/serializers_/zone_template.py +40 -34
- netbox_dns/choices/dnssec_key_template.py +4 -0
- netbox_dns/choices/record.py +4 -2
- netbox_dns/filtersets/dnssec_key_template.py +10 -4
- netbox_dns/filtersets/dnssec_policy.py +2 -0
- netbox_dns/filtersets/nameserver.py +9 -4
- netbox_dns/filtersets/record.py +16 -15
- 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 +39 -20
- netbox_dns/filtersets/zone_template.py +10 -9
- netbox_dns/forms/dnssec_key_template.py +97 -46
- netbox_dns/forms/dnssec_policy.py +124 -105
- 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 +273 -243
- netbox_dns/forms/zone_template.py +151 -101
- netbox_dns/graphql/types.py +3 -3
- netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
- netbox_dns/migrations/0019_dnssecpolicy_parental_agents.py +25 -0
- netbox_dns/migrations/0020_remove_dnssecpolicy_parental_agents_and_more.py +29 -0
- netbox_dns/migrations/0021_alter_record_ptr_record.py +25 -0
- netbox_dns/models/dnssec_key_template.py +24 -22
- netbox_dns/models/dnssec_policy.py +17 -16
- netbox_dns/models/nameserver.py +26 -25
- netbox_dns/models/record.py +117 -61
- netbox_dns/models/record_template.py +30 -29
- netbox_dns/models/registrar.py +13 -12
- netbox_dns/models/registration_contact.py +33 -32
- netbox_dns/models/view.py +16 -15
- netbox_dns/models/zone.py +88 -57
- netbox_dns/models/zone_template.py +35 -34
- 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 +55 -34
- 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 +25 -12
- netbox_dns/tables/zone.py +23 -21
- netbox_dns/tables/zone_template.py +17 -13
- netbox_dns/template_content.py +13 -2
- netbox_dns/templates/netbox_dns/record.html +13 -11
- netbox_dns/templates/netbox_dns/zone.html +10 -0
- netbox_dns/validators/dns_name.py +1 -1
- netbox_dns/views/dnssec_key_template.py +3 -3
- netbox_dns/views/record.py +19 -3
- netbox_dns/views/record_template.py +3 -1
- netbox_dns/views/zone_template.py +5 -3
- {netbox_plugin_dns-1.3b1.dist-info → netbox_plugin_dns-1.3.1.dist-info}/METADATA +3 -2
- {netbox_plugin_dns-1.3b1.dist-info → netbox_plugin_dns-1.3.1.dist-info}/RECORD +73 -70
- {netbox_plugin_dns-1.3b1.dist-info → netbox_plugin_dns-1.3.1.dist-info}/WHEEL +1 -1
- {netbox_plugin_dns-1.3b1.dist-info → netbox_plugin_dns-1.3.1.dist-info}/licenses/LICENSE +0 -0
- {netbox_plugin_dns-1.3b1.dist-info → netbox_plugin_dns-1.3.1.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,19 +32,16 @@ __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):
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
class Meta:
|
|
38
|
+
model = DNSSECPolicy
|
|
39
|
+
|
|
40
|
+
fields = (
|
|
44
41
|
"name",
|
|
45
42
|
"description",
|
|
46
43
|
"status",
|
|
47
44
|
"key_templates",
|
|
48
|
-
name=_("Attributes"),
|
|
49
|
-
),
|
|
50
|
-
FieldSet(
|
|
51
45
|
"dnskey_ttl",
|
|
52
46
|
"purge_keys",
|
|
53
47
|
"publish_safety",
|
|
@@ -58,41 +52,28 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
58
52
|
"signatures_validity_dnskey",
|
|
59
53
|
"max_zone_ttl",
|
|
60
54
|
"zone_propagation_delay",
|
|
61
|
-
name=_("Timing"),
|
|
62
|
-
),
|
|
63
|
-
FieldSet(
|
|
64
55
|
"create_cdnskey",
|
|
65
56
|
"cds_digest_types",
|
|
66
57
|
"parent_ds_ttl",
|
|
67
58
|
"parent_propagation_delay",
|
|
68
|
-
name=_("Parent Delegation"),
|
|
69
|
-
),
|
|
70
|
-
FieldSet(
|
|
71
59
|
"use_nsec3",
|
|
72
60
|
"nsec3_iterations",
|
|
73
61
|
"nsec3_opt_out",
|
|
74
62
|
"nsec3_salt_size",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
key_templates = DynamicModelMultipleChoiceField(
|
|
82
|
-
queryset=DNSSECKeyTemplate.objects.all(),
|
|
83
|
-
required=False,
|
|
84
|
-
label=_("Key Templates"),
|
|
85
|
-
help_text=_("Select CSK or KSK/ZSK templates for signing"),
|
|
86
|
-
quick_add=QUICK_ADD,
|
|
87
|
-
)
|
|
63
|
+
"tenant_group",
|
|
64
|
+
"tenant",
|
|
65
|
+
"tags",
|
|
66
|
+
)
|
|
88
67
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
fields = (
|
|
68
|
+
fieldsets = (
|
|
69
|
+
FieldSet(
|
|
92
70
|
"name",
|
|
93
71
|
"description",
|
|
94
72
|
"status",
|
|
95
73
|
"key_templates",
|
|
74
|
+
name=_("Attributes"),
|
|
75
|
+
),
|
|
76
|
+
FieldSet(
|
|
96
77
|
"dnskey_ttl",
|
|
97
78
|
"purge_keys",
|
|
98
79
|
"publish_safety",
|
|
@@ -103,19 +84,40 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
103
84
|
"signatures_validity_dnskey",
|
|
104
85
|
"max_zone_ttl",
|
|
105
86
|
"zone_propagation_delay",
|
|
87
|
+
name=_("Timing"),
|
|
88
|
+
),
|
|
89
|
+
FieldSet(
|
|
106
90
|
"create_cdnskey",
|
|
107
91
|
"cds_digest_types",
|
|
108
92
|
"parent_ds_ttl",
|
|
109
93
|
"parent_propagation_delay",
|
|
94
|
+
name=_("Parent Delegation"),
|
|
95
|
+
),
|
|
96
|
+
FieldSet(
|
|
110
97
|
"use_nsec3",
|
|
111
98
|
"nsec3_iterations",
|
|
112
99
|
"nsec3_opt_out",
|
|
113
100
|
"nsec3_salt_size",
|
|
101
|
+
name=_("Proof of Non-Existence"),
|
|
102
|
+
),
|
|
103
|
+
FieldSet(
|
|
114
104
|
"tenant_group",
|
|
115
105
|
"tenant",
|
|
106
|
+
name=_("Tenancy"),
|
|
107
|
+
),
|
|
108
|
+
FieldSet(
|
|
116
109
|
"tags",
|
|
117
|
-
|
|
110
|
+
name=_("Tags"),
|
|
111
|
+
),
|
|
112
|
+
)
|
|
118
113
|
|
|
114
|
+
key_templates = DynamicModelMultipleChoiceField(
|
|
115
|
+
queryset=DNSSECKeyTemplate.objects.all(),
|
|
116
|
+
required=False,
|
|
117
|
+
label=_("Key Templates"),
|
|
118
|
+
help_text=_("Select CSK or KSK/ZSK templates for signing"),
|
|
119
|
+
quick_add=True,
|
|
120
|
+
)
|
|
119
121
|
dnskey_ttl = TimePeriodField(
|
|
120
122
|
required=False,
|
|
121
123
|
label=_("DNSKEY TTL"),
|
|
@@ -180,8 +182,13 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
180
182
|
|
|
181
183
|
class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
182
184
|
model = DNSSECPolicy
|
|
185
|
+
|
|
183
186
|
fieldsets = (
|
|
184
|
-
FieldSet(
|
|
187
|
+
FieldSet(
|
|
188
|
+
"q",
|
|
189
|
+
"filter_id",
|
|
190
|
+
"tag",
|
|
191
|
+
),
|
|
185
192
|
FieldSet(
|
|
186
193
|
"name",
|
|
187
194
|
"description",
|
|
@@ -221,8 +228,15 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
221
228
|
"nsec3_salt_size",
|
|
222
229
|
name=_("Proof of Non-Existence"),
|
|
223
230
|
),
|
|
224
|
-
FieldSet(
|
|
225
|
-
|
|
231
|
+
FieldSet(
|
|
232
|
+
"tenant_group_id",
|
|
233
|
+
"tenant_id",
|
|
234
|
+
name=_("Tenancy"),
|
|
235
|
+
),
|
|
236
|
+
FieldSet(
|
|
237
|
+
"tags",
|
|
238
|
+
name=_("Tags"),
|
|
239
|
+
),
|
|
226
240
|
)
|
|
227
241
|
|
|
228
242
|
name = forms.CharField(
|
|
@@ -335,6 +349,35 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
335
349
|
|
|
336
350
|
|
|
337
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
|
+
|
|
338
381
|
status = CSVChoiceField(
|
|
339
382
|
choices=DNSSECPolicyStatusChoices,
|
|
340
383
|
required=False,
|
|
@@ -395,12 +438,17 @@ class DNSSECPolicyImportForm(NetBoxModelImportForm):
|
|
|
395
438
|
label=_("Tenant"),
|
|
396
439
|
)
|
|
397
440
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
441
|
+
|
|
442
|
+
class DNSSECPolicyBulkEditForm(NetBoxModelBulkEditForm):
|
|
443
|
+
model = DNSSECPolicy
|
|
444
|
+
|
|
445
|
+
fieldsets = (
|
|
446
|
+
FieldSet(
|
|
402
447
|
"description",
|
|
403
448
|
"key_templates",
|
|
449
|
+
name=_("Attributes"),
|
|
450
|
+
),
|
|
451
|
+
FieldSet(
|
|
404
452
|
"dnskey_ttl",
|
|
405
453
|
"purge_keys",
|
|
406
454
|
"publish_safety",
|
|
@@ -411,21 +459,52 @@ class DNSSECPolicyImportForm(NetBoxModelImportForm):
|
|
|
411
459
|
"signatures_validity_dnskey",
|
|
412
460
|
"max_zone_ttl",
|
|
413
461
|
"zone_propagation_delay",
|
|
462
|
+
name=_("Timing"),
|
|
463
|
+
),
|
|
464
|
+
FieldSet(
|
|
414
465
|
"create_cdnskey",
|
|
415
466
|
"cds_digest_types",
|
|
416
467
|
"parent_ds_ttl",
|
|
417
468
|
"parent_propagation_delay",
|
|
469
|
+
name=_("Parent Delegation"),
|
|
470
|
+
),
|
|
471
|
+
FieldSet(
|
|
418
472
|
"use_nsec3",
|
|
419
473
|
"nsec3_iterations",
|
|
420
474
|
"nsec3_opt_out",
|
|
421
475
|
"nsec3_salt_size",
|
|
476
|
+
name=_("Proof of Non-Existence"),
|
|
477
|
+
),
|
|
478
|
+
FieldSet(
|
|
479
|
+
"tenant_group",
|
|
422
480
|
"tenant",
|
|
423
|
-
"
|
|
424
|
-
)
|
|
425
|
-
|
|
481
|
+
name=_("Tenancy"),
|
|
482
|
+
),
|
|
483
|
+
)
|
|
426
484
|
|
|
427
|
-
|
|
428
|
-
|
|
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
|
+
)
|
|
429
508
|
|
|
430
509
|
description = forms.CharField(
|
|
431
510
|
max_length=200,
|
|
@@ -524,66 +603,6 @@ class DNSSECPolicyBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
524
603
|
label=_("Tenant"),
|
|
525
604
|
)
|
|
526
605
|
|
|
527
|
-
fieldsets = (
|
|
528
|
-
FieldSet(
|
|
529
|
-
"description",
|
|
530
|
-
"key_templates",
|
|
531
|
-
name=_("Attributes"),
|
|
532
|
-
),
|
|
533
|
-
FieldSet(
|
|
534
|
-
"dnskey_ttl",
|
|
535
|
-
"purge_keys",
|
|
536
|
-
"publish_safety",
|
|
537
|
-
"retire_safety",
|
|
538
|
-
"signatures_jitter",
|
|
539
|
-
"signatures_refresh",
|
|
540
|
-
"signatures_validity",
|
|
541
|
-
"signatures_validity_dnskey",
|
|
542
|
-
"max_zone_ttl",
|
|
543
|
-
"zone_propagation_delay",
|
|
544
|
-
name=_("Timing"),
|
|
545
|
-
),
|
|
546
|
-
FieldSet(
|
|
547
|
-
"create_cdnskey",
|
|
548
|
-
"cds_digest_types",
|
|
549
|
-
"parent_ds_ttl",
|
|
550
|
-
"parent_propagation_delay",
|
|
551
|
-
name=_("Parent Delegation"),
|
|
552
|
-
),
|
|
553
|
-
FieldSet(
|
|
554
|
-
"use_nsec3",
|
|
555
|
-
"nsec3_iterations",
|
|
556
|
-
"nsec3_opt_out",
|
|
557
|
-
"nsec3_salt_size",
|
|
558
|
-
name=_("Proof of Non-Existence"),
|
|
559
|
-
),
|
|
560
|
-
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
561
|
-
)
|
|
562
|
-
|
|
563
|
-
nullable_fields = (
|
|
564
|
-
"description",
|
|
565
|
-
"tenant",
|
|
566
|
-
"dnskey_ttl",
|
|
567
|
-
"purge_keys",
|
|
568
|
-
"publish_safety",
|
|
569
|
-
"retire_safety",
|
|
570
|
-
"signatures_jitter",
|
|
571
|
-
"signatures_refresh",
|
|
572
|
-
"signatures_validity",
|
|
573
|
-
"signatures_validity_dnskey",
|
|
574
|
-
"max_zone_ttl",
|
|
575
|
-
"zone_propagation_delay",
|
|
576
|
-
"cds_digest_types",
|
|
577
|
-
"parent_ds_ttl",
|
|
578
|
-
"parent_propagation_delay",
|
|
579
|
-
"nsec3_iterations",
|
|
580
|
-
"nsec3_opt_out",
|
|
581
|
-
"nsec3_salt_size",
|
|
582
|
-
"cds_digest_types",
|
|
583
|
-
"parent_ds_ttl",
|
|
584
|
-
"parent_propagation_delay",
|
|
585
|
-
)
|
|
586
|
-
|
|
587
606
|
def clean_cds_digest_types(self, *args, **kwargs):
|
|
588
607
|
if not (
|
|
589
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")
|