netbox-plugin-dns 1.3.1__tar.gz → 1.3.3__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 (202) hide show
  1. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/PKG-INFO +1 -1
  2. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/__init__.py +1 -1
  3. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/zone.py +9 -2
  4. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/dnssec_key_template.py +1 -1
  5. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/dnssec_policy.py +1 -1
  6. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/nameserver.py +1 -1
  7. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/record.py +1 -1
  8. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/record_template.py +1 -1
  9. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/registrar.py +1 -1
  10. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/registration_contact.py +1 -1
  11. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/view.py +1 -1
  12. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/zone.py +1 -1
  13. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/zone_template.py +1 -1
  14. netbox_plugin_dns-1.3.3/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
  15. netbox_plugin_dns-1.3.3/netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
  16. netbox_plugin_dns-1.3.3/netbox_dns/management/commands/remove_orphaned_ptr_records.py +35 -0
  17. netbox_plugin_dns-1.3.3/netbox_dns/migrations/0022_alter_record_ipam_ip_address.py +26 -0
  18. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/record.py +58 -44
  19. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/zone.py +30 -24
  20. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/zone_template.py +2 -0
  21. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record.html +7 -0
  22. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/base.html +1 -1
  23. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone.html +7 -0
  24. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/ipam_dnssync.py +21 -3
  25. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/zone.py +2 -0
  26. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/PKG-INFO +1 -1
  27. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/SOURCES.txt +2 -0
  28. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/pyproject.toml +4 -2
  29. netbox_plugin_dns-1.3.1/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
  30. netbox_plugin_dns-1.3.1/netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
  31. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/LICENSE +0 -0
  32. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/README.md +0 -0
  33. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/field_serializers.py +0 -0
  34. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/nested_serializers.py +0 -0
  35. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers.py +0 -0
  36. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/__init__.py +0 -0
  37. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/dnssec_key_template.py +0 -0
  38. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/dnssec_policy.py +0 -0
  39. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/nameserver.py +0 -0
  40. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/prefix.py +0 -0
  41. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/record.py +0 -0
  42. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/record_template.py +0 -0
  43. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/registrar.py +0 -0
  44. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/registration_contact.py +0 -0
  45. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/view.py +0 -0
  46. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/zone.py +0 -0
  47. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/zone_template.py +0 -0
  48. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/urls.py +0 -0
  49. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/views.py +0 -0
  50. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/apps.py +0 -0
  51. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/__init__.py +0 -0
  52. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/dnssec_key_template.py +0 -0
  53. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/dnssec_policy.py +0 -0
  54. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/record.py +0 -0
  55. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/utilities.py +0 -0
  56. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/zone.py +0 -0
  57. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/__init__.py +0 -0
  58. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/address.py +0 -0
  59. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/choice_array.py +0 -0
  60. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/ipam.py +0 -0
  61. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/network.py +0 -0
  62. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/rfc2317.py +0 -0
  63. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/timeperiod.py +0 -0
  64. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/__init__.py +0 -0
  65. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/dnssec_key_template.py +0 -0
  66. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/dnssec_policy.py +0 -0
  67. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/nameserver.py +0 -0
  68. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/record.py +0 -0
  69. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/record_template.py +0 -0
  70. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/registrar.py +0 -0
  71. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/registration_contact.py +0 -0
  72. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/view.py +0 -0
  73. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/zone.py +0 -0
  74. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/zone_template.py +0 -0
  75. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/__init__.py +0 -0
  76. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/dnssec_key_template.py +0 -0
  77. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/dnssec_policy.py +0 -0
  78. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/nameserver.py +0 -0
  79. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/record.py +0 -0
  80. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/record_template.py +0 -0
  81. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/registrar.py +0 -0
  82. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/registration_contact.py +0 -0
  83. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/view.py +0 -0
  84. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/zone_template.py +0 -0
  85. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/__init__.py +0 -0
  86. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/enums.py +0 -0
  87. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filter_lookups.py +0 -0
  88. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/__init__.py +0 -0
  89. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/schema.py +0 -0
  90. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/types.py +0 -0
  91. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/locale/en/LC_MESSAGES/django.mo +0 -0
  92. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/cleanup_database.py +0 -0
  93. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
  94. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/rebuild_dnssync.py +0 -0
  95. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/setup_dnssync.py +0 -0
  96. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/update_soa.py +0 -0
  97. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  98. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
  99. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
  100. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0003_default_view.py +0 -0
  101. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
  102. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
  103. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0006_templating.py +0 -0
  104. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
  105. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0008_view_prefixes.py +0 -0
  106. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -0
  107. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0010_view_ip_address_filter.py +0 -0
  108. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0011_rename_related_fields.py +0 -0
  109. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0012_natural_ordering.py +0 -0
  110. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0013_zonetemplate_soa_mname_zonetemplate_soa_rname.py +0 -0
  111. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0014_alter_unique_constraints_lowercase.py +0 -0
  112. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0015_dnssec.py +0 -0
  113. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0016_dnssec_policy_status.py +0 -0
  114. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0017_dnssec_policy_zone_zone_template.py +0 -0
  115. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0018_zone_domain_status_zone_expiration_date.py +0 -0
  116. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0019_dnssecpolicy_parental_agents.py +0 -0
  117. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  118. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0020_remove_dnssecpolicy_parental_agents_and_more.py +0 -0
  119. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0021_alter_record_ptr_record.py +0 -0
  120. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  121. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0022_search.py +0 -0
  122. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  123. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0024_tenancy.py +0 -0
  124. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  125. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  126. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  127. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  128. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
  129. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/__init__.py +0 -0
  130. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/mixins/__init__.py +0 -0
  131. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/mixins/object_modification.py +0 -0
  132. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/__init__.py +0 -0
  133. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/dnssec_key_template.py +0 -0
  134. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/dnssec_policy.py +0 -0
  135. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/nameserver.py +0 -0
  136. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/record_template.py +0 -0
  137. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/registrar.py +0 -0
  138. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/registration_contact.py +0 -0
  139. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/view.py +0 -0
  140. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/navigation.py +55 -55
  141. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/signals/__init__.py +0 -0
  142. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/signals/dnssec.py +0 -0
  143. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/signals/ipam_dnssync.py +0 -0
  144. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/__init__.py +0 -0
  145. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/dnssec_key_template.py +0 -0
  146. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/dnssec_policy.py +0 -0
  147. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/ipam_dnssync.py +0 -0
  148. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/nameserver.py +0 -0
  149. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/record.py +0 -0
  150. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/record_template.py +0 -0
  151. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/registrar.py +0 -0
  152. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/registration_contact.py +0 -0
  153. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/view.py +0 -0
  154. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/zone.py +0 -0
  155. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/zone_template.py +0 -0
  156. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/template_content.py +0 -0
  157. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/dnsseckeytemplate.html +0 -0
  158. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/dnssecpolicy.html +0 -0
  159. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  160. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  161. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  162. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
  163. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  164. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/registrationcontact.html +0 -0
  165. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view/button.html +0 -0
  166. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view/prefix.html +0 -0
  167. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
  168. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view.html +0 -0
  169. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  170. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
  171. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/delegation_record.html +0 -0
  172. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  173. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  174. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  175. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  176. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zonetemplate/child.html +0 -0
  177. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
  178. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templatetags/__init__.py +0 -0
  179. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templatetags/netbox_dns.py +0 -0
  180. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/urls.py +0 -0
  181. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/__init__.py +0 -0
  182. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/conversions.py +0 -0
  183. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/dns.py +0 -0
  184. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/__init__.py +0 -0
  185. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/dns_name.py +0 -0
  186. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/dns_value.py +0 -0
  187. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/dnssec.py +0 -0
  188. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/rfc2317.py +0 -0
  189. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/__init__.py +0 -0
  190. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/dnssec_key_template.py +0 -0
  191. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/dnssec_policy.py +0 -0
  192. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/nameserver.py +0 -0
  193. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/record.py +0 -0
  194. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/record_template.py +0 -0
  195. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/registrar.py +0 -0
  196. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/registration_contact.py +0 -0
  197. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/view.py +0 -0
  198. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/zone_template.py +0 -0
  199. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/dependency_links.txt +0 -0
  200. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/requires.txt +0 -0
  201. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/top_level.txt +0 -0
  202. {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-plugin-dns
3
- Version: 1.3.1
3
+ Version: 1.3.3
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
@@ -4,7 +4,7 @@ from django.core.exceptions import ImproperlyConfigured
4
4
  from netbox.plugins import PluginConfig
5
5
  from netbox.plugins.utils import get_plugin_config
6
6
 
7
- __version__ = "1.3.1"
7
+ __version__ = "1.3.3"
8
8
 
9
9
 
10
10
  def _check_list(setting):
@@ -1,5 +1,5 @@
1
1
  from django import forms
2
- from django.db import transaction
2
+ from django.db import models, transaction
3
3
  from django.conf import settings
4
4
  from django.core.validators import MinValueValidator, MaxValueValidator
5
5
  from django.core.exceptions import ValidationError
@@ -101,7 +101,14 @@ class ZoneTemplateUpdateMixin:
101
101
  custom_fields = {}
102
102
  for key, value in zone_data.copy().items():
103
103
  if key.startswith("cf_"):
104
- custom_fields[key[3:]] = value
104
+ if isinstance(value, models.Model):
105
+ custom_fields[key[3:]] = value.pk
106
+ elif isinstance(value, models.QuerySet):
107
+ custom_fields[key[3:]] = list(
108
+ value.values_list("pk", flat=True)
109
+ )
110
+ else:
111
+ custom_fields[key[3:]] = value
105
112
  zone_data.pop(key)
106
113
  if custom_fields:
107
114
  zone_data["custom_field_data"] = custom_fields
@@ -23,7 +23,7 @@ from netbox_dns.models import DNSSECKeyTemplate
23
23
  __all__ = ("NetBoxDNSDNSSECKeyTemplateFilter",)
24
24
 
25
25
 
26
- @strawberry_django.filter(DNSSECKeyTemplate, lookups=True)
26
+ @strawberry_django.filter_type(DNSSECKeyTemplate, lookups=True)
27
27
  class NetBoxDNSDNSSECKeyTemplateFilter(
28
28
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
29
29
  ):
@@ -21,7 +21,7 @@ from netbox_dns.graphql.filter_lookups import PolicyDigestArrayLookup
21
21
  __all__ = ("NetBoxDNSDNSSECPolicyFilter", "PolicyDigestArrayLookup")
22
22
 
23
23
 
24
- @strawberry_django.filter(DNSSECPolicy, lookups=True)
24
+ @strawberry_django.filter_type(DNSSECPolicy, lookups=True)
25
25
  class NetBoxDNSDNSSECPolicyFilter(
26
26
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
27
27
  ):
@@ -16,7 +16,7 @@ from netbox_dns.models import NameServer
16
16
  __all__ = ("NetBoxDNSNameServerFilter",)
17
17
 
18
18
 
19
- @strawberry_django.filter(NameServer, lookups=True)
19
+ @strawberry_django.filter_type(NameServer, lookups=True)
20
20
  class NetBoxDNSNameServerFilter(
21
21
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
22
22
  ):
@@ -24,7 +24,7 @@ from netbox_dns.models import Record
24
24
  __all__ = ("NetBoxDNSRecordFilter",)
25
25
 
26
26
 
27
- @strawberry_django.filter(Record, lookups=True)
27
+ @strawberry_django.filter_type(Record, lookups=True)
28
28
  class NetBoxDNSRecordFilter(
29
29
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
30
30
  ):
@@ -20,7 +20,7 @@ from netbox_dns.models import RecordTemplate
20
20
  __all__ = ("NetBoxDNSRecordTemplateFilter",)
21
21
 
22
22
 
23
- @strawberry_django.filter(RecordTemplate, lookups=True)
23
+ @strawberry_django.filter_type(RecordTemplate, lookups=True)
24
24
  class NetBoxDNSRecordTemplateFilter(
25
25
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
26
26
  ):
@@ -15,7 +15,7 @@ from netbox_dns.models import Registrar
15
15
  __all__ = ("NetBoxDNSRegistrarFilter",)
16
16
 
17
17
 
18
- @strawberry_django.filter(Registrar, lookups=True)
18
+ @strawberry_django.filter_type(Registrar, lookups=True)
19
19
  class NetBoxDNSRegistrarFilter(NetBoxModelFilterMixin):
20
20
  name: FilterLookup[str] | None = strawberry_django.filter_field()
21
21
  description: FilterLookup[str] | None = strawberry_django.filter_field()
@@ -9,7 +9,7 @@ from netbox_dns.models import RegistrationContact
9
9
  __all__ = ("NetBoxDNSRegistrationContactFilter",)
10
10
 
11
11
 
12
- @strawberry_django.filter(RegistrationContact, lookups=True)
12
+ @strawberry_django.filter_type(RegistrationContact, lookups=True)
13
13
  class NetBoxDNSRegistrationContactFilter(NetBoxModelFilterMixin):
14
14
  name: FilterLookup[str] | None = strawberry_django.filter_field()
15
15
  description: FilterLookup[str] | None = strawberry_django.filter_field()
@@ -16,7 +16,7 @@ from netbox_dns.models import View
16
16
  __all__ = ("NetBoxDNSViewFilter",)
17
17
 
18
18
 
19
- @strawberry_django.filter(View, lookups=True)
19
+ @strawberry_django.filter_type(View, lookups=True)
20
20
  class NetBoxDNSViewFilter(
21
21
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
22
22
  ):
@@ -23,7 +23,7 @@ from netbox_dns.models import Zone
23
23
  __all__ = ("NetBoxDNSZoneFilter",)
24
24
 
25
25
 
26
- @strawberry_django.filter(Zone, lookups=True)
26
+ @strawberry_django.filter_type(Zone, lookups=True)
27
27
  class NetBoxDNSZoneFilter(
28
28
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
29
29
  ):
@@ -21,7 +21,7 @@ from netbox_dns.models import ZoneTemplate
21
21
  __all__ = ("NetBoxDNSZoneTemplateFilter",)
22
22
 
23
23
 
24
- @strawberry_django.filter(ZoneTemplate, lookups=True)
24
+ @strawberry_django.filter_type(ZoneTemplate, lookups=True)
25
25
  class NetBoxDNSZoneTemplateFilter(
26
26
  ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
27
27
  ):
@@ -0,0 +1,35 @@
1
+ from django.core.management.base import BaseCommand
2
+
3
+ from netbox_dns.models import Record
4
+ from netbox_dns.choices import RecordTypeChoices
5
+
6
+
7
+ class Command(BaseCommand):
8
+ help = "Remove managed PTR records without an address record"
9
+
10
+ def handle(self, *model_names, **options):
11
+ orphaned_ptr_records = Record.objects.filter(
12
+ type=RecordTypeChoices.PTR,
13
+ address_records__isnull=True,
14
+ managed=True,
15
+ )
16
+
17
+ if not orphaned_ptr_records.exists():
18
+ if options.get("verbosity") >= 1:
19
+ self.stdout.write("No orphaned PTR records found")
20
+ return
21
+
22
+ if options.get("verbosity") >= 1:
23
+ self.stdout.write(
24
+ f"Removing {orphaned_ptr_records.count()} orphaned PTR record(s) ..."
25
+ )
26
+
27
+ for record in orphaned_ptr_records:
28
+ if options.get("verbosity") >= 2:
29
+ self.stdout.write(
30
+ f"removing PTR record {record} from zone {record.zone}"
31
+ )
32
+ record.delete()
33
+
34
+ if options.get("verbosity") >= 1:
35
+ self.stdout.write("... done.")
@@ -0,0 +1,26 @@
1
+ # Generated by Django 5.2.1 on 2025-05-19 19:34
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
+ ("ipam", "0081_remove_service_device_virtual_machine_add_parent_gfk_index"),
11
+ ("netbox_dns", "0021_alter_record_ptr_record"),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.AlterField(
16
+ model_name="record",
17
+ name="ipam_ip_address",
18
+ field=models.ForeignKey(
19
+ blank=True,
20
+ null=True,
21
+ on_delete=django.db.models.deletion.SET_NULL,
22
+ related_name="netbox_dns_records",
23
+ to="ipam.ipaddress",
24
+ ),
25
+ ),
26
+ ]
@@ -6,7 +6,7 @@ from dns import name as dns_name
6
6
  from dns import rdata
