netbox-plugin-dns 1.1.5__tar.gz → 1.1.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 (158) hide show
  1. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/PKG-INFO +1 -1
  2. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/__init__.py +1 -1
  3. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/views.py +1 -1
  4. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/record.py +3 -3
  5. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/types.py +37 -0
  6. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/cleanup_database.py +4 -6
  7. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/rebuild_dnssync.py +3 -1
  8. netbox_plugin_dns-1.1.6/netbox_dns/migrations/0011_rename_related_fields.py +63 -0
  9. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/mixins/object_modification.py +4 -0
  10. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/nameserver.py +2 -2
  11. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/record.py +14 -13
  12. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/record_template.py +1 -1
  13. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/registration_contact.py +1 -1
  14. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/zone.py +31 -29
  15. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/nameserver.py +3 -3
  16. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/record.py +2 -2
  17. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/registrar.py +3 -3
  18. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/registration_contact.py +1 -1
  19. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/view.py +4 -4
  20. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/zone.py +5 -5
  21. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/PKG-INFO +1 -1
  22. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/SOURCES.txt +1 -0
  23. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/pyproject.toml +1 -1
  24. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/LICENSE +0 -0
  25. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/README.md +0 -0
  26. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/nested_serializers.py +0 -0
  27. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers.py +0 -0
  28. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/__init__.py +0 -0
  29. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/nameserver.py +0 -0
  30. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/prefix.py +0 -0
  31. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/record.py +0 -0
  32. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/record_template.py +0 -0
  33. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/registrar.py +0 -0
  34. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/registration_contact.py +0 -0
  35. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/view.py +0 -0
  36. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/zone.py +0 -0
  37. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/zone_template.py +0 -0
  38. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/api/urls.py +0 -0
  39. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/apps.py +0 -0
  40. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/choices/__init__.py +0 -0
  41. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/choices/record.py +0 -0
  42. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/choices/zone.py +0 -0
  43. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/__init__.py +0 -0
  44. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/address.py +0 -0
  45. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/ipam.py +0 -0
  46. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/network.py +0 -0
  47. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/rfc2317.py +0 -0
  48. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/__init__.py +0 -0
  49. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/nameserver.py +0 -0
  50. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/record.py +0 -0
  51. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/record_template.py +0 -0
  52. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/registrar.py +0 -0
  53. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/registration_contact.py +0 -0
  54. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/view.py +0 -0
  55. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/zone.py +0 -0
  56. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/zone_template.py +0 -0
  57. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/__init__.py +0 -0
  58. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/nameserver.py +0 -0
  59. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/record_template.py +0 -0
  60. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/registrar.py +0 -0
  61. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/registration_contact.py +0 -0
  62. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/view.py +0 -0
  63. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/zone.py +0 -0
  64. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/zone_template.py +0 -0
  65. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/__init__.py +0 -0
  66. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/filters.py +0 -0
  67. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/schema.py +0 -0
  68. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
  69. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/locale/en/LC_MESSAGES/django.mo +0 -0
  70. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
  71. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/setup_dnssync.py +0 -0
  72. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/update_soa.py +0 -0
  73. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  74. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
  75. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
  76. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0003_default_view.py +0 -0
  77. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
  78. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
  79. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0006_templating.py +0 -0
  80. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
  81. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0008_view_prefixes.py +0 -0
  82. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -0
  83. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0010_view_ip_address_filter.py +0 -0
  84. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  85. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  86. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0022_search.py +0 -0
  87. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  88. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0024_tenancy.py +0 -0
  89. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  90. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  91. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  92. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  93. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
  94. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/__init__.py +0 -0
  95. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/mixins/__init__.py +0 -0
  96. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/__init__.py +0 -0
  97. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/registrar.py +0 -0
  98. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/view.py +0 -0
  99. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/models/zone_template.py +0 -0
  100. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/navigation.py +0 -0
  101. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/signals/__init__.py +0 -0
  102. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/signals/ipam_dnssync.py +0 -0
  103. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/__init__.py +0 -0
  104. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/ipam_dnssync.py +0 -0
  105. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/nameserver.py +0 -0
  106. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/record.py +0 -0
  107. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/record_template.py +0 -0
  108. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/registrar.py +0 -0
  109. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/registration_contact.py +0 -0
  110. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/view.py +0 -0
  111. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/zone.py +0 -0
  112. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/zone_template.py +0 -0
  113. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/template_content.py +0 -0
  114. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  115. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  116. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  117. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/record.html +0 -0
  118. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
  119. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  120. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/registrationcontact.html +0 -0
  121. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view/button.html +0 -0
  122. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view/prefix.html +0 -0
  123. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
  124. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view.html +0 -0
  125. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  126. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  127. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
  128. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/delegation_record.html +0 -0
  129. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  130. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  131. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  132. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  133. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone.html +0 -0
  134. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
  135. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/__init__.py +0 -0
  136. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/nameserver.py +0 -0
  137. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/record.py +0 -0
  138. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/record_template.py +0 -0
  139. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/registrar.py +0 -0
  140. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/registration_contact.py +0 -0
  141. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/view.py +0 -0
  142. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/zone.py +0 -0
  143. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/zone_template.py +0 -0
  144. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/__init__.py +0 -0
  145. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/conversions.py +0 -0
  146. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/dns.py +0 -0
  147. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/ipam_dnssync.py +0 -0
  148. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/__init__.py +0 -0
  149. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/dns_name.py +0 -0
  150. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/dns_value.py +0 -0
  151. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/rfc2317.py +0 -0
  152. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/__init__.py +0 -0
  153. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/record_template.py +0 -0
  154. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_dns/views/zone_template.py +0 -0
  155. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/dependency_links.txt +0 -0
  156. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/requires.txt +0 -0
  157. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/top_level.txt +0 -0
  158. {netbox_plugin_dns-1.1.5 → netbox_plugin_dns-1.1.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 1.1.5
3
+ Version: 1.1.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.1.5"
10
+ __version__ = "1.1.6"
11
11
 
12
12
 
13
13
  def _check_list(setting):
@@ -57,7 +57,7 @@ class ZoneViewSet(NetBoxModelViewSet):
57
57
  "nameservers",
58
58
  "tags",
59
59
  "soa_mname",
60
- "record_set",
60
+ "records",
61
61
  "tenant",
62
62
  )
