netbox-plugin-dns 0.21.3__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 CHANGED
@@ -9,7 +9,7 @@ except ImportError:
9
9
  # NetBox 3.5.8
10
10
  from extras.plugins.utils import get_plugin_config
11
11
 
12
- __version__ = "0.21.3"
12
+ __version__ = "0.21.4"
13
13
 
14
14
 
15
15
  class DNSConfig(PluginConfig):
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
- UNDERSCORE_LABEL = r"[a-z0-9][a-z0-9-_]*(?<![-_])"
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"^(\*|{UNDERSCORE_LABEL})(\.{UNDERSCORE_LABEL})+\.?$"
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
- regex = rf"^([*@]|(\*\.)?{LEADING_UNDERSCORE_LABEL}(\.{LEADING_UNDERSCORE_LABEL})*\.?)$"
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"^([*@]|(\*\.)?{UNDERSCORE_LABEL}(\.{UNDERSCORE_LABEL})*\.?)$"
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"^{UNDERSCORE_LABEL}(\.{UNDERSCORE_LABEL})*\.?$"
52
+ regex = rf"^{TOLERANT_LABEL}(\.{TOLERANT_LABEL})*\.?$"
49
53
  else:
50
54
  regex = rf"^{LABEL}(\.{LABEL})*\.?$"
51
55
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 0.21.3
3
+ Version: 0.21.4
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
@@ -1,4 +1,4 @@
1
- netbox_dns/__init__.py,sha256=MCcUbnH3CFsxr7pd9uUcH42x5MSluBazZGlpUf11D8U,2320
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
@@ -96,7 +96,7 @@ netbox_dns/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
96
96
  netbox_dns/templatetags/view_helpers.py,sha256=M7ND-gQhPTey_4wlhalthucqKJf8UjjP4LGuHMw3j-c,271
97
97
  netbox_dns/urls.py,sha256=RMEDiyEmtHQzbjKy65ud6LofQYoEziIH7BvRaVs7kn0,8020
98
98
  netbox_dns/utilities.py,sha256=UjYHNp3RxToJgjOLs6iPn5ekETCpES2yWUfuqJXkDyU,1915
99
- netbox_dns/validators.py,sha256=WfYomXxHnk908-AIbS19fwa0NyumGDYoMoscJm4twt4,1959
99
+ netbox_dns/validators.py,sha256=mauW5-7a-sjTxyP4qWiRi-kfffGEj9Ma7N2o-BJjx38,2232
100
100
  netbox_dns/views/__init__.py,sha256=Aw8HrCTjaJfu5JSwJsQRHfOUz4zKwAmZNByT9q6BrFU,136
101
101
  netbox_dns/views/contact.py,sha256=6-oCfK98-submcUTmi0ejw7QBscNn3S9bnS0oUTXOaY,2235
102
102
  netbox_dns/views/nameserver.py,sha256=Wa8CQ19P5uPNLMIYkj_U82wmwdp5gZoBWZnOR4ZExa0,2990
@@ -104,7 +104,7 @@ netbox_dns/views/record.py,sha256=eT-M-rqhCrcmhpEyKOnQ8SWnxAVUgams5e86nVL9uc0,25
104
104
  netbox_dns/views/registrar.py,sha256=aznSKt1L5tILMLGgcZiBR7u7B8rNl-jM1B2-N0fTeK8,2072
105
105
  netbox_dns/views/view.py,sha256=uUvtlNEh5MYoEALvWWaCOqj_Zj8dpGOL2PUyg-UPfEA,1895
106
106
  netbox_dns/views/zone.py,sha256=j1wxqEQKYxkQv2DqOHo0gP6e_hZrD2RTyZhkx5CCXFE,3988
107
- netbox_plugin_dns-0.21.3.dist-info/LICENSE,sha256=tziMJKpkMbySr09L6bIwsu7Ca9ICoqpMO3yAXgEMQA4,1076
108
- netbox_plugin_dns-0.21.3.dist-info/METADATA,sha256=qqsv1kjhnJEJgEQvXACyaDFkVZQyaG1hiANBaGTwk9E,3931
109
- netbox_plugin_dns-0.21.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
110
- netbox_plugin_dns-0.21.3.dist-info/RECORD,,
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,,