7
7
 
8
8
  from django.core.exceptions import ValidationError
9
- from django.db import transaction, models
9
+ from django.db import models
10
10
  from django.db.models import Q, ExpressionWrapper, BooleanField, Min
11
11
  from django.conf import settings
12
12
  from django.utils.translation import gettext_lazy as _
@@ -245,7 +245,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
245
245
  ipam_ip_address = models.ForeignKey(
246
246
  verbose_name=_("IPAM IP Address"),
247
247
  to="ipam.IPAddress",
248
- on_delete=models.CASCADE,
248
+ on_delete=models.SET_NULL,
249
249
  related_name="netbox_dns_records",
250
250
  blank=True,
251
251
  null=True,
@@ -378,6 +378,10 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
378
378
  def update_ptr_record(self, update_rfc2317_cname=True, save_zone_serial=True):
379
379
  ptr_zone = self.ptr_zone
380
380
 
381
+ # +
382
+ # Check whether a PTR record is optioned for and return if that is not the
383
+ # case.
384
+ # -
381
385
  if (
382
386
  ptr_zone is None
383
387
  or self.disable_ptr
@@ -388,6 +392,10 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
388
392
  self.ptr_record = None
389
393
  return
390
394
 
395
+ # +
396
+ # Determine the ptr_name and ptr_value related to the ptr_zone. RFC2317
397
+ # PTR names and zones need to be handled differently.
398
+ # -
391
399
  if ptr_zone.is_rfc2317_zone:
392
400
  ptr_name = self.rfc2317_ptr_name
393
401
  else:
@@ -396,9 +404,12 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
396
404
  .relativize(dns_name.from_text(ptr_zone.name))
397
405
  .to_text()
398
406
  )
399
-
400
407
  ptr_value = self.fqdn
401
- if ptr_record := self.ptr_record:
408
+
409
+ # +
410
+ # If there is an existing and matching PTR record there is nothing to be done.
411
+ # -
412
+ if (ptr_record := self.ptr_record) is not None:
402
413
  if (
403
414
  ptr_record.zone == ptr_zone
404
415
  and ptr_record.name == ptr_name
@@ -407,15 +418,37 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
407
418
  ):
408
419
  return
409
420
 
410
- if ptr_record is not None:
421
+ # +
422
+ # If there is an RFC2317 CNAME for the PTR record and it is either
423
+ # not required or needs to be changed, remove it.
424
+ # -
411
425
  if (
412
- not ptr_record.zone.is_rfc2317_zone
413
- and ptr_record.rfc2317_cname_record is not None
414
- ):
426
+ ptr_record.zone.pk != ptr_zone.pk or not ptr_record.zone.is_rfc2317_zone
427
+ ) and ptr_record.rfc2317_cname_record is not None:
415
428
  ptr_record.rfc2317_cname_record.delete(
416
429
  save_zone_serial=save_zone_serial
417
430
  )
