netbox-plugin-dns 1.0.0__py3-none-any.whl → 1.0b1__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 -3
- netbox_dns/api/serializers_/view.py +1 -6
- netbox_dns/api/serializers_/zone.py +11 -0
- netbox_dns/fields/network.py +21 -20
- netbox_dns/fields/rfc2317.py +2 -2
- netbox_dns/filtersets/view.py +1 -1
- netbox_dns/filtersets/zone.py +4 -4
- netbox_dns/forms/record.py +2 -30
- netbox_dns/forms/view.py +3 -6
- netbox_dns/forms/zone.py +101 -70
- netbox_dns/graphql/types.py +4 -1
- netbox_dns/management/commands/cleanup_rrset_ttl.py +1 -1
- netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +2 -4
- netbox_dns/models/nameserver.py +1 -3
- netbox_dns/models/record.py +24 -26
- netbox_dns/models/view.py +0 -53
- netbox_dns/models/zone.py +46 -63
- netbox_dns/signals/ipam_coupling.py +2 -1
- netbox_dns/tables/view.py +2 -9
- netbox_dns/template_content.py +1 -1
- netbox_dns/templates/netbox_dns/record.html +1 -1
- netbox_dns/templates/netbox_dns/view.html +0 -4
- netbox_dns/templates/netbox_dns/zone.html +4 -2
- netbox_dns/urls.py +297 -0
- netbox_dns/views/record.py +24 -9
- {netbox_plugin_dns-1.0.0.dist-info → netbox_plugin_dns-1.0b1.dist-info}/METADATA +13 -29
- {netbox_plugin_dns-1.0.0.dist-info → netbox_plugin_dns-1.0b1.dist-info}/RECORD +29 -38
- netbox_dns/migrations/0003_default_view.py +0 -15
- netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -26
- netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -18
- netbox_dns/urls/__init__.py +0 -17
- netbox_dns/urls/contact.py +0 -51
- netbox_dns/urls/nameserver.py +0 -69
- netbox_dns/urls/record.py +0 -41
- netbox_dns/urls/registrar.py +0 -63
- netbox_dns/urls/view.py +0 -39
- netbox_dns/urls/zone.py +0 -57
- {netbox_plugin_dns-1.0.0.dist-info → netbox_plugin_dns-1.0b1.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-1.0.0.dist-info → netbox_plugin_dns-1.0b1.dist-info}/WHEEL +0 -0
netbox_dns/urls.py
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
from django.urls import path
|
|
2
|
+
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
|
+
|
|
5
|
+
from netbox_dns.models import View, Zone, Record, NameServer, Contact, Registrar
|
|
6
|
+
from netbox_dns.views import (
|
|
7
|
+
# zone
|
|
8
|
+
ZoneListView,
|
|
9
|
+
ZoneView,
|
|
10
|
+
ZoneDeleteView,
|
|
11
|
+
ZoneEditView,
|
|
12
|
+
ZoneBulkImportView,
|
|
13
|
+
ZoneBulkEditView,
|
|
14
|
+
ZoneBulkDeleteView,
|
|
15
|
+
ZoneRecordListView,
|
|
16
|
+
ZoneManagedRecordListView,
|
|
17
|
+
ZoneRegistrationView,
|
|
18
|
+
ZoneRFC2317ChildZoneListView,
|
|
19
|
+
# nameserver
|
|
20
|
+
NameServerListView,
|
|
21
|
+
NameServerView,
|
|
22
|
+
NameServerEditView,
|
|
23
|
+
NameServerDeleteView,
|
|
24
|
+
NameServerBulkImportView,
|
|
25
|
+
NameServerBulkEditView,
|
|
26
|
+
NameServerBulkDeleteView,
|
|
27
|
+
NameServerZoneListView,
|
|
28
|
+
NameServerSOAZoneListView,
|
|
29
|
+
# record
|
|
30
|
+
RecordListView,
|
|
31
|
+
RecordView,
|
|
32
|
+
RecordEditView,
|
|
33
|
+
RecordDeleteView,
|
|
34
|
+
RecordBulkImportView,
|
|
35
|
+
RecordBulkEditView,
|
|
36
|
+
RecordBulkDeleteView,
|
|
37
|
+
# managed record
|
|
38
|
+
ManagedRecordListView,
|
|
39
|
+
# view
|
|
40
|
+
ViewListView,
|
|
41
|
+
ViewView,
|
|
42
|
+
ViewDeleteView,
|
|
43
|
+
ViewEditView,
|
|
44
|
+
ViewBulkImportView,
|
|
45
|
+
ViewBulkEditView,
|
|
46
|
+
ViewBulkDeleteView,
|
|
47
|
+
ViewZoneListView,
|
|
48
|
+
# contact
|
|
49
|
+
ContactListView,
|
|
50
|
+
ContactView,
|
|
51
|
+
ContactDeleteView,
|
|
52
|
+
ContactEditView,
|
|
53
|
+
ContactBulkImportView,
|
|
54
|
+
ContactBulkEditView,
|
|
55
|
+
ContactBulkDeleteView,
|
|
56
|
+
ContactZoneListView,
|
|
57
|
+
# registrar
|
|
58
|
+
RegistrarListView,
|
|
59
|
+
RegistrarView,
|
|
60
|
+
RegistrarDeleteView,
|
|
61
|
+
RegistrarEditView,
|
|
62
|
+
RegistrarBulkImportView,
|
|
63
|
+
RegistrarBulkEditView,
|
|
64
|
+
RegistrarBulkDeleteView,
|
|
65
|
+
RegistrarZoneListView,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
app_name = "netbox_dns"
|
|
69
|
+
|
|
70
|
+
urlpatterns = [
|
|
71
|
+
#
|
|
72
|
+
# Zone urls
|
|
73
|
+
#
|
|
74
|
+
path("zones/", ZoneListView.as_view(), name="zone_list"),
|
|
75
|
+
path("zones/add/", ZoneEditView.as_view(), name="zone_add"),
|
|
76
|
+
path("zones/import/", ZoneBulkImportView.as_view(), name="zone_import"),
|
|
77
|
+
path("zones/edit/", ZoneBulkEditView.as_view(), name="zone_bulk_edit"),
|
|
78
|
+
path("zones/delete/", ZoneBulkDeleteView.as_view(), name="zone_bulk_delete"),
|
|
79
|
+
path("zones/<int:pk>/", ZoneView.as_view(), name="zone"),
|
|
80
|
+
path("zones/<int:pk>/delete/", ZoneDeleteView.as_view(), name="zone_delete"),
|
|
81
|
+
path("zones/<int:pk>/edit/", ZoneEditView.as_view(), name="zone_edit"),
|
|
82
|
+
path(
|
|
83
|
+
"zones/<int:pk>/journal/",
|
|
84
|
+
ObjectJournalView.as_view(),
|
|
85
|
+
name="zone_journal",
|
|
86
|
+
kwargs={"model": Zone},
|
|
87
|
+
),
|
|
88
|
+
path(
|
|
89
|
+
"zones/<int:pk>/changelog/",
|
|
90
|
+
ObjectChangeLogView.as_view(),
|
|
91
|
+
name="zone_changelog",
|
|
92
|
+
kwargs={"model": Zone},
|
|
93
|
+
),
|
|
94
|
+
path("zones/<int:pk>/records/", ZoneRecordListView.as_view(), name="zone_records"),
|
|
95
|
+
path(
|
|
96
|
+
"zones/<int:pk>/managedrecords/",
|
|
97
|
+
ZoneManagedRecordListView.as_view(),
|
|
98
|
+
name="zone_managed_records",
|
|
99
|
+
),
|
|
100
|
+
path(
|
|
101
|
+
"zones/<int:pk>/rfc2317childzones/",
|
|
102
|
+
ZoneRFC2317ChildZoneListView.as_view(),
|
|
103
|
+
name="zone_rfc2317_child_zones",
|
|
104
|
+
),
|
|
105
|
+
path(
|
|
106
|
+
"zones/<int:pk>/registration/",
|
|
107
|
+
ZoneRegistrationView.as_view(),
|
|
108
|
+
name="zone_registration",
|
|
109
|
+
),
|
|
110
|
+
#
|
|
111
|
+
# NameServer urls
|
|
112
|
+
#
|
|
113
|
+
path("nameservers/", NameServerListView.as_view(), name="nameserver_list"),
|
|
114
|
+
path("nameservers/add/", NameServerEditView.as_view(), name="nameserver_add"),
|
|
115
|
+
path(
|
|
116
|
+
"nameservers/import/",
|
|
117
|
+
NameServerBulkImportView.as_view(),
|
|
118
|
+
name="nameserver_import",
|
|
119
|
+
),
|
|
120
|
+
path(
|
|
121
|
+
"nameservers/edit/",
|
|
122
|
+
NameServerBulkEditView.as_view(),
|
|
123
|
+
name="nameserver_bulk_edit",
|
|
124
|
+
),
|
|
125
|
+
path(
|
|
126
|
+
"nameservers/delete/",
|
|
127
|
+
NameServerBulkDeleteView.as_view(),
|
|
128
|
+
name="nameserver_bulk_delete",
|
|
129
|
+
),
|
|
130
|
+
path("nameservers/<int:pk>/", NameServerView.as_view(), name="nameserver"),
|
|
131
|
+
path(
|
|
132
|
+
"nameservers/<int:pk>/edit",
|
|
133
|
+
NameServerEditView.as_view(),
|
|
134
|
+
name="nameserver_edit",
|
|
135
|
+
),
|
|
136
|
+
path(
|
|
137
|
+
"nameservers/<int:pk>/delete",
|
|
138
|
+
NameServerDeleteView.as_view(),
|
|
139
|
+
name="nameserver_delete",
|
|
140
|
+
),
|
|
141
|
+
path(
|
|
142
|
+
"nameservers/<int:pk>/journal/",
|
|
143
|
+
ObjectJournalView.as_view(),
|
|
144
|
+
name="nameserver_journal",
|
|
145
|
+
kwargs={"model": NameServer},
|
|
146
|
+
),
|
|
147
|
+
path(
|
|
148
|
+
"nameservers/<int:pk>/changelog/",
|
|
149
|
+
ObjectChangeLogView.as_view(),
|
|
150
|
+
name="nameserver_changelog",
|
|
151
|
+
kwargs={"model": NameServer},
|
|
152
|
+
),
|
|
153
|
+
path(
|
|
154
|
+
"nameservers/<int:pk>/zones/",
|
|
155
|
+
NameServerZoneListView.as_view(),
|
|
156
|
+
name="nameserver_zones",
|
|
157
|
+
),
|
|
158
|
+
path(
|
|
159
|
+
"nameservers/<int:pk>/soazones/",
|
|
160
|
+
NameServerSOAZoneListView.as_view(),
|
|
161
|
+
name="nameserver_soa_zones",
|
|
162
|
+
),
|
|
163
|
+
#
|
|
164
|
+
# Record urls
|
|
165
|
+
#
|
|
166
|
+
path("records/", RecordListView.as_view(), name="record_list"),
|
|
167
|
+
path("records/add/", RecordEditView.as_view(), name="record_add"),
|
|
168
|
+
path("records/import/", RecordBulkImportView.as_view(), name="record_import"),
|
|
169
|
+
path("records/edit/", RecordBulkEditView.as_view(), name="record_bulk_edit"),
|
|
170
|
+
path("records/delete/", RecordBulkDeleteView.as_view(), name="record_bulk_delete"),
|
|
171
|
+
path("records/<int:pk>/", RecordView.as_view(), name="record"),
|
|
172
|
+
path("records/<int:pk>/edit/", RecordEditView.as_view(), name="record_edit"),
|
|
173
|
+
path("records/<int:pk>/delete/", RecordDeleteView.as_view(), name="record_delete"),
|
|
174
|
+
path(
|
|
175
|
+
"records/<int:pk>/journal/",
|
|
176
|
+
ObjectJournalView.as_view(),
|
|
177
|
+
name="record_journal",
|
|
178
|
+
kwargs={"model": Record},
|
|
179
|
+
),
|
|
180
|
+
path(
|
|
181
|
+
"records/<int:pk>/changelog/",
|
|
182
|
+
ObjectChangeLogView.as_view(),
|
|
183
|
+
name="record_changelog",
|
|
184
|
+
kwargs={"model": Record},
|
|
185
|
+
),
|
|
186
|
+
path(
|
|
187
|
+
"managedrecords/", ManagedRecordListView.as_view(), name="managed_record_list"
|
|
188
|
+
),
|
|
189
|
+
#
|
|
190
|
+
# View urls
|
|
191
|
+
#
|
|
192
|
+
path("views/", ViewListView.as_view(), name="view_list"),
|
|
193
|
+
path("views/add/", ViewEditView.as_view(), name="view_add"),
|
|
194
|
+
path("views/import/", ViewBulkImportView.as_view(), name="view_import"),
|
|
195
|
+
path("views/edit/", ViewBulkEditView.as_view(), name="view_bulk_edit"),
|
|
196
|
+
path("views/delete/", ViewBulkDeleteView.as_view(), name="view_bulk_delete"),
|
|
197
|
+
path("views/<int:pk>/", ViewView.as_view(), name="view"),
|
|
198
|
+
path("views/<int:pk>/edit/", ViewEditView.as_view(), name="view_edit"),
|
|
199
|
+
path("views/<int:pk>/delete/", ViewDeleteView.as_view(), name="view_delete"),
|
|
200
|
+
path("views/<int:pk>/zones/", ViewZoneListView.as_view(), name="view_zones"),
|
|
201
|
+
path(
|
|
202
|
+
"views/<int:pk>/journal/",
|
|
203
|
+
ObjectJournalView.as_view(),
|
|
204
|
+
name="view_journal",
|
|
205
|
+
kwargs={"model": View},
|
|
206
|
+
),
|
|
207
|
+
path(
|
|
208
|
+
"views/<int:pk>/changelog/",
|
|
209
|
+
ObjectChangeLogView.as_view(),
|
|
210
|
+
name="view_changelog",
|
|
211
|
+
kwargs={"model": View},
|
|
212
|
+
),
|
|
213
|
+
#
|
|
214
|
+
# Contact urls
|
|
215
|
+
#
|
|
216
|
+
path("contacts/", ContactListView.as_view(), name="contact_list"),
|
|
217
|
+
path("contacts/add/", ContactEditView.as_view(), name="contact_add"),
|
|
218
|
+
path("contacts/import/", ContactBulkImportView.as_view(), name="contact_import"),
|
|
219
|
+
path("contacts/edit/", ContactBulkEditView.as_view(), name="contact_bulk_edit"),
|
|
220
|
+
path(
|
|
221
|
+
"contacts/delete/",
|
|
222
|
+
ContactBulkDeleteView.as_view(),
|
|
223
|
+
name="contact_bulk_delete",
|
|
224
|
+
),
|
|
225
|
+
path("contacts/<int:pk>/", ContactView.as_view(), name="contact"),
|
|
226
|
+
path("contacts/<int:pk>/edit/", ContactEditView.as_view(), name="contact_edit"),
|
|
227
|
+
path(
|
|
228
|
+
"contacts/<int:pk>/delete/",
|
|
229
|
+
ContactDeleteView.as_view(),
|
|
230
|
+
name="contact_delete",
|
|
231
|
+
),
|
|
232
|
+
path(
|
|
233
|
+
"contacts/<int:pk>/zones/",
|
|
234
|
+
ContactZoneListView.as_view(),
|
|
235
|
+
name="contact_zones",
|
|
236
|
+
),
|
|
237
|
+
path(
|
|
238
|
+
"contacts/<int:pk>/journal/",
|
|
239
|
+
ObjectJournalView.as_view(),
|
|
240
|
+
name="contact_journal",
|
|
241
|
+
kwargs={"model": Contact},
|
|
242
|
+
),
|
|
243
|
+
path(
|
|
244
|
+
"contacts/<int:pk>/changelog/",
|
|
245
|
+
ObjectChangeLogView.as_view(),
|
|
246
|
+
name="contact_changelog",
|
|
247
|
+
kwargs={"model": Contact},
|
|
248
|
+
),
|
|
249
|
+
#
|
|
250
|
+
# Registrar urls
|
|
251
|
+
#
|
|
252
|
+
path("registrars/", RegistrarListView.as_view(), name="registrar_list"),
|
|
253
|
+
path("registrars/add/", RegistrarEditView.as_view(), name="registrar_add"),
|
|
254
|
+
path(
|
|
255
|
+
"registrars/import/",
|
|
256
|
+
RegistrarBulkImportView.as_view(),
|
|
257
|
+
name="registrar_import",
|
|
258
|
+
),
|
|
259
|
+
path(
|
|
260
|
+
"registrars/edit/",
|
|
261
|
+
RegistrarBulkEditView.as_view(),
|
|
262
|
+
name="registrar_bulk_edit",
|
|
263
|
+
),
|
|
264
|
+
path(
|
|
265
|
+
"registrars/delete/",
|
|
266
|
+
RegistrarBulkDeleteView.as_view(),
|
|
267
|
+
name="registrar_bulk_delete",
|
|
268
|
+
),
|
|
269
|
+
path("registrars/<int:pk>/", RegistrarView.as_view(), name="registrar"),
|
|
270
|
+
path(
|
|
271
|
+
"registrars/<int:pk>/edit/",
|
|
272
|
+
RegistrarEditView.as_view(),
|
|
273
|
+
name="registrar_edit",
|
|
274
|
+
),
|
|
275
|
+
path(
|
|
276
|
+
"registrars/<int:pk>/delete/",
|
|
277
|
+
RegistrarDeleteView.as_view(),
|
|
278
|
+
name="registrar_delete",
|
|
279
|
+
),
|
|
280
|
+
path(
|
|
281
|
+
"registrars/<int:pk>/zones/",
|
|
282
|
+
RegistrarZoneListView.as_view(),
|
|
283
|
+
name="registrar_zones",
|
|
284
|
+
),
|
|
285
|
+
path(
|
|
286
|
+
"registrars/<int:pk>/journal/",
|
|
287
|
+
ObjectJournalView.as_view(),
|
|
288
|
+
name="registrar_journal",
|
|
289
|
+
kwargs={"model": Registrar},
|
|
290
|
+
),
|
|
291
|
+
path(
|
|
292
|
+
"registrars/<int:pk>/changelog/",
|
|
293
|
+
ObjectChangeLogView.as_view(),
|
|
294
|
+
name="registrar_changelog",
|
|
295
|
+
kwargs={"model": Registrar},
|
|
296
|
+
),
|
|
297
|
+
]
|
netbox_dns/views/record.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
from dns import name as dns_name
|
|
2
2
|
|
|
3
|
+
from django.db.models import Q
|
|
4
|
+
from django.db.models.functions import Length
|
|
5
|
+
|
|
3
6
|
from netbox.views import generic
|
|
4
7
|
|
|
5
8
|
from netbox_dns.filtersets import RecordFilterSet
|
|
@@ -39,10 +42,21 @@ class RecordView(generic.ObjectView):
|
|
|
39
42
|
|
|
40
43
|
def get_value_records(self, instance):
|
|
41
44
|
value_fqdn = dns_name.from_text(instance.value_fqdn)
|
|
45
|
+
value_zone_names = [
|
|
46
|
+
value_fqdn.split(length)[1].to_text().rstrip(".")
|
|
47
|
+
for length in range(2, len(value_fqdn) + 1)
|
|
48
|
+
]
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
value_zone = (
|
|
51
|
+
Zone.objects.filter(instance.zone.view_filter, name__in=value_zone_names)
|
|
52
|
+
.order_by(Length("name").desc())
|
|
53
|
+
.first()
|
|
45
54
|
)
|
|
55
|
+
if not value_zone:
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
value_name = value_fqdn.relativize(dns_name.from_text(value_zone.name))
|
|
59
|
+
cname_targets = Record.objects.filter(zone=value_zone, name=value_name)
|
|
46
60
|
|
|
47
61
|
if cname_targets:
|
|
48
62
|
return RelatedRecordTable(
|
|
@@ -52,11 +66,14 @@ class RecordView(generic.ObjectView):
|
|
|
52
66
|
return None
|
|
53
67
|
|
|
54
68
|
def get_cname_records(self, instance):
|
|
69
|
+
view_filter = (
|
|
70
|
+
Q(zone__view__isnull=True)
|
|
71
|
+
if instance.zone.view is None
|
|
72
|
+
else Q(zone__view=instance.zone.view)
|
|
73
|
+
)
|
|
55
74
|
cname_records = set(
|
|
56
75
|
Record.objects.filter(
|
|
57
|
-
|
|
58
|
-
value=instance.fqdn,
|
|
59
|
-
type=RecordTypeChoices.CNAME,
|
|
76
|
+
view_filter, value=instance.fqdn, type=RecordTypeChoices.CNAME
|
|
60
77
|
)
|
|
61
78
|
)
|
|
62
79
|
|
|
@@ -67,14 +84,12 @@ class RecordView(generic.ObjectView):
|
|
|
67
84
|
]
|
|
68
85
|
|
|
69
86
|
parent_zones = Zone.objects.filter(
|
|
70
|
-
|
|
87
|
+
instance.zone.view_filter, name__in=parent_zone_names
|
|
71
88
|
)
|
|
72
89
|
|
|
73
90
|
for parent_zone in parent_zones:
|
|
74
91
|
parent_cname_records = Record.objects.filter(
|
|
75
|
-
|
|
76
|
-
type=RecordTypeChoices.CNAME,
|
|
77
|
-
zone=parent_zone,
|
|
92
|
+
view_filter, type=RecordTypeChoices.CNAME, zone=parent_zone
|
|
78
93
|
)
|
|
79
94
|
cname_records = cname_records.union(
|
|
80
95
|
set(
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-plugin-dns
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.0b1
|
|
4
4
|
Summary: NetBox DNS is a NetBox plugin for managing DNS data.
|
|
5
5
|
Home-page: https://github.com/peteeckel/netbox-plugin-dns
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: netbox,netbox-plugin,dns
|
|
8
8
|
Author: Peter Eckel
|
|
9
9
|
Author-email: pete@netbox-dns.org
|
|
10
|
-
Requires-Python: >=3.
|
|
11
|
-
Classifier: Development Status ::
|
|
10
|
+
Requires-Python: >=3.10,<4.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -21,7 +19,7 @@ Project-URL: Repository, https://github.com/peteeckel/netbox-plugin-dns
|
|
|
21
19
|
Description-Content-Type: text/markdown
|
|
22
20
|
|
|
23
21
|
# NetBox DNS
|
|
24
|
-
The NetBox DNS plugin enables NetBox to manage operational DNS data such as name servers, zones, records and views, as well as registration data for domains. It can automate tasks like creating PTR records, generating zone serial numbers, NS and SOA records, as well as validate names and values values for resource records to ensure zone data is consistent,
|
|
22
|
+
The NetBox DNS plugin enables NetBox to manage operational DNS data such as name servers, zones, records and views, as well as registration data for domains. It can automate tasks like creating PTR records, generating zone serial numbers, NS and SOA records, as well as validate names and values values for resource records to ensure zone data is consistent, current and conforming to the relevant RFCs.
|
|
25
23
|
|
|
26
24
|
<div align="center">
|
|
27
25
|
<a href="https://pypi.org/project/netbox-plugin-dns/"><img src="https://img.shields.io/pypi/v/netbox-plugin-dns" alt="PyPi"/></a>
|
|
@@ -36,30 +34,16 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
|
|
|
36
34
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
|
|
37
35
|
</div>
|
|
38
36
|
|
|
39
|
-
##
|
|
40
|
-
NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
|
|
37
|
+
## Features
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
* Manage name servers, zones and records
|
|
40
|
+
* Automatically generate SOA and NS records for zones
|
|
41
|
+
* Automatically create and update PTR records for IPv4 and IPv6 address records
|
|
42
|
+
* Organize DNS zones in views for split horizon DNS and multi-site deployments
|
|
43
|
+
* Manage domain registrar and registrant information for domains related to zones
|
|
44
|
+
* Manage RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* Validation of record names and values
|
|
47
|
-
* Automatic maintenance of PTR records for IPv6 and IPv4 address records
|
|
48
|
-
* Automatic generation of SOA records, optionally including the serial number of the zone data
|
|
49
|
-
* Validation of record types such as CNAME and singletons, to ensure DNS zone validity
|
|
50
|
-
* Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
|
|
51
|
-
|
|
52
|
-
Other main features include:
|
|
53
|
-
|
|
54
|
-
* Support for BIND views, providing lightweight namespaces for zones
|
|
55
|
-
* Support for IDN, including the validation of punycode names
|
|
56
|
-
* Full support for the NetBox REST and GraphQL APIs
|
|
57
|
-
* Support for all major NetBox features such as global search, tenancy, change logs, tagging, journaling etc.
|
|
58
|
-
|
|
59
|
-
## Non-objectives
|
|
60
|
-
In the same way as NetBox is not a network management application, NetBox DNS does not provide any functionality to manage specific name servers or DNS service providers or to generate input such as configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services that actually use the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.
|
|
61
|
-
|
|
62
|
-
For integration with a large number of DNS server implementations integration tools like [octodns-netbox-dns](https://pypi.org/project/octodns-netbox-dns/) are available.
|
|
46
|
+
NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
|
|
63
47
|
|
|
64
48
|
## Requirements
|
|
65
49
|
|
|
@@ -101,7 +85,7 @@ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documen
|
|
|
101
85
|
|
|
102
86
|
## Contribute
|
|
103
87
|
|
|
104
|
-
Contributions are always welcome! Please see
|
|
88
|
+
Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
|
|
105
89
|
|
|
106
90
|
## Documentation
|
|
107
91
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
netbox_dns/__init__.py,sha256=
|
|
1
|
+
netbox_dns/__init__.py,sha256=UCoJy3Ru9spDUyac_WRlNF7XOblh3aSkO-ZTnksGOV4,1053
|
|
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
|
|
@@ -6,43 +6,40 @@ netbox_dns/api/serializers_/contact.py,sha256=dH4rSmJQWy3B2GcZhF86OtaUxJRl_pF7eV
|
|
|
6
6
|
netbox_dns/api/serializers_/nameserver.py,sha256=Y1Ou6wAFddL28bIR10kYdHMHucbFGD7Q1M71L1z-gzY,1093
|
|
7
7
|
netbox_dns/api/serializers_/record.py,sha256=USnaNU5Mj6Uxo-qqOtBn_y1hj6UO1UcdCbj_9emDHfQ,2284
|
|
8
8
|
netbox_dns/api/serializers_/registrar.py,sha256=hnd6yzxd3wtIaUFkaeVyJ9q63M3IFdq_JftJj8KMIEQ,805
|
|
9
|
-
netbox_dns/api/serializers_/view.py,sha256=
|
|
10
|
-
netbox_dns/api/serializers_/zone.py,sha256=
|
|
9
|
+
netbox_dns/api/serializers_/view.py,sha256=cCeaTBiAAVBvPd8hBAl_XIW6O3FpwXNh0dcY-vX1H_I,798
|
|
10
|
+
netbox_dns/api/serializers_/zone.py,sha256=tiEcYfScWP0FtR0E3oQKWxkJSAE6MEGawFHFG3OpTEk,4759
|
|
11
11
|
netbox_dns/api/urls.py,sha256=R9VmmWtdrjvr35i5d_SfZK2lGn6JzmPuWEKTQlZ8MJo,575
|
|
12
12
|
netbox_dns/api/views.py,sha256=NI6ge3aCum394G0YN3mVSTQdFPB5kMOPdWRMR05aDO8,3566
|
|
13
13
|
netbox_dns/apps.py,sha256=JCW5eS-AQBUubDJve1DjP-IRFKTFGQh1NLGWzJpC5MI,151
|
|
14
14
|
netbox_dns/fields/__init__.py,sha256=egA6gLQ4SPYacECcYU4Vl_P7TbzLOMRfaX6rw3k26YA,69
|
|
15
15
|
netbox_dns/fields/address.py,sha256=qklRDbZJVK20t2OIxGBoo9VVeuVTWvWkf2gHaZMnoAI,1494
|
|
16
|
-
netbox_dns/fields/network.py,sha256=
|
|
17
|
-
netbox_dns/fields/rfc2317.py,sha256=
|
|
16
|
+
netbox_dns/fields/network.py,sha256=wKAuqopoJTXr6kOZ2X65VWhLNygLsFUmy4WR6ScSWWo,3606
|
|
17
|
+
netbox_dns/fields/rfc2317.py,sha256=ODlg5UXzTZ5m1R0J8G89UgcMdYRg4Ka0INPKDY_I250,2518
|
|
18
18
|
netbox_dns/filtersets/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
19
19
|
netbox_dns/filtersets/contact.py,sha256=OHwaV0nUhOchNN4etXviqo6eJVnXs0o8W0rwXBhRpx8,1057
|
|
20
20
|
netbox_dns/filtersets/nameserver.py,sha256=mX-0iCndZZo-_YiYqMT89JY7lYRvrdB2CMo5kIXXJWg,1110
|
|
21
21
|
netbox_dns/filtersets/record.py,sha256=Xop2yRT_UJcLvnk9DmKSekOt2a3NTFcCaIAKLskPx4M,3687
|
|
22
22
|
netbox_dns/filtersets/registrar.py,sha256=CzugumDLbFtkMaURLupMciKgV6VWHCzr1duXWQUGUKA,941
|
|
23
|
-
netbox_dns/filtersets/view.py,sha256=
|
|
24
|
-
netbox_dns/filtersets/zone.py,sha256=
|
|
23
|
+
netbox_dns/filtersets/view.py,sha256=KhM0xB4hEBSAE9LYsoOjsPdsxswlPsRnBuQ85yYv51E,505
|
|
24
|
+
netbox_dns/filtersets/zone.py,sha256=DZLO1m0WKrZ6vxiq8mNE9m82ni8asAOZ1xSe9gULVYE,6564
|
|
25
25
|
netbox_dns/forms/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
26
26
|
netbox_dns/forms/contact.py,sha256=zC6DY5x05RmuIkURlnL3QwdmVeWLSbw5XqQ568RVUOM,5220
|
|
27
27
|
netbox_dns/forms/nameserver.py,sha256=x3vmPQfiGLvIayOhTq--wC7pp24pOuVLArosUZOXpc4,2361
|
|
28
|
-
netbox_dns/forms/record.py,sha256=
|
|
28
|
+
netbox_dns/forms/record.py,sha256=3obkPtQCreDkO0OCZFc2JfFz7RtD5cKvKwtYc_2c2u0,6272
|
|
29
29
|
netbox_dns/forms/registrar.py,sha256=Z1V03Vk5k1KeMioQeNbBIo3LbFlh4LYiHIw72I4hN34,3638
|
|
30
|
-
netbox_dns/forms/view.py,sha256=
|
|
31
|
-
netbox_dns/forms/zone.py,sha256=
|
|
30
|
+
netbox_dns/forms/view.py,sha256=yWq0dtCc0P8Zxk6geX0O3w-vPJtgoXNADRvAaYNiqc0,1932
|
|
31
|
+
netbox_dns/forms/zone.py,sha256=0KsQdVD5OCmF3lXQa99cc8rEqML4W1OjvzjcDUxu__g,22627
|
|
32
32
|
netbox_dns/graphql/__init__.py,sha256=B9FHsY2Nntz4Vg9EtKbYB_gyzPCIM76CMQSGbf0Q9ek,358
|
|
33
33
|
netbox_dns/graphql/filters.py,sha256=Kwjrn0SaxaeqhxzjFb6isXYVvL_IXOwUpNsQd_c-ffY,1257
|
|
34
34
|
netbox_dns/graphql/schema.py,sha256=2CHe93vQQgFhl5cQTYCJp3JikK_QnBok8xi5UFvPmac,1915
|
|
35
|
-
netbox_dns/graphql/types.py,sha256=
|
|
35
|
+
netbox_dns/graphql/types.py,sha256=Md-OZgih9GFomQuqwOK-sIHyNGET8iMAkQ8s9cryC2A,4207
|
|
36
36
|
netbox_dns/management/commands/cleanup_database.py,sha256=HbfhYONCv1xlAbGP4e4Yv9IIoB0U-R8wAnyOjYMvxM0,5960
|
|
37
|
-
netbox_dns/management/commands/cleanup_rrset_ttl.py,sha256=
|
|
37
|
+
netbox_dns/management/commands/cleanup_rrset_ttl.py,sha256=LKRDlprPsCXFppH1FTkW0hg1XVJriQmL94W-VzEBFHs,2029
|
|
38
38
|
netbox_dns/management/commands/setup_coupling.py,sha256=1cUxDvHoX1UebgyCsbrLqIccuXhE8tkvyhW8dofIyr4,4556
|
|
39
39
|
netbox_dns/management/commands/update_soa.py,sha256=Rj_Xk-qpwkAVRubVnM5OqSTwgzi93E0PqjwGb3rYjf0,660
|
|
40
40
|
netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py,sha256=3U0810NWSHPu2dTSHpfzlleDgwMS04FhJ_CkO76SDaw,10283
|
|
41
|
-
netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py,sha256=
|
|
41
|
+
netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py,sha256=Fs4V6fi3D_1tn2GdUhkMVrvO9pqffCHCKH7ce38-3cE,20243
|
|
42
42
|
netbox_dns/migrations/0002_contact_description_registrar_description.py,sha256=ZrI-L3jJ5GzdVx21pomgM4waE-njixHQjl_grjsGr0I,583
|
|
43
|
-
netbox_dns/migrations/0003_default_view.py,sha256=NByVlAyiiK6WCfJ014BiFPkoNcHeqr1IpkgNdHiwbWw,367
|
|
44
|
-
netbox_dns/migrations/0004_create_and_assign_default_view.py,sha256=npBFxWuJCZeMhbZLEH9C_sZcQZRaa3IOlyn4p_GULyk,627
|
|
45
|
-
netbox_dns/migrations/0005_alter_zone_view_not_null.py,sha256=vUfCFD-qeh5M1WCqtE1eYHXZwQVCcf841Z2-0CdcMRI,463
|
|
46
43
|
netbox_dns/migrations/0020_netbox_3_4.py,sha256=UMcHdn8ZAuQjUaM_3rEGpktYrM0TuvhccD7Jt7WQnPs,1271
|
|
47
44
|
netbox_dns/migrations/0021_record_ip_address.py,sha256=k72KACwnaCkgXLMgrex_lZCB1xd614llxRBeBBuJTYU,3243
|
|
48
45
|
netbox_dns/migrations/0022_search.py,sha256=KW1ffEZ4-0dppGQ_KD1EN7iw8eQJOnDco-xfJFRZqKQ,172
|
|
@@ -56,44 +53,38 @@ netbox_dns/migrations/0029_record_fqdn.py,sha256=UAAU38ekKQyiYDOJlcrz6Qbk4bqZfSH
|
|
|
56
53
|
netbox_dns/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
54
|
netbox_dns/models/__init__.py,sha256=Q7UIEe2vGh18AZN4er6CykciwXPQGgUq0L-9718wZqU,182
|
|
58
55
|
netbox_dns/models/contact.py,sha256=xXmNGuM6k1U98jO3mMmp93PXamh1YZQ270JOcy0FFnE,2958
|
|
59
|
-
netbox_dns/models/nameserver.py,sha256=
|
|
60
|
-
netbox_dns/models/record.py,sha256=
|
|
56
|
+
netbox_dns/models/nameserver.py,sha256=LuE0VNwu3jM-IKf6ubq4kWHZpCAmTPdhGhz3btYtE0U,3021
|
|
57
|
+
netbox_dns/models/record.py,sha256=YiWYeB3IaGfmm88OVlU3N1ezc753QAKCB2TVgT4Zxp0,23740
|
|
61
58
|
netbox_dns/models/registrar.py,sha256=yidjVCq7WPECsHLKQRRCSzGbvG2jIXu8lqAKox0SU5Q,1502
|
|
62
|
-
netbox_dns/models/view.py,sha256
|
|
63
|
-
netbox_dns/models/zone.py,sha256=
|
|
59
|
+
netbox_dns/models/view.py,sha256=-CniIpddvoGAQQSS8y5R6Oq6IuPU_mGSi8J-3WLtYNU,920
|
|
60
|
+
netbox_dns/models/zone.py,sha256=8V7cJPhX3mWsmhWNH3Jc7-6cRPTeLXxb4CdOeo2YNOk,26519
|
|
64
61
|
netbox_dns/navigation.py,sha256=ykZJE5X-sqlnaTIU_pRzsio8Ux8zZVLH-iNsC2QqIxs,4062
|
|
65
62
|
netbox_dns/signals/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
-
netbox_dns/signals/ipam_coupling.py,sha256=
|
|
63
|
+
netbox_dns/signals/ipam_coupling.py,sha256=yBKICUcueJvzWCpUICEA0BYxf3WwaD2ZVNCb2bFRBEQ,5595
|
|
67
64
|
netbox_dns/tables/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
68
65
|
netbox_dns/tables/contact.py,sha256=guT_wC3NJMYbVbXeMOg6nqmmmDcnjfbRI-SkjFDEYdU,774
|
|
69
66
|
netbox_dns/tables/nameserver.py,sha256=8BfXzDXNuhZHEyHjGlL4EA1LYx7XU3EPGHlby0k33II,767
|
|
70
67
|
netbox_dns/tables/record.py,sha256=VwBWMiZN_Lkl9SXfJLzd8-7TM1CKetwE7azhScF4r7I,3162
|
|
71
68
|
netbox_dns/tables/registrar.py,sha256=6C8XpxvR9O7IoVK0RD5RoZgXjkm-ORSBeKP6KbwcjHA,648
|
|
72
|
-
netbox_dns/tables/view.py,sha256=
|
|
69
|
+
netbox_dns/tables/view.py,sha256=r9CLS96m-KojX3OYZ-k45FbVseHO20nPxRzlKrRrLio,501
|
|
73
70
|
netbox_dns/tables/zone.py,sha256=4TlTB7lVsztZJ41aetkqr6PWosjZP-xc2sB9gDnw0z8,1886
|
|
74
|
-
netbox_dns/template_content.py,sha256=
|
|
71
|
+
netbox_dns/template_content.py,sha256=0Az-YtDweyjX10NylMxk3Fv1_VIigCzY-Es48QSQRvA,3805
|
|
75
72
|
netbox_dns/templates/netbox_dns/contact.html,sha256=fMHAQyLXIxohKoCTxFEnKetl9UVXeQgjasfpv_JONaw,2855
|
|
76
73
|
netbox_dns/templates/netbox_dns/nameserver.html,sha256=DpTdetQVV_jKThDbi62LvbhiCay-1QxR-yiJEiPFm4w,1554
|
|
77
74
|
netbox_dns/templates/netbox_dns/record/managed.html,sha256=G6LPG1koUGuzUiwYdv1okdVa4sKaofiQegDBnsFL0kA,89
|
|
78
75
|
netbox_dns/templates/netbox_dns/record/related.html,sha256=Aqor8uGcuHQTHjlX-Xmni2Yp4N7lOBrMOqQiszrQOC0,742
|
|
79
|
-
netbox_dns/templates/netbox_dns/record.html,sha256=
|
|
76
|
+
netbox_dns/templates/netbox_dns/record.html,sha256=tzqX7FpSLwx3nzQHsOnlR_mfPZIehv6qs2erfC3KtDM,5481
|
|
80
77
|
netbox_dns/templates/netbox_dns/registrar.html,sha256=O5veGmW59Pf5yN25ihPLvRIkA2P7xmSGv0G3NrRG8vI,2152
|
|
81
78
|
netbox_dns/templates/netbox_dns/related_dns_objects.html,sha256=KSzlnw1cStrJa3poKkwrt_ycIH0oH0STWIHRNy3ks4g,806
|
|
82
|
-
netbox_dns/templates/netbox_dns/view.html,sha256=
|
|
79
|
+
netbox_dns/templates/netbox_dns/view.html,sha256=Ua91W33MRVKzEJcSUY7tgnO-rRD0FhFPdi72Sx_6iY0,1321
|
|
83
80
|
netbox_dns/templates/netbox_dns/zone/base.html,sha256=n_E4aVYdGeZZl-ARE8sb4DgAAgPs92X1UEFepX3xIlM,495
|
|
84
81
|
netbox_dns/templates/netbox_dns/zone/child.html,sha256=kH56PJFBGCjiRdIh7zCtClnZdfOChqN_sYslsyoz5gU,2147
|
|
85
82
|
netbox_dns/templates/netbox_dns/zone/managed_record.html,sha256=LOchMAJyfMZIICE6q0pX1eorRbtgUtOQ1u0VvJKCDZ8,514
|
|
86
83
|
netbox_dns/templates/netbox_dns/zone/record.html,sha256=tu5RFm2eYJ3fjeUxZYDJqJ9qK8tGslXl1iGs60DlRyM,2194
|
|
87
84
|
netbox_dns/templates/netbox_dns/zone/registration.html,sha256=de2Kph-G8Gv5LD_Wf294SLfO0UKPS9NmHeQYRfJf-Ck,1151
|
|
88
85
|
netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html,sha256=rWlmb3zRQbLYQ_1dsa0twwu6y1dRj2tfFVEERH07p-s,517
|
|
89
|
-
netbox_dns/templates/netbox_dns/zone.html,sha256=
|
|
90
|
-
netbox_dns/urls
|
|
91
|
-
netbox_dns/urls/contact.py,sha256=OSQO-AkAhTaBruAdzVgcC7ip_OuiacvFI_ozgkWlNFU,1549
|
|
92
|
-
netbox_dns/urls/nameserver.py,sha256=BBbY-wqPqCquvLLv1_JhqToj7oDHhPNGCWHt0IfjBNM,1941
|
|
93
|
-
netbox_dns/urls/record.py,sha256=bDprohTso1N0GtPXH4X3TNHnkxopiOSQFXWItifEZ_k,1432
|
|
94
|
-
netbox_dns/urls/registrar.py,sha256=u6B0zGGYNUJIKTo9uGiUeZLPD0QMGaQOAPShGEy4NaA,1728
|
|
95
|
-
netbox_dns/urls/view.py,sha256=8AeBnOHWusXXQs4JXpNfMSHqszXAY1GDXGWmNsMulQ8,1327
|
|
96
|
-
netbox_dns/urls/zone.py,sha256=wYRAhtq695K0QSrvNj6gdFaf1gExEN5vwmYXLAA9FrU,1849
|
|
86
|
+
netbox_dns/templates/netbox_dns/zone.html,sha256=BW8ig7bSuPXfcx2oiqLGCRVgs2IQIssoiT7QfEI0y54,6717
|
|
87
|
+
netbox_dns/urls.py,sha256=NxqvnRxLM6VwUBTY6KA8u-PRjNklmBai7gy6NXc-1xo,9172
|
|
97
88
|
netbox_dns/utilities/__init__.py,sha256=dVPi1gAGaRum-aQYi0oLgagRYrTVQNY5bmi2Ig02cOo,1835
|
|
98
89
|
netbox_dns/utilities/ipam_coupling.py,sha256=6z1Fx8fhesf15gLTHYc0KVqE3_YhJbNPAjqFOvWlqK8,3441
|
|
99
90
|
netbox_dns/validators/__init__.py,sha256=5W8s31R1aT5B_mKJjTRwogEKj-Xun05iCyvRuYVGkdM,47
|
|
@@ -102,11 +93,11 @@ netbox_dns/validators/rfc2317.py,sha256=L2Z-z5ghktFyWMLVZPeK8OEVGnQzbXD11fha2xGH
|
|
|
102
93
|
netbox_dns/views/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
103
94
|
netbox_dns/views/contact.py,sha256=mBWM92UVjoz90JCUGO7kaFUI0_yA7tH4lSHxOZQB3MQ,2253
|
|
104
95
|
netbox_dns/views/nameserver.py,sha256=Sxl1h8v1W-uP0Qxz-Re0Ei1LgnWJuQGjI7ZaHS7qLeE,3011
|
|
105
|
-
netbox_dns/views/record.py,sha256=
|
|
96
|
+
netbox_dns/views/record.py,sha256=lx4OGwIAMUPdncGb_M2fBEzyvUYqtlh1h46YYgoOZIQ,4928
|
|
106
97
|
netbox_dns/views/registrar.py,sha256=NK6jTYRwRjaVjYmI7T4Phh_gjXg9yPrxl-7vciZ9doc,2090
|
|
107
98
|
netbox_dns/views/view.py,sha256=a3l6pybhqGb_RMxrRgFT1Gia9tRq8EmXFxPv9WUId0U,1913
|
|
108
99
|
netbox_dns/views/zone.py,sha256=EqkjXuX1xhkjDgaSNgFBvnA74IhuK_zDWlHPb3_4YKQ,4591
|
|
109
|
-
netbox_plugin_dns-1.
|
|
110
|
-
netbox_plugin_dns-1.
|
|
111
|
-
netbox_plugin_dns-1.
|
|
112
|
-
netbox_plugin_dns-1.
|
|
100
|
+
netbox_plugin_dns-1.0b1.dist-info/LICENSE,sha256=tziMJKpkMbySr09L6bIwsu7Ca9ICoqpMO3yAXgEMQA4,1076
|
|
101
|
+
netbox_plugin_dns-1.0b1.dist-info/METADATA,sha256=iEKHek34GRV1885L1kFDRAtKQn3GfWVwprqiHDZbacg,4460
|
|
102
|
+
netbox_plugin_dns-1.0b1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
103
|
+
netbox_plugin_dns-1.0b1.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
from django.db import migrations, models
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Migration(migrations.Migration):
|
|
5
|
-
dependencies = [
|
|
6
|
-
("netbox_dns", "0002_contact_description_registrar_description"),
|
|
7
|
-
]
|
|
8
|
-
|
|
9
|
-
operations = [
|
|
10
|
-
migrations.AddField(
|
|
11
|
-
model_name="view",
|
|
12
|
-
name="default_view",
|
|
13
|
-
field=models.BooleanField(default=False),
|
|
14
|
-
),
|
|
15
|
-
]
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from django.db import migrations
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def create_and_assign_default_view(apps, schema_editor):
|
|
5
|
-
View = apps.get_model("netbox_dns", "View")
|
|
6
|
-
Zone = apps.get_model("netbox_dns", "Zone")
|
|
7
|
-
|
|
8
|
-
default_view = View.objects.create(
|
|
9
|
-
name="_default_",
|
|
10
|
-
description="Default View",
|
|
11
|
-
default_view=True,
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
for zone in Zone.objects.filter(view=None):
|
|
15
|
-
zone.view = default_view
|
|
16
|
-
zone.save()
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class Migration(migrations.Migration):
|
|
20
|
-
dependencies = [
|
|
21
|
-
("netbox_dns", "0003_default_view"),
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
operations = [
|
|
25
|
-
migrations.RunPython(create_and_assign_default_view),
|
|
26
|
-
]
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import django.db.models.deletion
|
|
2
|
-
from django.db import migrations, models
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Migration(migrations.Migration):
|
|
6
|
-
dependencies = [
|
|
7
|
-
("netbox_dns", "0004_create_and_assign_default_view"),
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
operations = [
|
|
11
|
-
migrations.AlterField(
|
|
12
|
-
model_name="zone",
|
|
13
|
-
name="view",
|
|
14
|
-
field=models.ForeignKey(
|
|
15
|
-
on_delete=django.db.models.deletion.PROTECT, to="netbox_dns.view"
|
|
16
|
-
),
|
|
17
|
-
),
|
|
18
|
-
]
|
netbox_dns/urls/__init__.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from .contact import contact_urlpatterns
|
|
2
|
-
from .nameserver import nameserver_urlpatterns
|
|
3
|
-
from .record import record_urlpatterns
|
|
4
|
-
from .registrar import registrar_urlpatterns
|
|
5
|
-
from .view import view_urlpatterns
|
|
6
|
-
from .zone import zone_urlpatterns
|
|
7
|
-
|
|
8
|
-
app_name = "netbox_dns"
|
|
9
|
-
|
|
10
|
-
urlpatterns = (
|
|
11
|
-
contact_urlpatterns
|
|
12
|
-
+ nameserver_urlpatterns
|
|
13
|
-
+ record_urlpatterns
|
|
14
|
-
+ registrar_urlpatterns
|
|
15
|
-
+ view_urlpatterns
|
|
16
|
-
+ zone_urlpatterns
|
|
17
|
-
)
|