netbox-plugin-dns 0.18.3__tar.gz → 0.18.4__tar.gz
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_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/PKG-INFO +1 -1
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/__init__.py +2 -1
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/models.py +11 -6
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/utilities.py +8 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/validators.py +3 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/pyproject.toml +1 -1
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/LICENSE +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/README.md +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/admin.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/api/nested_serializers.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/api/serializers.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/api/urls.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/api/views.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/fields/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/fields/network.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/filters/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/filters/nameserver.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/filters/record.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/filters/view.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/filters/zone.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/forms/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/forms/nameserver.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/forms/record.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/forms/view.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/forms/zone.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/graphql/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/graphql/nameserver.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/graphql/record.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/graphql/schema.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/graphql/view.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/graphql/zone.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/management/commands/cleanup_database.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0001_initial.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0002_zone_default_ttl.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0003_soa_managed_records.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0004_create_ptr_for_a_aaaa_records.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0005_update_ns_records.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0006_zone_soa_serial_auto.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0007_alter_zone_soa_serial_auto.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0008_zone_status_names.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0009_netbox32.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0010_update_soa_records.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0011_add_view_model.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0012_adjust_zone_and_record.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0013_add_nameserver_zone_record_description.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0014_add_view_description.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0015_add_record_status.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0016_cleanup_ptr_records.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0017_alter_record_ttl.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0018_zone_arpa_network.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0019_update_ns_ttl.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/navigation.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/tables/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/tables/nameserver.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/tables/record.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/tables/view.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/tables/zone.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/template_content.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/record.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/view.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone/related.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone.html +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templatetags/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templatetags/view_helpers.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/urls.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/views/__init__.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/views/nameserver.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/views/record.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/views/view.py +0 -0
- {netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/views/zone.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from extras.plugins import PluginConfig
|
|
2
2
|
|
|
3
|
-
__version__ = "0.18.
|
|
3
|
+
__version__ = "0.18.4"
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class DNSConfig(PluginConfig):
|
|
@@ -27,6 +27,7 @@ class DNSConfig(PluginConfig):
|
|
|
27
27
|
"SRV",
|
|
28
28
|
],
|
|
29
29
|
"tolerate_non_rfc1035_types": [],
|
|
30
|
+
"enable_root_zones": False,
|
|
30
31
|
}
|
|
31
32
|
base_url = "netbox-dns"
|
|
32
33
|
|
|
@@ -289,10 +289,13 @@ class Zone(NetBoxModel):
|
|
|
289
289
|
)
|
|
290
290
|
|
|
291
291
|
def __str__(self):
|
|
292
|
-
|
|
293
|
-
name =
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
if self.name == "." and get_plugin_config("netbox_dns", "enable_root_zones"):
|
|
293
|
+
name = ". (root zone)"
|
|
294
|
+
else:
|
|
295
|
+
try:
|
|
296
|
+
name = dns_name.from_text(self.name, origin=None).to_unicode()
|
|
297
|
+
except dns_name.IDNAException:
|
|
298
|
+
name = self.name
|
|
296
299
|
|
|
297
300
|
if self.view:
|
|
298
301
|
return f"[{self.view}] {name}"
|
|
@@ -855,7 +858,7 @@ class Record(NetBoxModel):
|
|
|
855
858
|
)
|
|
856
859
|
|
|
857
860
|
if self.type not in get_plugin_config(
|
|
858
|
-
"netbox_dns", "tolerate_non_rfc1035_types"
|
|
861
|
+
"netbox_dns", "tolerate_non_rfc1035_types", default=list()
|
|
859
862
|
):
|
|
860
863
|
try:
|
|
861
864
|
validate_extended_hostname(
|
|
@@ -863,7 +866,9 @@ class Record(NetBoxModel):
|
|
|
863
866
|
(
|
|
864
867
|
self.type
|
|
865
868
|
in get_plugin_config(
|
|
866
|
-
"netbox_dns",
|
|
869
|
+
"netbox_dns",
|
|
870
|
+
"tolerate_leading_underscore_types",
|
|
871
|
+
default=list(),
|
|
867
872
|
)
|
|
868
873
|
),
|
|
869
874
|
)
|
|
@@ -4,6 +4,8 @@ from dns import name as dns_name
|
|
|
4
4
|
from dns.exception import DNSException
|
|
5
5
|
from netaddr import IPNetwork, AddrFormatError
|
|
6
6
|
|
|
7
|
+
from extras.plugins import get_plugin_config
|
|
8
|
+
|
|
7
9
|
|
|
8
10
|
class NameFormatError(Exception):
|
|
9
11
|
pass
|
|
@@ -38,6 +40,9 @@ def arpa_to_prefix(arpa_name):
|
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
def name_to_unicode(name):
|
|
43
|
+
if name == "." and get_plugin_config("netbox_dns", "enable_root_zones"):
|
|
44
|
+
return "."
|
|
45
|
+
|
|
41
46
|
try:
|
|
42
47
|
return dns_name.from_text(name, origin=None).to_unicode()
|
|
43
48
|
except dns_name.IDNAException:
|
|
@@ -54,6 +59,9 @@ def value_to_unicode(value):
|
|
|
54
59
|
|
|
55
60
|
|
|
56
61
|
def normalize_name(name):
|
|
62
|
+
if name == "." and get_plugin_config("netbox_dns", "enable_root_zones"):
|
|
63
|
+
return "."
|
|
64
|
+
|
|
57
65
|
try:
|
|
58
66
|
return (
|
|
59
67
|
dns_name.from_text(name, origin=dns_name.root)
|
|
@@ -47,6 +47,9 @@ def validate_extended_hostname(name, tolerate_leading_underscores=False):
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
def validate_domain_name(name):
|
|
50
|
+
if name == "." and get_plugin_config("netbox_dns", "enable_root_zones"):
|
|
51
|
+
return
|
|
52
|
+
|
|
50
53
|
if get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames"):
|
|
51
54
|
regex = rf"^{UNDERSCORE_LABEL}(\.{UNDERSCORE_LABEL})*\.?$"
|
|
52
55
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "netbox-plugin-dns"
|
|
3
|
-
version = "0.18.
|
|
3
|
+
version = "0.18.4"
|
|
4
4
|
description = "NetBox DNS is a NetBox plugin for managing DNS data."
|
|
5
5
|
authors = ["Peter Eckel <pe-netbox-dns@hindenburgring.com>"]
|
|
6
6
|
homepage = "https://github.com/peteeckel/netbox-plugin-dns"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/management/commands/update_soa.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0002_zone_default_ttl.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0009_netbox32.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0011_add_view_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0017_alter_record_ttl.py
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0019_update_ns_ttl.py
RENAMED
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/migrations/0020_netbox_3_4.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/record.html
RENAMED
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/view.html
RENAMED
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone/base.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templates/netbox_dns/zone.html
RENAMED
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-0.18.3 → netbox_plugin_dns-0.18.4}/netbox_dns/templatetags/view_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|