netbox-plugin-dns 1.2.4__tar.gz → 1.2.6__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.

Files changed (157) hide show
  1. {netbox_plugin_dns-1.2.4/netbox_plugin_dns.egg-info → netbox_plugin_dns-1.2.6}/PKG-INFO +1 -1
  2. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/__init__.py +2 -1
  3. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/fields/__init__.py +1 -0
  4. netbox_plugin_dns-1.2.6/netbox_dns/fields/timeperiod.py +31 -0
  5. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/record.py +12 -6
  6. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/record_template.py +13 -3
  7. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/zone.py +35 -22
  8. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/zone_template.py +8 -0
  9. netbox_plugin_dns-1.2.6/netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
  10. netbox_plugin_dns-1.2.6/netbox_dns/migrations/0014_alter_unique_constraints_lowercase.py +42 -0
  11. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/nameserver.py +19 -2
  12. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/record.py +19 -10
  13. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/record_template.py +5 -2
  14. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/zone.py +28 -12
  15. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/utilities/conversions.py +5 -0
  16. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/utilities/dns.py +1 -2
  17. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/utilities/ipam_dnssync.py +5 -2
  18. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/record.py +17 -7
  19. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6/netbox_plugin_dns.egg-info}/PKG-INFO +1 -1
  20. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_plugin_dns.egg-info/SOURCES.txt +3 -0
  21. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/pyproject.toml +1 -1
  22. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/LICENSE +0 -0
  23. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/README.md +0 -0
  24. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/nested_serializers.py +0 -0
  25. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers.py +0 -0
  26. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/__init__.py +0 -0
  27. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/nameserver.py +0 -0
  28. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/prefix.py +0 -0
  29. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/record.py +0 -0
  30. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/record_template.py +0 -0
  31. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/registrar.py +0 -0
  32. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/registration_contact.py +0 -0
  33. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/view.py +0 -0
  34. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/zone.py +0 -0
  35. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/serializers_/zone_template.py +0 -0
  36. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/urls.py +0 -0
  37. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/api/views.py +0 -0
  38. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/apps.py +0 -0
  39. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/choices/__init__.py +0 -0
  40. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/choices/record.py +0 -0
  41. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/choices/zone.py +0 -0
  42. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/fields/address.py +0 -0
  43. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/fields/ipam.py +0 -0
  44. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/fields/network.py +0 -0
  45. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/fields/rfc2317.py +0 -0
  46. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/__init__.py +0 -0
  47. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/nameserver.py +0 -0
  48. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/record.py +0 -0
  49. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/record_template.py +0 -0
  50. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/registrar.py +0 -0
  51. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/registration_contact.py +0 -0
  52. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/view.py +0 -0
  53. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/zone.py +0 -0
  54. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/filtersets/zone_template.py +0 -0
  55. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/__init__.py +0 -0
  56. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/nameserver.py +0 -0
  57. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/registrar.py +0 -0
  58. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/registration_contact.py +0 -0
  59. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/forms/view.py +0 -0
  60. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/graphql/__init__.py +0 -0
  61. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/graphql/filters.py +0 -0
  62. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/graphql/schema.py +0 -0
  63. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/graphql/types.py +0 -0
  64. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
  65. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/locale/en/LC_MESSAGES/django.mo +0 -0
  66. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/management/commands/cleanup_database.py +0 -0
  67. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
  68. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/management/commands/rebuild_dnssync.py +0 -0
  69. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/management/commands/setup_dnssync.py +0 -0
  70. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/management/commands/update_soa.py +0 -0
  71. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  72. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
  73. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
  74. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0003_default_view.py +0 -0
  75. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
  76. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
  77. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0006_templating.py +0 -0
  78. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
  79. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0008_view_prefixes.py +0 -0
  80. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -0
  81. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0010_view_ip_address_filter.py +0 -0
  82. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0011_rename_related_fields.py +0 -0
  83. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0012_natural_ordering.py +0 -0
  84. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0013_zonetemplate_soa_mname_zonetemplate_soa_rname.py +0 -0
  85. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  86. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  87. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0022_search.py +0 -0
  88. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  89. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0024_tenancy.py +0 -0
  90. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  91. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  92. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  93. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  94. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
  95. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/migrations/__init__.py +0 -0
  96. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/mixins/__init__.py +0 -0
  97. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/mixins/object_modification.py +0 -0
  98. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/__init__.py +0 -0
  99. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/registrar.py +0 -0
  100. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/registration_contact.py +0 -0
  101. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/view.py +0 -0
  102. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/models/zone_template.py +0 -0
  103. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/navigation.py +0 -0
  104. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/signals/__init__.py +0 -0
  105. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/signals/ipam_dnssync.py +0 -0
  106. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/__init__.py +0 -0
  107. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/ipam_dnssync.py +0 -0
  108. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/nameserver.py +0 -0
  109. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/record.py +0 -0
  110. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/record_template.py +0 -0
  111. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/registrar.py +0 -0
  112. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/registration_contact.py +0 -0
  113. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/view.py +0 -0
  114. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/zone.py +0 -0
  115. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/tables/zone_template.py +0 -0
  116. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/template_content.py +0 -0
  117. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  118. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  119. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  120. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/record.html +0 -0
  121. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
  122. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  123. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/registrationcontact.html +0 -0
  124. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/view/button.html +0 -0
  125. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/view/prefix.html +0 -0
  126. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
  127. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/view.html +0 -0
  128. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  129. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  130. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
  131. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/delegation_record.html +0 -0
  132. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  133. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  134. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  135. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  136. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zone.html +0 -0
  137. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
  138. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templatetags/__init__.py +0 -0
  139. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/templatetags/netbox_dns.py +0 -0
  140. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/urls.py +0 -0
  141. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/utilities/__init__.py +0 -0
  142. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/validators/__init__.py +0 -0
  143. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/validators/dns_name.py +0 -0
  144. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/validators/dns_value.py +0 -0
  145. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/validators/rfc2317.py +0 -0
  146. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/__init__.py +0 -0
  147. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/nameserver.py +0 -0
  148. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/record_template.py +0 -0
  149. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/registrar.py +0 -0
  150. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/registration_contact.py +0 -0
  151. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/view.py +0 -0
  152. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/zone.py +0 -0
  153. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_dns/views/zone_template.py +0 -0
  154. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_plugin_dns.egg-info/dependency_links.txt +0 -0
  155. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_plugin_dns.egg-info/requires.txt +0 -0
  156. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/netbox_plugin_dns.egg-info/top_level.txt +0 -0
  157. {netbox_plugin_dns-1.2.4 → netbox_plugin_dns-1.2.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: netbox-plugin-dns
3
- Version: 1.2.4
3
+ Version: 1.2.6
4
4
  Summary: NetBox DNS is a NetBox plugin for managing DNS data.
5
5
  Author-email: Peter Eckel <pete@netbox-dns.org>
6
6
  Project-URL: Homepage, https://github.com/peteeckel/netbox-plugin-dns
@@ -7,7 +7,7 @@ from ipam.choices import IPAddressStatusChoices
7
7
 
8
8
  from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices, ZoneStatusChoices
9
9
 
10
- __version__ = "1.2.4"
10
+ __version__ = "1.2.6"
11
11
 
12
12
 
13
13
  def _check_list(setting):
@@ -64,6 +64,7 @@ class DNSConfig(PluginConfig):
64
64
  "enforce_unique_rrset_ttl": True,
65
65
  "menu_name": "DNS",
66
66
  "top_level_menu": True,
67
+ "convert_names_to_lowercase": False,
67
68
  }
