netbox-plugin-dns 1.1.0__py3-none-any.whl → 1.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 +6 -9
- netbox_dns/api/nested_serializers.py +16 -17
- netbox_dns/api/serializers.py +1 -1
- netbox_dns/api/serializers_/{registration_contact.py → contact.py} +5 -5
- netbox_dns/api/serializers_/record.py +0 -1
- netbox_dns/api/serializers_/zone.py +5 -5
- netbox_dns/api/serializers_/zone_template.py +5 -5
- netbox_dns/api/urls.py +2 -2
- netbox_dns/api/views.py +35 -9
- netbox_dns/fields/ipam.py +3 -0
- netbox_dns/filtersets/__init__.py +1 -1
- netbox_dns/filtersets/{registration_contact.py → contact.py} +4 -4
- netbox_dns/filtersets/record.py +1 -1
- netbox_dns/filtersets/zone.py +15 -15
- netbox_dns/filtersets/zone_template.py +15 -15
- netbox_dns/forms/__init__.py +1 -1
- netbox_dns/forms/{registration_contact.py → contact.py} +16 -16
- netbox_dns/forms/view.py +7 -95
- netbox_dns/forms/zone.py +17 -22
- netbox_dns/forms/zone_template.py +13 -13
- netbox_dns/graphql/__init__.py +2 -2
- netbox_dns/graphql/filters.py +5 -5
- netbox_dns/graphql/schema.py +44 -24
- netbox_dns/graphql/types.py +12 -40
- netbox_dns/management/commands/{setup_dnssync.py → setup_autodns.py} +28 -48
- netbox_dns/migrations/{0008_view_prefixes.py → 0007_view_prefixes.py} +1 -1
- netbox_dns/models/__init__.py +1 -1
- netbox_dns/models/{registration_contact.py → contact.py} +9 -15
- netbox_dns/models/nameserver.py +3 -8
- netbox_dns/models/record.py +28 -93
- netbox_dns/models/record_template.py +1 -4
- netbox_dns/models/registrar.py +1 -7
- netbox_dns/models/view.py +2 -9
- netbox_dns/models/zone.py +22 -59
- netbox_dns/models/zone_template.py +9 -12
- netbox_dns/navigation.py +7 -7
- netbox_dns/signals/ipam_autodns.py +138 -0
- netbox_dns/tables/__init__.py +1 -1
- netbox_dns/tables/{registration_contact.py → contact.py} +6 -5
- netbox_dns/tables/nameserver.py +7 -1
- netbox_dns/tables/record.py +30 -43
- netbox_dns/tables/record_template.py +17 -0
- netbox_dns/tables/registrar.py +2 -0
- netbox_dns/tables/view.py +8 -1
- netbox_dns/tables/zone.py +15 -0
- netbox_dns/tables/zone_template.py +16 -2
- netbox_dns/template_content.py +2 -14
- netbox_dns/templates/netbox_dns/{registrationcontact.html → contact.html} +1 -1
- netbox_dns/templates/netbox_dns/view.html +7 -3
- netbox_dns/urls/__init__.py +2 -2
- netbox_dns/urls/contact.py +51 -0
- netbox_dns/urls/nameserver.py +38 -14
- netbox_dns/urls/record.py +19 -7
- netbox_dns/urls/record_template.py +27 -18
- netbox_dns/urls/registrar.py +35 -11
- netbox_dns/urls/view.py +20 -12
- netbox_dns/urls/zone.py +46 -8
- netbox_dns/urls/zone_template.py +26 -16
- netbox_dns/utilities/__init__.py +1 -1
- netbox_dns/utilities/{ipam_dnssync.py → ipam_autodns.py} +32 -122
- netbox_dns/validators/dns_name.py +0 -9
- netbox_dns/views/__init__.py +1 -1
- netbox_dns/views/contact.py +95 -0
- netbox_dns/views/nameserver.py +3 -7
- netbox_dns/views/record.py +7 -12
- netbox_dns/views/record_template.py +1 -1
- netbox_dns/views/registrar.py +1 -0
- netbox_dns/views/view.py +2 -32
- netbox_dns/views/zone.py +6 -7
- netbox_dns/views/zone_template.py +2 -2
- {netbox_plugin_dns-1.1.0.dist-info → netbox_plugin_dns-1.1.0b1.dist-info}/METADATA +2 -3
- netbox_plugin_dns-1.1.0b1.dist-info/RECORD +140 -0
- netbox_dns/management/commands/rebuild_dnssync.py +0 -18
- netbox_dns/migrations/0007_alter_ordering_options.py +0 -25
- netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -27
- netbox_dns/signals/ipam_dnssync.py +0 -224
- netbox_dns/tables/ipam_dnssync.py +0 -11
- netbox_dns/templates/netbox_dns/view/button.html +0 -9
- netbox_dns/templates/netbox_dns/view/prefix.html +0 -41
- netbox_dns/urls/registration_contact.py +0 -60
- netbox_dns/views/registration_contact.py +0 -94
- netbox_plugin_dns-1.1.0.dist-info/RECORD +0 -146
- {netbox_plugin_dns-1.1.0.dist-info → netbox_plugin_dns-1.1.0b1.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-1.1.0.dist-info → netbox_plugin_dns-1.1.0b1.dist-info}/WHEEL +0 -0
netbox_dns/tables/view.py
CHANGED
|
@@ -23,7 +23,14 @@ class ViewTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
23
23
|
|
|
24
24
|
class Meta(NetBoxTable.Meta):
|
|
25
25
|
model = View
|
|
26
|
-
fields = (
|
|
26
|
+
fields = (
|
|
27
|
+
"name",
|
|
28
|
+
"default_view",
|
|
29
|
+
"description",
|
|
30
|
+
"tenant",
|
|
31
|
+
"tenant_group",
|
|
32
|
+
"tags",
|
|
33
|
+
)
|
|
27
34
|
default_columns = ("name", "default_view")
|
|
28
35
|
|
|
29
36
|
|
netbox_dns/tables/zone.py
CHANGED
|
@@ -58,11 +58,26 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
58
58
|
class Meta(NetBoxTable.Meta):
|
|
59
59
|
model = Zone
|
|
60
60
|
fields = (
|
|
61
|
+
"name",
|
|
62
|
+
"view",
|
|
63
|
+
"status",
|
|
61
64
|
"description",
|
|
65
|
+
"tags",
|
|
66
|
+
"default_ttl",
|
|
67
|
+
"soa_mname",
|
|
62
68
|
"soa_rname",
|
|
63
69
|
"soa_serial",
|
|
70
|
+
"rfc2317_prefix",
|
|
64
71
|
"rfc2317_parent_managed",
|
|
72
|
+
"rfc2317_parent_zone",
|
|
73
|
+
"registrar",
|
|
65
74
|
"registry_domain_id",
|
|
75
|
+
"registrant",
|
|
76
|
+
"admin_c",
|
|
77
|
+
"tech_c",
|
|
78
|
+
"billing_c",
|
|
79
|
+
"tenant",
|
|
80
|
+
"tenant_group",
|
|
66
81
|
)
|
|
67
82
|
default_columns = (
|
|
68
83
|
"name",
|
|
@@ -37,7 +37,18 @@ class ZoneTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
37
37
|
|
|
38
38
|
class Meta(NetBoxTable.Meta):
|
|
39
39
|
model = ZoneTemplate
|
|
40
|
-
fields = (
|
|
40
|
+
fields = (
|
|
41
|
+
"name",
|
|
42
|
+
"description",
|
|
43
|
+
"tags",
|
|
44
|
+
"registrar",
|
|
45
|
+
"registrant",
|
|
46
|
+
"admin_c",
|
|
47
|
+
"tech_c",
|
|
48
|
+
"billing_c",
|
|
49
|
+
"tenant",
|
|
50
|
+
"tenant_group",
|
|
51
|
+
)
|
|
41
52
|
default_columns = (
|
|
42
53
|
"name",
|
|
43
54
|
"tags",
|
|
@@ -49,7 +60,10 @@ class ZoneTemplateDisplayTable(ZoneTemplateTable):
|
|
|
49
60
|
|
|
50
61
|
class Meta(NetBoxTable.Meta):
|
|
51
62
|
model = ZoneTemplate
|
|
52
|
-
fields = (
|
|
63
|
+
fields = (
|
|
64
|
+
"name",
|
|
65
|
+
"description",
|
|
66
|
+
)
|
|
53
67
|
default_columns = (
|
|
54
68
|
"name",
|
|
55
69
|
"description",
|
netbox_dns/template_content.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from django.conf import settings
|
|
2
|
-
from django.urls import reverse
|
|
3
2
|
|
|
4
3
|
from netbox.plugins.utils import get_plugin_config
|
|
5
4
|
from netbox.plugins import PluginTemplateExtension
|
|
6
5
|
|
|
7
|
-
from netbox_dns.models import Record
|
|
6
|
+
from netbox_dns.models import Record, Zone, View, NameServer
|
|
8
7
|
from netbox_dns.choices import RecordTypeChoices
|
|
9
8
|
from netbox_dns.tables import RelatedRecordTable, RelatedViewTable
|
|
10
9
|
from netbox_dns.utilities import get_views_by_prefix
|
|
@@ -64,17 +63,6 @@ class RelatedDNSViews(PluginTemplateExtension):
|
|
|
64
63
|
extra_context=context,
|
|
65
64
|
)
|
|
66
65
|
|
|
67
|
-
def buttons(self):
|
|
68
|
-
return self.render(
|
|
69
|
-
"netbox_dns/view/button.html",
|
|
70
|
-
extra_context={
|
|
71
|
-
"url": reverse(
|
|
72
|
-
"plugins:netbox_dns:prefix_views",
|
|
73
|
-
kwargs={"pk": self.context.get("object").pk},
|
|
74
|
-
),
|
|
75
|
-
},
|
|
76
|
-
)
|
|
77
|
-
|
|
78
66
|
|
|
79
67
|
class IPRelatedDNSRecords(PluginTemplateExtension):
|
|
80
68
|
model = "ipam.ipaddress"
|
|
@@ -114,7 +102,7 @@ class IPRelatedDNSRecords(PluginTemplateExtension):
|
|
|
114
102
|
)
|
|
115
103
|
|
|
116
104
|
|
|
117
|
-
if not settings.PLUGINS_CONFIG["netbox_dns"].get("
|
|
105
|
+
if not settings.PLUGINS_CONFIG["netbox_dns"].get("autodns_disabled"):
|
|
118
106
|
template_extensions = [RelatedDNSRecords, RelatedDNSViews]
|
|
119
107
|
else:
|
|
120
108
|
template_extensions = []
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
<div class="col col-md-6">
|
|
37
37
|
{% include 'inc/panels/tags.html' %}
|
|
38
|
-
{% if not settings.PLUGINS_CONFIG.netbox_dns.
|
|
38
|
+
{% if not settings.PLUGINS_CONFIG.netbox_dns.autodns_disabled %}
|
|
39
39
|
<div class="card">
|
|
40
40
|
<h5 class="card-header">
|
|
41
41
|
IPAM Prefixes
|
|
@@ -45,11 +45,15 @@
|
|
|
45
45
|
{% for prefix in object.prefixes.all %}
|
|
46
46
|
<tr>
|
|
47
47
|
<td>
|
|
48
|
-
{
|
|
48
|
+
<a href="{% url 'ipam:prefix' pk=prefix.pk %}">
|
|
49
|
+
{{ prefix }}
|
|
50
|
+
</a>
|
|
49
51
|
</td>
|
|
50
52
|
{% if prefix.vrf %}
|
|
51
53
|
<td>
|
|
52
|
-
{
|
|
54
|
+
<a href="{% url 'ipam:vrf' pk=prefix.vrf.pk %}">
|
|
55
|
+
{{ prefix.vrf }}
|
|
56
|
+
</a>
|
|
53
57
|
</td>
|
|
54
58
|
{% else %}
|
|
55
59
|
<td>Global</td>
|
netbox_dns/urls/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .
|
|
1
|
+
from .contact import contact_urlpatterns
|
|
2
2
|
from .nameserver import nameserver_urlpatterns
|
|
3
3
|
from .record import record_urlpatterns
|
|
4
4
|
from .record_template import recordtemplate_urlpatterns
|
|
@@ -10,7 +10,7 @@ from .zone_template import zonetemplate_urlpatterns
|
|
|
10
10
|
app_name = "netbox_dns"
|
|
11
11
|
|
|
12
12
|
urlpatterns = (
|
|
13
|
-
|
|
13
|
+
contact_urlpatterns
|
|
14
14
|
+ nameserver_urlpatterns
|
|
15
15
|
+ record_urlpatterns
|
|
16
16
|
+ recordtemplate_urlpatterns
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from django.urls import path
|
|
2
|
+
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
|
+
|
|
5
|
+
from netbox_dns.models import Contact
|
|
6
|
+
from netbox_dns.views import (
|
|
7
|
+
ContactListView,
|
|
8
|
+
ContactView,
|
|
9
|
+
ContactDeleteView,
|
|
10
|
+
ContactEditView,
|
|
11
|
+
ContactBulkImportView,
|
|
12
|
+
ContactBulkEditView,
|
|
13
|
+
ContactBulkDeleteView,
|
|
14
|
+
ContactZoneListView,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
contact_urlpatterns = [
|
|
18
|
+
path("contacts/", ContactListView.as_view(), name="contact_list"),
|
|
19
|
+
path("contacts/add/", ContactEditView.as_view(), name="contact_add"),
|
|
20
|
+
path("contacts/import/", ContactBulkImportView.as_view(), name="contact_import"),
|
|
21
|
+
path("contacts/edit/", ContactBulkEditView.as_view(), name="contact_bulk_edit"),
|
|
22
|
+
path(
|
|
23
|
+
"contacts/delete/",
|
|
24
|
+
ContactBulkDeleteView.as_view(),
|
|
25
|
+
name="contact_bulk_delete",
|
|
26
|
+
),
|
|
27
|
+
path("contacts/<int:pk>/", ContactView.as_view(), name="contact"),
|
|
28
|
+
path("contacts/<int:pk>/edit/", ContactEditView.as_view(), name="contact_edit"),
|
|
29
|
+
path(
|
|
30
|
+
"contacts/<int:pk>/delete/",
|
|
31
|
+
ContactDeleteView.as_view(),
|
|
32
|
+
name="contact_delete",
|
|
33
|
+
),
|
|
34
|
+
path(
|
|
35
|
+
"contacts/<int:pk>/zones/",
|
|
36
|
+
ContactZoneListView.as_view(),
|
|
37
|
+
name="contact_zones",
|
|
38
|
+
),
|
|
39
|
+
path(
|
|
40
|
+
"contacts/<int:pk>/journal/",
|
|
41
|
+
ObjectJournalView.as_view(),
|
|
42
|
+
name="contact_journal",
|
|
43
|
+
kwargs={"model": Contact},
|
|
44
|
+
),
|
|
45
|
+
path(
|
|
46
|
+
"contacts/<int:pk>/changelog/",
|
|
47
|
+
ObjectChangeLogView.as_view(),
|
|
48
|
+
name="contact_changelog",
|
|
49
|
+
kwargs={"model": Contact},
|
|
50
|
+
),
|
|
51
|
+
]
|
netbox_dns/urls/nameserver.py
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
|
-
from django.urls import
|
|
1
|
+
from django.urls import path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
4
|
|
|
5
|
+
from netbox_dns.models import NameServer
|
|
5
6
|
from netbox_dns.views import (
|
|
6
|
-
NameServerView,
|
|
7
7
|
NameServerListView,
|
|
8
|
+
NameServerView,
|
|
8
9
|
NameServerEditView,
|
|
9
10
|
NameServerDeleteView,
|
|
10
11
|
NameServerBulkImportView,
|
|
11
12
|
NameServerBulkEditView,
|
|
12
13
|
NameServerBulkDeleteView,
|
|
14
|
+
NameServerZoneListView,
|
|
15
|
+
NameServerSOAZoneListView,
|
|
13
16
|
)
|
|
14
17
|
|
|
15
18
|
nameserver_urlpatterns = [
|
|
16
|
-
path("nameservers/<int:pk>/", NameServerView.as_view(), name="nameserver"),
|
|
17
19
|
path("nameservers/", NameServerListView.as_view(), name="nameserver_list"),
|
|
18
20
|
path("nameservers/add/", NameServerEditView.as_view(), name="nameserver_add"),
|
|
21
|
+
path(
|
|
22
|
+
"nameservers/import/",
|
|
23
|
+
NameServerBulkImportView.as_view(),
|
|
24
|
+
name="nameserver_import",
|
|
25
|
+
),
|
|
26
|
+
path(
|
|
27
|
+
"nameservers/edit/",
|
|
28
|
+
NameServerBulkEditView.as_view(),
|
|
29
|
+
name="nameserver_bulk_edit",
|
|
30
|
+
),
|
|
31
|
+
path(
|
|
32
|
+
"nameservers/delete/",
|
|
33
|
+
NameServerBulkDeleteView.as_view(),
|
|
34
|
+
name="nameserver_bulk_delete",
|
|
35
|
+
),
|
|
36
|
+
path("nameservers/<int:pk>/", NameServerView.as_view(), name="nameserver"),
|
|
19
37
|
path(
|
|
20
38
|
"nameservers/<int:pk>/edit",
|
|
21
39
|
NameServerEditView.as_view(),
|
|
@@ -27,19 +45,25 @@ nameserver_urlpatterns = [
|
|
|
27
45
|
name="nameserver_delete",
|
|
28
46
|
),
|
|
29
47
|
path(
|
|
30
|
-
"nameservers/
|
|
31
|
-
|
|
32
|
-
name="
|
|
48
|
+
"nameservers/<int:pk>/journal/",
|
|
49
|
+
ObjectJournalView.as_view(),
|
|
50
|
+
name="nameserver_journal",
|
|
51
|
+
kwargs={"model": NameServer},
|
|
33
52
|
),
|
|
34
53
|
path(
|
|
35
|
-
"nameservers/
|
|
36
|
-
|
|
37
|
-
name="
|
|
54
|
+
"nameservers/<int:pk>/changelog/",
|
|
55
|
+
ObjectChangeLogView.as_view(),
|
|
56
|
+
name="nameserver_changelog",
|
|
57
|
+
kwargs={"model": NameServer},
|
|
38
58
|
),
|
|
39
59
|
path(
|
|
40
|
-
"nameservers/
|
|
41
|
-
|
|
42
|
-
name="
|
|
60
|
+
"nameservers/<int:pk>/zones/",
|
|
61
|
+
NameServerZoneListView.as_view(),
|
|
62
|
+
name="nameserver_zones",
|
|
63
|
+
),
|
|
64
|
+
path(
|
|
65
|
+
"nameservers/<int:pk>/soazones/",
|
|
66
|
+
NameServerSOAZoneListView.as_view(),
|
|
67
|
+
name="nameserver_soa_zones",
|
|
43
68
|
),
|
|
44
|
-
path("nameservers/<int:pk>/", include(get_model_urls("netbox_dns", "nameserver"))),
|
|
45
69
|
]
|
netbox_dns/urls/record.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from django.urls import
|
|
1
|
+
from django.urls import path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
4
|
|
|
5
|
+
from netbox_dns.models import Record
|
|
5
6
|
from netbox_dns.views import (
|
|
6
|
-
RecordView,
|
|
7
7
|
RecordListView,
|
|
8
|
+
RecordView,
|
|
8
9
|
RecordEditView,
|
|
9
10
|
RecordDeleteView,
|
|
10
11
|
RecordBulkImportView,
|
|
@@ -14,15 +15,26 @@ from netbox_dns.views import (
|
|
|
14
15
|
)
|
|
15
16
|
|
|
16
17
|
record_urlpatterns = [
|
|
17
|
-
path("records/<int:pk>/", RecordView.as_view(), name="record"),
|
|
18
18
|
path("records/", RecordListView.as_view(), name="record_list"),
|
|
19
19
|
path("records/add/", RecordEditView.as_view(), name="record_add"),
|
|
20
|
-
path("records/<int:pk>/edit/", RecordEditView.as_view(), name="record_edit"),
|
|
21
|
-
path("records/<int:pk>/delete/", RecordDeleteView.as_view(), name="record_delete"),
|
|
22
20
|
path("records/import/", RecordBulkImportView.as_view(), name="record_import"),
|
|
23
21
|
path("records/edit/", RecordBulkEditView.as_view(), name="record_bulk_edit"),
|
|
24
22
|
path("records/delete/", RecordBulkDeleteView.as_view(), name="record_bulk_delete"),
|
|
25
|
-
path("records/<int:pk>/",
|
|
23
|
+
path("records/<int:pk>/", RecordView.as_view(), name="record"),
|
|
24
|
+
path("records/<int:pk>/edit/", RecordEditView.as_view(), name="record_edit"),
|
|
25
|
+
path("records/<int:pk>/delete/", RecordDeleteView.as_view(), name="record_delete"),
|
|
26
|
+
path(
|
|
27
|
+
"records/<int:pk>/journal/",
|
|
28
|
+
ObjectJournalView.as_view(),
|
|
29
|
+
name="record_journal",
|
|
30
|
+
kwargs={"model": Record},
|
|
31
|
+
),
|
|
32
|
+
path(
|
|
33
|
+
"records/<int:pk>/changelog/",
|
|
34
|
+
ObjectChangeLogView.as_view(),
|
|
35
|
+
name="record_changelog",
|
|
36
|
+
kwargs={"model": Record},
|
|
37
|
+
),
|
|
26
38
|
path(
|
|
27
39
|
"managedrecords/", ManagedRecordListView.as_view(), name="managed_record_list"
|
|
28
40
|
),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from django.urls import
|
|
1
|
+
from django.urls import path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
4
|
|
|
5
|
+
from netbox_dns.models import RecordTemplate
|
|
5
6
|
from netbox_dns.views import (
|
|
6
|
-
RecordTemplateView,
|
|
7
7
|
RecordTemplateListView,
|
|
8
|
+
RecordTemplateView,
|
|
8
9
|
RecordTemplateEditView,
|
|
9
10
|
RecordTemplateDeleteView,
|
|
10
11
|
RecordTemplateBulkImportView,
|
|
@@ -13,9 +14,6 @@ from netbox_dns.views import (
|
|
|
13
14
|
)
|
|
14
15
|
|
|
15
16
|
recordtemplate_urlpatterns = [
|
|
16
|
-
path(
|
|
17
|
-
"recordtemplates/<int:pk>/", RecordTemplateView.as_view(), name="recordtemplate"
|
|
18
|
-
),
|
|
19
17
|
path(
|
|
20
18
|
"recordtemplates/", RecordTemplateListView.as_view(), name="recordtemplate_list"
|
|
21
19
|
),
|
|
@@ -24,16 +22,6 @@ recordtemplate_urlpatterns = [
|
|
|
24
22
|
RecordTemplateEditView.as_view(),
|
|
25
23
|
name="recordtemplate_add",
|
|
26
24
|
),
|
|
27
|
-
path(
|
|
28
|
-
"recordtemplates/<int:pk>/edit/",
|
|
29
|
-
RecordTemplateEditView.as_view(),
|
|
30
|
-
name="recordtemplate_edit",
|
|
31
|
-
),
|
|
32
|
-
path(
|
|
33
|
-
"recordtemplates/<int:pk>/delete/",
|
|
34
|
-
RecordTemplateDeleteView.as_view(),
|
|
35
|
-
name="recordtemplate_delete",
|
|
36
|
-
),
|
|
37
25
|
path(
|
|
38
26
|
"recordtemplates/import/",
|
|
39
27
|
RecordTemplateBulkImportView.as_view(),
|
|
@@ -50,7 +38,28 @@ recordtemplate_urlpatterns = [
|
|
|
50
38
|
name="recordtemplate_bulk_delete",
|
|
51
39
|
),
|
|
52
40
|
path(
|
|
53
|
-
"recordtemplates/<int:pk>/",
|
|
54
|
-
|
|
41
|
+
"recordtemplates/<int:pk>/", RecordTemplateView.as_view(), name="recordtemplate"
|
|
42
|
+
),
|
|
43
|
+
path(
|
|
44
|
+
"recordtemplates/<int:pk>/edit/",
|
|
45
|
+
RecordTemplateEditView.as_view(),
|
|
46
|
+
name="recordtemplate_edit",
|
|
47
|
+
),
|
|
48
|
+
path(
|
|
49
|
+
"recordtemplates/<int:pk>/delete/",
|
|
50
|
+
RecordTemplateDeleteView.as_view(),
|
|
51
|
+
name="recordtemplate_delete",
|
|
52
|
+
),
|
|
53
|
+
path(
|
|
54
|
+
"recordtemplates/<int:pk>/journal/",
|
|
55
|
+
ObjectJournalView.as_view(),
|
|
56
|
+
name="recordtemplate_journal",
|
|
57
|
+
kwargs={"model": RecordTemplate},
|
|
58
|
+
),
|
|
59
|
+
path(
|
|
60
|
+
"recordtemplates/<int:pk>/changelog/",
|
|
61
|
+
ObjectChangeLogView.as_view(),
|
|
62
|
+
name="recordtemplate_changelog",
|
|
63
|
+
kwargs={"model": RecordTemplate},
|
|
55
64
|
),
|
|
56
65
|
]
|
netbox_dns/urls/registrar.py
CHANGED
|
@@ -1,39 +1,63 @@
|
|
|
1
|
-
from django.urls import
|
|
1
|
+
from django.urls import path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
4
|
|
|
5
|
+
from netbox_dns.models import Registrar
|
|
5
6
|
from netbox_dns.views import (
|
|
6
|
-
RegistrarView,
|
|
7
7
|
RegistrarListView,
|
|
8
|
-
|
|
8
|
+
RegistrarView,
|
|
9
9
|
RegistrarDeleteView,
|
|
10
|
+
RegistrarEditView,
|
|
10
11
|
RegistrarBulkImportView,
|
|
11
12
|
RegistrarBulkEditView,
|
|
12
13
|
RegistrarBulkDeleteView,
|
|
14
|
+
RegistrarZoneListView,
|
|
13
15
|
)
|
|
14
16
|
|
|
15
17
|
registrar_urlpatterns = [
|
|
16
|
-
path("registrars/<int:pk>/", RegistrarView.as_view(), name="registrar"),
|
|
17
18
|
path("registrars/", RegistrarListView.as_view(), name="registrar_list"),
|
|
18
19
|
path("registrars/add/", RegistrarEditView.as_view(), name="registrar_add"),
|
|
19
20
|
path(
|
|
20
|
-
"registrars
|
|
21
|
+
"registrars/import/",
|
|
22
|
+
RegistrarBulkImportView.as_view(),
|
|
23
|
+
name="registrar_import",
|
|
24
|
+
),
|
|
25
|
+
path(
|
|
26
|
+
"registrars/edit/",
|
|
27
|
+
RegistrarBulkEditView.as_view(),
|
|
28
|
+
name="registrar_bulk_edit",
|
|
21
29
|
),
|
|
22
30
|
path(
|
|
23
31
|
"registrars/delete/",
|
|
24
32
|
RegistrarBulkDeleteView.as_view(),
|
|
25
33
|
name="registrar_bulk_delete",
|
|
26
34
|
),
|
|
35
|
+
path("registrars/<int:pk>/", RegistrarView.as_view(), name="registrar"),
|
|
27
36
|
path(
|
|
28
|
-
"registrars/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"registrars/edit/", RegistrarBulkEditView.as_view(), name="registrar_bulk_edit"
|
|
37
|
+
"registrars/<int:pk>/edit/",
|
|
38
|
+
RegistrarEditView.as_view(),
|
|
39
|
+
name="registrar_edit",
|
|
32
40
|
),
|
|
33
41
|
path(
|
|
34
42
|
"registrars/<int:pk>/delete/",
|
|
35
43
|
RegistrarDeleteView.as_view(),
|
|
36
44
|
name="registrar_delete",
|
|
37
45
|
),
|
|
38
|
-
path(
|
|
46
|
+
path(
|
|
47
|
+
"registrars/<int:pk>/zones/",
|
|
48
|
+
RegistrarZoneListView.as_view(),
|
|
49
|
+
name="registrar_zones",
|
|
50
|
+
),
|
|
51
|
+
path(
|
|
52
|
+
"registrars/<int:pk>/journal/",
|
|
53
|
+
ObjectJournalView.as_view(),
|
|
54
|
+
name="registrar_journal",
|
|
55
|
+
kwargs={"model": Registrar},
|
|
56
|
+
),
|
|
57
|
+
path(
|
|
58
|
+
"registrars/<int:pk>/changelog/",
|
|
59
|
+
ObjectChangeLogView.as_view(),
|
|
60
|
+
name="registrar_changelog",
|
|
61
|
+
kwargs={"model": Registrar},
|
|
62
|
+
),
|
|
39
63
|
]
|
netbox_dns/urls/view.py
CHANGED
|
@@ -1,31 +1,39 @@
|
|
|
1
|
-
from django.urls import
|
|
1
|
+
from django.urls import path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
4
|
|
|
5
|
+
from netbox_dns.models import View
|
|
5
6
|
from netbox_dns.views import (
|
|
6
|
-
ViewView,
|
|
7
7
|
ViewListView,
|
|
8
|
-
|
|
8
|
+
ViewView,
|
|
9
9
|
ViewDeleteView,
|
|
10
|
+
ViewEditView,
|
|
10
11
|
ViewBulkImportView,
|
|
11
12
|
ViewBulkEditView,
|
|
12
13
|
ViewBulkDeleteView,
|
|
13
|
-
|
|
14
|
+
ViewZoneListView,
|
|
14
15
|
)
|
|
15
16
|
|
|
16
17
|
view_urlpatterns = [
|
|
17
|
-
path("views/<int:pk>/", ViewView.as_view(), name="view"),
|
|
18
18
|
path("views/", ViewListView.as_view(), name="view_list"),
|
|
19
19
|
path("views/add/", ViewEditView.as_view(), name="view_add"),
|
|
20
|
-
path("views/<int:pk>/edit/", ViewEditView.as_view(), name="view_edit"),
|
|
21
|
-
path("views/<int:pk>/delete/", ViewDeleteView.as_view(), name="view_delete"),
|
|
22
20
|
path("views/import/", ViewBulkImportView.as_view(), name="view_import"),
|
|
23
21
|
path("views/edit/", ViewBulkEditView.as_view(), name="view_bulk_edit"),
|
|
24
22
|
path("views/delete/", ViewBulkDeleteView.as_view(), name="view_bulk_delete"),
|
|
25
|
-
path("views/<int:pk>/",
|
|
23
|
+
path("views/<int:pk>/", ViewView.as_view(), name="view"),
|
|
24
|
+
path("views/<int:pk>/edit/", ViewEditView.as_view(), name="view_edit"),
|
|
25
|
+
path("views/<int:pk>/delete/", ViewDeleteView.as_view(), name="view_delete"),
|
|
26
|
+
path("views/<int:pk>/zones/", ViewZoneListView.as_view(), name="view_zones"),
|
|
27
|
+
path(
|
|
28
|
+
"views/<int:pk>/journal/",
|
|
29
|
+
ObjectJournalView.as_view(),
|
|
30
|
+
name="view_journal",
|
|
31
|
+
kwargs={"model": View},
|
|
32
|
+
),
|
|
26
33
|
path(
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
name="
|
|
34
|
+
"views/<int:pk>/changelog/",
|
|
35
|
+
ObjectChangeLogView.as_view(),
|
|
36
|
+
name="view_changelog",
|
|
37
|
+
kwargs={"model": View},
|
|
30
38
|
),
|
|
31
39
|
]
|
netbox_dns/urls/zone.py
CHANGED
|
@@ -1,25 +1,63 @@
|
|
|
1
|
-
from django.urls import
|
|
1
|
+
from django.urls import path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from netbox.views.generic import ObjectChangeLogView, ObjectJournalView
|
|
4
4
|
|
|
5
|
+
from netbox_dns.models import Zone
|
|
5
6
|
from netbox_dns.views import (
|
|
6
|
-
ZoneView,
|
|
7
7
|
ZoneListView,
|
|
8
|
-
|
|
8
|
+
ZoneView,
|
|
9
9
|
ZoneDeleteView,
|
|
10
|
+
ZoneEditView,
|
|
10
11
|
ZoneBulkImportView,
|
|
11
12
|
ZoneBulkEditView,
|
|
12
13
|
ZoneBulkDeleteView,
|
|
14
|
+
ZoneRecordListView,
|
|
15
|
+
ZoneManagedRecordListView,
|
|
16
|
+
ZoneRegistrationView,
|
|
17
|
+
ZoneRFC2317ChildZoneListView,
|
|
18
|
+
ZoneChildZoneListView,
|
|
13
19
|
)
|
|
14
20
|
|
|
15
21
|
zone_urlpatterns = [
|
|
16
|
-
path("zones/<int:pk>/", ZoneView.as_view(), name="zone"),
|
|
17
22
|
path("zones/", ZoneListView.as_view(), name="zone_list"),
|
|
18
23
|
path("zones/add/", ZoneEditView.as_view(), name="zone_add"),
|
|
19
|
-
path("zones/<int:pk>/edit/", ZoneEditView.as_view(), name="zone_edit"),
|
|
20
|
-
path("zones/<int:pk>/delete/", ZoneDeleteView.as_view(), name="zone_delete"),
|
|
21
24
|
path("zones/import/", ZoneBulkImportView.as_view(), name="zone_import"),
|
|
22
25
|
path("zones/edit/", ZoneBulkEditView.as_view(), name="zone_bulk_edit"),
|
|
23
26
|
path("zones/delete/", ZoneBulkDeleteView.as_view(), name="zone_bulk_delete"),
|
|
24
|
-
path("zones/<int:pk>/",
|
|
27
|
+
path("zones/<int:pk>/", ZoneView.as_view(), name="zone"),
|
|
28
|
+
path("zones/<int:pk>/delete/", ZoneDeleteView.as_view(), name="zone_delete"),
|
|
29
|
+
path("zones/<int:pk>/edit/", ZoneEditView.as_view(), name="zone_edit"),
|
|
30
|
+
path("zones/<int:pk>/records/", ZoneRecordListView.as_view(), name="zone_records"),
|
|
31
|
+
path(
|
|
32
|
+
"zones/<int:pk>/managedrecords/",
|
|
33
|
+
ZoneManagedRecordListView.as_view(),
|
|
34
|
+
name="zone_managed_records",
|
|
35
|
+
),
|
|
36
|
+
path(
|
|
37
|
+
"zones/<int:pk>/rfc2317childzones/",
|
|
38
|
+
ZoneRFC2317ChildZoneListView.as_view(),
|
|
39
|
+
name="zone_rfc2317_child_zones",
|
|
40
|
+
),
|
|
41
|
+
path(
|
|
42
|
+
"zones/<int:pk>/childzones/",
|
|
43
|
+
ZoneChildZoneListView.as_view(),
|
|
44
|
+
name="zone_child_zones",
|
|
45
|
+
),
|
|
46
|
+
path(
|
|
47
|
+
"zones/<int:pk>/registration/",
|
|
48
|
+
ZoneRegistrationView.as_view(),
|
|
49
|
+
name="zone_registration",
|
|
50
|
+
),
|
|
51
|
+
path(
|
|
52
|
+
"zones/<int:pk>/journal/",
|
|
53
|
+
ObjectJournalView.as_view(),
|
|
54
|
+
name="zone_journal",
|
|
55
|
+
kwargs={"model": Zone},
|
|
56
|
+
),
|
|
57
|
+
path(
|
|
58
|
+
"zones/<int:pk>/changelog/",
|
|
59
|
+
ObjectChangeLogView.as_view(),
|
|
60
|
+
name="zone_changelog",
|
|
61
|
+
kwargs={"model": Zone},
|
|
62
|
+
),
|
|
25
63
|
]
|