netbox-plugin-dns 1.0.2__py3-none-any.whl → 1.0.3__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 +6 -2
- netbox_dns/models/record.py +10 -5
- netbox_dns/models/zone.py +18 -1
- netbox_dns/navigation.py +34 -18
- netbox_dns/templates/netbox_dns/record.html +4 -4
- netbox_dns/templates/netbox_dns/zone/child_zone.html +18 -0
- netbox_dns/templates/netbox_dns/zone.html +11 -15
- netbox_dns/urls/zone.py +6 -0
- netbox_dns/utilities/__init__.py +1 -1
- netbox_dns/validators/dns_name.py +49 -28
- netbox_dns/views/zone.py +20 -0
- {netbox_plugin_dns-1.0.2.dist-info → netbox_plugin_dns-1.0.3.dist-info}/METADATA +1 -1
- {netbox_plugin_dns-1.0.2.dist-info → netbox_plugin_dns-1.0.3.dist-info}/RECORD +15 -14
- {netbox_plugin_dns-1.0.2.dist-info → netbox_plugin_dns-1.0.3.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-1.0.2.dist-info → netbox_plugin_dns-1.0.3.dist-info}/WHEEL +0 -0
netbox_dns/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from netbox.plugins import PluginConfig
|
|
2
2
|
|
|
3
|
-
__version__ = "1.0.
|
|
3
|
+
__version__ = "1.0.3"
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class DNSConfig(PluginConfig):
|
|
@@ -21,7 +21,9 @@ class DNSConfig(PluginConfig):
|
|
|
21
21
|
"zone_soa_expire": 2419200,
|
|
22
22
|
"zone_soa_minimum": 3600,
|
|
23
23
|
"feature_ipam_coupling": False,
|
|
24
|
-
"
|
|
24
|
+
"tolerate_characters_in_zone_labels": "",
|
|
25
|
+
"tolerate_underscores_in_labels": False,
|
|
26
|
+
"tolerate_underscores_in_hostnames": False, # Deprecated, will be removed in 1.2.0
|
|
25
27
|
"tolerate_leading_underscore_types": [
|
|
26
28
|
"TXT",
|
|
27
29
|
"SRV",
|
|
@@ -30,6 +32,8 @@ class DNSConfig(PluginConfig):
|
|
|
30
32
|
"enable_root_zones": False,
|
|
31
33
|
"enforce_unique_records": True,
|
|
32
34
|
"enforce_unique_rrset_ttl": True,
|
|
35
|
+
"menu_name": "NetBox DNS",
|
|
36
|
+
"top_level_menu": True,
|
|
33
37
|
}
|
|
34
38
|
base_url = "netbox-dns"
|
|
35
39
|
|
netbox_dns/models/record.py
CHANGED
|
@@ -22,7 +22,7 @@ from netbox_dns.utilities import (
|
|
|
22
22
|
)
|
|
23
23
|
from netbox_dns.validators import (
|
|
24
24
|
validate_fqdn,
|
|
25
|
-
|
|
25
|
+
validate_generic_name,
|
|
26
26
|
validate_domain_name,
|
|
27
27
|
)
|
|
28
28
|
from netbox_dns.mixins import ObjectModificationMixin
|
|
@@ -494,7 +494,7 @@ class Record(ObjectModificationMixin, NetBoxModel):
|
|
|
494
494
|
"netbox_dns", "tolerate_non_rfc1035_types", default=[]
|
|
495
495
|
):
|
|
496
496
|
try:
|
|
497
|
-
|
|
497
|
+
validate_generic_name(
|
|
498
498
|
self.name,
|
|
499
499
|
(
|
|
500
500
|
self.type
|
|
@@ -541,8 +541,7 @@ class Record(ObjectModificationMixin, NetBoxModel):
|
|
|
541
541
|
)
|
|
542
542
|
|
|
543
543
|
case (
|
|
544
|
-
RecordTypeChoices.
|
|
545
|
-
| RecordTypeChoices.NS
|
|
544
|
+
RecordTypeChoices.NS
|
|
546
545
|
| RecordTypeChoices.HTTPS
|
|
547
546
|
| RecordTypeChoices.SRV
|
|
548
547
|
| RecordTypeChoices.SVCB
|
|
@@ -550,6 +549,12 @@ class Record(ObjectModificationMixin, NetBoxModel):
|
|
|
550
549
|
_validate_idn(rr.target)
|
|
551
550
|
validate_domain_name(rr.target.to_text(), always_tolerant=True)
|
|
552
551
|
|
|
552
|
+
case RecordTypeChoices.DNAME:
|
|
553
|
+
_validate_idn(rr.target)
|
|
554
|
+
validate_domain_name(
|
|
555
|
+
rr.target.to_text(), always_tolerant=True, zone_name=True
|
|
556
|
+
)
|
|
557
|
+
|
|
553
558
|
case RecordTypeChoices.PTR | RecordTypeChoices.NSAP_PTR:
|
|
554
559
|
_validate_idn(rr.target)
|
|
555
560
|
validate_fqdn(rr.target.to_text(), always_tolerant=True)
|
|
@@ -570,7 +575,7 @@ class Record(ObjectModificationMixin, NetBoxModel):
|
|
|
570
575
|
|
|
571
576
|
case RecordTypeChoices.NAPTR:
|
|
572
577
|
_validate_idn(rr.replacement)
|
|
573
|
-
|
|
578
|
+
validate_generic_name(
|
|
574
579
|
rr.replacement.to_text(), always_tolerant=True
|
|
575
580
|
)
|
|
576
581
|
|
netbox_dns/models/zone.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import re
|
|
1
2
|
from math import ceil
|
|
2
3
|
from datetime import datetime
|
|
3
4
|
|
|
@@ -353,6 +354,22 @@ class Zone(ObjectModificationMixin, NetBoxModel):
|
|
|
353
354
|
)
|
|
354
355
|
)
|
|
355
356
|
|
|
357
|
+
@property
|
|
358
|
+
def child_zones(self):
|
|
359
|
+
return Zone.objects.filter(
|
|
360
|
+
name__iregex=rf"^[^.]+\.{re.escape(self.name)}$", view=self.view
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
@property
|
|
364
|
+
def parent_zone(self):
|
|
365
|
+
parent_name = (
|
|
366
|
+
dns_name.from_text(self.name).parent().relativize(dns_name.root).to_text()
|
|
367
|
+
)
|
|
368
|
+
try:
|
|
369
|
+
return Zone.objects.get(name=parent_name, view=self.view)
|
|
370
|
+
except Zone.DoesNotExist:
|
|
371
|
+
return None
|
|
372
|
+
|
|
356
373
|
def record_count(self, managed=False):
|
|
357
374
|
return record.Record.objects.filter(zone=self, managed=managed).count()
|
|
358
375
|
|
|
@@ -593,7 +610,7 @@ class Zone(ObjectModificationMixin, NetBoxModel):
|
|
|
593
610
|
) from None
|
|
594
611
|
|
|
595
612
|
try:
|
|
596
|
-
validate_domain_name(self.name)
|
|
613
|
+
validate_domain_name(self.name, zone_name=True)
|
|
597
614
|
except ValidationError as exc:
|
|
598
615
|
raise ValidationError(
|
|
599
616
|
{
|
netbox_dns/navigation.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
from netbox.plugins import PluginMenuButton, PluginMenuItem, PluginMenu
|
|
2
|
+
from netbox.plugins.utils import get_plugin_config
|
|
3
|
+
|
|
4
|
+
menu_name = get_plugin_config("netbox_dns", "menu_name")
|
|
5
|
+
top_level_menu = get_plugin_config("netbox_dns", "top_level_menu")
|
|
2
6
|
|
|
3
7
|
view_menu_item = PluginMenuItem(
|
|
4
8
|
link="plugins:netbox_dns:view_list",
|
|
@@ -126,26 +130,38 @@ contact_menu_item = PluginMenuItem(
|
|
|
126
130
|
),
|
|
127
131
|
)
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
|
|
134
|
+
if top_level_menu:
|
|
135
|
+
menu = PluginMenu(
|
|
136
|
+
label=menu_name,
|
|
137
|
+
groups=(
|
|
134
138
|
(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
"DNS Configuration",
|
|
140
|
+
(
|
|
141
|
+
view_menu_item,
|
|
142
|
+
zone_menu_item,
|
|
143
|
+
nameserver_menu_item,
|
|
144
|
+
record_menu_item,
|
|
145
|
+
managed_record_menu_item,
|
|
146
|
+
),
|
|
140
147
|
),
|
|
141
|
-
),
|
|
142
|
-
(
|
|
143
|
-
"Domain Registration",
|
|
144
148
|
(
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
"Domain Registration",
|
|
150
|
+
(
|
|
151
|
+
registrar_menu_item,
|
|
152
|
+
contact_menu_item,
|
|
153
|
+
),
|
|
147
154
|
),
|
|
148
155
|
),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
icon_class="mdi mdi-dns",
|
|
157
|
+
)
|
|
158
|
+
else:
|
|
159
|
+
menu_items = (
|
|
160
|
+
view_menu_item,
|
|
161
|
+
zone_menu_item,
|
|
162
|
+
nameserver_menu_item,
|
|
163
|
+
record_menu_item,
|
|
164
|
+
managed_record_menu_item,
|
|
165
|
+
registrar_menu_item,
|
|
166
|
+
contact_menu_item,
|
|
167
|
+
)
|
|
@@ -94,25 +94,25 @@
|
|
|
94
94
|
{% if object.ptr_record %}
|
|
95
95
|
<tr>
|
|
96
96
|
<th scope="row">PTR Record</th>
|
|
97
|
-
<td
|
|
97
|
+
<td>{{ object.ptr_record|linkify }}</td>
|
|
98
98
|
</tr>
|
|
99
99
|
{% endif %}
|
|
100
100
|
{% if object.address_record %}
|
|
101
101
|
<tr>
|
|
102
102
|
<th scope="row">Address Record</th>
|
|
103
|
-
<td
|
|
103
|
+
<td>{{ object.address_record|linkify }}</td>
|
|
104
104
|
</tr>
|
|
105
105
|
{% if object.address_record.ipam_ip_address %}
|
|
106
106
|
<tr>
|
|
107
107
|
<th scope="row">IPAM IP Address</th>
|
|
108
|
-
<td
|
|
108
|
+
<td>{{ object.address_record.ipam_ip_address|linkify }}</td>
|
|
109
109
|
</tr>
|
|
110
110
|
{% endif %}
|
|
111
111
|
{% endif %}
|
|
112
112
|
{% if object.ipam_ip_address %}
|
|
113
113
|
<tr>
|
|
114
114
|
<th scope="row">IPAM IP Address</th>
|
|
115
|
-
<td
|
|
115
|
+
<td>{{ object.ipam_ip_address|linkify }}</td>
|
|
116
116
|
</tr>
|
|
117
117
|
{% endif %}
|
|
118
118
|
<tr>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{% extends 'netbox_dns/zone/base.html' %}
|
|
2
|
+
{% load helpers %}
|
|
3
|
+
{% load render_table from django_tables2 %}
|
|
4
|
+
{% load perms %}
|
|
5
|
+
|
|
6
|
+
{% block content %}
|
|
7
|
+
{% include 'inc/table_controls_htmx.html' with table_modal="ChildZoneTable_config" %}
|
|
8
|
+
<div class="card">
|
|
9
|
+
<div class="htmx-container table-responsive" id="object_list">
|
|
10
|
+
{% include 'htmx/table.html' %}
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
{% endblock %}
|
|
14
|
+
|
|
15
|
+
{% block modals %}
|
|
16
|
+
{{ block.super }}
|
|
17
|
+
{% table_config_form table %}
|
|
18
|
+
{% endblock modals %}
|
|
@@ -20,13 +20,15 @@
|
|
|
20
20
|
<td>{{ unicode_name }}</td>
|
|
21
21
|
</tr>
|
|
22
22
|
{% endif %}
|
|
23
|
+
{% if parent_zone %}
|
|
24
|
+
<tr>
|
|
25
|
+
<th scope="row">Parent Zone</th>
|
|
26
|
+
<td>{{ parent_zone|linkify }}</td>
|
|
27
|
+
</tr>
|
|
28
|
+
{% endif %}
|
|
23
29
|
<tr>
|
|
24
30
|
<th scope="row">View</th>
|
|
25
|
-
<td>
|
|
26
|
-
<a href="{% url 'plugins:netbox_dns:view' pk=object.view.pk %}">
|
|
27
|
-
{{ object.view }}
|
|
28
|
-
</a>
|
|
29
|
-
</td>
|
|
31
|
+
<td>{{ object.view|linkify }}</td>
|
|
30
32
|
</tr>
|
|
31
33
|
{% if object.description %}
|
|
32
34
|
<tr>
|
|
@@ -52,13 +54,7 @@
|
|
|
52
54
|
<td>
|
|
53
55
|
<table>
|
|
54
56
|
{% for nameserver in object.nameservers.all %}
|
|
55
|
-
<tr>
|
|
56
|
-
<td>
|
|
57
|
-
<a href="{% url 'plugins:netbox_dns:nameserver' pk=nameserver.pk %}">
|
|
58
|
-
{{ nameserver }}
|
|
59
|
-
</a>
|
|
60
|
-
</td>
|
|
61
|
-
</tr>
|
|
57
|
+
<tr><td>{{ nameserver|linkify }}</td></tr>
|
|
62
58
|
{% endfor %}
|
|
63
59
|
</table>
|
|
64
60
|
</td>
|
|
@@ -115,7 +111,7 @@
|
|
|
115
111
|
</tr>
|
|
116
112
|
<tr>
|
|
117
113
|
<th scope="row">MName</th>
|
|
118
|
-
<td
|
|
114
|
+
<td>{{ object.soa_mname|linkify }}</td>
|
|
119
115
|
</tr>
|
|
120
116
|
<tr>
|
|
121
117
|
<th scope="row">RName</th>
|
|
@@ -153,7 +149,7 @@
|
|
|
153
149
|
{% if object.rfc2317_prefix %}
|
|
154
150
|
<div class="card">
|
|
155
151
|
<h5 class="card-header">RFC2317</h5>
|
|
156
|
-
<table class="table table-hover
|
|
152
|
+
<table class="table table-hover attr-table">
|
|
157
153
|
<tr>
|
|
158
154
|
<th scope="row">Prefix</th>
|
|
159
155
|
<td>{{ object.rfc2317_prefix }}</td>
|
|
@@ -165,7 +161,7 @@
|
|
|
165
161
|
{% if object.rfc2317_parent_managed %}
|
|
166
162
|
<tr>
|
|
167
163
|
<th scope="row">Parent Zone</th>
|
|
168
|
-
<td
|
|
164
|
+
<td>{{ object.rfc2317_parent_zone|linkify }}</td>
|
|
169
165
|
</tr>
|
|
170
166
|
{% endif %}
|
|
171
167
|
</table>
|
netbox_dns/urls/zone.py
CHANGED
|
@@ -15,6 +15,7 @@ from netbox_dns.views import (
|
|
|
15
15
|
ZoneManagedRecordListView,
|
|
16
16
|
ZoneRegistrationView,
|
|
17
17
|
ZoneRFC2317ChildZoneListView,
|
|
18
|
+
ZoneChildZoneListView,
|
|
18
19
|
)
|
|
19
20
|
|
|
20
21
|
zone_urlpatterns = [
|
|
@@ -37,6 +38,11 @@ zone_urlpatterns = [
|
|
|
37
38
|
ZoneRFC2317ChildZoneListView.as_view(),
|
|
38
39
|
name="zone_rfc2317_child_zones",
|
|
39
40
|
),
|
|
41
|
+
path(
|
|
42
|
+
"zones/<int:pk>/childzones/",
|
|
43
|
+
ZoneChildZoneListView.as_view(),
|
|
44
|
+
name="zone_child_zones",
|
|
45
|
+
),
|
|
40
46
|
path(
|
|
41
47
|
"zones/<int:pk>/registration/",
|
|
42
48
|
ZoneRegistrationView.as_view(),
|
netbox_dns/utilities/__init__.py
CHANGED
|
@@ -4,10 +4,40 @@ from django.core.exceptions import ValidationError
|
|
|
4
4
|
|
|
5
5
|
from netbox.plugins.utils import get_plugin_config
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import logging
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _get_label(tolerate_leading_underscores=False, always_tolerant=False):
|
|
11
|
+
tolerate_characters = re.escape(
|
|
12
|
+
get_plugin_config("netbox_dns", "tolerate_characters_in_zone_labels", "")
|
|
13
|
+
)
|
|
14
|
+
label_characters = rf"a-z0-9{tolerate_characters}"
|
|
15
|
+
|
|
16
|
+
if always_tolerant:
|
|
17
|
+
label = rf"[a-z0-9_][a-z0-9_-]*(?<![-_])"
|
|
18
|
+
zone_label = rf"[{label_characters}_][{label_characters}_-]*(?<![-_])"
|
|
19
|
+
|
|
20
|
+
return label, zone_label
|
|
21
|
+
|
|
22
|
+
tolerate_underscores = get_plugin_config(
|
|
23
|
+
"netbox_dns", "tolerate_underscores_in_labels"
|
|
24
|
+
) or get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames")
|
|
25
|
+
|
|
26
|
+
if tolerate_leading_underscores:
|
|
27
|
+
if tolerate_underscores:
|
|
28
|
+
label = r"[a-z0-9_][a-z0-9_-]*(?<![-_])"
|
|
29
|
+
zone_label = rf"[{label_characters}_][{label_characters}_-]*(?<![-_])"
|
|
30
|
+
else:
|
|
31
|
+
label = rf"[a-z0-9_][a-z0-9-]*(?<!-)"
|
|
32
|
+
zone_label = rf"[{label_characters}_][{label_characters}-]*(?<!-)"
|
|
33
|
+
elif tolerate_underscores:
|
|
34
|
+
label = rf"[a-z0-9][a-z0-9_-]*(?<![-_])"
|
|
35
|
+
zone_label = rf"[{label_characters}][{label_characters}_-]*(?<![-_])"
|
|
36
|
+
else:
|
|
37
|
+
label = rf"[a-z0-9][a-z0-9-]*(?<!-)"
|
|
38
|
+
zone_label = rf"[{label_characters}][{label_characters}-]*(?<!-)"
|
|
39
|
+
|
|
40
|
+
return label, zone_label
|
|
11
41
|
|
|
12
42
|
|
|
13
43
|
def has_invalid_double_dash(name):
|
|
@@ -15,37 +45,29 @@ def has_invalid_double_dash(name):
|
|
|
15
45
|
|
|
16
46
|
|
|
17
47
|
def validate_fqdn(name, always_tolerant=False):
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
):
|
|
21
|
-
regex = rf"^(\*|{TOLERANT_LABEL})(\.{TOLERANT_LABEL})+\.?$"
|
|
22
|
-
else:
|
|
23
|
-
regex = rf"^(\*|{LABEL})(\.{LABEL})+\.?$"
|
|
48
|
+
label, zone_label = _get_label(always_tolerant=always_tolerant)
|
|
49
|
+
regex = rf"^(\*|{label})(\.{zone_label})+\.?$"
|
|
24
50
|
|
|
25
51
|
if not re.match(regex, name, flags=re.IGNORECASE) or has_invalid_double_dash(name):
|
|
26
52
|
raise ValidationError(f"{name} is not a valid fully qualified DNS host name")
|
|
27
53
|
|
|
28
54
|
|
|
29
|
-
def
|
|
55
|
+
def validate_generic_name(
|
|
30
56
|
name, tolerate_leading_underscores=False, always_tolerant=False
|
|
31
57
|
):
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
else:
|
|
38
|
-
regex = rf"^([*@]|(\*\.)?{LEADING_UNDERSCORE_LABEL}(\.{LEADING_UNDERSCORE_LABEL})*\.?)$"
|
|
39
|
-
elif get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames"):
|
|
40
|
-
regex = rf"^([*@]|(\*\.)?{TOLERANT_LABEL}(\.{TOLERANT_LABEL})*\.?)$"
|
|
41
|
-
else:
|
|
42
|
-
regex = rf"^([*@]|(\*\.)?{LABEL}(\.{LABEL})*\.?)$"
|
|
58
|
+
label, zone_label = _get_label(
|
|
59
|
+
tolerate_leading_underscores=tolerate_leading_underscores,
|
|
60
|
+
always_tolerant=always_tolerant,
|
|
61
|
+
)
|
|
62
|
+
regex = rf"^([*@]|(\*\.)?{label}(\.{zone_label})*\.?)$"
|
|
43
63
|
|
|
44
64
|
if not re.match(regex, name, flags=re.IGNORECASE) or has_invalid_double_dash(name):
|
|
45
65
|
raise ValidationError(f"{name} is not a valid DNS host name")
|
|
46
66
|
|
|
47
67
|
|
|
48
|
-
def validate_domain_name(
|
|
68
|
+
def validate_domain_name(
|
|
69
|
+
name, always_tolerant=False, allow_empty_label=False, zone_name=False
|
|
70
|
+
):
|
|
49
71
|
if name == "@" and allow_empty_label:
|
|
50
72
|
return
|
|
51
73
|
|
|
@@ -54,12 +76,11 @@ def validate_domain_name(name, always_tolerant=False, allow_empty_label=False):
|
|
|
54
76
|
):
|
|
55
77
|
return
|
|
56
78
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
regex = rf"^{TOLERANT_LABEL}(\.{TOLERANT_LABEL})*\.?$"
|
|
79
|
+
label, zone_label = _get_label(always_tolerant=always_tolerant)
|
|
80
|
+
if zone_name:
|
|
81
|
+
regex = rf"^{zone_label}(\.{zone_label})*\.?$"
|
|
61
82
|
else:
|
|
62
|
-
regex = rf"^{
|
|
83
|
+
regex = rf"^{label}(\.{zone_label})*\.?$"
|
|
63
84
|
|
|
64
85
|
if not re.match(regex, name, flags=re.IGNORECASE) or has_invalid_double_dash(name):
|
|
65
86
|
raise ValidationError(f"{name} is not a valid DNS domain name")
|
netbox_dns/views/zone.py
CHANGED
|
@@ -40,6 +40,7 @@ class ZoneView(generic.ObjectView):
|
|
|
40
40
|
context = {
|
|
41
41
|
"nameserver_warnings": ns_warnings,
|
|
42
42
|
"nameserver_errors": ns_errors,
|
|
43
|
+
"parent_zone": instance.parent_zone,
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
name = dns_name.from_text(instance.name)
|
|
@@ -165,3 +166,22 @@ class ZoneRFC2317ChildZoneListView(generic.ObjectChildrenView):
|
|
|
165
166
|
|
|
166
167
|
def get_children(self, request, parent):
|
|
167
168
|
return parent.rfc2317_child_zones.all()
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
@register_model_view(Zone, "child_zones")
|
|
172
|
+
class ZoneChildZoneListView(generic.ObjectChildrenView):
|
|
173
|
+
queryset = Zone.objects.all()
|
|
174
|
+
child_model = Zone
|
|
175
|
+
table = ZoneTable
|
|
176
|
+
filterset = ZoneFilterSet
|
|
177
|
+
template_name = "netbox_dns/zone/child_zone.html"
|
|
178
|
+
|
|
179
|
+
tab = ViewTab(
|
|
180
|
+
label="Child Zones",
|
|
181
|
+
permission="netbox_dns.view_zone",
|
|
182
|
+
badge=lambda obj: obj.child_zones.count(),
|
|
183
|
+
hide_if_empty=True,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
def get_children(self, request, parent):
|
|
187
|
+
return parent.child_zones
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
netbox_dns/__init__.py,sha256
|
|
1
|
+
netbox_dns/__init__.py,sha256=lhlLlERkb4Bbex6ypL5-ra35zq2Uro7qTZlC95JLmiI,1244
|
|
2
2
|
netbox_dns/api/nested_serializers.py,sha256=kkTU4Hylkbam9-lIniv8E0nTQwE1bz8D_GzIEOUy0Mw,2145
|
|
3
3
|
netbox_dns/api/serializers.py,sha256=C4-TP1luq9QjEHjPS5cW7u2flAEdIFjghpVd_sa5S_Y,249
|
|
4
4
|
netbox_dns/api/serializers_/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -59,11 +59,11 @@ netbox_dns/mixins/object_modification.py,sha256=wq01fyCAai2staM2g5wV9BbW1hDUeRdX
|
|
|
59
59
|
netbox_dns/models/__init__.py,sha256=Q7UIEe2vGh18AZN4er6CykciwXPQGgUq0L-9718wZqU,182
|
|
60
60
|
netbox_dns/models/contact.py,sha256=xXmNGuM6k1U98jO3mMmp93PXamh1YZQ270JOcy0FFnE,2958
|
|
61
61
|
netbox_dns/models/nameserver.py,sha256=5Z0sFTqpxksCFCOExxXZEY_mpEVTKLMtFv5urD9yvdg,3121
|
|
62
|
-
netbox_dns/models/record.py,sha256=
|
|
62
|
+
netbox_dns/models/record.py,sha256=BTMt9Tq-3v_fZcNeLZvlkZHfWYpfgwcLbbxdB6F1s5M,26476
|
|
63
63
|
netbox_dns/models/registrar.py,sha256=yidjVCq7WPECsHLKQRRCSzGbvG2jIXu8lqAKox0SU5Q,1502
|
|
64
64
|
netbox_dns/models/view.py,sha256=HgQSpD8zQCxDpNel0b1_m4GlMYoRBpxiu6-Dtb1YnxI,2712
|
|
65
|
-
netbox_dns/models/zone.py,sha256=
|
|
66
|
-
netbox_dns/navigation.py,sha256=
|
|
65
|
+
netbox_dns/models/zone.py,sha256=eaFNlDdvfNn9Ky6sUUl2HA-_SkcWnYJzExB3GLDaoLo,28655
|
|
66
|
+
netbox_dns/navigation.py,sha256=9NdvJ-0IIFvf3hMccoailepu7QLkVYEk0dpDxfuGo80,4572
|
|
67
67
|
netbox_dns/signals/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
68
|
netbox_dns/signals/ipam_coupling.py,sha256=kJUKHUgq5XgWMhxB-312SPaZAYTLIYGgKO0lz2-z_rg,5594
|
|
69
69
|
netbox_dns/tables/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
@@ -78,28 +78,29 @@ netbox_dns/templates/netbox_dns/contact.html,sha256=fMHAQyLXIxohKoCTxFEnKetl9UVX
|
|
|
78
78
|
netbox_dns/templates/netbox_dns/nameserver.html,sha256=DpTdetQVV_jKThDbi62LvbhiCay-1QxR-yiJEiPFm4w,1554
|
|
79
79
|
netbox_dns/templates/netbox_dns/record/managed.html,sha256=G6LPG1koUGuzUiwYdv1okdVa4sKaofiQegDBnsFL0kA,89
|
|
80
80
|
netbox_dns/templates/netbox_dns/record/related.html,sha256=Aqor8uGcuHQTHjlX-Xmni2Yp4N7lOBrMOqQiszrQOC0,742
|
|
81
|
-
netbox_dns/templates/netbox_dns/record.html,sha256=
|
|
81
|
+
netbox_dns/templates/netbox_dns/record.html,sha256=WtEkWy_CstGWE9UDFsATxz0bNpP_Gx9joZusAYGHDFQ,5235
|
|
82
82
|
netbox_dns/templates/netbox_dns/registrar.html,sha256=O5veGmW59Pf5yN25ihPLvRIkA2P7xmSGv0G3NrRG8vI,2152
|
|
83
83
|
netbox_dns/templates/netbox_dns/related_dns_objects.html,sha256=KSzlnw1cStrJa3poKkwrt_ycIH0oH0STWIHRNy3ks4g,806
|
|
84
84
|
netbox_dns/templates/netbox_dns/view.html,sha256=XCa7Sg8fjSkhVqjLvw652FINQdWURLWdQqw8is82iaI,1499
|
|
85
85
|
netbox_dns/templates/netbox_dns/zone/base.html,sha256=n_E4aVYdGeZZl-ARE8sb4DgAAgPs92X1UEFepX3xIlM,495
|
|
86
86
|
netbox_dns/templates/netbox_dns/zone/child.html,sha256=kH56PJFBGCjiRdIh7zCtClnZdfOChqN_sYslsyoz5gU,2147
|
|
87
|
+
netbox_dns/templates/netbox_dns/zone/child_zone.html,sha256=b9CSGWEfWT7hLQ80gApMnu7mXM8w2LT-3UaOYe6HIRQ,510
|
|
87
88
|
netbox_dns/templates/netbox_dns/zone/managed_record.html,sha256=LOchMAJyfMZIICE6q0pX1eorRbtgUtOQ1u0VvJKCDZ8,514
|
|
88
89
|
netbox_dns/templates/netbox_dns/zone/record.html,sha256=tu5RFm2eYJ3fjeUxZYDJqJ9qK8tGslXl1iGs60DlRyM,2194
|
|
89
90
|
netbox_dns/templates/netbox_dns/zone/registration.html,sha256=de2Kph-G8Gv5LD_Wf294SLfO0UKPS9NmHeQYRfJf-Ck,1151
|
|
90
91
|
netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html,sha256=rWlmb3zRQbLYQ_1dsa0twwu6y1dRj2tfFVEERH07p-s,517
|
|
91
|
-
netbox_dns/templates/netbox_dns/zone.html,sha256=
|
|
92
|
+
netbox_dns/templates/netbox_dns/zone.html,sha256=zPi1sLFnya-ytx8-Pcf_ujc1sKllCRuz48x2E-S1HSo,6285
|
|
92
93
|
netbox_dns/urls/__init__.py,sha256=ky-ertisnz10vB18bi7JGwZwkvbRAeDErAqn621Xmbc,438
|
|
93
94
|
netbox_dns/urls/contact.py,sha256=OSQO-AkAhTaBruAdzVgcC7ip_OuiacvFI_ozgkWlNFU,1549
|
|
94
95
|
netbox_dns/urls/nameserver.py,sha256=BBbY-wqPqCquvLLv1_JhqToj7oDHhPNGCWHt0IfjBNM,1941
|
|
95
96
|
netbox_dns/urls/record.py,sha256=bDprohTso1N0GtPXH4X3TNHnkxopiOSQFXWItifEZ_k,1432
|
|
96
97
|
netbox_dns/urls/registrar.py,sha256=u6B0zGGYNUJIKTo9uGiUeZLPD0QMGaQOAPShGEy4NaA,1728
|
|
97
98
|
netbox_dns/urls/view.py,sha256=8AeBnOHWusXXQs4JXpNfMSHqszXAY1GDXGWmNsMulQ8,1327
|
|
98
|
-
netbox_dns/urls/zone.py,sha256=
|
|
99
|
-
netbox_dns/utilities/__init__.py,sha256
|
|
99
|
+
netbox_dns/urls/zone.py,sha256=rmB1BkzmWNG06ILUf-39Aj6-SBFkwQouyixMQiamqPc,2005
|
|
100
|
+
netbox_dns/utilities/__init__.py,sha256=-6-qmb1yTAt9QEtGtokNFBQV_TSheobkLjbWFKEYpfw,1849
|
|
100
101
|
netbox_dns/utilities/ipam_coupling.py,sha256=6z1Fx8fhesf15gLTHYc0KVqE3_YhJbNPAjqFOvWlqK8,3441
|
|
101
102
|
netbox_dns/validators/__init__.py,sha256=5W8s31R1aT5B_mKJjTRwogEKj-Xun05iCyvRuYVGkdM,47
|
|
102
|
-
netbox_dns/validators/dns_name.py,sha256=
|
|
103
|
+
netbox_dns/validators/dns_name.py,sha256=rb4nd3zfVotoS0lZXfoHL7uTZWN2QPCIuf7uYxXsasg,2991
|
|
103
104
|
netbox_dns/validators/rfc2317.py,sha256=L2Z-z5ghktFyWMLVZPeK8OEVGnQzbXD11fha2xGHM5E,501
|
|
104
105
|
netbox_dns/views/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
105
106
|
netbox_dns/views/contact.py,sha256=mBWM92UVjoz90JCUGO7kaFUI0_yA7tH4lSHxOZQB3MQ,2253
|
|
@@ -107,8 +108,8 @@ netbox_dns/views/nameserver.py,sha256=Sxl1h8v1W-uP0Qxz-Re0Ei1LgnWJuQGjI7ZaHS7qLe
|
|
|
107
108
|
netbox_dns/views/record.py,sha256=DDHbxQ33P_mduoPquvyXrdrqNT6r79qShLg1uJzU4Ic,4347
|
|
108
109
|
netbox_dns/views/registrar.py,sha256=NK6jTYRwRjaVjYmI7T4Phh_gjXg9yPrxl-7vciZ9doc,2090
|
|
109
110
|
netbox_dns/views/view.py,sha256=a3l6pybhqGb_RMxrRgFT1Gia9tRq8EmXFxPv9WUId0U,1913
|
|
110
|
-
netbox_dns/views/zone.py,sha256=
|
|
111
|
-
netbox_plugin_dns-1.0.
|
|
112
|
-
netbox_plugin_dns-1.0.
|
|
113
|
-
netbox_plugin_dns-1.0.
|
|
114
|
-
netbox_plugin_dns-1.0.
|
|
111
|
+
netbox_dns/views/zone.py,sha256=bOWnHtnlYH8BiB3L7ZKJLqS_VVOYCEFZNnOxbmFmsNY,5161
|
|
112
|
+
netbox_plugin_dns-1.0.3.dist-info/LICENSE,sha256=I3tDu11bZfhFm3EkV4zOD5TmWgLjnUNLEFwrdjniZYs,1112
|
|
113
|
+
netbox_plugin_dns-1.0.3.dist-info/METADATA,sha256=xdA1apPJLWo-Y9QDq5pXYx-acxDhf1vTOynMISktZU8,6146
|
|
114
|
+
netbox_plugin_dns-1.0.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
115
|
+
netbox_plugin_dns-1.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|