68
69
  base_url = "netbox-dns"
69
70
 
@@ -2,3 +2,4 @@ from .network import *
2
2
  from .address import *
3
3
  from .rfc2317 import *
4
4
  from .ipam import *
5
+ from .timeperiod import *
@@ -0,0 +1,31 @@
1
+ from django.forms import Field
2
+ from django.utils.dateparse import parse_duration
3
+ from django.core.exceptions import ValidationError
4
+
5
+
6
+ __all__ = ("TimePeriodField",)
7
+
8
+
9
+ class TimePeriodField(Field):
10
+ def to_python(self, value):
11
+ if not value:
12
+ return None
13
+
14
+ try:
15
+ return int(value)
16
+ except ValueError:
17
+ try:
18
+ duration = parse_duration(value)
19
+ if duration is None:
20
+ raise TypeError
21
+ return int(duration.total_seconds())
22
+ except TypeError:
23
+ raise ValidationError(
24
+ "Enter a valid integer or ISO 8601 duration (W, M and Y are not supported)"
25
+ )
26
+
27
+ def validate(self, value):
28
+ super().validate(value)
29
+
30
+ if value is not None and value < 0:
31
+ raise ValidationError("A time period cannot be negative.")
@@ -23,6 +23,7 @@ from tenancy.forms import TenancyForm, TenancyFilterForm
23
23
  from netbox_dns.models import View, Zone, Record