431
+ ptr_record.rfc2317_cname_record = None
432
+
433
+ # +
434
+ # If the PTR record is used exclusively by the address record it can be
435
+ # modified to match the new name, zone, value and TTL.
436
+ # -
437
+ if ptr_record.address_records.count() == 1:
438
+ ptr_record.zone = ptr_zone
439
+ ptr_record.name = ptr_name
440
+ ptr_record.value = ptr_value
441
+ ptr_record.ttl = self.ttl
442
+ ptr_record.save(
443
+ update_rfc2317_cname=update_rfc2317_cname,
444
+ save_zone_serial=save_zone_serial,
445
+ )
446
+ return
418
447
 
448
+ # +
449
+ # Either there was no PTR record or the existing PTR record could not be re-used,
450
+ # so we need to either get find a matching PTR record or create a new one.
451
+ # -
419
452
  try:
420
453
  ptr_record = Record.objects.get(
421
454
  name=ptr_name,
@@ -423,43 +456,24 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
423
456
  type=RecordTypeChoices.PTR,
424
457
  value=ptr_value,
425
458
  )
426
- except Record.DoesNotExist:
427
- pass
428
-
429
- with transaction.atomic():
430
- if ptr_record is not None:
431
- if ptr_record.zone.pk != ptr_zone.pk:
432
- if ptr_record.rfc2317_cname_record is not None:
433
- ptr_record.rfc2317_cname_record.delete()
434
- ptr_record.rfc2317_cname_record = None
435
-
436
- if ptr_record.address_records.count() == 1:
437
- ptr_record.zone = ptr_zone
438
- ptr_record.name = ptr_name
439
- ptr_record.value = ptr_value
440
- ptr_record.ttl = self.ttl
441
- ptr_record.save(
442
- update_rfc2317_cname=update_rfc2317_cname,
443
- save_zone_serial=save_zone_serial,
444
- )
445
459
 