63
63
  serializer_class = ZoneSerializer
@@ -45,7 +45,7 @@ class RecordForm(TenancyForm, NetBoxModelForm):
45
45
  queryset=View.objects.all(),
46
46
  required=False,
47
47
  initial_params={
48
- "zone": "$zone",
48
+ "zones": "$zone",
49
49
  },
50
50
  label=_("View"),
51
51
  )
@@ -186,9 +186,9 @@ class RecordImportForm(NetBoxModelImportForm):
186
186
  pass
187
187
 
188
188
  if view is not None:
189
- self.fields["zone"].queryset = view.zone_set
189
+ self.fields["zone"].queryset = view.zones
190
190
  else:
191
- self.fields["zone"].queryset = View.get_default_view().zone_set
191
+ self.fields["zone"].queryset = View.get_default_view().zones
192
192
 
193
193
  zone = CSVModelChoiceField(
194
194
  queryset=Zone.objects.all(),
@@ -35,6 +35,12 @@ class NetBoxDNSNameServerType(NetBoxObjectType):
35
35
  name: str
36
36
  description: str
37
37
  tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
38
+ zones: List[
39
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
40
+ ]
41
+ soa_zones: List[
42
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
43
+ ]
38
44
 
39
45
 
40
46
  @strawberry_django.type(View, fields="__all__", filters=NetBoxDNSViewFilter)
@@ -44,6 +50,9 @@ class NetBoxDNSViewType(NetBoxObjectType):
44
50
  tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
45
51
  prefixes: List[Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]]
46
52
  ip_address_filter: str | None
53
+ zones: List[
54
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
55
+ ]
47
56
 
48
57
 
49
58
  @strawberry_django.type(Zone, fields="__all__", filters=NetBoxDNSZoneFilter)
@@ -111,6 +120,12 @@ class NetBoxDNSZoneType(NetBoxObjectType):
111
120
  Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
