netbox-plugin-dns 1.2.7b2__py3-none-any.whl → 1.2.8__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 +56 -29
- netbox_dns/api/field_serializers.py +25 -0
- netbox_dns/api/nested_serializers.py +19 -1
- netbox_dns/api/serializers_/dnssec_key_template.py +13 -0
- netbox_dns/api/serializers_/dnssec_policy.py +31 -0
- netbox_dns/api/serializers_/record.py +2 -0
- netbox_dns/api/serializers_/record_template.py +2 -0
- netbox_dns/api/serializers_/zone.py +10 -1
- netbox_dns/choices/dnssec_key_template.py +4 -4
- netbox_dns/choices/dnssec_policy.py +2 -2
- netbox_dns/choices/record.py +66 -19
- netbox_dns/choices/utilities.py +4 -26
- netbox_dns/choices/zone.py +96 -1
- netbox_dns/fields/choice_array.py +13 -0
- netbox_dns/fields/timeperiod.py +15 -13
- netbox_dns/filtersets/dnssec_policy.py +47 -1
- netbox_dns/filtersets/zone.py +7 -2
- netbox_dns/filtersets/zone_template.py +2 -2
- netbox_dns/forms/dnssec_key_template.py +2 -1
- netbox_dns/forms/dnssec_policy.py +82 -33
- netbox_dns/forms/nameserver.py +2 -0
- netbox_dns/forms/record_template.py +1 -0
- netbox_dns/forms/zone.py +78 -15
- netbox_dns/forms/zone_template.py +9 -0
- netbox_dns/graphql/types.py +1 -0
- netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
- netbox_dns/migrations/0018_zone_domain_status_zone_expiration_date.py +23 -0
- netbox_dns/migrations/0019_dnssecpolicy_parental_agents.py +25 -0
- netbox_dns/models/dnssec_policy.py +14 -3
- netbox_dns/models/record.py +4 -1
- netbox_dns/models/zone.py +65 -4
- netbox_dns/models/zone_template.py +1 -1
- netbox_dns/tables/zone.py +6 -1
- netbox_dns/template_content.py +2 -1
- netbox_dns/templates/netbox_dns/dnssecpolicy.html +10 -0
- netbox_dns/templates/netbox_dns/zone/registration.html +19 -0
- netbox_dns/urls.py +7 -0
- netbox_dns/utilities/conversions.py +13 -0
- netbox_dns/validators/dns_value.py +3 -0
- netbox_dns/validators/dnssec.py +10 -8
- netbox_dns/views/dnssec_policy.py +3 -1
- netbox_dns/views/zone.py +11 -1
- {netbox_plugin_dns-1.2.7b2.dist-info → netbox_plugin_dns-1.2.8.dist-info}/METADATA +4 -3
- {netbox_plugin_dns-1.2.7b2.dist-info → netbox_plugin_dns-1.2.8.dist-info}/RECORD +48 -45
- {netbox_plugin_dns-1.2.7b2.dist-info → netbox_plugin_dns-1.2.8.dist-info}/WHEEL +1 -1
- {netbox_plugin_dns-1.2.7b2.dist-info → netbox_plugin_dns-1.2.8.dist-info/licenses}/LICENSE +0 -0
- {netbox_plugin_dns-1.2.7b2.dist-info → netbox_plugin_dns-1.2.8.dist-info}/top_level.txt +0 -0
netbox_dns/fields/timeperiod.py
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
from django.forms import Field
|
|
2
|
-
from django.utils.dateparse import parse_duration
|
|
1
|
+
from django.forms import Field, TextInput
|
|
3
2
|
from django.core.exceptions import ValidationError
|
|
4
3
|
|
|
4
|
+
from netbox_dns.utilities import iso8601_to_int
|
|
5
5
|
|
|
6
6
|
__all__ = ("TimePeriodField",)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TimePeriodField(Field):
|
|
10
|
+
def __init__(self, *args, **kwargs):
|
|
11
|
+
placeholder = kwargs.pop("placeholder", None)
|
|
12
|
+
|
|
13
|
+
if placeholder is not None:
|
|
14
|
+
self.widget = TextInput(attrs={"placeholder": placeholder})
|
|
15
|
+
|
|
16
|
+
return super().__init__(*args, **kwargs)
|
|
17
|
+
|
|
10
18
|
def to_python(self, value):
|
|
11
19
|
if not value:
|
|
12
20
|
return None
|
|
13
21
|
|
|
14
22
|
try:
|
|
15
|
-
return
|
|
16
|
-
except
|
|
17
|
-
|
|
18
|
-
duration
|
|
19
|
-
|
|
20
|
-
raise TypeError
|
|
21
|
-
return int(duration.total_seconds())
|
|
22
|
-
except TypeError:
|
|
23
|
-
raise ValidationError(
|
|
24
|
-
"Enter a valid integer or ISO 8601 duration (W, M and Y are not supported)"
|
|
25
|
-
)
|
|
23
|
+
return iso8601_to_int(value)
|
|
24
|
+
except TypeError:
|
|
25
|
+
raise ValidationError(
|
|
26
|
+
"Enter a valid integer or ISO 8601 duration (W, M and Y are not supported)"
|
|
27
|
+
)
|
|
26
28
|
|
|
27
29
|
def validate(self, value):
|
|
28
30
|
super().validate(value)
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import netaddr
|
|
2
|
+
from netaddr.core import AddrFormatError
|
|
3
|
+
|
|
1
4
|
import django_filters
|
|
2
5
|
|
|
3
6
|
from django.db.models import Q
|
|
@@ -7,9 +10,10 @@ from netbox.filtersets import NetBoxModelFilterSet
|
|
|
7
10
|
from tenancy.filtersets import TenancyFilterSet
|
|
8
11
|
from utilities.filters import MultiValueCharFilter
|
|
9
12
|
|
|
10
|
-
from netbox_dns.models import DNSSECPolicy, DNSSECKeyTemplate
|
|
13
|
+
from netbox_dns.models import DNSSECPolicy, DNSSECKeyTemplate, Zone, ZoneTemplate
|
|
11
14
|
from netbox_dns.choices import DNSSECPolicyStatusChoices
|
|
12
15
|
|
|
16
|
+
|
|
13
17
|
__all__ = ("DNSSECPolicyFilterSet",)
|
|
14
18
|
|
|
15
19
|
|
|
@@ -34,6 +38,7 @@ class DNSSECPolicyFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
34
38
|
"create_cdnskey",
|
|
35
39
|
"parent_ds_ttl",
|
|
36
40
|
"parent_propagation_delay",
|
|
41
|
+
"parental_agents",
|
|
37
42
|
"use_nsec3",
|
|
38
43
|
"nsec3_iterations",
|
|
39
44
|
"nsec3_opt_out",
|
|
@@ -59,6 +64,34 @@ class DNSSECPolicyFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
59
64
|
to_field_name="id",
|
|
60
65
|
label=_("DNSSEC Key Template IDs"),
|
|
61
66
|
)
|
|
67
|
+
zone = django_filters.ModelMultipleChoiceFilter(
|
|
68
|
+
field_name="zones__name",
|
|
69
|
+
queryset=Zone.objects.all(),
|
|
70
|
+
to_field_name="name",
|
|
71
|
+
label=_("Zones"),
|
|
72
|
+
)
|
|
73
|
+
zone_id = django_filters.ModelMultipleChoiceFilter(
|
|
74
|
+
field_name="zones",
|
|
75
|
+
queryset=Zone.objects.all(),
|
|
76
|
+
to_field_name="id",
|
|
77
|
+
label=_("Zone IDs"),
|
|
78
|
+
)
|
|
79
|
+
zone_template = django_filters.ModelMultipleChoiceFilter(
|
|
80
|
+
field_name="zone_templates__name",
|
|
81
|
+
queryset=ZoneTemplate.objects.all(),
|
|
82
|
+
to_field_name="name",
|
|
83
|
+
label=_("Zone Templates"),
|
|
84
|
+
)
|
|
85
|
+
zone_template_id = django_filters.ModelMultipleChoiceFilter(
|
|
86
|
+
field_name="zone_templates",
|
|
87
|
+
queryset=ZoneTemplate.objects.all(),
|
|
88
|
+
to_field_name="id",
|
|
89
|
+
label=_("Zone Template IDs"),
|
|
90
|
+
)
|
|
91
|
+
parental_agents = MultiValueCharFilter(
|
|
92
|
+
method="filter_parental_agents",
|
|
93
|
+
label=_("Parental Agents"),
|
|
94
|
+
)
|
|
62
95
|
|
|
63
96
|
def filter_cds_digest_types(self, queryset, name, value):
|
|
64
97
|
if not value:
|
|
@@ -66,6 +99,19 @@ class DNSSECPolicyFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
66
99
|
|
|
67
100
|
return queryset.filter(cds_digest_types__overlap=value)
|
|
68
101
|
|
|
102
|
+
def filter_parental_agents(self, queryset, name, value):
|
|
103
|
+
if not value:
|
|
104
|
+
return queryset
|
|
105
|
+
|
|
106
|
+
query_values = []
|
|
107
|
+
for v in value:
|
|
108
|
+
try:
|
|
109
|
+
query_values.append(str(netaddr.IPAddress(v)))
|
|
110
|
+
except (AddrFormatError, ValueError):
|
|
111
|
+
pass
|
|
112
|
+
|
|
113
|
+
return queryset.filter(parental_agents__overlap=query_values)
|
|
114
|
+
|
|
69
115
|
def search(self, queryset, name, value):
|
|
70
116
|
if not value.strip():
|
|
71
117
|
return queryset
|
netbox_dns/filtersets/zone.py
CHANGED
|
@@ -16,7 +16,7 @@ from netbox_dns.models import (
|
|
|
16
16
|
NameServer,
|
|
17
17
|
DNSSECPolicy,
|
|
18
18
|
)
|
|
19
|
-
from netbox_dns.choices import ZoneStatusChoices
|
|
19
|
+
from netbox_dns.choices import ZoneStatusChoices, ZoneEPPStatusChoices
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
__all__ = ("ZoneFilterSet",)
|
|
@@ -86,7 +86,7 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
86
86
|
)
|
|
87
87
|
registrar_id = django_filters.ModelMultipleChoiceFilter(
|
|
88
88
|
queryset=Registrar.objects.all(),
|
|
89
|
-
label="Registrar ID",
|
|
89
|
+
label=_("Registrar ID"),
|
|
90
90
|
)
|
|
91
91
|
registrar = django_filters.ModelMultipleChoiceFilter(
|
|
92
92
|
queryset=Registrar.objects.all(),
|
|
@@ -94,6 +94,10 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
94
94
|
to_field_name="name",
|
|
95
95
|
label=_("Registrar"),
|
|
96
96
|
)
|
|
97
|
+
expiration_date = django_filters.DateFromToRangeFilter()
|
|
98
|
+
domain_status = django_filters.MultipleChoiceFilter(
|
|
99
|
+
choices=ZoneEPPStatusChoices,
|
|
100
|
+
)
|
|
97
101
|
registrant_id = django_filters.ModelMultipleChoiceFilter(
|
|
98
102
|
queryset=RegistrationContact.objects.all(),
|
|
99
103
|
label=_("Registrant ID"),
|
|
@@ -160,6 +164,7 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
160
164
|
"rfc2317_parent_managed",
|
|
161
165
|
"inline_signing",
|
|
162
166
|
"registry_domain_id",
|
|
167
|
+
"domain_status",
|
|
163
168
|
)
|
|
164
169
|
|
|
165
170
|
def filter_arpa_network(self, queryset, name, value):
|
|
@@ -48,13 +48,13 @@ class ZoneTemplateFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
48
48
|
queryset=NameServer.objects.all(),
|
|
49
49
|
field_name="soa_mname",
|
|
50
50
|
to_field_name="id",
|
|
51
|
-
label=_("SOA
|
|
51
|
+
label=_("SOA MName ID"),
|
|
52
52
|
)
|
|
53
53
|
soa_mname = django_filters.ModelMultipleChoiceFilter(
|
|
54
54
|
queryset=NameServer.objects.all(),
|
|
55
55
|
field_name="soa_mname__name",
|
|
56
56
|
to_field_name="name",
|
|
57
|
-
label=_("SOA
|
|
57
|
+
label=_("SOA MName"),
|
|
58
58
|
)
|
|
59
59
|
dnssec_policy_id = django_filters.ModelMultipleChoiceFilter(
|
|
60
60
|
queryset=DNSSECPolicy.objects.all(),
|
|
@@ -68,7 +68,7 @@ class DNSSECKeyTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
68
68
|
fieldsets = (
|
|
69
69
|
FieldSet("q", "filter_id", "tag"),
|
|
70
70
|
FieldSet("name", "description", name=_("Attributes")),
|
|
71
|
-
FieldSet("
|
|
71
|
+
FieldSet("policiy_id", name=_("Policies")),
|
|
72
72
|
FieldSet("type", "lifetime", "algorithm", "key_size", name=_("Key Properties")),
|
|
73
73
|
FieldSet("tenant_group_id", "tenant_id", name=_("Tenancy")),
|
|
74
74
|
)
|
|
@@ -82,6 +82,7 @@ class DNSSECKeyTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
82
82
|
policy_id = DynamicModelMultipleChoiceField(
|
|
83
83
|
queryset=DNSSECPolicy.objects.all(),
|
|
84
84
|
required=False,
|
|
85
|
+
null_option=_("None"),
|
|
85
86
|
label=_("Policies"),
|
|
86
87
|
)
|
|
87
88
|
type = forms.MultipleChoiceField(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from packaging.version import Version
|
|
2
2
|
|
|
3
3
|
from django import forms
|
|
4
|
+
from django.contrib.postgres.forms import SimpleArrayField
|
|
4
5
|
from django.utils.translation import gettext_lazy as _
|
|
5
6
|
|
|
6
7
|
from netbox.forms import (
|
|
@@ -23,7 +24,7 @@ from utilities.forms import BOOLEAN_WITH_BLANK_CHOICES, add_blank_choice
|
|
|
23
24
|
from tenancy.models import Tenant, TenantGroup
|
|
24
25
|
from tenancy.forms import TenancyForm, TenancyFilterForm
|
|
25
26
|
|
|
26
|
-
from netbox_dns.models import DNSSECPolicy, DNSSECKeyTemplate
|
|
27
|
+
from netbox_dns.models import DNSSECPolicy, DNSSECKeyTemplate, Zone, ZoneTemplate
|
|
27
28
|
from netbox_dns.choices import DNSSECPolicyDigestChoices, DNSSECPolicyStatusChoices
|
|
28
29
|
from netbox_dns.fields import TimePeriodField
|
|
29
30
|
|
|
@@ -65,6 +66,7 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
65
66
|
"cds_digest_types",
|
|
66
67
|
"parent_ds_ttl",
|
|
67
68
|
"parent_propagation_delay",
|
|
69
|
+
"parental_agents",
|
|
68
70
|
name=_("Parent Delegation"),
|
|
69
71
|
),
|
|
70
72
|
FieldSet(
|
|
@@ -74,7 +76,7 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
74
76
|
"nsec3_salt_size",
|
|
75
77
|
name=_("Proof of Non-Existence"),
|
|
76
78
|
),
|
|
77
|
-
FieldSet("
|
|
79
|
+
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
78
80
|
FieldSet("tags", name=_("Tags")),
|
|
79
81
|
)
|
|
80
82
|
|
|
@@ -85,86 +87,103 @@ class DNSSECPolicyForm(TenancyForm, NetBoxModelForm):
|
|
|
85
87
|
help_text=_("Select CSK or KSK/ZSK templates for signing"),
|
|
86
88
|
quick_add=QUICK_ADD,
|
|
87
89
|
)
|
|
88
|
-
|
|
89
|
-
class Meta:
|
|
90
|
-
model = DNSSECPolicy
|
|
91
|
-
fields = (
|
|
92
|
-
"name",
|
|
93
|
-
"description",
|
|
94
|
-
"status",
|
|
95
|
-
"key_templates",
|
|
96
|
-
"dnskey_ttl",
|
|
97
|
-
"purge_keys",
|
|
98
|
-
"publish_safety",
|
|
99
|
-
"retire_safety",
|
|
100
|
-
"signatures_jitter",
|
|
101
|
-
"signatures_refresh",
|
|
102
|
-
"signatures_validity",
|
|
103
|
-
"signatures_validity_dnskey",
|
|
104
|
-
"max_zone_ttl",
|
|
105
|
-
"zone_propagation_delay",
|
|
106
|
-
"create_cdnskey",
|
|
107
|
-
"cds_digest_types",
|
|
108
|
-
"parent_ds_ttl",
|
|
109
|
-
"parent_propagation_delay",
|
|
110
|
-
"use_nsec3",
|
|
111
|
-
"nsec3_iterations",
|
|
112
|
-
"nsec3_opt_out",
|
|
113
|
-
"nsec3_salt_size",
|
|
114
|
-
"tenant_group",
|
|
115
|
-
"tenant",
|
|
116
|
-
"tags",
|
|
117
|
-
)
|
|
118
|
-
|
|
119
90
|
dnskey_ttl = TimePeriodField(
|
|
120
91
|
required=False,
|
|
121
92
|
label=_("DNSKEY TTL"),
|
|
93
|
+
placeholder=DNSSECPolicy.get_fallback_setting("dnskey_ttl"),
|
|
122
94
|
)
|
|
123
95
|
purge_keys = TimePeriodField(
|
|
124
96
|
required=False,
|
|
125
97
|
label=_("Purge Keys"),
|
|
98
|
+
placeholder=DNSSECPolicy.get_fallback_setting("purge_keys"),
|
|
126
99
|
)
|
|
127
100
|
publish_safety = TimePeriodField(
|
|
128
101
|
required=False,
|
|
129
102
|
label=_("Publish Safety"),
|
|
103
|
+
placeholder=DNSSECPolicy.get_fallback_setting("publish_safety"),
|
|
130
104
|
)
|
|
131
105
|
retire_safety = TimePeriodField(
|
|
132
106
|
required=False,
|
|
133
107
|
label=_("Retire Safety"),
|
|
108
|
+
placeholder=DNSSECPolicy.get_fallback_setting("retire_safety"),
|
|
134
109
|
)
|
|
135
110
|
signatures_jitter = TimePeriodField(
|
|
136
111
|
required=False,
|
|
137
112
|
label=_("Signatures Jitter"),
|
|
113
|
+
placeholder=DNSSECPolicy.get_fallback_setting("signatures_jitter"),
|
|
138
114
|
)
|
|
139
115
|
signatures_refresh = TimePeriodField(
|
|
140
116
|
required=False,
|
|
141
117
|
label=_("Signatures Refresh"),
|
|
118
|
+
placeholder=DNSSECPolicy.get_fallback_setting("signatures_refresh"),
|
|
142
119
|
)
|
|
143
120
|
signatures_validity = TimePeriodField(
|
|
144
121
|
required=False,
|
|
145
122
|
label=_("Signatures Validity"),
|
|
123
|
+
placeholder=DNSSECPolicy.get_fallback_setting("signatures_validity"),
|
|
146
124
|
)
|
|
147
125
|
signatures_validity_dnskey = TimePeriodField(
|
|
148
126
|
required=False,
|
|
149
127
|
label=_("Signatures Validity (DNSKEY)"),
|
|
128
|
+
placeholder=DNSSECPolicy.get_fallback_setting("signatures_validity_dnskey"),
|
|
150
129
|
)
|
|
151
130
|
max_zone_ttl = TimePeriodField(
|
|
152
131
|
required=False,
|
|
153
132
|
label=_("Max Zone TTL"),
|
|
133
|
+
placeholder=DNSSECPolicy.get_fallback_setting("max_zone_ttl"),
|
|
154
134
|
)
|
|
155
135
|
zone_propagation_delay = TimePeriodField(
|
|
156
136
|
required=False,
|
|
157
137
|
label=_("Zone Propagation Delay"),
|
|
138
|
+
placeholder=DNSSECPolicy.get_fallback_setting("zone_propagation_delay"),
|
|
158
139
|
)
|
|
159
140
|
parent_ds_ttl = TimePeriodField(
|
|
160
141
|
required=False,
|
|
161
142
|
label=_("Parent DS TTL"),
|
|
143
|
+
placeholder=DNSSECPolicy.get_fallback_setting("parent_ds_ttl"),
|
|
162
144
|
)
|
|
163
145
|
parent_propagation_delay = TimePeriodField(
|
|
164
146
|
required=False,
|
|
165
147
|
label=_("Parent Propagation Delay"),
|
|
148
|
+
placeholder=DNSSECPolicy.get_fallback_setting("parent_propagation_delay"),
|
|
149
|
+
)
|
|
150
|
+
parental_agents = SimpleArrayField(
|
|
151
|
+
required=False,
|
|
152
|
+
base_field=forms.GenericIPAddressField(),
|
|
153
|
+
label=_("Parental Agents"),
|
|
166
154
|
)
|
|
167
155
|
|
|
156
|
+
class Meta:
|
|
157
|
+
model = DNSSECPolicy
|
|
158
|
+
fields = (
|
|
159
|
+
"name",
|
|
160
|
+
"description",
|
|
161
|
+
"status",
|
|
162
|
+
"key_templates",
|
|
163
|
+
"dnskey_ttl",
|
|
164
|
+
"purge_keys",
|
|
165
|
+
"publish_safety",
|
|
166
|
+
"retire_safety",
|
|
167
|
+
"signatures_jitter",
|
|
168
|
+
"signatures_refresh",
|
|
169
|
+
"signatures_validity",
|
|
170
|
+
"signatures_validity_dnskey",
|
|
171
|
+
"max_zone_ttl",
|
|
172
|
+
"zone_propagation_delay",
|
|
173
|
+
"create_cdnskey",
|
|
174
|
+
"cds_digest_types",
|
|
175
|
+
"parent_ds_ttl",
|
|
176
|
+
"parent_propagation_delay",
|
|
177
|
+
"parental_agents",
|
|
178
|
+
"use_nsec3",
|
|
179
|
+
"nsec3_iterations",
|
|
180
|
+
"nsec3_opt_out",
|
|
181
|
+
"nsec3_salt_size",
|
|
182
|
+
"tenant_group",
|
|
183
|
+
"tenant",
|
|
184
|
+
"tags",
|
|
185
|
+
)
|
|
186
|
+
|
|
168
187
|
|
|
169
188
|
class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
170
189
|
model = DNSSECPolicy
|
|
@@ -177,6 +196,11 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
177
196
|
"key_template_id",
|
|
178
197
|
name=_("Attributes"),
|
|
179
198
|
),
|
|
199
|
+
FieldSet(
|
|
200
|
+
"zone_id",
|
|
201
|
+
"zone_template_id",
|
|
202
|
+
name=_("Assignments"),
|
|
203
|
+
),
|
|
180
204
|
FieldSet(
|
|
181
205
|
"dnskey_ttl",
|
|
182
206
|
"purge_keys",
|
|
@@ -195,6 +219,7 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
195
219
|
"cds_digest_types",
|
|
196
220
|
"parent_ds_ttl",
|
|
197
221
|
"parent_propagation_delay",
|
|
222
|
+
"parental_agents",
|
|
198
223
|
name=_("Parent Delegation"),
|
|
199
224
|
),
|
|
200
225
|
FieldSet(
|
|
@@ -222,8 +247,21 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
222
247
|
key_template_id = DynamicModelMultipleChoiceField(
|
|
223
248
|
queryset=DNSSECKeyTemplate.objects.all(),
|
|
224
249
|
required=False,
|
|
250
|
+
null_option=_("None"),
|
|
225
251
|
label=_("Key Templates"),
|
|
226
252
|
)
|
|
253
|
+
zone_id = DynamicModelMultipleChoiceField(
|
|
254
|
+
queryset=Zone.objects.all(),
|
|
255
|
+
required=False,
|
|
256
|
+
null_option=_("None"),
|
|
257
|
+
label=_("Zones"),
|
|
258
|
+
)
|
|
259
|
+
zone_template_id = DynamicModelMultipleChoiceField(
|
|
260
|
+
queryset=ZoneTemplate.objects.all(),
|
|
261
|
+
required=False,
|
|
262
|
+
null_option=_("None"),
|
|
263
|
+
label=_("Zone Templates"),
|
|
264
|
+
)
|
|
227
265
|
dnskey_ttl = TimePeriodField(
|
|
228
266
|
required=False,
|
|
229
267
|
label=_("DNSKEY TTL"),
|
|
@@ -282,6 +320,10 @@ class DNSSECPolicyFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
282
320
|
required=False,
|
|
283
321
|
label=_("Parent Propagation Delay"),
|
|
284
322
|
)
|
|
323
|
+
parental_agents = forms.GenericIPAddressField(
|
|
324
|
+
required=False,
|
|
325
|
+
label=_("Parental Agent"),
|
|
326
|
+
)
|
|
285
327
|
use_nsec3 = forms.NullBooleanField(
|
|
286
328
|
required=False,
|
|
287
329
|
widget=forms.Select(choices=BOOLEAN_WITH_BLANK_CHOICES),
|
|
@@ -385,6 +427,7 @@ class DNSSECPolicyImportForm(NetBoxModelImportForm):
|
|
|
385
427
|
"cds_digest_types",
|
|
386
428
|
"parent_ds_ttl",
|
|
387
429
|
"parent_propagation_delay",
|
|
430
|
+
"parental_agents",
|
|
388
431
|
"use_nsec3",
|
|
389
432
|
"nsec3_iterations",
|
|
390
433
|
"nsec3_opt_out",
|
|
@@ -465,6 +508,11 @@ class DNSSECPolicyBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
465
508
|
required=False,
|
|
466
509
|
label=_("Parent Propagation Delay"),
|
|
467
510
|
)
|
|
511
|
+
parental_agents = SimpleArrayField(
|
|
512
|
+
required=False,
|
|
513
|
+
base_field=forms.GenericIPAddressField(),
|
|
514
|
+
label=_("Parental Agents"),
|
|
515
|
+
)
|
|
468
516
|
use_nsec3 = forms.NullBooleanField(
|
|
469
517
|
required=False,
|
|
470
518
|
widget=BulkEditNullBooleanSelect(),
|
|
@@ -518,6 +566,7 @@ class DNSSECPolicyBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
518
566
|
"cds_digest_types",
|
|
519
567
|
"parent_ds_ttl",
|
|
520
568
|
"parent_propagation_delay",
|
|
569
|
+
"parental_agents",
|
|
521
570
|
name=_("Parent Delegation"),
|
|
522
571
|
),
|
|
523
572
|
FieldSet(
|
netbox_dns/forms/nameserver.py
CHANGED
|
@@ -64,11 +64,13 @@ class NameServerFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
64
64
|
zone_id = DynamicModelMultipleChoiceField(
|
|
65
65
|
queryset=Zone.objects.all(),
|
|
66
66
|
required=False,
|
|
67
|
+
null_option=_("None"),
|
|
67
68
|
label=_("Zones"),
|
|
68
69
|
)
|
|
69
70
|
soa_zone_id = DynamicModelMultipleChoiceField(
|
|
70
71
|
queryset=Zone.objects.all(),
|
|
71
72
|
required=False,
|
|
73
|
+
null_option=_("None"),
|
|
72
74
|
label=_("SOA Zones"),
|
|
73
75
|
)
|
|
74
76
|
description = forms.CharField(
|
|
@@ -146,6 +146,7 @@ class RecordTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
146
146
|
zone_template_id = DynamicModelMultipleChoiceField(
|
|
147
147
|
queryset=ZoneTemplate.objects.all(),
|
|
148
148
|
required=False,
|
|
149
|
+
null_option=_("None"),
|
|
149
150
|
label=_("Zone Templates"),
|
|
150
151
|
)
|
|
151
152
|
tag = TagFilterField(RecordTemplate)
|