446
- else:
447
- self.ptr_record = ptr_record
448
- return
449
-
450
- if ptr_record is None:
451
- ptr_record = Record(
452
- zone_id=ptr_zone.pk,
453
- type=RecordTypeChoices.PTR,
454
- name=ptr_name,
455
- ttl=self.ttl,
456
- value=ptr_value,
457
- managed=True,
458
- )
459
- ptr_record.save(
460
- update_rfc2317_cname=update_rfc2317_cname,
461
- save_zone_serial=save_zone_serial,
462
- )
460
+ # +
461
+ # If no existing PTR record could be found in the database, create a new
462
+ # one from scratch.
463
+ # -
464
+ except Record.DoesNotExist:
465
+ ptr_record = Record(
466
+ zone_id=ptr_zone.pk,
467
+ type=RecordTypeChoices.PTR,
468
+ name=ptr_name,
469
+ ttl=self.ttl,
470
+ value=ptr_value,
471
+ managed=True,
472
+ )
473
+ ptr_record.save(
474
+ update_rfc2317_cname=update_rfc2317_cname,
475
+ save_zone_serial=save_zone_serial,
476
+ )
463
477
 
464
478
  self.ptr_record = ptr_record
465
479
 
@@ -585,6 +585,30 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
585
585
  managed=True,