112
121
  | None
113
122
  )
123
+ records: List[
124
+ Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
125
+ ]
126
+ rfc2317_child_zones: List[
127
+ Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
128
+ ]
114
129
 
115
130
 
116
131
  @strawberry_django.type(Record, fields="__all__", filters=NetBoxDNSRecordFilter)
@@ -137,6 +152,13 @@ class NetBoxDNSRecordType(NetBoxObjectType):
137
152
  Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
138
153
  | None
139
154
  )
155
+ address_record: (
156
+ Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
157
+ | None
158
+ )
159
+ rfc2317_ptr_records: List[
160
+ Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
161
+ ]
140
162
 
141
163
 
142
164
  @strawberry_django.type(
@@ -157,6 +179,18 @@ class NetBoxDNSRegistrationContactType(NetBoxObjectType):
157
179
  fax: str
158
180
  fax_ext: str
159
181
  email: str
182
+ registrant_zones: List[
183
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
184
+ ]
185
+ admin_c_zones: List[
186
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
187
+ ]
188
+ tech_c_zones: List[
189
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
190
+ ]
191
+ billing_c_zones: List[
192
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
193
+ ]
160
194
 
161
195
 
162
196
  @strawberry_django.type(Registrar, fields="__all__", filters=NetBoxDNSRegistrarFilter)
@@ -169,6 +203,9 @@ class NetBoxDNSRegistrarType(NetBoxObjectType):
169
203
  address: str
170
204
  abuse_email: str
171
205
  abuse_phone: str
206
+ zones: List[
207
+ Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
208
+ ]
172
209
 
173
210
 
174
211
  @strawberry_django.type(
@@ -24,7 +24,7 @@ def zone_cleanup_ns_records(verbose=False):
24
24
  nameservers = zone.nameservers.all()
25
25
  nameserver_names = [f'{ns.name.rstrip(".")}.' for ns in nameservers]
26
26
 
27
- delete_ns = zone.record_set.filter(
27
+ delete_ns = zone.records.filter(
28
28
  name=ns_name, type=RecordTypeChoices.NS
29
29
  ).exclude(value__in=nameserver_names)
30
30
  for record in delete_ns:
@@ -33,7 +33,7 @@ def zone_cleanup_ns_records(verbose=False):
33
33
  record.delete()
34
34
 
35
35
  for ns in nameserver_names:
36
- ns_records = zone.record_set.filter(
36
+ ns_records = zone.records.filter(
37
37
  name=ns_name,
38
38
  type=RecordTypeChoices.NS,
39
39
  value=ns,
@@ -46,7 +46,7 @@ def zone_cleanup_ns_records(verbose=False):
46
46
  record.delete()
47
47
 
48
48
  try:
49
- ns_record = zone.record_set.get(
49
+ ns_record = zone.records.get(
50
50
  name=ns_name,
51
51
  type=RecordTypeChoices.NS,
52
52
  value=ns,
@@ -76,9 +76,7 @@ def zone_update_soa_records(verbose=False):
76
76
  soa_name = "@"
77
77
 
78
78
  for zone in Zone.objects.all():
79
- delete_soa = zone.record_set.filter(name=soa_name, type=RecordTypeChoices.SOA)[
80
- 1:
81
- ]
79
+ delete_soa = zone.records.filter(name=soa_name, type=RecordTypeChoices.SOA)[1:]
82
80
  for record in delete_soa:
83
81
  if verbose:
84
82
  print(f"Deleting duplicate SOA record {record}")
@@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand
2
2
 
3
3
  from ipam.models import IPAddress
4
4
 
5
- from netbox_dns.utilities import update_dns_records
5
+ from netbox_dns.utilities import update_dns_records, get_zones
6
6
 
7
7
 
8
8
  class Command(BaseCommand):
@@ -22,6 +22,8 @@ class Command(BaseCommand):
22
22
  self.stdout.write(
23
23
  f"Updating DNS records for IP Address {ip_address}, VRF {ip_address.vrf}"
24
24
  )
25
+ if options.get("verbosity") >= 3:
26
+ self.stdout.write(f" Zones: {get_zones(ip_address)}")
25
27
  if (
26
28
  update_dns_records(ip_address, force=options.get("force"))
27
29
  and options.get("verbosity") >= 1
@@ -0,0 +1,63 @@
1
+ # Generated by Django 5.0.9 on 2024-11-11 08:09
2
+
3
+ import django.db.models.deletion
4
+ from django.db import migrations, models
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+
9
+ dependencies = [
10
+ ("netbox_dns", "0010_view_ip_address_filter"),
11
+ ]
12
+
13
+ operations = [
14
+ migrations.AlterField(
15
+ model_name="record",
16
+ name="zone",
17
+ field=models.ForeignKey(
18
+ on_delete=django.db.models.deletion.CASCADE,
19
+ related_name="records",
20
+ to="netbox_dns.zone",
21
+ ),
22
+ ),
23
+ migrations.AlterField(
24
+ model_name="zone",
25
+ name="registrant",
26
+ field=models.ForeignKey(
27
+ blank=True,
28
+ null=True,
29
+ on_delete=django.db.models.deletion.SET_NULL,
30
+ related_name="registrant_zones",
31
+ to="netbox_dns.registrationcontact",
32
+ ),
33
+ ),
34
+ migrations.AlterField(
35
+ model_name="zone",
36
+ name="registrar",
37
+ field=models.ForeignKey(
38
+ blank=True,
39
+ null=True,
40
+ on_delete=django.db.models.deletion.SET_NULL,
41
+ related_name="zones",
42
+ to="netbox_dns.registrar",
43
+ ),
44
+ ),
45
+ migrations.AlterField(
46
+ model_name="zone",
47
+ name="soa_mname",
48
+ field=models.ForeignKey(
49
+ on_delete=django.db.models.deletion.PROTECT,
50
+ related_name="soa_zones",
51
+ to="netbox_dns.nameserver",
52
+ ),
53
+ ),
54
+ migrations.AlterField(
55
+ model_name="zone",
56
+ name="view",
57
+ field=models.ForeignKey(
58
+ on_delete=django.db.models.deletion.PROTECT,
59
+ related_name="zones",
60
+ to="netbox_dns.view",
61
+ ),
62
+ ),
63
+ ]
@@ -21,6 +21,10 @@ class ObjectModificationMixin:
21
21
 
22
22
  def _save_field_values(self):
23
23
  for field in self.check_fields:
24
+ if field == "custom_field_data":
25
+ self._saved_custom_field_data = self.custom_field_data.copy()
26
+ continue
27
+
24
28
  if f"{field}_id" in self.__dict__:
25
29
  setattr(self, f"_saved_{field}_id", self.__dict__.get(f"{field}_id"))
26
30
  else:
@@ -100,7 +100,7 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
100
100
  super().save(*args, **kwargs)
101
101
 
102
102
  if changed_fields is not None and "name" in changed_fields:
103
- soa_zones = self.zones_soa.all()
103
+ soa_zones = self.soa_zones.all()
104
104
  for soa_zone in soa_zones:
105
105
  soa_zone.update_soa_record()
106
106
 
@@ -111,7 +111,7 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
111
111
  def delete(self, *args, **kwargs):
112
112
  with transaction.atomic():
113
113
  for zone in self.zones.all():
114
- zone.record_set.filter(
114
+ zone.records.filter(
115
115
  Q(managed=True),
116
116
  Q(value=f"{self.name}."),
117
117
  Q(type=RecordTypeChoices.NS),
@@ -1,4 +1,5 @@
1
1
  import ipaddress
2
+ import netaddr
2
3
 
3
4
  import dns
4
5
  from dns import name as dns_name
@@ -123,6 +124,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
123
124
  verbose_name=_("Zone"),
124
125
  to="Zone",
125
126
  on_delete=models.CASCADE,
127
+ related_name="records",
126
128
  )
127
129
  fqdn = models.CharField(
128
130
  verbose_name=_("FQDN"),
@@ -320,7 +322,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
320
322
  def ptr_zone(self):
321
323
  if self.type == RecordTypeChoices.A:
322
324
  ptr_zone = (
323
- self.zone.view.zone_set.filter(
325
+ self.zone.view.zones.filter(
324
326
  rfc2317_prefix__net_contains=self.value,
325
327
  )
326
328
  .order_by("rfc2317_prefix__net_mask_length")
@@ -331,7 +333,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
331
333
  return ptr_zone
332
334
 
333
335
  ptr_zone = (
334
- self.zone.view.zone_set.filter(arpa_network__net_contains=self.value)
336
+ self.zone.view.zones.filter(arpa_network__net_contains=self.value)
335
337
  .order_by("arpa_network__net_mask_length")
336
338
  .last()
337
339
  )
@@ -451,7 +453,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
451
453
 
452
454
  self.remove_from_rfc2317_cname_record(save_zone_serial=save_zone_serial)
453
455
 
454
- rfc2317_cname_record = self.zone.rfc2317_parent_zone.record_set.filter(
456
+ rfc2317_cname_record = self.zone.rfc2317_parent_zone.records.filter(
455
457
  name=cname_name,
456
458
  type=RecordTypeChoices.CNAME,
457
459
  managed=True,
@@ -601,7 +603,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
601
603
  if new_zone is None:
602
604
  new_zone = self.zone
603
605
 
604
- records = new_zone.record_set.filter(
606
+ records = new_zone.records.filter(
605
607
  name=self.name,
606
608
  type=self.type,
607
609
  value=self.value,
@@ -637,7 +639,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
637
639
  if not get_plugin_config("netbox_dns", "dnssync_conflict_deactivate", False):
638
640
  return
639
641
 
640
- records = self.zone.record_set.filter(
642
+ records = self.zone.records.filter(
641
643
  name=self.name,
642
644
  type=self.type,
643
645
  value=self.value,
@@ -665,7 +667,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
665
667
  return
666
668
 
667
669
  records = (
668
- self.zone.record_set.filter(
670
+ self.zone.records.filter(
669
671
  name=self.name,
670
672
  type=self.type,
671
673
  )
@@ -708,7 +710,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
708
710
  ttl = self.ttl
709
711
 
710
712
  records = (
711
- self.zone.record_set.filter(
713
+ self.zone.records.filter(
712
714
  name=self.name,
713
715
  type=self.type,
714
716
  )
@@ -736,7 +738,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
736
738
  if not self.is_active:
737
739
  return
738
740
 
739
- records = self.zone.record_set.filter(name=self.name, active=True).exclude(
741
+ records = self.zone.records.filter(name=self.name, active=True).exclude(
740
742
  pk=self.pk
741
743
  )
742
744
 
@@ -755,7 +757,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
755
757
  )
756
758
 
757
759
  if (
758
- ptr_cname_zone.record_set.filter(
760
+ ptr_cname_zone.records.filter(
759
761
  name=ptr_cname_name,
760
762
  active=True,
761
763
  )
@@ -839,7 +841,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
839
841
  self.ip_address = self.address_from_name
840
842
 
841
843
  elif self.is_address_record:
842
- self.ip_address = self.value
844
+ self.ip_address = netaddr.IPAddress(self.value)
843
845
  else:
844
846
  self.ip_address = None
845
847
 
@@ -857,9 +859,8 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
857
859
  if changed_fields is None or changed_fields:
858
860
  super().save(*args, **kwargs)
859
861
 
860
- _zone = self.zone
861
- if self.type != RecordTypeChoices.SOA and _zone.soa_serial_auto:
862
- _zone.update_serial(save_zone_serial=save_zone_serial)
862
+ if self.type != RecordTypeChoices.SOA and self.zone.soa_serial_auto:
863
+ self.zone.update_serial(save_zone_serial=save_zone_serial)
863
864
 
864
865
  def delete(self, *args, save_zone_serial=True, **kwargs):
865
866
  if self.rfc2317_cname_record:
@@ -142,7 +142,7 @@ class RecordTemplate(NetBoxModel):
142
142
  raise ValidationError({"value": exc})
143
143
 
144
144
  def matching_records(self, zone):
145
- return zone.record_set.filter(
145
+ return zone.records.filter(
146
146
  name=self.record_name, type=self.type, value=self.value
147
147
  )
148
148
 
@@ -137,7 +137,7 @@ class RegistrationContact(NetBoxModel):
137
137
  @property
138
138
  def zones(self):
139
139
  return (
140
- set(self.zone_set.all())
140
+ set(self.registrant_zones.all())
141
141
  | set(self.admin_c_zones.all())
142
142
  | set(self.tech_c_zones.all())
143
143
  | set(self.billing_c_zones.all())
@@ -88,6 +88,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
88
88
  verbose_name=_("View"),
89
89
  to="View",
90
90
  on_delete=models.PROTECT,
91
+ related_name="zones",
91
92
  null=False,
92
93
  )
93
94
  name = models.CharField(
@@ -121,7 +122,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
121
122
  soa_mname = models.ForeignKey(
122
123
  verbose_name=_("SOA MName"),
123
124
  to="NameServer",
124
- related_name="zones_soa",
125
+ related_name="soa_zones",
125
126
  on_delete=models.PROTECT,
126
127
  blank=False,
127
128
  null=False,
@@ -190,6 +191,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
190
191
  verbose_name=_("Registrar"),
191
192
  to="Registrar",
192
193
  on_delete=models.SET_NULL,
194
+ related_name="zones",
193
195
  blank=True,
194
196
  null=True,
195
197
  )
@@ -203,6 +205,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
203
205
  verbose_name=_("Registrant"),
204
206
  to="RegistrationContact",
205
207
  on_delete=models.SET_NULL,
208
+ related_name="registrant_zones",
206
209
  blank=True,
207
210
  null=True,
208
211
  )
@@ -368,7 +371,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
368
371
  return None
369
372
 
370
373
  return (
371
- self.view.zone_set.filter(arpa_network__net_contains=self.rfc2317_prefix)
374
+ self.view.zones.filter(arpa_network__net_contains=self.rfc2317_prefix)
372
375
  .order_by("arpa_network__net_mask_length")
373
376
  .last()
374
377
  )
@@ -389,25 +392,23 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
389
392
 
390
393
  @property
391
394
  def child_zones(self):
392
- return self.view.zone_set.filter(
393
- name__iregex=rf"^[^.]+\.{re.escape(self.name)}$"
394
- )
395
+ return self.view.zones.filter(name__iregex=rf"^[^.]+\.{re.escape(self.name)}$")
395
396
 
396
397
  @property
397
398
  def descendant_zones(self):
398
- return self.view.zone_set.filter(name__endswith=f".{self.name}")
399
+ return self.view.zones.filter(name__endswith=f".{self.name}")
399
400
 
400
401
  @property
401
402
  def parent_zone(self):
402
403
  try:
403
- return self.view.zone_set.get(name=get_parent_zone_names(self.name)[-1])
404
+ return self.view.zones.get(name=get_parent_zone_names(self.name)[-1])
404
405
  except (Zone.DoesNotExist, IndexError):
405
406
  return None
406
407
 
407
408
  @property
408
409
  def ancestor_zones(self):
409
410
  return (
410
- self.view.zone_set.annotate(name_length=Length("name"))
411
+ self.view.zones.annotate(name_length=Length("name"))
411
412
  .filter(name__in=get_parent_zone_names(self.name))
412
413
  .order_by("name_length")
413
414
  )
@@ -419,7 +420,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
419
420
  ]
420
421
 
421
422
  ns_records = (
422
- self.record_set.filter(type=RecordTypeChoices.NS)
423
+ self.records.filter(type=RecordTypeChoices.NS)
423
424
  .exclude(fqdn=self.fqdn)
424
425
  .filter(fqdn__in=descendant_zone_names)
425
426
  )
@@ -427,8 +428,8 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
427
428
 
428
429
  return (
429
430
  ns_records
430
- | self.record_set.filter(type=RecordTypeChoices.DS)
431
- | self.record_set.filter(
431
+ | self.records.filter(type=RecordTypeChoices.DS)
432
+ | self.records.filter(
432
433
  type__in=(RecordTypeChoices.A, RecordTypeChoices.AAAA),
433
434
  fqdn__in=ns_values,
434
435
  )
@@ -473,7 +474,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
473
474
  )
474
475
 
475
476
  try:
476
- soa_record = self.record_set.get(type=RecordTypeChoices.SOA, name=soa_name)
477
+ soa_record = self.records.get(type=RecordTypeChoices.SOA, name=soa_name)
477
478
 
478
479
  if soa_record.ttl != soa_ttl or soa_record.value != soa_rdata.to_text():
479
480
  soa_record.ttl = soa_ttl
@@ -496,9 +497,10 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
496
497
 
497
498
  nameservers = [f"{nameserver.name}." for nameserver in self.nameservers.all()]
498
499
 
499
- self.record_set.filter(type=RecordTypeChoices.NS, managed=True).exclude(
500
- value__in=nameservers
501
- ).delete()
500
+ for ns_record in self.records.filter(
501
+ type=RecordTypeChoices.NS, managed=True
502
+ ).exclude(value__in=nameservers):
503
+ ns_record.delete()
502
504
 
503
505
  for ns in nameservers:
504
506
  Record.raw_objects.update_or_create(
@@ -533,7 +535,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
533
535
  continue
534
536
 
535
537
  relative_name = name.relativize(parent).to_text()
536
- address_records = ns_zone.record_set.filter(
538
+ address_records = ns_zone.records.filter(
537
539
  Q(status__in=RECORD_ACTIVE_STATUS_LIST),
538
540
  Q(Q(name=f"{_nameserver.name}.") | Q(name=relative_name)),
539
541
  Q(Q(type=RecordTypeChoices.A) | Q(type=RecordTypeChoices.AAAA)),
@@ -623,9 +625,9 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
623
625
  self.rfc2317_parent_zone = rfc2317_parent_zone
624
626
  self.save(update_fields=["rfc2317_parent_zone"])
625
627
 
626
- ptr_records = self.record_set.filter(
627
- type=RecordTypeChoices.PTR
628
- ).prefetch_related("zone", "rfc2317_cname_record")
628
+ ptr_records = self.records.filter(type=RecordTypeChoices.PTR).prefetch_related(
629
+ "zone", "rfc2317_cname_record"
630
+ )
629
631
  ptr_zones = {ptr_record.zone for ptr_record in ptr_records}
630
632
 
631
633
  if self.rfc2317_parent_managed:
@@ -752,7 +754,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
752
754
  or old_view_id != self.view_id
753
755
  ):
754
756
  ip_addresses = IPAddress.objects.filter(
755
- netbox_dns_records__in=self.record_set.filter(
757
+ netbox_dns_records__in=self.records.filter(
756
758
  ipam_ip_address__isnull=False
757
759
  )
758
760
  )
@@ -795,7 +797,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
795
797
  else:
796
798
  self.rfc2317_parent_zone = None
797
799
 
798
- overlapping_zones = self.view.zone_set.filter(
800
+ overlapping_zones = self.view.zones.filter(
799
801
  rfc2317_prefix__net_overlap=self.rfc2317_prefix,
800
802
  active=True,
801
803
  ).exclude(pk=self.pk)
@@ -828,7 +830,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
828
830
  if (
829
831
  changed_fields is None or {"name", "view", "status"} & changed_fields
830
832
  ) and self.is_reverse_zone:
831
- zones = self.view.zone_set.filter(
833
+ zones = self.view.zones.filter(
832
834
  arpa_network__net_contains_or_equals=self.arpa_network
833
835
  )
834
836
  address_records = Record.objects.filter(
@@ -858,7 +860,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
858
860
  or {"name", "view", "status", "rfc2317_prefix", "rfc2317_parent_managed"}
859
861
  & changed_fields
860
862
  ) and self.is_rfc2317_zone:
861
- zones = self.view.zone_set.filter(
863
+ zones = self.view.zones.filter(
862
864
  arpa_network__net_contains=self.rfc2317_prefix
863
865
  )
864
866
  address_records = Record.objects.filter(
@@ -882,14 +884,14 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
882
884
  self.update_rfc2317_parent_zone()
883
885
 
884
886
  elif changed_fields is not None and {"name", "view", "status"} & changed_fields:
885
- for address_record in self.record_set.filter(
887
+ for address_record in self.records.filter(
886
888
  type__in=(RecordTypeChoices.A, RecordTypeChoices.AAAA),
887
889
  ipam_ip_address__isnull=True,
888
890
  ):
889
891
  address_record.save(update_fields=["ptr_record"])
890
892
 
891
893
  if changed_fields is not None and "name" in changed_fields:
892
- for _record in self.record_set.filter(ipam_ip_address__isnull=True):
894
+ for _record in self.records.filter(ipam_ip_address__isnull=True):
893
895
  _record.save(
894
896
  update_fields=["fqdn"],
895
897
  save_zone_serial=False,
@@ -899,7 +901,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
899
901
 
900
902
  if changed_fields is None or {"name", "view"} & changed_fields:
901
903
  ip_addresses = IPAddress.objects.filter(
902
- netbox_dns_records__in=self.record_set.filter(
904
+ netbox_dns_records__in=self.records.filter(
903
905
  ipam_ip_address__isnull=False
904
906
  )
905
907
  )
@@ -913,13 +915,13 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
913
915
 
914
916
  def delete(self, *args, **kwargs):
915
917
  with transaction.atomic():
916
- address_records = self.record_set.filter(
918
+ address_records = self.records.filter(
917
919
  ptr_record__isnull=False
918
920
  ).prefetch_related("ptr_record")
919
921
  for address_record in address_records:
920
922
  address_record.ptr_record.delete()
921
923
 
922
- ptr_records = self.record_set.filter(address_record__isnull=False)
924
+ ptr_records = self.records.filter(address_record__isnull=False)
923
925
  update_records = list(
924
926
  Record.objects.filter(ptr_record__in=ptr_records).values_list(
925
927
  "pk", flat=True
@@ -945,7 +947,7 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
945
947
 
946
948
  ipam_ip_addresses = list(
947
949
  IPAddress.objects.filter(
948
- netbox_dns_records__in=self.record_set.filter(
950
+ netbox_dns_records__in=self.records.filter(
949
951
  ipam_ip_address__isnull=False
950
952
  )
951
953
  )
@@ -105,7 +105,7 @@ class NameServerZoneListView(generic.ObjectChildrenView):
105
105
 
106
106
  @register_model_view(NameServer, "soa_zones")
107
107
  class NameServerSOAZoneListView(generic.ObjectChildrenView):
108
- queryset = NameServer.objects.prefetch_related("zones_soa")
108
+ queryset = NameServer.objects.prefetch_related("soa_zones")
109
109
  child_model = Zone
110
110
  table = ZoneTable
111
111
  filterset = ZoneFilterSet
@@ -115,9 +115,9 @@ class NameServerSOAZoneListView(generic.ObjectChildrenView):
115
115
  tab = ViewTab(
116
116
  label=_("SOA Zones"),
117
117
  permission="netbox_dns.view_zone",
118
- badge=lambda obj: obj.zones_soa.count(),
118
+ badge=lambda obj: obj.soa_zones.count(),
119
119
  hide_if_empty=True,
120
120
  )
121
121
 
122
122
  def get_children(self, request, parent):
123
- return parent.zones_soa
123
+ return parent.soa_zones
@@ -70,7 +70,7 @@ class RecordView(generic.ObjectView):
70
70
  data=cname_targets,
71
71
  )
72
72
 
73
- if instance.zone.view.zone_set.filter(
73
+ if instance.zone.view.zones.filter(
74
74
  name__in=get_parent_zone_names(instance.value_fqdn, min_labels=1),
75
75
  active=True,
76
76
  ).exists():
@@ -93,7 +93,7 @@ class RecordView(generic.ObjectView):
93
93
  )
94
94
  )
95
95
 
96
- parent_zones = instance.zone.view.zone_set.filter(
96
+ parent_zones = instance.zone.view.zones.filter(
97
97
  name__in=get_parent_zone_names(instance.fqdn, include_self=True),
98
98
  )
99
99