netbox-plugin-dns 0.21.2__py3-none-any.whl → 0.21.4__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.
- netbox_dns/__init__.py +1 -1
- netbox_dns/migrations/0027_alter_registrar_iana_id.py +17 -0
- netbox_dns/models/registrar.py +1 -0
- netbox_dns/validators.py +9 -5
- {netbox_plugin_dns-0.21.2.dist-info → netbox_plugin_dns-0.21.4.dist-info}/METADATA +1 -1
- {netbox_plugin_dns-0.21.2.dist-info → netbox_plugin_dns-0.21.4.dist-info}/RECORD +8 -7
- {netbox_plugin_dns-0.21.2.dist-info → netbox_plugin_dns-0.21.4.dist-info}/LICENSE +0 -0
- {netbox_plugin_dns-0.21.2.dist-info → netbox_plugin_dns-0.21.4.dist-info}/WHEEL +0 -0
netbox_dns/__init__.py
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Generated by Django 4.2.5 on 2023-11-16 14:17
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
dependencies = [
|
|
8
|
+
("netbox_dns", "0026_domain_registration"),
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
operations = [
|
|
12
|
+
migrations.AlterField(
|
|
13
|
+
model_name="registrar",
|
|
14
|
+
name="iana_id",
|
|
15
|
+
field=models.IntegerField(blank=True, null=True),
|
|
16
|
+
),
|
|
17
|
+
]
|
netbox_dns/models/registrar.py
CHANGED
netbox_dns/validators.py
CHANGED
|
@@ -10,8 +10,9 @@ except ImportError:
|
|
|
10
10
|
from extras.plugins.utils import get_plugin_config
|
|
11
11
|
|
|
12
12
|
LABEL = r"[a-z0-9][a-z0-9-]*(?<!-)"
|
|
13
|
-
|
|
13
|
+
TOLERANT_LABEL = r"[a-z0-9][a-z0-9-_]*(?<![-_])"
|
|
14
14
|
LEADING_UNDERSCORE_LABEL = r"[a-z0-9_][a-z0-9-]*(?<!-)"
|
|
15
|
+
TOLERANT_LEADING_UNDERSCORE_LABEL = r"[a-z0-9_][a-z0-9-_]*(?<![-_])"
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
def has_invalid_double_dash(name):
|
|
@@ -20,7 +21,7 @@ def has_invalid_double_dash(name):
|
|
|
20
21
|
|
|
21
22
|
def validate_fqdn(name):
|
|
22
23
|
if get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames"):
|
|
23
|
-
regex = rf"^(\*|{
|
|
24
|
+
regex = rf"^(\*|{TOLERANT_LABEL})(\.{TOLERANT_LABEL})+\.?$"
|
|
24
25
|
else:
|
|
25
26
|
regex = rf"^(\*|{LABEL})(\.{LABEL})+\.?$"
|
|
26
27
|
|
|
@@ -30,9 +31,12 @@ def validate_fqdn(name):
|
|
|
30
31
|
|
|
31
32
|
def validate_extended_hostname(name, tolerate_leading_underscores=False):
|
|
32
33
|
if tolerate_leading_underscores:
|
|
33
|
-
|
|
34
|
+
if get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames"):
|
|
35
|
+
regex = rf"^([*@]|(\*\.)?{TOLERANT_LEADING_UNDERSCORE_LABEL}(\.{TOLERANT_LEADING_UNDERSCORE_LABEL})*\.?)$"
|
|
36
|
+
else:
|
|
37
|
+
regex = rf"^([*@]|(\*\.)?{LEADING_UNDERSCORE_LABEL}(\.{LEADING_UNDERSCORE_LABEL})*\.?)$"
|
|
34
38
|
elif get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames"):
|
|
35
|
-
regex = rf"^([*@]|(\*\.)?{
|
|
39
|
+
regex = rf"^([*@]|(\*\.)?{TOLERANT_LABEL}(\.{TOLERANT_LABEL})*\.?)$"
|
|
36
40
|
else:
|
|
37
41
|
regex = rf"^([*@]|(\*\.)?{LABEL}(\.{LABEL})*\.?)$"
|
|
38
42
|
|
|
@@ -45,7 +49,7 @@ def validate_domain_name(name):
|
|
|
45
49
|
return
|
|
46
50
|
|
|
47
51
|
if get_plugin_config("netbox_dns", "tolerate_underscores_in_hostnames"):
|
|
48
|
-
regex = rf"^{
|
|
52
|
+
regex = rf"^{TOLERANT_LABEL}(\.{TOLERANT_LABEL})*\.?$"
|
|
49
53
|
else:
|
|
50
54
|
regex = rf"^{LABEL}(\.{LABEL})*\.?$"
|
|
51
55
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
netbox_dns/__init__.py,sha256=
|
|
1
|
+
netbox_dns/__init__.py,sha256=dgBrcfNXZvdNommqv3m17mSyrwClvIilTqKQkBMymKg,2320
|
|
2
2
|
netbox_dns/api/nested_serializers.py,sha256=Do1wWwWrZ5a4OUuW0Sj8AU3AVlaCu675PAG78RT3dv4,2616
|
|
3
3
|
netbox_dns/api/serializers.py,sha256=RXSETFLwRZQrUus8uzMt7q7wuB-QVoiHBQumQQxyX3s,7673
|
|
4
4
|
netbox_dns/api/urls.py,sha256=R9VmmWtdrjvr35i5d_SfZK2lGn6JzmPuWEKTQlZ8MJo,575
|
|
@@ -60,12 +60,13 @@ netbox_dns/migrations/0023_alter_record_value.py,sha256=4_4v8YZzU8_jadJqIUUjH6SI
|
|
|
60
60
|
netbox_dns/migrations/0024_tenancy.py,sha256=3kc5l5_AyfhOI6g6mbCfReUAbSgb2DAv0MDMZqJ-3YQ,1745
|
|
61
61
|
netbox_dns/migrations/0025_ipam_coupling_cf.py,sha256=7uHujclWrsYw5QMLWft0Po78Ow5Q8MjPuU7moKyQ2qs,620
|
|
62
62
|
netbox_dns/migrations/0026_domain_registration.py,sha256=iBgyZZfsy3MOBl1UoDNWHOq0VZH35-_EuK-ShieaImA,5818
|
|
63
|
+
netbox_dns/migrations/0027_alter_registrar_iana_id.py,sha256=QUtRIrqqfkraFmzzeJFZWAEv4PfrOouoHtrV6FRn8Kc,404
|
|
63
64
|
netbox_dns/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
65
|
netbox_dns/models/__init__.py,sha256=uqpVU1z4DiQWq_PimqAbtKX89bvgEsKa0vMOafMlSSY,136
|
|
65
66
|
netbox_dns/models/contact.py,sha256=Mzj4SR3fczOE96etWjObJElk0RVQetNuXZVtm8sS1h8,2849
|
|
66
67
|
netbox_dns/models/nameserver.py,sha256=SjKUbMRNE3TSDzmxbKFR9b4AfYPS0UPj0QeO7XpwNRk,2941
|
|
67
68
|
netbox_dns/models/record.py,sha256=k-A0HeYgNiQAkyTFV7Sm26PtQJRIbwuvUEjXtHsa9tY,14048
|
|
68
|
-
netbox_dns/models/registrar.py,sha256=
|
|
69
|
+
netbox_dns/models/registrar.py,sha256=ByKHeqH5KfswqOLjya8DZExJ1omSKFHMfCjIIYfnwTo,1416
|
|
69
70
|
netbox_dns/models/view.py,sha256=ljs3Q2xQR63ZOSyja5H7DEdFbm7MX2ZjlR6uNVrAsVo,920
|
|
70
71
|
netbox_dns/models/zone.py,sha256=wfOgvGnu8aT0A6xwthI0KDFSU3XY-R-Ut75mJ5-GkfQ,18076
|
|
71
72
|
netbox_dns/navigation.py,sha256=IutEr_TcPgDGzqTT1ZzV4IUABLSOFU9v364BfpCqbro,4587
|
|
@@ -95,7 +96,7 @@ netbox_dns/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
95
96
|
netbox_dns/templatetags/view_helpers.py,sha256=M7ND-gQhPTey_4wlhalthucqKJf8UjjP4LGuHMw3j-c,271
|
|
96
97
|
netbox_dns/urls.py,sha256=RMEDiyEmtHQzbjKy65ud6LofQYoEziIH7BvRaVs7kn0,8020
|
|
97
98
|
netbox_dns/utilities.py,sha256=UjYHNp3RxToJgjOLs6iPn5ekETCpES2yWUfuqJXkDyU,1915
|
|
98
|
-
netbox_dns/validators.py,sha256=
|
|
99
|
+
netbox_dns/validators.py,sha256=mauW5-7a-sjTxyP4qWiRi-kfffGEj9Ma7N2o-BJjx38,2232
|
|
99
100
|
netbox_dns/views/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
|
|
100
101
|
netbox_dns/views/contact.py,sha256=6-oCfK98-submcUTmi0ejw7QBscNn3S9bnS0oUTXOaY,2235
|
|
101
102
|
netbox_dns/views/nameserver.py,sha256=Wa8CQ19P5uPNLMIYkj_U82wmwdp5gZoBWZnOR4ZExa0,2990
|
|
@@ -103,7 +104,7 @@ netbox_dns/views/record.py,sha256=eT-M-rqhCrcmhpEyKOnQ8SWnxAVUgams5e86nVL9uc0,25
|
|
|
103
104
|
netbox_dns/views/registrar.py,sha256=aznSKt1L5tILMLGgcZiBR7u7B8rNl-jM1B2-N0fTeK8,2072
|
|
104
105
|
netbox_dns/views/view.py,sha256=uUvtlNEh5MYoEALvWWaCOqj_Zj8dpGOL2PUyg-UPfEA,1895
|
|
105
106
|
netbox_dns/views/zone.py,sha256=j1wxqEQKYxkQv2DqOHo0gP6e_hZrD2RTyZhkx5CCXFE,3988
|
|
106
|
-
netbox_plugin_dns-0.21.
|
|
107
|
-
netbox_plugin_dns-0.21.
|
|
108
|
-
netbox_plugin_dns-0.21.
|
|
109
|
-
netbox_plugin_dns-0.21.
|
|
107
|
+
netbox_plugin_dns-0.21.4.dist-info/LICENSE,sha256=tziMJKpkMbySr09L6bIwsu7Ca9ICoqpMO3yAXgEMQA4,1076
|
|
108
|
+
netbox_plugin_dns-0.21.4.dist-info/METADATA,sha256=lk59DRiIpPahWXSNUAjohLx2Bl9s6CEpNOOTofzDBOk,3931
|
|
109
|
+
netbox_plugin_dns-0.21.4.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
110
|
+
netbox_plugin_dns-0.21.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|