586
586
  )
587
587
 
588
+ def _check_nameserver_address_records(self, nameserver):
589
+ name = dns_name.from_text(nameserver.name, origin=None)
590
+ parent = name.parent()
591
+
592
+ if len(parent) < 2:
593
+ return None
594
+
595
+ try:
596
+ ns_zone = Zone.objects.get(view_id=self.view.pk, name=parent.to_text())
597
+ except ObjectDoesNotExist:
598
+ return None
599
+
600
+ relative_name = name.relativize(parent).to_text()
601
+ address_records = ns_zone.records.filter(
602
+ Q(status__in=RECORD_ACTIVE_STATUS_LIST),
603
+ Q(Q(name=f"{nameserver.name}.") | Q(name=relative_name)),
604
+ Q(Q(type=RecordTypeChoices.A) | Q(type=RecordTypeChoices.AAAA)),
605
+ )
606
+
607
+ if not address_records.exists():
608
+ return _(
609
+ "Nameserver {ns} does not have an active address record in zone {zone}"
610
+ ).format(ns=nameserver.name, zone=ns_zone)
611
+
588
612
  def check_nameservers(self):
589
613
  nameservers = self.nameservers.all()
590
614
 
@@ -597,33 +621,15 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
597
621
  )
598
622
 
599
623
  for _nameserver in nameservers:
600
- name = dns_name.from_text(_nameserver.name, origin=None)
601
- parent = name.parent()
602
-
603
- if len(parent) < 2:
604
- continue
605
-
606
- try:
607
- ns_zone = Zone.objects.get(view_id=self.view.pk, name=parent.to_text())
608
- except ObjectDoesNotExist:
609
- continue
610
-
611
- relative_name = name.relativize(parent).to_text()
612
- address_records = ns_zone.records.filter(
613
- Q(status__in=RECORD_ACTIVE_STATUS_LIST),
614
- Q(Q(name=f"{_nameserver.name}.") | Q(name=relative_name)),
615
- Q(Q(type=RecordTypeChoices.A) | Q(type=RecordTypeChoices.AAAA)),
616
- )
617
-
618
- if not address_records:
619
- ns_warnings.append(
620
- _(
621
- "Nameserver {nameserver} does not have an active address record in zone {zone}"
622
- ).format(nameserver=_nameserver.name, zone=ns_zone)
623
- )
624
+ warning = self._check_nameserver_address_records(_nameserver)
625
+ if warning is not None:
626
+ ns_warnings.append(warning)
624
627
 
625
628
  return ns_warnings, ns_errors
626
629
 
630
+ def check_soa_mname(self):
631
+ return self._check_nameserver_address_records(self.soa_mname)
632
+
627
633
  def check_expiration(self):
