netbox-plugin-dns 1.2.5__py3-none-any.whl → 1.2.7b2__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 +15 -1
- netbox_dns/api/serializers.py +3 -0
- netbox_dns/api/serializers_/dnssec_key_template.py +46 -0
- netbox_dns/api/serializers_/dnssec_policy.py +83 -0
- netbox_dns/api/serializers_/zone.py +10 -0
- netbox_dns/api/serializers_/zone_template.py +13 -4
- netbox_dns/api/urls.py +4 -0
- netbox_dns/api/views.py +18 -0
- netbox_dns/choices/__init__.py +2 -0
- netbox_dns/choices/dnssec_key_template.py +63 -0
- netbox_dns/choices/dnssec_policy.py +40 -0
- netbox_dns/choices/record.py +2 -25
- netbox_dns/choices/utilities.py +26 -0
- netbox_dns/fields/__init__.py +2 -0
- netbox_dns/fields/choice_array.py +20 -0
- netbox_dns/fields/timeperiod.py +31 -0
- netbox_dns/filtersets/__init__.py +3 -0
- netbox_dns/filtersets/dnssec_key_template.py +51 -0
- netbox_dns/filtersets/dnssec_policy.py +73 -0
- netbox_dns/filtersets/zone.py +23 -4
- netbox_dns/filtersets/zone_template.py +11 -0
- netbox_dns/forms/__init__.py +2 -0
- netbox_dns/forms/dnssec_key_template.py +188 -0
- netbox_dns/forms/dnssec_policy.py +563 -0
- netbox_dns/forms/record.py +12 -6
- netbox_dns/forms/record_template.py +9 -3
- netbox_dns/forms/zone.py +70 -22
- netbox_dns/forms/zone_template.py +29 -0
- netbox_dns/graphql/__init__.py +7 -3
- netbox_dns/graphql/filters.py +16 -0
- netbox_dns/graphql/schema.py +20 -0
- netbox_dns/graphql/types.py +67 -3
- netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
- netbox_dns/migrations/0015_dnssec.py +168 -0
- netbox_dns/migrations/0016_dnssec_policy_status.py +18 -0
- netbox_dns/migrations/0017_dnssec_policy_zone_zone_template.py +41 -0
- netbox_dns/models/__init__.py +2 -0
- netbox_dns/models/dnssec_key_template.py +114 -0
- netbox_dns/models/dnssec_policy.py +201 -0
- netbox_dns/models/zone.py +29 -16
- netbox_dns/models/zone_template.py +16 -6
- netbox_dns/navigation.py +49 -0
- netbox_dns/signals/dnssec.py +32 -0
- netbox_dns/tables/__init__.py +2 -0
- netbox_dns/tables/dnssec_key_template.py +48 -0
- netbox_dns/tables/dnssec_policy.py +131 -0
- netbox_dns/tables/zone.py +17 -1
- netbox_dns/tables/zone_template.py +4 -0
- netbox_dns/templates/netbox_dns/dnsseckeytemplate.html +70 -0
- netbox_dns/templates/netbox_dns/dnssecpolicy.html +155 -0
- netbox_dns/templates/netbox_dns/zone.html +16 -0
- netbox_dns/templates/netbox_dns/zonetemplate/child.html +46 -0
- netbox_dns/templates/netbox_dns/zonetemplate.html +12 -0
- netbox_dns/urls.py +16 -0
- netbox_dns/validators/__init__.py +1 -0
- netbox_dns/validators/dnssec.py +146 -0
- netbox_dns/views/__init__.py +2 -0
- netbox_dns/views/dnssec_key_template.py +87 -0
- netbox_dns/views/dnssec_policy.py +153 -0
- {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/METADATA +2 -2
- {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/RECORD +65 -39
- {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/WHEEL +1 -1
- {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-1.2.5.dist-info → netbox_plugin_dns-1.2.7b2.dist-info}/top_level.txt +0 -0
netbox_dns/forms/zone.py
CHANGED
|
@@ -36,10 +36,11 @@ from netbox_dns.models import (
|
|
|
36
36
|
Registrar,
|
|
37
37
|
RegistrationContact,
|
|
38
38
|
ZoneTemplate,
|
|
39
|
+
DNSSECPolicy,
|
|
39
40
|
)
|
|
40
41
|
from netbox_dns.choices import ZoneStatusChoices
|
|
41
42
|
from netbox_dns.utilities import name_to_unicode, network_to_reverse
|
|
42
|
-
from netbox_dns.fields import RFC2317NetworkFormField
|
|
43
|
+
from netbox_dns.fields import RFC2317NetworkFormField, TimePeriodField
|
|
43
44
|
from netbox_dns.validators import validate_ipv4, validate_prefix, validate_rfc2317
|
|
44
45
|
|
|
45
46
|
|
|
@@ -171,7 +172,7 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
171
172
|
label=_("Nameservers"),
|
|
172
173
|
quick_add=QUICK_ADD,
|
|
173
174
|
)
|
|
174
|
-
default_ttl =
|
|
175
|
+
default_ttl = TimePeriodField(
|
|
175
176
|
required=False,
|
|
176
177
|
help_text=_("Default TTL for new records in this zone"),
|
|
177
178
|
validators=[MinValueValidator(1)],
|
|
@@ -181,7 +182,7 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
181
182
|
required=False,
|
|
182
183
|
label=_("Description"),
|
|
183
184
|
)
|
|
184
|
-
soa_ttl =
|
|
185
|
+
soa_ttl = TimePeriodField(
|
|
185
186
|
required=True,
|
|
186
187
|
help_text=_("TTL for the SOA record of the zone"),
|
|
187
188
|
validators=[MinValueValidator(1)],
|
|
@@ -199,25 +200,25 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
199
200
|
help_text=_("Mailbox of the zone's administrator"),
|
|
200
201
|
label=_("SOA RName"),
|
|
201
202
|
)
|
|
202
|
-
soa_refresh =
|
|
203
|
+
soa_refresh = TimePeriodField(
|
|
203
204
|
required=True,
|
|
204
205
|
help_text=_("Refresh interval for secondary nameservers"),
|
|
205
206
|
validators=[MinValueValidator(1)],
|
|
206
207
|
label=_("SOA Refresh"),
|
|
207
208
|
)
|
|
208
|
-
soa_retry =
|
|
209
|
+
soa_retry = TimePeriodField(
|
|
209
210
|
required=True,
|
|
210
211
|
help_text=_("Retry interval for secondary nameservers"),
|
|
211
212
|
validators=[MinValueValidator(1)],
|
|
212
213
|
label=_("SOA Retry"),
|
|
213
214
|
)
|
|
214
|
-
soa_expire =
|
|
215
|
+
soa_expire = TimePeriodField(
|
|
215
216
|
required=True,
|
|
216
217
|
validators=[MinValueValidator(1)],
|
|
217
218
|
help_text=_("Expire time after which the zone is considered unavailable"),
|
|
218
219
|
label=_("SOA Expire"),
|
|
219
220
|
)
|
|
220
|
-
soa_minimum =
|
|
221
|
+
soa_minimum = TimePeriodField(
|
|
221
222
|
required=True,
|
|
222
223
|
help_text=_("Minimum TTL for negative results, e.g. NXRRSET, NXDOMAIN"),
|
|
223
224
|
validators=[MinValueValidator(1)],
|
|
@@ -243,7 +244,7 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
243
244
|
rfc2317_parent_managed = forms.BooleanField(
|
|
244
245
|
required=False,
|
|
245
246
|
help_text=_(
|
|
246
|
-
"IPv4 reverse zone for
|
|
247
|
+
"IPv4 reverse zone for delegating the RFC2317 PTR records is managed in NetBox DNS"
|
|
247
248
|
),
|
|
248
249
|
label=_("RFC2317 Parent Managed"),
|
|
249
250
|
)
|
|
@@ -271,6 +272,11 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
271
272
|
"soa_serial",
|
|
272
273
|
name=_("SOA"),
|
|
273
274
|
),
|
|
275
|
+
FieldSet(
|
|
276
|
+
"dnssec_policy",
|
|
277
|
+
"inline_signing",
|
|
278
|
+
name=_("DNSSEC"),
|
|
279
|
+
),
|
|
274
280
|
FieldSet(
|
|
275
281
|
"rfc2317_prefix",
|
|
276
282
|
"rfc2317_parent_managed",
|
|
@@ -369,6 +375,8 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
369
375
|
"soa_minimum",
|
|
370
376
|
"rfc2317_prefix",
|
|
371
377
|
"rfc2317_parent_managed",
|
|
378
|
+
"dnssec_policy",
|
|
379
|
+
"inline_signing",
|
|
372
380
|
"registrar",
|
|
373
381
|
"registry_domain_id",
|
|
374
382
|
"registrant",
|
|
@@ -403,6 +411,11 @@ class ZoneFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
403
411
|
"soa_serial_auto",
|
|
404
412
|
name=_("SOA"),
|
|
405
413
|
),
|
|
414
|
+
FieldSet(
|
|
415
|
+
"dnssec_policy",
|
|
416
|
+
"inline_signing",
|
|
417
|
+
name=_("DNSSEC"),
|
|
418
|
+
),
|
|
406
419
|
FieldSet(
|
|
407
420
|
"rfc2317_prefix",
|
|
408
421
|
"rfc2317_parent_managed",
|
|
@@ -482,6 +495,11 @@ class ZoneFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
482
495
|
required=False,
|
|
483
496
|
label=_("Registrar"),
|
|
484
497
|
)
|
|
498
|
+
dnssec_policy_id = DynamicModelMultipleChoiceField(
|
|
499
|
+
queryset=DNSSECPolicy.objects.all(),
|
|
500
|
+
required=False,
|
|
501
|
+
label=_("DNSSEC Policy"),
|
|
502
|
+
)
|
|
485
503
|
registry_domain_id = forms.CharField(
|
|
486
504
|
required=False,
|
|
487
505
|
label=_("Registry Domain ID"),
|
|
@@ -530,11 +548,11 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
530
548
|
required=False,
|
|
531
549
|
label=_("Nameservers"),
|
|
532
550
|
)
|
|
533
|
-
default_ttl =
|
|
551
|
+
default_ttl = TimePeriodField(
|
|
534
552
|
required=False,
|
|
535
553
|
label=_("Default TTL"),
|
|
536
554
|
)
|
|
537
|
-
soa_ttl =
|
|
555
|
+
soa_ttl = TimePeriodField(
|
|
538
556
|
required=False,
|
|
539
557
|
help_text=_("TTL for the SOA record of the zone"),
|
|
540
558
|
label=_("SOA TTL"),
|
|
@@ -562,22 +580,22 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
562
580
|
required=False,
|
|
563
581
|
label=_("SOA Serial"),
|
|
564
582
|
)
|
|
565
|
-
soa_refresh =
|
|
583
|
+
soa_refresh = TimePeriodField(
|
|
566
584
|
required=False,
|
|
567
585
|
help_text=_("Refresh interval for secondary nameservers"),
|
|
568
586
|
label=_("SOA Refresh"),
|
|
569
587
|
)
|
|
570
|
-
soa_retry =
|
|
588
|
+
soa_retry = TimePeriodField(
|
|
571
589
|
required=False,
|
|
572
590
|
help_text=_("Retry interval for secondary nameservers"),
|
|
573
591
|
label=_("SOA Retry"),
|
|
574
592
|
)
|
|
575
|
-
soa_expire =
|
|
593
|
+
soa_expire = TimePeriodField(
|
|
576
594
|
required=False,
|
|
577
595
|
help_text=_("Expire time after which the zone is considered unavailable"),
|
|
578
596
|
label=_("SOA Expire"),
|
|
579
597
|
)
|
|
580
|
-
soa_minimum =
|
|
598
|
+
soa_minimum = TimePeriodField(
|
|
581
599
|
required=False,
|
|
582
600
|
help_text=_("Minimum TTL for negative results, e.g. NXRRSET, NXDOMAIN"),
|
|
583
601
|
label=_("SOA Minimum TTL"),
|
|
@@ -590,10 +608,23 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
590
608
|
rfc2317_parent_managed = forms.BooleanField(
|
|
591
609
|
required=False,
|
|
592
610
|
help_text=_(
|
|
593
|
-
"IPv4 reverse zone for
|
|
611
|
+
"IPv4 reverse zone for delegating the RFC2317 PTR records is managed in NetBox DNS"
|
|
594
612
|
),
|
|
595
613
|
label=_("RFC2317 Parent Managed"),
|
|
596
614
|
)
|
|
615
|
+
dnssec_policy = CSVModelChoiceField(
|
|
616
|
+
queryset=DNSSECPolicy.objects.all(),
|
|
617
|
+
required=False,
|
|
618
|
+
to_field_name="name",
|
|
619
|
+
error_messages={
|
|
620
|
+
"invalid_choice": _("DNSSEC policy %(value)s not found"),
|
|
621
|
+
},
|
|
622
|
+
label=_("DNSSEC Policy"),
|
|
623
|
+
)
|
|
624
|
+
inline_signing = forms.BooleanField(
|
|
625
|
+
required=False,
|
|
626
|
+
label=_("Use Inline Signing"),
|
|
627
|
+
)
|
|
597
628
|
registrar = CSVModelChoiceField(
|
|
598
629
|
queryset=Registrar.objects.all(),
|
|
599
630
|
required=False,
|
|
@@ -676,6 +707,8 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
676
707
|
"soa_retry",
|
|
677
708
|
"soa_expire",
|
|
678
709
|
"soa_minimum",
|
|
710
|
+
"dnssec_policy",
|
|
711
|
+
"inline_signing",
|
|
679
712
|
"rfc2317_prefix",
|
|
680
713
|
"rfc2317_parent_managed",
|
|
681
714
|
"registrar",
|
|
@@ -726,7 +759,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
726
759
|
required=False,
|
|
727
760
|
label=_("Nameservers"),
|
|
728
761
|
)
|
|
729
|
-
default_ttl =
|
|
762
|
+
default_ttl = TimePeriodField(
|
|
730
763
|
required=False,
|
|
731
764
|
validators=[MinValueValidator(1)],
|
|
732
765
|
label=_("Default TTL"),
|
|
@@ -736,7 +769,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
736
769
|
required=False,
|
|
737
770
|
label=_("Description"),
|
|
738
771
|
)
|
|
739
|
-
soa_ttl =
|
|
772
|
+
soa_ttl = TimePeriodField(
|
|
740
773
|
required=False,
|
|
741
774
|
validators=[MinValueValidator(1)],
|
|
742
775
|
label=_("SOA TTL"),
|
|
@@ -760,22 +793,22 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
760
793
|
validators=[MinValueValidator(1), MaxValueValidator(4294967295)],
|
|
761
794
|
label=_("SOA Serial"),
|
|
762
795
|
)
|
|
763
|
-
soa_refresh =
|
|
796
|
+
soa_refresh = TimePeriodField(
|
|
764
797
|
required=False,
|
|
765
798
|
validators=[MinValueValidator(1)],
|
|
766
799
|
label=_("SOA Refresh"),
|
|
767
800
|
)
|
|
768
|
-
soa_retry =
|
|
801
|
+
soa_retry = TimePeriodField(
|
|
769
802
|
required=False,
|
|
770
803
|
validators=[MinValueValidator(1)],
|
|
771
804
|
label=_("SOA Retry"),
|
|
772
805
|
)
|
|
773
|
-
soa_expire =
|
|
806
|
+
soa_expire = TimePeriodField(
|
|
774
807
|
required=False,
|
|
775
808
|
validators=[MinValueValidator(1)],
|
|
776
809
|
label=_("SOA Expire"),
|
|
777
810
|
)
|
|
778
|
-
soa_minimum =
|
|
811
|
+
soa_minimum = TimePeriodField(
|
|
779
812
|
required=False,
|
|
780
813
|
validators=[MinValueValidator(1)],
|
|
781
814
|
label=_("SOA Minimum TTL"),
|
|
@@ -790,10 +823,20 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
790
823
|
required=False,
|
|
791
824
|
widget=BulkEditNullBooleanSelect(),
|
|
792
825
|
help_text=_(
|
|
793
|
-
"IPv4 reverse zone for
|
|
826
|
+
"IPv4 reverse zone for delegating the RFC2317 PTR records is managed in NetBox DNS"
|
|
794
827
|
),
|
|
795
828
|
label=_("RFC2317 Parent Managed"),
|
|
796
829
|
)
|
|
830
|
+
dnssec_policy = DynamicModelChoiceField(
|
|
831
|
+
queryset=DNSSECPolicy.objects.all(),
|
|
832
|
+
required=False,
|
|
833
|
+
label=_("DNSSEC Policy"),
|
|
834
|
+
)
|
|
835
|
+
inline_signing = forms.NullBooleanField(
|
|
836
|
+
required=False,
|
|
837
|
+
widget=BulkEditNullBooleanSelect(),
|
|
838
|
+
label=_("Use Inline Signing"),
|
|
839
|
+
)
|
|
797
840
|
registrar = DynamicModelChoiceField(
|
|
798
841
|
queryset=Registrar.objects.all(),
|
|
799
842
|
required=False,
|
|
@@ -857,6 +900,11 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
857
900
|
"soa_serial",
|
|
858
901
|
name=_("SOA"),
|
|
859
902
|
),
|
|
903
|
+
FieldSet(
|
|
904
|
+
"dnssec_policy",
|
|
905
|
+
"inline_signing",
|
|
906
|
+
name=_("DNSSEC"),
|
|
907
|
+
),
|
|
860
908
|
FieldSet(
|
|
861
909
|
"rfc2317_prefix",
|
|
862
910
|
"rfc2317_parent_managed",
|
|
@@ -27,6 +27,7 @@ from netbox_dns.models import (
|
|
|
27
27
|
NameServer,
|
|
28
28
|
Registrar,
|
|
29
29
|
RegistrationContact,
|
|
30
|
+
DNSSECPolicy,
|
|
30
31
|
)
|
|
31
32
|
|
|
32
33
|
|
|
@@ -62,6 +63,7 @@ class ZoneTemplateForm(TenancyForm, NetBoxModelForm):
|
|
|
62
63
|
FieldSet("name", "description", "nameservers", name=_("Zone Template")),
|
|
63
64
|
FieldSet("soa_mname", "soa_rname", name=_("SOA")),
|
|
64
65
|
FieldSet("record_templates", name=_("Record Templates")),
|
|
66
|
+
FieldSet("dnssec_policy", name=_("DNSSEC")),
|
|
65
67
|
FieldSet(
|
|
66
68
|
"registrar",
|
|
67
69
|
"registrant",
|
|
@@ -82,6 +84,7 @@ class ZoneTemplateForm(TenancyForm, NetBoxModelForm):
|
|
|
82
84
|
"nameservers",
|
|
83
85
|
"soa_mname",
|
|
84
86
|
"soa_rname",
|
|
87
|
+
"dnssec_policy",
|
|
85
88
|
"record_templates",
|
|
86
89
|
"description",
|
|
87
90
|
"registrar",
|
|
@@ -105,6 +108,7 @@ class ZoneTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
105
108
|
FieldSet("name", "nameserver_id", "description", name=_("Attributes")),
|
|
106
109
|
FieldSet("soa_mname_id", "soa_rname", name=_("SOA")),
|
|
107
110
|
FieldSet("record_template_id", name=_("Record Templates")),
|
|
111
|
+
FieldSet("dnssec_policy", name=_("DNSSEC")),
|
|
108
112
|
FieldSet(
|
|
109
113
|
"registrar_id",
|
|
110
114
|
"registrant_id",
|
|
@@ -142,6 +146,11 @@ class ZoneTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
142
146
|
description = forms.CharField(
|
|
143
147
|
required=False,
|
|
144
148
|
)
|
|
149
|
+
dnssec_policy_id = DynamicModelMultipleChoiceField(
|
|
150
|
+
queryset=DNSSECPolicy.objects.all(),
|
|
151
|
+
required=False,
|
|
152
|
+
label=_("DNSSEC Policy ID"),
|
|
153
|
+
)
|
|
145
154
|
registrar_id = DynamicModelMultipleChoiceField(
|
|
146
155
|
queryset=Registrar.objects.all(),
|
|
147
156
|
required=False,
|
|
@@ -189,6 +198,15 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
189
198
|
required=False,
|
|
190
199
|
label=_("Record Templates"),
|
|
191
200
|
)
|
|
201
|
+
dnssec_policy = CSVModelChoiceField(
|
|
202
|
+
queryset=DNSSECPolicy.objects.all(),
|
|
203
|
+
required=False,
|
|
204
|
+
to_field_name="name",
|
|
205
|
+
error_messages={
|
|
206
|
+
"invalid_choice": _("DNSSEC policy %(value)s not found"),
|
|
207
|
+
},
|
|
208
|
+
label=_("DNSSEC Policy"),
|
|
209
|
+
)
|
|
192
210
|
registrar = CSVModelChoiceField(
|
|
193
211
|
queryset=Registrar.objects.all(),
|
|
194
212
|
required=False,
|
|
@@ -250,6 +268,7 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
250
268
|
"soa_mname",
|
|
251
269
|
"soa_rname",
|
|
252
270
|
"record_templates",
|
|
271
|
+
"dnssec_policy",
|
|
253
272
|
"description",
|
|
254
273
|
"registrar",
|
|
255
274
|
"registrant",
|
|
@@ -281,6 +300,11 @@ class ZoneTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
281
300
|
description = forms.CharField(
|
|
282
301
|
max_length=200, required=False, label=_("Description")
|
|
283
302
|
)
|
|
303
|
+
dnssec_policy = DynamicModelChoiceField(
|
|
304
|
+
queryset=DNSSECPolicy.objects.all(),
|
|
305
|
+
required=False,
|
|
306
|
+
label=_("DNSSEC Policy"),
|
|
307
|
+
)
|
|
284
308
|
registrar = DynamicModelChoiceField(
|
|
285
309
|
queryset=Registrar.objects.all(),
|
|
286
310
|
required=False,
|
|
@@ -334,6 +358,10 @@ class ZoneTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
334
358
|
"record_templates",
|
|
335
359
|
name=_("Record Templates"),
|
|
336
360
|
),
|
|
361
|
+
FieldSet(
|
|
362
|
+
"dnssec_policy",
|
|
363
|
+
name=_("DNSSEC"),
|
|
364
|
+
),
|
|
337
365
|
FieldSet(
|
|
338
366
|
"registrar",
|
|
339
367
|
"registrant",
|
|
@@ -351,6 +379,7 @@ class ZoneTemplateBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
351
379
|
"soa_mname",
|
|
352
380
|
"soa_rname",
|
|
353
381
|
"record_templates",
|
|
382
|
+
"dnssec_policy",
|
|
354
383
|
"registrar",
|
|
355
384
|
"registrant",
|
|
356
385
|
"admin_c",
|
netbox_dns/graphql/__init__.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
from .schema import (
|
|
2
|
-
NetBoxDNSViewQuery,
|
|
3
2
|
NetBoxDNSNameServerQuery,
|
|
4
|
-
|
|
5
|
-
NetBoxDNSRegistrarQuery,
|
|
3
|
+
NetBoxDNSViewQuery,
|
|
6
4
|
NetBoxDNSZoneQuery,
|
|
7
5
|
NetBoxDNSRecordQuery,
|
|
6
|
+
NetBoxDNSDNSSECKeyTemplateQuery,
|
|
7
|
+
NetBoxDNSDNSSECPolicyQuery,
|
|
8
|
+
NetBoxDNSRegistrationContactQuery,
|
|
9
|
+
NetBoxDNSRegistrarQuery,
|
|
8
10
|
NetBoxDNSZoneTemplateQuery,
|
|
9
11
|
NetBoxDNSRecordTemplateQuery,
|
|
10
12
|
)
|
|
@@ -14,6 +16,8 @@ schema = [
|
|
|
14
16
|
NetBoxDNSViewQuery,
|
|
15
17
|
NetBoxDNSZoneQuery,
|
|
16
18
|
NetBoxDNSRecordQuery,
|
|
19
|
+
NetBoxDNSDNSSECKeyTemplateQuery,
|
|
20
|
+
NetBoxDNSDNSSECPolicyQuery,
|
|
17
21
|
NetBoxDNSRegistrationContactQuery,
|
|
18
22
|
NetBoxDNSRegistrarQuery,
|
|
19
23
|
NetBoxDNSZoneTemplateQuery,
|
netbox_dns/graphql/filters.py
CHANGED
|
@@ -7,6 +7,8 @@ from netbox_dns.models import (
|
|
|
7
7
|
View,
|
|
8
8
|
Zone,
|
|
9
9
|
Record,
|
|
10
|
+
DNSSECKeyTemplate,
|
|
11
|
+
DNSSECPolicy,
|
|
10
12
|
RegistrationContact,
|
|
11
13
|
Registrar,
|
|
12
14
|
ZoneTemplate,
|
|
@@ -17,6 +19,8 @@ from netbox_dns.filtersets import (
|
|
|
17
19
|
ViewFilterSet,
|
|
18
20
|
ZoneFilterSet,
|
|
19
21
|
RecordFilterSet,
|
|
22
|
+
DNSSECKeyTemplateFilterSet,
|
|
23
|
+
DNSSECPolicyFilterSet,
|
|
20
24
|
RegistrationContactFilterSet,
|
|
21
25
|
RegistrarFilterSet,
|
|
22
26
|
ZoneTemplateFilterSet,
|
|
@@ -48,6 +52,18 @@ class NetBoxDNSRecordFilter(BaseFilterMixin):
|
|
|
48
52
|
ip_address: str | None
|
|
49
53
|
|
|
50
54
|
|
|
55
|
+
@strawberry_django.filter(DNSSECKeyTemplate, lookups=True)
|
|
56
|
+
@autotype_decorator(DNSSECKeyTemplateFilterSet)
|
|
57
|
+
class NetBoxDNSDNSSECKeyTemplateFilter(BaseFilterMixin):
|
|
58
|
+
ip_address: str | None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@strawberry_django.filter(DNSSECPolicy, lookups=True)
|
|
62
|
+
@autotype_decorator(DNSSECPolicyFilterSet)
|
|
63
|
+
class NetBoxDNSDNSSECPolicyFilter(BaseFilterMixin):
|
|
64
|
+
ip_address: str | None
|
|
65
|
+
|
|
66
|
+
|
|
51
67
|
@strawberry_django.filter(ZoneTemplate, lookups=True)
|
|
52
68
|
@autotype_decorator(ZoneTemplateFilterSet)
|
|
53
69
|
class NetBoxDNSZoneTemplateFilter(BaseFilterMixin):
|
netbox_dns/graphql/schema.py
CHANGED
|
@@ -8,6 +8,8 @@ from .types import (
|
|
|
8
8
|
NetBoxDNSViewType,
|
|
9
9
|
NetBoxDNSZoneType,
|
|
10
10
|
NetBoxDNSRecordType,
|
|
11
|
+
NetBoxDNSDNSSECKeyTemplateType,
|
|
12
|
+
NetBoxDNSDNSSECPolicyType,
|
|
11
13
|
NetBoxDNSRegistrationContactType,
|
|
12
14
|
NetBoxDNSRegistrarType,
|
|
13
15
|
NetBoxDNSZoneTemplateType,
|
|
@@ -41,6 +43,24 @@ class NetBoxDNSRecordQuery:
|
|
|
41
43
|
netbox_dns_record_list: List[NetBoxDNSRecordType] = strawberry_django.field()
|
|
42
44
|
|
|
43
45
|
|
|
46
|
+
@strawberry.type(name="Query")
|
|
47
|
+
class NetBoxDNSDNSSECKeyTemplateQuery:
|
|
48
|
+
netbox_dns_dnssec_key_template: NetBoxDNSDNSSECKeyTemplateType = (
|
|
49
|
+
strawberry_django.field()
|
|
50
|
+
)
|
|
51
|
+
netbox_dns_dnssec_key_template_list: List[NetBoxDNSDNSSECKeyTemplateType] = (
|
|
52
|
+
strawberry_django.field()
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@strawberry.type(name="Query")
|
|
57
|
+
class NetBoxDNSDNSSECPolicyQuery:
|
|
58
|
+
netbox_dns_dnssec_policy: NetBoxDNSDNSSECPolicyType = strawberry_django.field()
|
|
59
|
+
netbox_dns_dnssec_policy_list: List[NetBoxDNSDNSSECPolicyType] = (
|
|
60
|
+
strawberry_django.field()
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
44
64
|
@strawberry.type(name="Query")
|
|
45
65
|
class NetBoxDNSRegistrationContactQuery:
|
|
46
66
|
netbox_dns_registration_contact: NetBoxDNSRegistrationContactType = (
|
netbox_dns/graphql/types.py
CHANGED
|
@@ -13,6 +13,8 @@ from netbox_dns.models import (
|
|
|
13
13
|
View,
|
|
14
14
|
Zone,
|
|
15
15
|
Record,
|
|
16
|
+
DNSSECKeyTemplate,
|
|
17
|
+
DNSSECPolicy,
|
|
16
18
|
RegistrationContact,
|
|
17
19
|
Registrar,
|
|
18
20
|
ZoneTemplate,
|
|
@@ -23,6 +25,8 @@ from .filters import (
|
|
|
23
25
|
NetBoxDNSViewFilter,
|
|
24
26
|
NetBoxDNSZoneFilter,
|
|
25
27
|
NetBoxDNSRecordFilter,
|
|
28
|
+
NetBoxDNSDNSSECKeyTemplateFilter,
|
|
29
|
+
NetBoxDNSDNSSECPolicyFilter,
|
|
26
30
|
NetBoxDNSRegistrationContactFilter,
|
|
27
31
|
NetBoxDNSRegistrarFilter,
|
|
28
32
|
NetBoxDNSZoneTemplateFilter,
|
|
@@ -58,6 +62,7 @@ class NetBoxDNSViewType(NetBoxObjectType):
|
|
|
58
62
|
@strawberry_django.type(Zone, fields="__all__", filters=NetBoxDNSZoneFilter)
|
|
59
63
|
class NetBoxDNSZoneType(NetBoxObjectType):
|
|
60
64
|
name: str
|
|
65
|
+
description: str | None
|
|
61
66
|
status: str
|
|
62
67
|
active: bool
|
|
63
68
|
view: Annotated["NetBoxDNSViewType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
@@ -78,9 +83,13 @@ class NetBoxDNSZoneType(NetBoxObjectType):
|
|
|
78
83
|
soa_expire: BigInt
|
|
79
84
|
soa_minimum: BigInt
|
|
80
85
|
soa_serial_auto: bool
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
dnssec_policy: (
|
|
87
|
+
Annotated[
|
|
88
|
+
"NetBoxDNSDNSSECPolicyType", strawberry.lazy("netbox_dns.graphql.types")
|
|
89
|
+
]
|
|
90
|
+
| None
|
|
91
|
+
)
|
|
92
|
+
inline_signing: bool
|
|
84
93
|
registrar: (
|
|
85
94
|
Annotated["NetBoxDNSRegistrarType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
86
95
|
| None
|
|
@@ -126,6 +135,8 @@ class NetBoxDNSZoneType(NetBoxObjectType):
|
|
|
126
135
|
rfc2317_child_zones: List[
|
|
127
136
|
Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
128
137
|
]
|
|
138
|
+
arpa_network: str | None
|
|
139
|
+
tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
|
|
129
140
|
|
|
130
141
|
|
|
131
142
|
@strawberry_django.type(Record, fields="__all__", filters=NetBoxDNSRecordFilter)
|
|
@@ -162,6 +173,53 @@ class NetBoxDNSRecordType(NetBoxObjectType):
|
|
|
162
173
|
]
|
|
163
174
|
|
|
164
175
|
|
|
176
|
+
@strawberry_django.type(
|
|
177
|
+
DNSSECKeyTemplate, fields="__all__", filters=NetBoxDNSDNSSECKeyTemplateFilter
|
|
178
|
+
)
|
|
179
|
+
class NetBoxDNSDNSSECKeyTemplateType(NetBoxObjectType):
|
|
180
|
+
name: str
|
|
181
|
+
description: str
|
|
182
|
+
tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
|
|
183
|
+
type: str
|
|
184
|
+
lifetime: BigInt | None
|
|
185
|
+
algorithm: str
|
|
186
|
+
key_size: BigInt | None
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
@strawberry_django.type(
|
|
190
|
+
DNSSECPolicy, fields="__all__", filters=NetBoxDNSDNSSECPolicyFilter
|
|
191
|
+
)
|
|
192
|
+
class NetBoxDNSDNSSECPolicyType(NetBoxObjectType):
|
|
193
|
+
name: str
|
|
194
|
+
description: str | None
|
|
195
|
+
status: str
|
|
196
|
+
tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
|
|
197
|
+
key_templates: List[
|
|
198
|
+
Annotated[
|
|
199
|
+
"NetBoxDNSDNSSECKeyTemplateType",
|
|
200
|
+
strawberry.lazy("netbox_dns.graphql.types"),
|
|
201
|
+
]
|
|
202
|
+
]
|
|
203
|
+
dnskey_ttl: BigInt | None
|
|
204
|
+
purge_keys: BigInt | None
|
|
205
|
+
publish_safety: BigInt | None
|
|
206
|
+
retire_safety: BigInt | None
|
|
207
|
+
signatures_jitter: BigInt | None
|
|
208
|
+
signatures_refresh: BigInt | None
|
|
209
|
+
signatures_validity: BigInt | None
|
|
210
|
+
signatures_validity_dnskey: BigInt | None
|
|
211
|
+
max_zone_ttl: BigInt | None
|
|
212
|
+
zone_propagation_delay: BigInt | None
|
|
213
|
+
create_cdnskey: bool
|
|
214
|
+
cds_digest_types: List[str]
|
|
215
|
+
parent_ds_ttl: BigInt | None
|
|
216
|
+
parent_propagation_delay: BigInt | None
|
|
217
|
+
use_nsec3: bool
|
|
218
|
+
nsec3_iterations: BigInt | None
|
|
219
|
+
nsec3_opt_out: bool
|
|
220
|
+
nsec3_salt_size: BigInt | None
|
|
221
|
+
|
|
222
|
+
|
|
165
223
|
@strawberry_django.type(
|
|
166
224
|
RegistrationContact, fields="__all__", filters=NetBoxDNSRegistrationContactFilter
|
|
167
225
|
)
|
|
@@ -226,6 +284,12 @@ class NetBoxDNSZoneTemplateType(NetBoxObjectType):
|
|
|
226
284
|
| None
|
|
227
285
|
)
|
|
228
286
|
soa_rname: str | None
|
|
287
|
+
dnssec_policy: (
|
|
288
|
+
Annotated[
|
|
289
|
+
"NetBoxDNSDNSSECPolicyType", strawberry.lazy("netbox_dns.graphql.types")
|
|
290
|
+
]
|
|
291
|
+
| None
|
|
292
|
+
)
|
|
229
293
|
record_templates: List[
|
|
230
294
|
Annotated[
|
|
231
295
|
"NetBoxDNSRecordTemplateType", strawberry.lazy("netbox_dns.graphql.types")
|
|
Binary file
|
|
Binary file
|