netbox-plugin-dns 1.1.0b7__py3-none-any.whl → 1.1.2__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 -2
- netbox_dns/api/nested_serializers.py +17 -16
- netbox_dns/api/serializers.py +1 -1
- netbox_dns/api/serializers_/record.py +1 -0
- netbox_dns/api/serializers_/{contact.py → registration_contact.py} +5 -5
- netbox_dns/api/serializers_/view.py +1 -0
- 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 +7 -35
- netbox_dns/filtersets/__init__.py +1 -1
- netbox_dns/filtersets/nameserver.py +0 -0
- netbox_dns/filtersets/record.py +0 -0
- netbox_dns/filtersets/record_template.py +0 -0
- netbox_dns/filtersets/{contact.py → registration_contact.py} +4 -4
- 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/nameserver.py +0 -0
- netbox_dns/forms/record.py +0 -0
- netbox_dns/forms/record_template.py +0 -0
- netbox_dns/forms/{contact.py → registration_contact.py} +16 -16
- netbox_dns/forms/view.py +29 -10
- netbox_dns/forms/zone.py +13 -13
- 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 +23 -53
- netbox_dns/graphql/types.py +39 -12
- netbox_dns/migrations/0007_alter_ordering_options.py +25 -0
- netbox_dns/migrations/{0007_view_prefixes.py → 0008_view_prefixes.py} +1 -1
- netbox_dns/migrations/0009_rename_contact_registrationcontact.py +36 -0
- netbox_dns/migrations/0010_view_ip_address_filter.py +18 -0
- netbox_dns/mixins/object_modification.py +30 -8
- netbox_dns/models/__init__.py +1 -1
- netbox_dns/models/nameserver.py +8 -3
- netbox_dns/models/record.py +47 -14
- netbox_dns/models/record_template.py +4 -1
- netbox_dns/models/registrar.py +7 -1
- netbox_dns/models/{contact.py → registration_contact.py} +15 -9
- netbox_dns/models/view.py +49 -2
- netbox_dns/models/zone.py +24 -18
- netbox_dns/models/zone_template.py +12 -9
- netbox_dns/navigation.py +7 -7
- netbox_dns/signals/ipam_dnssync.py +4 -4
- netbox_dns/tables/__init__.py +1 -1
- netbox_dns/tables/nameserver.py +1 -7
- netbox_dns/tables/record.py +10 -35
- netbox_dns/tables/record_template.py +0 -17
- netbox_dns/tables/registrar.py +0 -2
- netbox_dns/tables/{contact.py → registration_contact.py} +5 -6
- netbox_dns/tables/view.py +1 -8
- netbox_dns/tables/zone.py +0 -15
- netbox_dns/tables/zone_template.py +2 -16
- netbox_dns/templates/netbox_dns/{contact.html → registrationcontact.html} +1 -1
- netbox_dns/templates/netbox_dns/view.html +16 -0
- netbox_dns/urls/__init__.py +2 -2
- netbox_dns/urls/nameserver.py +14 -38
- netbox_dns/urls/record.py +7 -19
- netbox_dns/urls/record_template.py +18 -27
- netbox_dns/urls/registrar.py +11 -35
- netbox_dns/urls/registration_contact.py +60 -0
- netbox_dns/urls/view.py +8 -22
- netbox_dns/urls/zone.py +8 -46
- netbox_dns/urls/zone_template.py +16 -26
- netbox_dns/utilities/ipam_dnssync.py +58 -26
- netbox_dns/views/__init__.py +1 -1
- netbox_dns/views/nameserver.py +7 -3
- netbox_dns/views/record.py +12 -3
- netbox_dns/views/record_template.py +1 -1
- netbox_dns/views/registrar.py +0 -1
- netbox_dns/views/registration_contact.py +94 -0
- netbox_dns/views/view.py +6 -1
- netbox_dns/views/zone.py +7 -6
- netbox_dns/views/zone_template.py +2 -2
- {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/METADATA +14 -14
- {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/RECORD +80 -76
- {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/WHEEL +2 -1
- netbox_plugin_dns-1.1.2.dist-info/top_level.txt +1 -0
- netbox_dns/urls/contact.py +0 -51
- netbox_dns/views/contact.py +0 -95
- {netbox_plugin_dns-1.1.0b7.dist-info → netbox_plugin_dns-1.1.2.dist-info}/LICENSE +0 -0
|
@@ -52,7 +52,7 @@ def ipam_dnssync_ipaddress_post_clean(instance, **kwargs):
|
|
|
52
52
|
dns_name=instance.dns_name,
|
|
53
53
|
status__in=IPADDRESS_ACTIVE_STATUS,
|
|
54
54
|
)
|
|
55
|
-
if instance.
|
|
55
|
+
if not instance._state.adding:
|
|
56
56
|
duplicate_addresses = duplicate_addresses.exclude(pk=instance.pk)
|
|
57
57
|
|
|
58
58
|
if ENFORCE_UNIQUE_RECORDS and instance.status in IPADDRESS_ACTIVE_STATUS:
|
|
@@ -74,7 +74,7 @@ def ipam_dnssync_ipaddress_post_clean(instance, **kwargs):
|
|
|
74
74
|
if (request := current_request.get()) is not None:
|
|
75
75
|
cf_data = instance.custom_field_data
|
|
76
76
|
if (
|
|
77
|
-
instance.
|
|
77
|
+
not instance._state.adding
|
|
78
78
|
and any(
|
|
79
79
|
(
|
|
80
80
|
cf_data.get(cf, cf_default)
|
|
@@ -86,7 +86,7 @@ def ipam_dnssync_ipaddress_post_clean(instance, **kwargs):
|
|
|
86
86
|
)
|
|
87
87
|
and not check_record_permission()
|
|
88
88
|
) or (
|
|
89
|
-
instance.
|
|
89
|
+
instance._state.adding
|
|
90
90
|
and any(
|
|
91
91
|
(
|
|
92
92
|
cf_data.get(cf, cf_default) != cf_default
|
|
@@ -129,7 +129,7 @@ def ipam_dnssync_prefix_pre_save(instance, **kwargs):
|
|
|
129
129
|
"""
|
|
130
130
|
request = current_request.get()
|
|
131
131
|
|
|
132
|
-
if instance.
|
|
132
|
+
if instance._state.adding or not instance.netbox_dns_views.exists():
|
|
133
133
|
return
|
|
134
134
|
|
|
135
135
|
saved_prefix = Prefix.objects.prefetch_related("netbox_dns_views").get(
|
netbox_dns/tables/__init__.py
CHANGED
netbox_dns/tables/nameserver.py
CHANGED
|
@@ -22,13 +22,7 @@ class NameServerTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
22
22
|
|
|
23
23
|
class Meta(NetBoxTable.Meta):
|
|
24
24
|
model = NameServer
|
|
25
|
-
fields = (
|
|
26
|
-
"name",
|
|
27
|
-
"description",
|
|
28
|
-
"tags",
|
|
29
|
-
"tenant",
|
|
30
|
-
"tenant_group",
|
|
31
|
-
)
|
|
25
|
+
fields = ("description",)
|
|
32
26
|
default_columns = (
|
|
33
27
|
"name",
|
|
34
28
|
"tags",
|
netbox_dns/tables/record.py
CHANGED
|
@@ -13,10 +13,6 @@ from tenancy.tables import TenancyColumnsMixin
|
|
|
13
13
|
from netbox_dns.models import Record
|
|
14
14
|
from netbox_dns.utilities import value_to_unicode
|
|
15
15
|
|
|
16
|
-
import logging
|
|
17
|
-
|
|
18
|
-
logger = logging.getLogger("netbox_dns")
|
|
19
|
-
|
|
20
16
|
|
|
21
17
|
__all__ = (
|
|
22
18
|
"RecordTable",
|
|
@@ -29,10 +25,18 @@ class RecordBaseTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
29
25
|
zone = tables.Column(
|
|
30
26
|
linkify=True,
|
|
31
27
|
)
|
|
28
|
+
view = tables.Column(
|
|
29
|
+
accessor="zone__view",
|
|
30
|
+
linkify=True,
|
|
31
|
+
)
|
|
32
32
|
type = tables.Column()
|
|
33
33
|
name = tables.Column(
|
|
34
34
|
linkify=True,
|
|
35
35
|
)
|
|
36
|
+
fqdn = tables.Column(
|
|
37
|
+
verbose_name="FQDN",
|
|
38
|
+
linkify=True,
|
|
39
|
+
)
|
|
36
40
|
value = tables.TemplateColumn(
|
|
37
41
|
template_code="{{ value|truncatechars:64 }}",
|
|
38
42
|
)
|
|
@@ -71,20 +75,8 @@ class RecordTable(RecordBaseTable):
|
|
|
71
75
|
class Meta(NetBoxTable.Meta):
|
|
72
76
|
model = Record
|
|
73
77
|
fields = (
|
|
74
|
-
"name",
|
|
75
|
-
"zone",
|
|
76
|
-
"ttl",
|
|
77
|
-
"type",
|
|
78
|
-
"value",
|
|
79
|
-
"unicode_value",
|
|
80
78
|
"status",
|
|
81
|
-
"disable_ptr",
|
|
82
|
-
"ptr_record",
|
|
83
|
-
"tags",
|
|
84
|
-
"active",
|
|
85
79
|
"description",
|
|
86
|
-
"tenant",
|
|
87
|
-
"tenant_group",
|
|
88
80
|
)
|
|
89
81
|
default_columns = (
|
|
90
82
|
"name",
|
|
@@ -115,18 +107,7 @@ class ManagedRecordTable(RecordBaseTable):
|
|
|
115
107
|
|
|
116
108
|
class Meta(NetBoxTable.Meta):
|
|
117
109
|
model = Record
|
|
118
|
-
fields = (
|
|
119
|
-
"name",
|
|
120
|
-
"zone",
|
|
121
|
-
"ttl",
|
|
122
|
-
"type",
|
|
123
|
-
"value",
|
|
124
|
-
"unicode_value",
|
|
125
|
-
"address_record",
|
|
126
|
-
"ipam_ip_address",
|
|
127
|
-
"related_ip_address",
|
|
128
|
-
"active",
|
|
129
|
-
)
|
|
110
|
+
fields = ()
|
|
130
111
|
default_columns = (
|
|
131
112
|
"name",
|
|
132
113
|
"zone",
|
|
@@ -164,13 +145,7 @@ class RelatedRecordTable(RecordBaseTable):
|
|
|
164
145
|
|
|
165
146
|
class Meta(NetBoxTable.Meta):
|
|
166
147
|
model = Record
|
|
167
|
-
fields = (
|
|
168
|
-
"name",
|
|
169
|
-
"zone",
|
|
170
|
-
"type",
|
|
171
|
-
"value",
|
|
172
|
-
"unicode_value",
|
|
173
|
-
)
|
|
148
|
+
fields = ()
|
|
174
149
|
default_columns = (
|
|
175
150
|
"name",
|
|
176
151
|
"zone",
|
|
@@ -43,18 +43,8 @@ class RecordTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
43
43
|
class Meta(NetBoxTable.Meta):
|
|
44
44
|
model = RecordTemplate
|
|
45
45
|
fields = (
|
|
46
|
-
"name",
|
|
47
|
-
"record_name",
|
|
48
|
-
"ttl",
|
|
49
|
-
"type",
|
|
50
|
-
"value",
|
|
51
|
-
"unicode_value",
|
|
52
46
|
"status",
|
|
53
|
-
"disable_ptr",
|
|
54
|
-
"tags",
|
|
55
47
|
"description",
|
|
56
|
-
"tenant",
|
|
57
|
-
"tenant_group",
|
|
58
48
|
)
|
|
59
49
|
default_columns = (
|
|
60
50
|
"name",
|
|
@@ -72,14 +62,7 @@ class RecordTemplateDisplayTable(RecordTemplateTable):
|
|
|
72
62
|
class Meta(NetBoxTable.Meta):
|
|
73
63
|
model = RecordTemplate
|
|
74
64
|
fields = (
|
|
75
|
-
"name",
|
|
76
|
-
"record_name",
|
|
77
|
-
"ttl",
|
|
78
|
-
"type",
|
|
79
|
-
"value",
|
|
80
|
-
"unicode_value",
|
|
81
65
|
"status",
|
|
82
|
-
"disable_ptr",
|
|
83
66
|
"description",
|
|
84
67
|
)
|
|
85
68
|
default_columns = (
|
netbox_dns/tables/registrar.py
CHANGED
|
@@ -19,13 +19,11 @@ class RegistrarTable(NetBoxTable):
|
|
|
19
19
|
class Meta(NetBoxTable.Meta):
|
|
20
20
|
model = Registrar
|
|
21
21
|
fields = (
|
|
22
|
-
"name",
|
|
23
22
|
"description",
|
|
24
23
|
"iana_id",
|
|
25
24
|
"referral_url",
|
|
26
25
|
"whois_server",
|
|
27
26
|
"abuse_email",
|
|
28
27
|
"abuse_phone",
|
|
29
|
-
"tags",
|
|
30
28
|
)
|
|
31
29
|
default_columns = ("name", "iana_id", "referral_url")
|
|
@@ -2,24 +2,23 @@ import django_tables2 as tables
|
|
|
2
2
|
|
|
3
3
|
from netbox.tables import NetBoxTable, TagColumn
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import
|
|
5
|
+
from netbox_dns.models import RegistrationContact
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
__all__ = ("
|
|
8
|
+
__all__ = ("RegistrationContactTable",)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class RegistrationContactTable(NetBoxTable):
|
|
12
12
|
contact_id = tables.Column(
|
|
13
13
|
linkify=True,
|
|
14
14
|
)
|
|
15
15
|
tags = TagColumn(
|
|
16
|
-
url_name="plugins:netbox_dns:
|
|
16
|
+
url_name="plugins:netbox_dns:registrationcontact_list",
|
|
17
17
|
)
|
|
18
18
|
|
|
19
19
|
class Meta(NetBoxTable.Meta):
|
|
20
|
-
model =
|
|
20
|
+
model = RegistrationContact
|
|
21
21
|
fields = (
|
|
22
|
-
"contact_id",
|
|
23
22
|
"name",
|
|
24
23
|
"description",
|
|
25
24
|
"organization",
|
netbox_dns/tables/view.py
CHANGED
|
@@ -23,14 +23,7 @@ class ViewTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
23
23
|
|
|
24
24
|
class Meta(NetBoxTable.Meta):
|
|
25
25
|
model = View
|
|
26
|
-
fields = (
|
|
27
|
-
"name",
|
|
28
|
-
"default_view",
|
|
29
|
-
"description",
|
|
30
|
-
"tenant",
|
|
31
|
-
"tenant_group",
|
|
32
|
-
"tags",
|
|
33
|
-
)
|
|
26
|
+
fields = ("description", "ip_address_filter")
|
|
34
27
|
default_columns = ("name", "default_view")
|
|
35
28
|
|
|
36
29
|
|
netbox_dns/tables/zone.py
CHANGED
|
@@ -58,26 +58,11 @@ class ZoneTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
58
58
|
class Meta(NetBoxTable.Meta):
|
|
59
59
|
model = Zone
|
|
60
60
|
fields = (
|
|
61
|
-
"name",
|
|
62
|
-
"view",
|
|
63
|
-
"status",
|
|
64
61
|
"description",
|
|
65
|
-
"tags",
|
|
66
|
-
"default_ttl",
|
|
67
|
-
"soa_mname",
|
|
68
62
|
"soa_rname",
|
|
69
63
|
"soa_serial",
|
|
70
|
-
"rfc2317_prefix",
|
|
71
64
|
"rfc2317_parent_managed",
|
|
72
|
-
"rfc2317_parent_zone",
|
|
73
|
-
"registrar",
|
|
74
65
|
"registry_domain_id",
|
|
75
|
-
"registrant",
|
|
76
|
-
"admin_c",
|
|
77
|
-
"tech_c",
|
|
78
|
-
"billing_c",
|
|
79
|
-
"tenant",
|
|
80
|
-
"tenant_group",
|
|
81
66
|
)
|
|
82
67
|
default_columns = (
|
|
83
68
|
"name",
|
|
@@ -37,18 +37,7 @@ class ZoneTemplateTable(TenancyColumnsMixin, NetBoxTable):
|
|
|
37
37
|
|
|
38
38
|
class Meta(NetBoxTable.Meta):
|
|
39
39
|
model = ZoneTemplate
|
|
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
|
-
)
|
|
40
|
+
fields = ("description",)
|
|
52
41
|
default_columns = (
|
|
53
42
|
"name",
|
|
54
43
|
"tags",
|
|
@@ -60,10 +49,7 @@ class ZoneTemplateDisplayTable(ZoneTemplateTable):
|
|
|
60
49
|
|
|
61
50
|
class Meta(NetBoxTable.Meta):
|
|
62
51
|
model = ZoneTemplate
|
|
63
|
-
fields = (
|
|
64
|
-
"name",
|
|
65
|
-
"description",
|
|
66
|
-
)
|
|
52
|
+
fields = ("description",)
|
|
67
53
|
default_columns = (
|
|
68
54
|
"name",
|
|
69
55
|
"description",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
</h5>
|
|
43
43
|
<div class="card-body">
|
|
44
44
|
<table class="table table-hover attr-table">
|
|
45
|
+
{% if object.prefixes.exists %}
|
|
45
46
|
{% for prefix in object.prefixes.all %}
|
|
46
47
|
<tr>
|
|
47
48
|
<td>
|
|
@@ -56,9 +57,24 @@
|
|
|
56
57
|
{% endif %}
|
|
57
58
|
</tr>
|
|
58
59
|
{% endfor %}
|
|
60
|
+
{% else %}
|
|
61
|
+
<span class="text-muted">No prefixes assigned</span>
|
|
62
|
+
{% endif %}
|
|
59
63
|
</table>
|
|
60
64
|
</div>
|
|
61
65
|
</div>
|
|
66
|
+
<div class="card">
|
|
67
|
+
<h5 class="card-header">
|
|
68
|
+
IP Address Filters
|
|
69
|
+
</h5>
|
|
70
|
+
<div class="card-body">
|
|
71
|
+
{% if object.ip_address_filter %}
|
|
72
|
+
<pre>{{ object.ip_address_filter|json }}</pre>
|
|
73
|
+
{% else %}
|
|
74
|
+
<span class="text-muted">No filters defined</span>
|
|
75
|
+
{% endif %}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
62
78
|
{% endif %}
|
|
63
79
|
</div>
|
|
64
80
|
</div>
|
netbox_dns/urls/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .
|
|
1
|
+
from .registration_contact import registrationcontact_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
|
+
registrationcontact_urlpatterns
|
|
14
14
|
+ nameserver_urlpatterns
|
|
15
15
|
+ record_urlpatterns
|
|
16
16
|
+ recordtemplate_urlpatterns
|
netbox_dns/urls/nameserver.py
CHANGED
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
from django.urls import path
|
|
1
|
+
from django.urls import include, path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from utilities.urls import get_model_urls
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import NameServer
|
|
6
5
|
from netbox_dns.views import (
|
|
7
|
-
NameServerListView,
|
|
8
6
|
NameServerView,
|
|
7
|
+
NameServerListView,
|
|
9
8
|
NameServerEditView,
|
|
10
9
|
NameServerDeleteView,
|
|
11
10
|
NameServerBulkImportView,
|
|
12
11
|
NameServerBulkEditView,
|
|
13
12
|
NameServerBulkDeleteView,
|
|
14
|
-
NameServerZoneListView,
|
|
15
|
-
NameServerSOAZoneListView,
|
|
16
13
|
)
|
|
17
14
|
|
|
18
15
|
nameserver_urlpatterns = [
|
|
16
|
+
path("nameservers/<int:pk>/", NameServerView.as_view(), name="nameserver"),
|
|
19
17
|
path("nameservers/", NameServerListView.as_view(), name="nameserver_list"),
|
|
20
18
|
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"),
|
|
37
19
|
path(
|
|
38
20
|
"nameservers/<int:pk>/edit",
|
|
39
21
|
NameServerEditView.as_view(),
|
|
@@ -45,25 +27,19 @@ nameserver_urlpatterns = [
|
|
|
45
27
|
name="nameserver_delete",
|
|
46
28
|
),
|
|
47
29
|
path(
|
|
48
|
-
"nameservers
|
|
49
|
-
|
|
50
|
-
name="
|
|
51
|
-
kwargs={"model": NameServer},
|
|
52
|
-
),
|
|
53
|
-
path(
|
|
54
|
-
"nameservers/<int:pk>/changelog/",
|
|
55
|
-
ObjectChangeLogView.as_view(),
|
|
56
|
-
name="nameserver_changelog",
|
|
57
|
-
kwargs={"model": NameServer},
|
|
30
|
+
"nameservers/import/",
|
|
31
|
+
NameServerBulkImportView.as_view(),
|
|
32
|
+
name="nameserver_import",
|
|
58
33
|
),
|
|
59
34
|
path(
|
|
60
|
-
"nameservers
|
|
61
|
-
|
|
62
|
-
name="
|
|
35
|
+
"nameservers/edit/",
|
|
36
|
+
NameServerBulkEditView.as_view(),
|
|
37
|
+
name="nameserver_bulk_edit",
|
|
63
38
|
),
|
|
64
39
|
path(
|
|
65
|
-
"nameservers
|
|
66
|
-
|
|
67
|
-
name="
|
|
40
|
+
"nameservers/delete/",
|
|
41
|
+
NameServerBulkDeleteView.as_view(),
|
|
42
|
+
name="nameserver_bulk_delete",
|
|
68
43
|
),
|
|
44
|
+
path("nameservers/<int:pk>/", include(get_model_urls("netbox_dns", "nameserver"))),
|
|
69
45
|
]
|
netbox_dns/urls/record.py
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
from django.urls import path
|
|
1
|
+
from django.urls import include, path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from utilities.urls import get_model_urls
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import Record
|
|
6
5
|
from netbox_dns.views import (
|
|
7
|
-
RecordListView,
|
|
8
6
|
RecordView,
|
|
7
|
+
RecordListView,
|
|
9
8
|
RecordEditView,
|
|
10
9
|
RecordDeleteView,
|
|
11
10
|
RecordBulkImportView,
|
|
@@ -15,26 +14,15 @@ from netbox_dns.views import (
|
|
|
15
14
|
)
|
|
16
15
|
|
|
17
16
|
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"),
|
|
20
22
|
path("records/import/", RecordBulkImportView.as_view(), name="record_import"),
|
|
21
23
|
path("records/edit/", RecordBulkEditView.as_view(), name="record_bulk_edit"),
|
|
22
24
|
path("records/delete/", RecordBulkDeleteView.as_view(), name="record_bulk_delete"),
|
|
23
|
-
path("records/<int:pk>/",
|
|
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
|
-
),
|
|
25
|
+
path("records/<int:pk>/", include(get_model_urls("netbox_dns", "record"))),
|
|
38
26
|
path(
|
|
39
27
|
"managedrecords/", ManagedRecordListView.as_view(), name="managed_record_list"
|
|
40
28
|
),
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
from django.urls import path
|
|
1
|
+
from django.urls import include, path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from utilities.urls import get_model_urls
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import RecordTemplate
|
|
6
5
|
from netbox_dns.views import (
|
|
7
|
-
RecordTemplateListView,
|
|
8
6
|
RecordTemplateView,
|
|
7
|
+
RecordTemplateListView,
|
|
9
8
|
RecordTemplateEditView,
|
|
10
9
|
RecordTemplateDeleteView,
|
|
11
10
|
RecordTemplateBulkImportView,
|
|
@@ -14,6 +13,9 @@ from netbox_dns.views import (
|
|
|
14
13
|
)
|
|
15
14
|
|
|
16
15
|
recordtemplate_urlpatterns = [
|
|
16
|
+
path(
|
|
17
|
+
"recordtemplates/<int:pk>/", RecordTemplateView.as_view(), name="recordtemplate"
|
|
18
|
+
),
|
|
17
19
|
path(
|
|
18
20
|
"recordtemplates/", RecordTemplateListView.as_view(), name="recordtemplate_list"
|
|
19
21
|
),
|
|
@@ -22,6 +24,16 @@ recordtemplate_urlpatterns = [
|
|
|
22
24
|
RecordTemplateEditView.as_view(),
|
|
23
25
|
name="recordtemplate_add",
|
|
24
26
|
),
|
|
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
|
+
),
|
|
25
37
|
path(
|
|
26
38
|
"recordtemplates/import/",
|
|
27
39
|
RecordTemplateBulkImportView.as_view(),
|
|
@@ -38,28 +50,7 @@ recordtemplate_urlpatterns = [
|
|
|
38
50
|
name="recordtemplate_bulk_delete",
|
|
39
51
|
),
|
|
40
52
|
path(
|
|
41
|
-
"recordtemplates/<int:pk>/",
|
|
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},
|
|
53
|
+
"recordtemplates/<int:pk>/",
|
|
54
|
+
include(get_model_urls("netbox_dns", "recordtemplate")),
|
|
64
55
|
),
|
|
65
56
|
]
|
netbox_dns/urls/registrar.py
CHANGED
|
@@ -1,63 +1,39 @@
|
|
|
1
|
-
from django.urls import path
|
|
1
|
+
from django.urls import include, path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from utilities.urls import get_model_urls
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import Registrar
|
|
6
5
|
from netbox_dns.views import (
|
|
7
|
-
RegistrarListView,
|
|
8
6
|
RegistrarView,
|
|
9
|
-
|
|
7
|
+
RegistrarListView,
|
|
10
8
|
RegistrarEditView,
|
|
9
|
+
RegistrarDeleteView,
|
|
11
10
|
RegistrarBulkImportView,
|
|
12
11
|
RegistrarBulkEditView,
|
|
13
12
|
RegistrarBulkDeleteView,
|
|
14
|
-
RegistrarZoneListView,
|
|
15
13
|
)
|
|
16
14
|
|
|
17
15
|
registrar_urlpatterns = [
|
|
16
|
+
path("registrars/<int:pk>/", RegistrarView.as_view(), name="registrar"),
|
|
18
17
|
path("registrars/", RegistrarListView.as_view(), name="registrar_list"),
|
|
19
18
|
path("registrars/add/", RegistrarEditView.as_view(), name="registrar_add"),
|
|
20
19
|
path(
|
|
21
|
-
"registrars/
|
|
22
|
-
RegistrarBulkImportView.as_view(),
|
|
23
|
-
name="registrar_import",
|
|
24
|
-
),
|
|
25
|
-
path(
|
|
26
|
-
"registrars/edit/",
|
|
27
|
-
RegistrarBulkEditView.as_view(),
|
|
28
|
-
name="registrar_bulk_edit",
|
|
20
|
+
"registrars/<int:pk>/edit/", RegistrarEditView.as_view(), name="registrar_edit"
|
|
29
21
|
),
|
|
30
22
|
path(
|
|
31
23
|
"registrars/delete/",
|
|
32
24
|
RegistrarBulkDeleteView.as_view(),
|
|
33
25
|
name="registrar_bulk_delete",
|
|
34
26
|
),
|
|
35
|
-
path("registrars/<int:pk>/", RegistrarView.as_view(), name="registrar"),
|
|
36
27
|
path(
|
|
37
|
-
"registrars
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
"registrars/import/", RegistrarBulkImportView.as_view(), name="registrar_import"
|
|
29
|
+
),
|
|
30
|
+
path(
|
|
31
|
+
"registrars/edit/", RegistrarBulkEditView.as_view(), name="registrar_bulk_edit"
|
|
40
32
|
),
|
|
41
33
|
path(
|
|
42
34
|
"registrars/<int:pk>/delete/",
|
|
43
35
|
RegistrarDeleteView.as_view(),
|
|
44
36
|
name="registrar_delete",
|
|
45
37
|
),
|
|
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
|
-
),
|
|
38
|
+
path("registrars/<int:pk>/", include(get_model_urls("netbox_dns", "registrar"))),
|
|
63
39
|
]
|