628
634
  if self.expiration_date is None:
629
635
  return None, None
@@ -28,6 +28,8 @@ class ZoneTemplate(NetBoxModel):
28
28
  "description",
29
29
  "nameservers",
30
30
  "record_templates",
31
+ "soa_mname",
32
+ "soa_rname",
31
33
  "dnssec_policy",
32
34
  "registrar",
33
35
  "registrant",
@@ -6,6 +6,13 @@
6
6
  {% load i18n %}
7
7
 
8
8
  {% block control-buttons %}
9
+ {% if perms.netbox_dns.add_record and object.type != "CNAME" %}
10
+ <a href="{% url 'plugins:netbox_dns:record_add' %}?view={{ object.zone.view.pk }}&zone={{ object.zone.pk }}&value={{ object.fqdn }}&type=CNAME&return_url={{ object.get_absolute_url }}">
11
+ <button type="submit" class="btn btn-primary" name="add-record">
12
+ <i class="mdi mdi-plus-thick" aria-hidden="true"></i>{% trans "Add CNAME" %}
13
+ </button>
14
+ </a>
15
+ {% endif %}
9
16
  {% if object.managed %}
10
17
  {% else %}
11
18
  {{ block.super }}
@@ -7,7 +7,7 @@
7
7
 
8
8
  {% block extra_controls %}
9
9
  {% if perms.netbox_dns.add_record %}
10
- <a href="{% url 'plugins:netbox_dns:record_add' %}?zone={{ object.pk }}&return_url={{ object.get_absolute_url }}">
10
+ <a href="{% url 'plugins:netbox_dns:record_add' %}?zone={{ object.pk }}&return_url={% url 'plugins:netbox_dns:zone_records' pk=object.pk %}">
11
11
  <button type="submit" class="btn btn-primary" name="add-record">
12
12
  <i class="mdi mdi-plus-thick" aria-hidden="true"></i>{% trans "Add Record" %}
13
13
  </button>
@@ -137,6 +137,13 @@
137
137
  <th scope="row">{% trans "MName" %}</th>
138
138
  <td>{{ object.soa_mname|linkify }}</td>
139
139
  </tr>
140
+ {% if mname_warning %}
141
+ <tr>
142
+ <th class="text-warning" scope="row">{% trans "Warning" %}</th>
143
+ <td class="text-warning">{{ mname_warning }}</td>
144
+ </tr>
145
+ {% endif %}
146
+
140
147
  <tr>
141
148
  <th scope="row">{% trans "RName" %}</th>
142
149
  <td>{{ object.soa_rname }}</td>
@@ -10,7 +10,7 @@ from django.db.models import Q
10
10
  from netbox.context import current_request
11
11
  from ipam.models import IPAddress, Prefix