24
24
  from netbox_dns.choices import RecordSelectableTypeChoices, RecordStatusChoices
25
25
  from netbox_dns.utilities import name_to_unicode
26
+ from netbox_dns.fields import TimePeriodField
26
27
 
27
28
 
28
29
  __all__ = (
@@ -67,7 +68,7 @@ class RecordForm(TenancyForm, NetBoxModelForm):
67
68
  required=False,
68
69
  label=_("Disable PTR"),
69
70
  )
70
- ttl = forms.IntegerField(
71
+ ttl = TimePeriodField(
71
72
  required=False,
72
73
  label=_("TTL"),
73
74
  )
@@ -112,16 +113,17 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
112
113
  fieldsets = (
113
114
  FieldSet("q", "filter_id", "tag"),
114
115
  FieldSet(
116
+ "name",
115
117
  "view_id",
116
118
  "zone_id",
117
- "name",
118
119
  "fqdn",
119
120
  "type",
120
121
  "value",
121
- "disable_ptr",
122
122
  "status",
123
- "active",
123
+ "ttl",
124
+ "disable_ptr",
124
125
  "description",
126
+ "active",
125
127
  name=_("Attributes"),
126
128
  ),
127
129
  FieldSet("tenant_group_id", "tenant_id", name=_("Tenancy")),
@@ -154,6 +156,10 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
154
156
  required=False,
155
157
  label=_("Status"),
156
158
  )
159
+ ttl = TimePeriodField(
160
+ required=False,
161
+ label=_("TTL"),
162
+ )
157
163
  view_id = DynamicModelMultipleChoiceField(
158
164
  queryset=View.objects.all(),
159
165
  required=False,
@@ -224,7 +230,7 @@ class RecordImportForm(NetBoxModelImportForm):
224
230
  required=False,
225
231
  label=_("Status"),
226
232
  )
227
- ttl = forms.IntegerField(
233
+ ttl = TimePeriodField(
228
234
  required=False,
229
235
  label=_("TTL"),
230
236
  )
@@ -286,7 +292,7 @@ class RecordBulkEditForm(NetBoxModelBulkEditForm):
286
292
  required=False,
287
293
  label=_("Status"),
288
294
  )
289
- ttl = forms.IntegerField(
295
+ ttl = TimePeriodField(
290
296
  required=False,
291
297
  label=_("TTL"),
292
298
  )
@@ -23,6 +23,7 @@ from tenancy.forms import TenancyForm, TenancyFilterForm
23
23
  from netbox_dns.models import RecordTemplate, ZoneTemplate
24
24
  from netbox_dns.choices import RecordSelectableTypeChoices, RecordStatusChoices
25
25
  from netbox_dns.utilities import name_to_unicode
26
+ from netbox_dns.fields import TimePeriodField
26
27
 
27
28
 
28
29
  __all__ = (
@@ -50,7 +51,7 @@ class RecordTemplateForm(TenancyForm, NetBoxModelForm):
50
51
  required=False,
51
52
  label=_("Disable PTR"),
52
53
  )
53
- ttl = forms.IntegerField(
54
+ ttl = TimePeriodField(
54
55
  required=False,
55
56
  label=_("TTL"),
56
57
  )
@@ -99,6 +100,7 @@ class RecordTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
99
100
  "type",
100
101
  "value",
101
102
  "status",
103
+ "ttl",
102
104
  "disable_ptr",
103
105
  "description",
104
106
  name=_("Attributes"),
@@ -129,6 +131,10 @@ class RecordTemplateFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
129
131
  required=False,
130
132
  label=_("Status"),
131
133
  )
134
+ ttl = TimePeriodField(
135
+ required=False,
136
+ label=_("TTL"),
137
+ )
132
138
  disable_ptr = forms.NullBooleanField(
133
139
  required=False,
134
140
  label=_("Disable PTR"),
@@ -156,7 +162,7 @@ class RecordTemplateImportForm(NetBoxModelImportForm):
156
162
  required=False,
157
163
  label=_("Status"),
158
164
  )
159
- ttl = forms.IntegerField(
165
+ ttl = TimePeriodField(
160
166
  required=False,
161
167
  label=_("TTL"),
162
168
  )
@@ -191,6 +197,10 @@ class RecordTemplateImportForm(NetBoxModelImportForm):
191
197
  class RecordTemplateBulkEditForm(NetBoxModelBulkEditForm):
192
198
  model = RecordTemplate
193
199
 
200
+ record_name = forms.CharField(
201
+ required=False,
202
+ label=_("Record Name"),
203
+ )
194
204
  type = forms.ChoiceField(
195
205
  choices=add_blank_choice(RecordSelectableTypeChoices),
196
206
  required=False,
@@ -205,7 +215,7 @@ class RecordTemplateBulkEditForm(NetBoxModelBulkEditForm):
205
215
  required=False,
206
216
  label=_("Status"),
207
217
  )
208
- ttl = forms.IntegerField(
218
+ ttl = TimePeriodField(
209
219
  required=False,
210
220
  label=_("TTL"),
211
221
  )
@@ -1,3 +1,5 @@
1
+ from packaging.version import Version
2
+
1
3
  from django import forms
2
4
  from django.db import transaction
3
5
  from django.conf import settings
@@ -20,6 +22,7 @@ from utilities.forms.fields import (
20
22
  CSVModelMultipleChoiceField,
21
23
  DynamicModelChoiceField,
22
24
  )
25
+ from utilities.release import load_release_data
23
26
  from utilities.forms.widgets import BulkEditNullBooleanSelect
24
27
  from utilities.forms.rendering import FieldSet
25
28
  from utilities.forms import BOOLEAN_WITH_BLANK_CHOICES, add_blank_choice
@@ -36,7 +39,7 @@ from netbox_dns.models import (
36
39
  )
37
40
  from netbox_dns.choices import ZoneStatusChoices
38
41
  from netbox_dns.utilities import name_to_unicode, network_to_reverse
39
- from netbox_dns.fields import RFC2317NetworkFormField
42
+ from netbox_dns.fields import RFC2317NetworkFormField, TimePeriodField
40
43
  from netbox_dns.validators import validate_ipv4, validate_prefix, validate_rfc2317
41
44
 
42
45
 
@@ -47,6 +50,8 @@ __all__ = (
47
50
  "ZoneBulkEditForm",
48
51
  )
49
52
 
53
+ QUICK_ADD = Version(load_release_data().version) >= Version("4.2.5")
54
+
50
55
 
51
56
  class RollbackTransaction(Exception):
52
57
  pass
@@ -140,6 +145,12 @@ class ZoneTemplateUpdateMixin:
140
145
 
141
146
 
142
147
  class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
148
+ view = DynamicModelChoiceField(
149
+ queryset=View.objects.all(),
150
+ required=True,
151
+ label=_("View"),
152
+ quick_add=QUICK_ADD,
153
+ )
143
154
  name = forms.CharField(
144
155
  required=True,
145
156
  label=_("Name"),
@@ -158,8 +169,9 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
158
169
  queryset=NameServer.objects.all(),
159
170
  required=False,
160
171
  label=_("Nameservers"),
172
+ quick_add=QUICK_ADD,
161
173
  )
162
- default_ttl = forms.IntegerField(
174
+ default_ttl = TimePeriodField(
163
175
  required=False,
164
176
  help_text=_("Default TTL for new records in this zone"),
165
177
  validators=[MinValueValidator(1)],
@@ -169,7 +181,7 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
169
181
  required=False,
170
182
  label=_("Description"),
171
183
  )
172
- soa_ttl = forms.IntegerField(
184
+ soa_ttl = TimePeriodField(
173
185
  required=True,
174
186
  help_text=_("TTL for the SOA record of the zone"),
175
187
  validators=[MinValueValidator(1)],
@@ -180,31 +192,32 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
180
192
  help_text=_("Primary nameserver this zone"),
181
193
  required=False,
182
194
  label=_("SOA MName"),
195
+ quick_add=QUICK_ADD,
183
196
  )
184
197
  soa_rname = forms.CharField(
185
198
  required=False,
186
199
  help_text=_("Mailbox of the zone's administrator"),
187
200
  label=_("SOA RName"),
188
201
  )
189
- soa_refresh = forms.IntegerField(
202
+ soa_refresh = TimePeriodField(
190
203
  required=True,
191
204
  help_text=_("Refresh interval for secondary nameservers"),
192
205
  validators=[MinValueValidator(1)],
193
206
  label=_("SOA Refresh"),
194
207
  )
195
- soa_retry = forms.IntegerField(
208
+ soa_retry = TimePeriodField(
196
209
  required=True,
197
210
  help_text=_("Retry interval for secondary nameservers"),
198
211
  validators=[MinValueValidator(1)],
199
212
  label=_("SOA Retry"),
200
213
  )
201
- soa_expire = forms.IntegerField(
214
+ soa_expire = TimePeriodField(
202
215
  required=True,
203
216
  validators=[MinValueValidator(1)],
204
217
  help_text=_("Expire time after which the zone is considered unavailable"),
205
218
  label=_("SOA Expire"),
206
219
  )
207
- soa_minimum = forms.IntegerField(
220
+ soa_minimum = TimePeriodField(
208
221
  required=True,
209
222
  help_text=_("Minimum TTL for negative results, e.g. NXRRSET, NXDOMAIN"),
210
223
  validators=[MinValueValidator(1)],
@@ -230,7 +243,7 @@ class ZoneForm(ZoneTemplateUpdateMixin, TenancyForm, NetBoxModelForm):
230
243
  rfc2317_parent_managed = forms.BooleanField(
231
244
  required=False,
232
245
  help_text=_(
233
- "IPv4 reverse zone for deletgating the RFC2317 PTR records is managed in NetBox DNS"
246
+ "IPv4 reverse zone for delegating the RFC2317 PTR records is managed in NetBox DNS"
234
247
  ),
235
248
  label=_("RFC2317 Parent Managed"),
236
249
  )
@@ -517,11 +530,11 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
517
530
  required=False,
518
531
  label=_("Nameservers"),
519
532
  )
520
- default_ttl = forms.IntegerField(
533
+ default_ttl = TimePeriodField(
521
534
  required=False,
522
535
  label=_("Default TTL"),
523
536
  )
524
- soa_ttl = forms.IntegerField(
537
+ soa_ttl = TimePeriodField(
525
538
  required=False,
526
539
  help_text=_("TTL for the SOA record of the zone"),
527
540
  label=_("SOA TTL"),
@@ -549,22 +562,22 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
549
562
  required=False,
550
563
  label=_("SOA Serial"),
551
564
  )
552
- soa_refresh = forms.IntegerField(
565
+ soa_refresh = TimePeriodField(
553
566
  required=False,
554
567
  help_text=_("Refresh interval for secondary nameservers"),
555
568
  label=_("SOA Refresh"),
556
569
  )
557
- soa_retry = forms.IntegerField(
570
+ soa_retry = TimePeriodField(
558
571
  required=False,
559
572
  help_text=_("Retry interval for secondary nameservers"),
560
573
  label=_("SOA Retry"),
561
574
  )
562
- soa_expire = forms.IntegerField(
575
+ soa_expire = TimePeriodField(
563
576
  required=False,
564
577
  help_text=_("Expire time after which the zone is considered unavailable"),
565
578
  label=_("SOA Expire"),
566
579
  )
567
- soa_minimum = forms.IntegerField(
580
+ soa_minimum = TimePeriodField(
568
581
  required=False,
569
582
  help_text=_("Minimum TTL for negative results, e.g. NXRRSET, NXDOMAIN"),
570
583
  label=_("SOA Minimum TTL"),
@@ -577,7 +590,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
577
590
  rfc2317_parent_managed = forms.BooleanField(
578
591
  required=False,
579
592
  help_text=_(
580
- "IPv4 reverse zone for deletgating the RFC2317 PTR records is managed in NetBox DNS"
593
+ "IPv4 reverse zone for delegating the RFC2317 PTR records is managed in NetBox DNS"
581
594
  ),
582
595
  label=_("RFC2317 Parent Managed"),
583
596
  )
@@ -713,7 +726,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
713
726
  required=False,
714
727
  label=_("Nameservers"),
715
728
  )
716
- default_ttl = forms.IntegerField(
729
+ default_ttl = TimePeriodField(
717
730
  required=False,
718
731
  validators=[MinValueValidator(1)],
719
732
  label=_("Default TTL"),
@@ -723,7 +736,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
723
736
  required=False,
724
737
  label=_("Description"),
725
738
  )
726
- soa_ttl = forms.IntegerField(
739
+ soa_ttl = TimePeriodField(
727
740
  required=False,
728
741
  validators=[MinValueValidator(1)],
729
742
  label=_("SOA TTL"),
@@ -747,22 +760,22 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
747
760
  validators=[MinValueValidator(1), MaxValueValidator(4294967295)],
748
761
  label=_("SOA Serial"),
749
762
  )
750
- soa_refresh = forms.IntegerField(
763
+ soa_refresh = TimePeriodField(
751
764
  required=False,
752
765
  validators=[MinValueValidator(1)],
753
766
  label=_("SOA Refresh"),
754
767
  )
755
- soa_retry = forms.IntegerField(
768
+ soa_retry = TimePeriodField(
756
769
  required=False,
757
770
  validators=[MinValueValidator(1)],
758
771
  label=_("SOA Retry"),
759
772
  )
760
- soa_expire = forms.IntegerField(
773
+ soa_expire = TimePeriodField(
761
774
  required=False,
762
775
  validators=[MinValueValidator(1)],
763
776
  label=_("SOA Expire"),
764
777
  )
765
- soa_minimum = forms.IntegerField(
778
+ soa_minimum = TimePeriodField(
766
779
  required=False,
767
780
  validators=[MinValueValidator(1)],
768
781
  label=_("SOA Minimum TTL"),
@@ -777,7 +790,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
777
790
  required=False,
778
791
  widget=BulkEditNullBooleanSelect(),
779
792
  help_text=_(
780
- "IPv4 reverse zone for deletgating the RFC2317 PTR records is managed in NetBox DNS"
793
+ "IPv4 reverse zone for delegating the RFC2317 PTR records is managed in NetBox DNS"
781
794
  ),
782
795
  label=_("RFC2317 Parent Managed"),
783
796
  )
@@ -1,3 +1,5 @@
1
+ from packaging.version import Version
2
+
1
3
  from django import forms
2
4
  from django.utils.translation import gettext_lazy as _
3
5
 
@@ -7,6 +9,7 @@ from netbox.forms import (
7
9
  NetBoxModelImportForm,
8
10
  NetBoxModelForm,
9
11
  )
12
+ from utilities.release import load_release_data
10
13
  from utilities.forms.fields import (
11
14
  DynamicModelMultipleChoiceField,
12
15
  TagFilterField,
@@ -34,20 +37,25 @@ __all__ = (
34
37
  "ZoneTemplateBulkEditForm",
35
38
  )
36
39
 
40
+ QUICK_ADD = Version(load_release_data().version) >= Version("4.2.5")
41
+
37
42
 
38
43
  class ZoneTemplateForm(TenancyForm, NetBoxModelForm):
39
44
  nameservers = DynamicModelMultipleChoiceField(
40
45
  queryset=NameServer.objects.all(),
41
46
  required=False,
47
+ quick_add=QUICK_ADD,
42
48
  )
43
49
  soa_mname = DynamicModelChoiceField(
44
50
  queryset=NameServer.objects.all(),
45
51
  required=False,
46
52
  label=_("MName"),
53
+ quick_add=QUICK_ADD,
47
54
  )
48
55
  record_templates = DynamicModelMultipleChoiceField(
49
56
  queryset=RecordTemplate.objects.all(),
50
57
  required=False,
58
+ quick_add=QUICK_ADD,
51
59
  )
52
60
 
53
61
  fieldsets = (
@@ -0,0 +1,42 @@
1
+ # Generated by Django 5.1.6 on 2025-02-27 19:36
2
+
3
+ import django.db.models.functions.text
4
+ from django.db import migrations, models
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+
9
+ dependencies = [
10
+ ("extras", "0122_charfield_null_choices"),
11
+ ("netbox_dns", "0013_zonetemplate_soa_mname_zonetemplate_soa_rname"),
12
+ ("tenancy", "0017_natural_ordering"),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.AlterUniqueTogether(
17
+ name="zone",
18
+ unique_together=set(),
19
+ ),
20
+ migrations.AlterField(
21
+ model_name="nameserver",
22
+ name="name",
23
+ field=models.CharField(db_collation="natural_sort", max_length=255),
24
+ ),
25
+ migrations.AddConstraint(
26
+ model_name="nameserver",
27
+ constraint=models.UniqueConstraint(
28
+ django.db.models.functions.text.Lower("name"),
29
+ name="name_unique_ci",
30
+ violation_error_message="There is already a nameserver with this name",
31
+ ),
32
+ ),
33
+ migrations.AddConstraint(
34
+ model_name="zone",
35
+ constraint=models.UniqueConstraint(
36
+ django.db.models.functions.text.Lower("name"),
37
+ models.F("view"),
38
+ name="name_view_unique_ci",
39
+ violation_error_message="There is already a zone with the same name in this view",
40
+ ),
41
+ ),
42
+ ]
@@ -2,13 +2,15 @@ from dns import name as dns_name
2
2
 
3
3
  from django.core.exceptions import ValidationError
4
4
  from django.db import models, transaction
5
- from django.db.models import Q
5
+ from django.db.models import Q, UniqueConstraint
6
+ from django.db.models.functions import Lower
6
7
  from django.urls import reverse
7
8
  from django.utils.translation import gettext_lazy as _
8
9
 
9
10
  from netbox.models import NetBoxModel
10
11
  from netbox.search import SearchIndex, register_search
11
12
  from netbox.models.features import ContactsMixin
13
+ from netbox.plugins.utils import get_plugin_config
12
14
 
13
15
  from netbox_dns.utilities import (
14
16
  name_to_unicode,
@@ -29,7 +31,6 @@ __all__ = (
29
31
  class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
30
32
  name = models.CharField(
31
33
  verbose_name=_("Name"),
32
- unique=True,
33
34
  max_length=255,
34
35
  db_collation="natural_sort",
35
36
  )
@@ -59,6 +60,16 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
59
60
 
60
61
  ordering = ("name",)
61
62
 
63
+ constraints = [
64
+ UniqueConstraint(
65
+ Lower("name"),
66
+ name="name_unique_ci",
67
+ violation_error_message=_(
68
+ "There is already a nameserver with this name"
69
+ ),
70
+ ),
71
+ ]
72
+
62
73
  def __str__(self):
63
74
  try:
64
75
  return dns_name.from_text(self.name, origin=None).to_unicode()
@@ -73,6 +84,12 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
73
84
  def get_absolute_url(self):
74
85
  return reverse("plugins:netbox_dns:nameserver", kwargs={"pk": self.pk})
75
86
 
87
+ def clean_fields(self, exclude=None):
88
+ if get_plugin_config("netbox_dns", "convert_names_to_lowercase", False):
89
+ self.name = self.name.lower()
90
+
91
+ super().clean_fields(exclude=exclude)
92
+
76
93
  def clean(self, *args, **kwargs):
77
94
  try:
78
95
  self.name = normalize_name(self.name)
@@ -371,9 +371,11 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
371
371
  if ptr_zone.is_rfc2317_zone:
372
372
  ptr_name = self.rfc2317_ptr_name
373
373
  else:
374
- ptr_name = dns_name.from_text(
375
- ipaddress.ip_address(self.value).reverse_pointer
376
- ).relativize(dns_name.from_text(ptr_zone.name))
374
+ ptr_name = (
375
+ dns_name.from_text(ipaddress.ip_address(self.value).reverse_pointer)
376
+ .relativize(dns_name.from_text(ptr_zone.name))
377
+ .to_text()
378
+ )
377
379
 
378
380
  ptr_value = self.fqdn
379
381
  ptr_record = self.ptr_record
@@ -440,12 +442,16 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
440
442
 
441
443
  def update_rfc2317_cname_record(self, save_zone_serial=True):
442
444
  if self.zone.rfc2317_parent_managed:
443
- cname_name = dns_name.from_text(
444
- ipaddress.ip_address(self.ip_address).reverse_pointer
445
- ).relativize(dns_name.from_text(self.zone.rfc2317_parent_zone.name))
445
+ cname_name = (
446
+ dns_name.from_text(
447
+ ipaddress.ip_address(self.ip_address).reverse_pointer
448
+ )
449
+ .relativize(dns_name.from_text(self.zone.rfc2317_parent_zone.name))
450
+ .to_text()
451
+ )
446
452
 
447
453
  if self.rfc2317_cname_record is not None:
448
- if self.rfc2317_cname_record.name == cname_name.to_text():
454
+ if self.rfc2317_cname_record.name == cname_name:
449
455
  self.rfc2317_cname_record.zone = self.zone.rfc2317_parent_zone
450
456
  self.rfc2317_cname_record.value = self.fqdn
451
457
  self.rfc2317_cname_record.ttl = min_ttl(
@@ -613,7 +619,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
613
619
  new_zone = self.zone
614
620
 
615
621
  records = new_zone.records.filter(
616
- name=self.name,
622
+ name__iexact=self.name,
617
623
  type=self.type,
618
624
  value=self.value,
619
625
  status__in=RECORD_ACTIVE_STATUS_LIST,
@@ -770,9 +776,12 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
770
776
  record.ttl = ttl
771
777
  record.save(update_fields=["ttl"], update_rrset_ttl=False)
772
778
 
773
- def clean_fields(self, *args, **kwargs):
779
+ def clean_fields(self, exclude=None):
774
780
  self.type = self.type.upper()
775
- super().clean_fields(*args, **kwargs)
781
+ if get_plugin_config("netbox_dns", "convert_names_to_lowercase", False):
782
+ self.name = self.name.lower()
783
+
784
+ super().clean_fields(exclude=exclude)
776
785
 
777
786
  def clean(self, *args, new_zone=None, **kwargs):
778
787
  self.validate_name(new_zone=new_zone)
@@ -174,9 +174,12 @@ class RecordTemplate(NetBoxModel):
174
174
  if tags := self.tags.all():
175
175
  record.tags.set(tags)
176
176
 
177
- def clean_fields(self, *args, **kwargs):
177
+ def clean_fields(self, exclude=None):
178
178
  self.type = self.type.upper()
179
- super().clean_fields(*args, **kwargs)
179
+ if get_plugin_config("netbox_dns", "convert_names_to_lowercase", False):
180
+ self.record_name = self.record_name.lower()
181
+
182
+ super().clean_fields(exclude=exclude)
180
183
 
181
184
  def clean(self, *args, **kwargs):
182
185
  self.validate_name()