12
12
 
13
- from netbox_dns.choices import RecordStatusChoices
13
+ from netbox_dns.choices import RecordStatusChoices, RecordTypeChoices
14
14
 
15
15
  from .dns import get_parent_zone_names
16
16
  from .conversions import regex_from_list
@@ -213,10 +213,28 @@ def update_dns_records(ip_address, view=None, force=False):
213
213
 
214
214
 
215
215
  def delete_dns_records(ip_address, view=None):
216
- if view is None:
216
+ from netbox_dns.models import Record
217
+
218
+ if current_request.get() is None:
217
219
  address_records = ip_address.netbox_dns_records.all()
218
220
  else:
219
- address_records = ip_address.netbox_dns_records.filter(zone__view=view)
221
+ # +
222
+ # This is a dirty hack made necessary by NetBox grand idea of manipulating
223
+ # objects in its event handling code, removing references to related objects
224
+ # in pre_delete() before our pre_delete() handler has the chance to handle
225
+ # them.
226
+ #
227
+ # TODO: Find something better. This is really awful.
228
+ # -
229
+ address_records = Record.objects.filter(
230
+ type__in=(RecordTypeChoices.A, RecordTypeChoices.AAAA),
231
+ managed=True,
232
+ ip_address=ip_address.address.ip,
233
+ ipam_ip_address__isnull=True,
234
+ )
235
+
236
+ if view is not None:
237
+ address_records &= Record.objects.filter(zone__view=view)
220
238
 
221
239
  if not address_records.exists():
222
240
  return False
@@ -52,10 +52,12 @@ class ZoneView(generic.ObjectView):
52
52
 
53
53
  def get_extra_context(self, request, instance):
54
54
  ns_warnings, ns_errors = instance.check_nameservers()
55
+ mname_warning = instance.check_soa_mname()
55
56
 
56
57
  context = {
57
58
  "nameserver_warnings": ns_warnings,
58
59
  "nameserver_errors": ns_errors,
60
+ "mname_warning": mname_warning,
59
61
  "parent_zone": instance.parent_zone,
60
62
  }
61
63
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-plugin-dns
3
- Version: 1.3.1
3
+ Version: 1.3.3
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
@@ -80,6 +80,7 @@ netbox_dns/locale/fr/LC_MESSAGES/django.mo
80
80
  netbox_dns/management/commands/cleanup_database.py
81
81
  netbox_dns/management/commands/cleanup_rrset_ttl.py
82
82
  netbox_dns/management/commands/rebuild_dnssync.py
83
+ netbox_dns/management/commands/remove_orphaned_ptr_records.py
83
84
  netbox_dns/management/commands/setup_dnssync.py
84
85
  netbox_dns/management/commands/update_soa.py
85
86
  netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py
@@ -106,6 +107,7 @@ netbox_dns/migrations/0020_netbox_3_4.py
106
107
  netbox_dns/migrations/0020_remove_dnssecpolicy_parental_agents_and_more.py
107
108
  netbox_dns/migrations/0021_alter_record_ptr_record.py
108
109
  netbox_dns/migrations/0021_record_ip_address.py
110
+ netbox_dns/migrations/0022_alter_record_ipam_ip_address.py
109
111
  netbox_dns/migrations/0022_search.py
110
112
  netbox_dns/migrations/0023_alter_record_value.py
111
113
  netbox_dns/migrations/0024_tenancy.py
@@ -1,11 +1,13 @@
1
1
  [project]
2
2
  name = "netbox-plugin-dns"
3
- version = "1.3.1"
3
+ version = "1.3.3"
4
4
  description = "NetBox DNS is a NetBox plugin for managing DNS data."
5
5
  authors = [
6
6
  {name="Peter Eckel", email="pete@netbox-dns.org"},
7
7
  ]
8
- license = {file="LICENCE"}
8
+ license-files = [
9
+ "LICENSE"
10
+ ]
9
11
  readme = "README.md"
10
12
  keywords = ["netbox", "netbox-plugin", "dns"]
11
13
  classifiers = [