netbox-plugin-dns 1.0.7__tar.gz → 1.1.0__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 (155) hide show
  1. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/PKG-INFO +2 -1
  2. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/README.md +1 -0
  3. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/__init__.py +23 -4
  4. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers.py +2 -1
  5. netbox_plugin_dns-1.1.0/netbox_dns/api/serializers_/prefix.py +18 -0
  6. netbox_plugin_dns-1.0.7/netbox_dns/api/serializers_/contact.py → netbox_plugin_dns-1.1.0/netbox_dns/api/serializers_/registration_contact.py +5 -5
  7. netbox_plugin_dns-1.1.0/netbox_dns/api/serializers_/view.py +69 -0
  8. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/zone.py +5 -5
  9. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/zone_template.py +5 -5
  10. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/urls.py +5 -2
  11. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/views.py +17 -7
  12. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/fields/__init__.py +1 -0
  13. netbox_plugin_dns-1.1.0/netbox_dns/fields/ipam.py +15 -0
  14. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/__init__.py +1 -1
  15. netbox_plugin_dns-1.0.7/netbox_dns/filtersets/contact.py → netbox_plugin_dns-1.1.0/netbox_dns/filtersets/registration_contact.py +4 -4
  16. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/view.py +16 -0
  17. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/zone.py +15 -15
  18. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/zone_template.py +15 -15
  19. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/__init__.py +1 -1
  20. netbox_plugin_dns-1.0.7/netbox_dns/forms/contact.py → netbox_plugin_dns-1.1.0/netbox_dns/forms/registration_contact.py +16 -16
  21. netbox_plugin_dns-1.1.0/netbox_dns/forms/view.py +290 -0
  22. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/zone.py +15 -18
  23. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/zone_template.py +13 -13
  24. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/graphql/__init__.py +2 -2
  25. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/graphql/filters.py +5 -5
  26. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/graphql/schema.py +9 -5
  27. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/graphql/types.py +41 -12
  28. netbox_plugin_dns-1.1.0/netbox_dns/management/commands/rebuild_dnssync.py +18 -0
  29. netbox_plugin_dns-1.1.0/netbox_dns/management/commands/setup_dnssync.py +140 -0
  30. netbox_plugin_dns-1.1.0/netbox_dns/migrations/0008_view_prefixes.py +18 -0
  31. netbox_plugin_dns-1.1.0/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +27 -0
  32. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/__init__.py +1 -3
  33. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/record.py +139 -20
  34. netbox_plugin_dns-1.0.7/netbox_dns/models/contact.py → netbox_plugin_dns-1.1.0/netbox_dns/models/registration_contact.py +8 -8
  35. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/view.py +5 -0
  36. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/zone.py +66 -30
  37. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/zone_template.py +4 -4
  38. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/navigation.py +7 -7
  39. netbox_plugin_dns-1.1.0/netbox_dns/signals/ipam_dnssync.py +224 -0
  40. {netbox_plugin_dns-1.0.7/netbox_dns/views → netbox_plugin_dns-1.1.0/netbox_dns/tables}/__init__.py +1 -1
  41. netbox_plugin_dns-1.1.0/netbox_dns/tables/ipam_dnssync.py +11 -0
  42. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/tables/record.py +33 -0
  43. netbox_plugin_dns-1.0.7/netbox_dns/tables/contact.py → netbox_plugin_dns-1.1.0/netbox_dns/tables/registration_contact.py +5 -5
  44. netbox_plugin_dns-1.1.0/netbox_dns/tables/view.py +46 -0
  45. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/template_content.py +41 -40
  46. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/record.html +6 -6
  47. netbox_plugin_dns-1.0.7/netbox_dns/templates/netbox_dns/contact.html → netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/registrationcontact.html +1 -1
  48. netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/view/button.html +9 -0
  49. netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/view/prefix.html +41 -0
  50. netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/view/related.html +17 -0
  51. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/view.html +25 -0
  52. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/__init__.py +2 -2
  53. netbox_plugin_dns-1.1.0/netbox_dns/urls/registration_contact.py +60 -0
  54. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/view.py +6 -0
  55. netbox_plugin_dns-1.1.0/netbox_dns/utilities/__init__.py +2 -0
  56. netbox_plugin_dns-1.0.7/netbox_dns/utilities/__init__.py → netbox_plugin_dns-1.1.0/netbox_dns/utilities/conversions.py +9 -0
  57. netbox_plugin_dns-1.1.0/netbox_dns/utilities/ipam_dnssync.py +295 -0
  58. {netbox_plugin_dns-1.0.7/netbox_dns/tables → netbox_plugin_dns-1.1.0/netbox_dns/views}/__init__.py +1 -1
  59. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/record.py +3 -5
  60. netbox_plugin_dns-1.1.0/netbox_dns/views/registration_contact.py +94 -0
  61. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/view.py +26 -1
  62. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/pyproject.toml +1 -1
  63. netbox_plugin_dns-1.0.7/netbox_dns/api/serializers_/view.py +0 -37
  64. netbox_plugin_dns-1.0.7/netbox_dns/forms/view.py +0 -90
  65. netbox_plugin_dns-1.0.7/netbox_dns/management/commands/setup_coupling.py +0 -109
  66. netbox_plugin_dns-1.0.7/netbox_dns/signals/ipam_coupling.py +0 -168
  67. netbox_plugin_dns-1.0.7/netbox_dns/tables/view.py +0 -24
  68. netbox_plugin_dns-1.0.7/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -21
  69. netbox_plugin_dns-1.0.7/netbox_dns/urls/contact.py +0 -29
  70. netbox_plugin_dns-1.0.7/netbox_dns/utilities/ipam_coupling.py +0 -112
  71. netbox_plugin_dns-1.0.7/netbox_dns/views/contact.py +0 -94
  72. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/LICENSE +0 -0
  73. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/nested_serializers.py +0 -0
  74. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/__init__.py +0 -0
  75. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/nameserver.py +0 -0
  76. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/record.py +0 -0
  77. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/record_template.py +0 -0
  78. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/api/serializers_/registrar.py +0 -0
  79. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/apps.py +0 -0
  80. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/choices/__init__.py +0 -0
  81. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/choices/record.py +0 -0
  82. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/choices/zone.py +0 -0
  83. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/fields/address.py +0 -0
  84. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/fields/network.py +0 -0
  85. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/fields/rfc2317.py +0 -0
  86. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/nameserver.py +0 -0
  87. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/record.py +0 -0
  88. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/record_template.py +0 -0
  89. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/filtersets/registrar.py +0 -0
  90. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/nameserver.py +0 -0
  91. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/record.py +0 -0
  92. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/record_template.py +0 -0
  93. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/forms/registrar.py +0 -0
  94. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/management/commands/cleanup_database.py +0 -0
  95. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
  96. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/management/commands/update_soa.py +0 -0
  97. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  98. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
  99. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
  100. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0003_default_view.py +0 -0
  101. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
  102. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
  103. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0006_templating.py +0 -0
  104. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
  105. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  106. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  107. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0022_search.py +0 -0
  108. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  109. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0024_tenancy.py +0 -0
  110. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  111. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  112. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  113. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  114. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
  115. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/migrations/__init__.py +0 -0
  116. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/mixins/__init__.py +0 -0
  117. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/mixins/object_modification.py +0 -0
  118. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/nameserver.py +0 -0
  119. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/record_template.py +0 -0
  120. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/models/registrar.py +0 -0
  121. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/signals/__init__.py +0 -0
  122. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/tables/nameserver.py +0 -0
  123. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/tables/record_template.py +0 -0
  124. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/tables/registrar.py +0 -0
  125. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/tables/zone.py +0 -0
  126. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/tables/zone_template.py +0 -0
  127. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  128. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  129. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  130. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
  131. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  132. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  133. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  134. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
  135. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  136. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  137. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  138. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  139. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zone.html +0 -0
  140. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
  141. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/nameserver.py +0 -0
  142. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/record.py +0 -0
  143. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/record_template.py +0 -0
  144. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/registrar.py +0 -0
  145. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/zone.py +0 -0
  146. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/urls/zone_template.py +0 -0
  147. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/validators/__init__.py +0 -0
  148. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/validators/dns_name.py +0 -0
  149. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/validators/dns_value.py +0 -0
  150. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/validators/rfc2317.py +0 -0
  151. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/nameserver.py +0 -0
  152. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/record_template.py +0 -0
  153. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/registrar.py +0 -0
  154. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/zone.py +0 -0
  155. {netbox_plugin_dns-1.0.7 → netbox_plugin_dns-1.1.0}/netbox_dns/views/zone_template.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 1.0.7
3
+ Version: 1.1.0
4
4
  Summary: NetBox DNS is a NetBox plugin for managing DNS data.
5
5
  Home-page: https://github.com/peteeckel/netbox-plugin-dns
6
6
  License: MIT
@@ -48,6 +48,7 @@ The main focus of the plugin is to ensure the quality of the data stored in it.
48
48
  * Validation of record types such as CNAME and singletons, to ensure DNS zone validity
49
49
  * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
50
50
  * Templating for zones and records enables faster creations of zones with given boilerplate object relations, such as name servers, tags, tenants or registration information, or records like standard SPF or MX records that are the same for a subset of zones
51
+ * IPAM DNSsync can be used to automatically create address and pointer records for IP addresses by assigning prefixes to DNS views. When an IP address has a DNS name assigned and there are zones with matching names in the DNS views linked to the IP address' prefix, a matching DNS record will be created in these zones
51
52
 
52
53
  Other main features include:
53
54
 
@@ -28,6 +28,7 @@ The main focus of the plugin is to ensure the quality of the data stored in it.
28
28
  * Validation of record types such as CNAME and singletons, to ensure DNS zone validity
29
29
  * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
30
30
  * Templating for zones and records enables faster creations of zones with given boilerplate object relations, such as name servers, tags, tenants or registration information, or records like standard SPF or MX records that are the same for a subset of zones
31
+ * IPAM DNSsync can be used to automatically create address and pointer records for IP addresses by assigning prefixes to DNS views. When an IP address has a DNS name assigned and there are zones with matching names in the DNS views linked to the IP address' prefix, a matching DNS record will be created in these zones
31
32
 
32
33
  Other main features include:
33
34
 
@@ -1,6 +1,11 @@
1
+ from django.conf import settings
2
+
1
3
  from netbox.plugins import PluginConfig
4
+ from ipam.choices import IPAddressStatusChoices
5
+
6
+ from netbox_dns.choices import RecordTypeChoices
2
7
 
3
- __version__ = "1.0.7"
8
+ __version__ = "1.1.0"
4
9
 
5
10
 
6
11
  class DNSConfig(PluginConfig):
@@ -20,13 +25,20 @@ class DNSConfig(PluginConfig):
20
25
  "zone_soa_retry": 7200,
21
26
  "zone_soa_expire": 2419200,
22
27
  "zone_soa_minimum": 3600,
23
- "feature_ipam_coupling": False,
28
+ "dnssync_disabled": False,
29
+ "dnssync_ipaddress_active_status": [
30
+ IPAddressStatusChoices.STATUS_ACTIVE,
31
+ IPAddressStatusChoices.STATUS_DHCP,
32
+ IPAddressStatusChoices.STATUS_SLAAC,
33
+ ],
34
+ "dnssync_conflict_deactivate": False,
35
+ "dnssync_minimum_zone_labels": 2,
24
36
  "tolerate_characters_in_zone_labels": "",
25
37
  "tolerate_underscores_in_labels": False,
26
38
  "tolerate_underscores_in_hostnames": False, # Deprecated, will be removed in 1.2.0
27
39
  "tolerate_leading_underscore_types": [
28
- "TXT",
29
- "SRV",
40
+ RecordTypeChoices.TXT,
41
+ RecordTypeChoices.SRV,
30
42
  ],
31
43
  "tolerate_non_rfc1035_types": [],
32
44
  "enable_root_zones": False,
@@ -37,6 +49,13 @@ class DNSConfig(PluginConfig):
37
49
  }
38
50
  base_url = "netbox-dns"
39
51
 
52
+ def ready(self):
53
+ super().ready()
54
+
55
+ if not settings.PLUGINS_CONFIG["netbox_dns"].get("dnssync_disabled"):
56
+ import netbox_dns.signals.ipam_dnssync
57
+ import netbox_dns.tables.ipam_dnssync
58
+
40
59
 
41
60
  #
42
61
  # Initialize plugin config
@@ -1,10 +1,11 @@
1
- from .serializers_.contact import *
2
1
  from .serializers_.nameserver import *
3
2
  from .serializers_.record import *
4
3
  from .serializers_.registrar import *
4
+ from .serializers_.registration_contact import *
5
5
  from .serializers_.view import *
6
6
  from .serializers_.zone import *
7
7
  from .serializers_.zone_template import *
8
8
  from .serializers_.record_template import *
9
+ from .serializers_.prefix import *
9
10
 
10
11
  from .nested_serializers import *
@@ -0,0 +1,18 @@
1
+ from rest_framework.serializers import HyperlinkedIdentityField
2
+
3
+ from ipam.api.serializers import PrefixSerializer as IPAMPrefixSerializer
4
+
5
+
6
+ __all__ = ("PrefixSerializer",)
7
+
8
+
9
+ class PrefixSerializer(IPAMPrefixSerializer):
10
+ url = HyperlinkedIdentityField(view_name="plugins-api:netbox_dns-api:prefix-detail")
11
+
12
+ def to_representation(self, instance):
13
+ representation = super().to_representation(instance)
14
+
15
+ if instance.vrf is not None:
16
+ representation["display"] += f" [{instance.vrf.name}]"
17
+
18
+ return representation
@@ -2,19 +2,19 @@ from rest_framework import serializers
2
2
 
3
3
  from netbox.api.serializers import NetBoxModelSerializer
4
4
 
5
- from netbox_dns.models import Contact
5
+ from netbox_dns.models import RegistrationContact
6
6
 
7
7
 
8
- __all__ = ("ContactSerializer",)
8
+ __all__ = ("RegistrationContactSerializer",)
9
9
 
10
10
 
11
- class ContactSerializer(NetBoxModelSerializer):
11
+ class RegistrationContactSerializer(NetBoxModelSerializer):
12
12
  url = serializers.HyperlinkedIdentityField(
13
- view_name="plugins-api:netbox_dns-api:contact-detail"
13
+ view_name="plugins-api:netbox_dns-api:registrationcontact-detail"
14
14
  )
15
15
 
16
16
  class Meta:
17
- model = Contact
17
+ model = RegistrationContact
18
18
  fields = (
19
19
  "id",
20
20
  "url",
@@ -0,0 +1,69 @@
1
+ from rest_framework import serializers
2
+
3
+ from netbox.api.serializers import NetBoxModelSerializer
4
+ from tenancy.api.serializers import TenantSerializer
5
+ from ipam.api.serializers import PrefixSerializer
6
+
7
+ from netbox_dns.models import View
8
+
9
+
10
+ __all__ = ("ViewSerializer",)
11
+
12
+
13
+ class ViewSerializer(NetBoxModelSerializer):
14
+ url = serializers.HyperlinkedIdentityField(
15
+ view_name="plugins-api:netbox_dns-api:view-detail"
16
+ )
17
+ default_view = serializers.BooleanField(
18
+ read_only=True,
19
+ )
20
+ prefixes = PrefixSerializer(
21
+ many=True,
22
+ nested=True,
23
+ read_only=False,
24
+ required=False,
25
+ help_text="IPAM Prefixes assigned to the View",
26
+ )
27
+ tenant = TenantSerializer(
28
+ nested=True,
29
+ required=False,
30
+ allow_null=True,
31
+ )
32
+
33
+ def create(self, validated_data):
34
+ prefixes = validated_data.pop("prefixes", None)
35
+
36
+ view = super().create(validated_data)
37
+
38
+ if prefixes is not None:
39
+ view.prefixes.set(prefixes)
40
+
41
+ return view
42
+
43
+ def update(self, instance, validated_data):
44
+ prefixes = validated_data.pop("prefixes", None)
45
+
46
+ view = super().update(instance, validated_data)
47
+
48
+ if prefixes is not None:
49
+ view.prefixes.set(prefixes)
50
+
51
+ return view
52
+
53
+ class Meta:
54
+ model = View
55
+ fields = (
56
+ "id",
57
+ "url",
58
+ "display",
59
+ "name",
60
+ "default_view",
61
+ "tags",
62
+ "description",
63
+ "created",
64
+ "last_updated",
65
+ "custom_fields",
66
+ "tenant",
67
+ "prefixes",
68
+ )
69
+ brief_fields = ("id", "url", "display", "name", "default_view", "description")
@@ -6,7 +6,7 @@ from tenancy.api.serializers import TenantSerializer
6
6
  from .view import ViewSerializer
7
7
  from .nameserver import NameServerSerializer
8
8
  from .registrar import RegistrarSerializer
9
- from .contact import ContactSerializer
9
+ from .registration_contact import RegistrationContactSerializer
10
10
  from .zone_template import ZoneTemplateSerializer
11
11
 
12
12
  from ..nested_serializers import NestedZoneSerializer
@@ -62,28 +62,28 @@ class ZoneSerializer(NetBoxModelSerializer):
62
62
  required=False,
63
63
  help_text="The registrar the domain is registered with",
64
64
  )
65
- registrant = ContactSerializer(
65
+ registrant = RegistrationContactSerializer(
66
66
  nested=True,
67
67
  many=False,
68
68
  read_only=False,
69
69
  required=False,
70
70
  help_text="The owner of the domain",
71
71
  )
72
- admin_c = ContactSerializer(
72
+ admin_c = RegistrationContactSerializer(
73
73
  nested=True,
74
74
  many=False,
75
75
  read_only=False,
76
76
  required=False,
77
77
  help_text="The administrative contact for the domain",
78
78
  )
79
- tech_c = ContactSerializer(
79
+ tech_c = RegistrationContactSerializer(
80
80
  nested=True,
81
81
  many=False,
82
82
  read_only=False,
83
83
  required=False,
84
84
  help_text="The technical contact for the domain",
85
85
  )
86
- billing_c = ContactSerializer(
86
+ billing_c = RegistrationContactSerializer(
87
87
  nested=True,
88
88
  many=False,
89
89
  read_only=False,
@@ -8,7 +8,7 @@ from netbox_dns.api.nested_serializers import NestedRecordTemplateSerializer
8
8
 
9
9
  from .nameserver import NameServerSerializer
10
10
  from .registrar import RegistrarSerializer
11
- from .contact import ContactSerializer
11
+ from .registration_contact import RegistrationContactSerializer
12
12
 
13
13
 
14
14
  __all__ = ("ZoneTemplateSerializer",)
@@ -38,28 +38,28 @@ class ZoneTemplateSerializer(NetBoxModelSerializer):
38
38
  required=False,
39
39
  help_text="The registrar the domain is registered with",
40
40
  )
41
- registrant = ContactSerializer(
41
+ registrant = RegistrationContactSerializer(
42
42
  nested=True,
43
43
  many=False,
44
44
  read_only=False,
45
45
  required=False,
46
46
  help_text="The owner of the domain",
47
47
  )
48
- admin_c = ContactSerializer(
48
+ admin_c = RegistrationContactSerializer(
49
49
  nested=True,
50
50
  many=False,
51
51
  read_only=False,
52
52
  required=False,
53
53
  help_text="The administrative contact for the domain",
54
54
  )
55
- tech_c = ContactSerializer(
55
+ tech_c = RegistrationContactSerializer(
56
56
  nested=True,
57
57
  many=False,
58
58
  read_only=False,
59
59
  required=False,
60
60
  help_text="The technical contact for the domain",
61
61
  )
62
- billing_c = ContactSerializer(
62
+ billing_c = RegistrationContactSerializer(
63
63
  nested=True,
64
64
  many=False,
65
65
  read_only=False,
@@ -7,9 +7,10 @@ from netbox_dns.api.views import (
7
7
  NameServerViewSet,
8
8
  RecordViewSet,
9
9
  RegistrarViewSet,
10
- ContactViewSet,
10
+ RegistrationContactViewSet,
11
11
  ZoneTemplateViewSet,
12
12
  RecordTemplateViewSet,
13
+ PrefixViewSet,
13
14
  )
14
15
 
15
16
  router = NetBoxRouter()
@@ -20,8 +21,10 @@ router.register("zones", ZoneViewSet)
20
21
  router.register("nameservers", NameServerViewSet)
21
22
  router.register("records", RecordViewSet)
22
23
  router.register("registrars", RegistrarViewSet)
23
- router.register("contacts", ContactViewSet)
24
+ router.register("contacts", RegistrationContactViewSet)
24
25
  router.register("zonetemplates", ZoneTemplateViewSet)
25
26
  router.register("recordtemplates", RecordTemplateViewSet)
26
27
 
28
+ router.register("prefixes", PrefixViewSet)
29
+
27
30
  urlpatterns = router.urls
@@ -1,6 +1,9 @@
1
1
  from rest_framework import serializers
2
2
  from rest_framework.routers import APIRootView
3
3
 
4
+ from ipam.models import Prefix
5
+ from ipam.filtersets import PrefixFilterSet
6
+
4
7
  from netbox.api.viewsets import NetBoxModelViewSet
5
8
 
6
9
  from netbox_dns.api.serializers import (
@@ -9,9 +12,10 @@ from netbox_dns.api.serializers import (
9
12
  NameServerSerializer,
10
13
  RecordSerializer,
11
14
  RegistrarSerializer,
12
- ContactSerializer,
15
+ RegistrationContactSerializer,
13
16
  ZoneTemplateSerializer,
14
17
  RecordTemplateSerializer,
18
+ PrefixSerializer,
15
19
  )
16
20
  from netbox_dns.filtersets import (
17
21
  ViewFilterSet,
@@ -19,7 +23,7 @@ from netbox_dns.filtersets import (
19
23
  NameServerFilterSet,
20
24
  RecordFilterSet,
21
25
  RegistrarFilterSet,
22
- ContactFilterSet,
26
+ RegistrationContactFilterSet,
23
27
  ZoneTemplateFilterSet,
24
28
  RecordTemplateFilterSet,
25
29
  )
@@ -29,7 +33,7 @@ from netbox_dns.models import (
29
33
  NameServer,
30
34
  Record,
31
35
  Registrar,
32
- Contact,
36
+ RegistrationContact,
33
37
  ZoneTemplate,
34
38
  RecordTemplate,
35
39
  )
@@ -108,10 +112,10 @@ class RegistrarViewSet(NetBoxModelViewSet):
108
112
  filterset_class = RegistrarFilterSet
109
113
 
110
114
 
111
- class ContactViewSet(NetBoxModelViewSet):
112
- queryset = Contact.objects.all()
113
- serializer_class = ContactSerializer
114
- filterset_class = ContactFilterSet
115
+ class RegistrationContactViewSet(NetBoxModelViewSet):
116
+ queryset = RegistrationContact.objects.all()
117
+ serializer_class = RegistrationContactSerializer
118
+ filterset_class = RegistrationContactFilterSet
115
119
 
116
120
 
117
121
  class ZoneTemplateViewSet(NetBoxModelViewSet):
@@ -124,3 +128,9 @@ class RecordTemplateViewSet(NetBoxModelViewSet):
124
128
  queryset = RecordTemplate.objects.all()
125
129
  serializer_class = RecordTemplateSerializer
126
130
  filterset_class = RecordTemplateFilterSet
131
+
132
+
133
+ class PrefixViewSet(NetBoxModelViewSet):
134
+ queryset = Prefix.objects.all()
135
+ serializer_class = PrefixSerializer
136
+ filterset_class = PrefixFilterSet
@@ -1,3 +1,4 @@
1
1
  from .network import *
2
2
  from .address import *
3
3
  from .rfc2317 import *
4
+ from .ipam import *
@@ -0,0 +1,15 @@
1
+ from utilities.forms.fields import DynamicModelMultipleChoiceField
2
+ from utilities.forms.widgets import APISelectMultiple
3
+
4
+
5
+ __all__ = ("PrefixDynamicModelMultipleChoiceField",)
6
+
7
+
8
+ class PrefixDynamicModelMultipleChoiceField(DynamicModelMultipleChoiceField):
9
+ widget = APISelectMultiple(api_url="/api/plugins/netbox-dns/prefixes")
10
+
11
+ def label_from_instance(self, obj):
12
+ if obj.vrf:
13
+ return f"{str(obj.prefix)} [{obj.vrf.name}]"
14
+
15
+ return str(obj.prefix)
@@ -2,7 +2,7 @@ from .view import *
2
2
  from .zone import *
3
3
  from .nameserver import *
4
4
  from .record import *
5
- from .contact import *
5
+ from .registration_contact import *
6
6
  from .registrar import *
7
7
 
8
8
  from .zone_template import *
@@ -2,15 +2,15 @@ from django.db.models import Q
2
2
 
3
3
  from netbox.filtersets import NetBoxModelFilterSet
4
4
 
5
- from netbox_dns.models import Contact
5
+ from netbox_dns.models import RegistrationContact
6
6
 
7
7
 
8
- __all__ = ("ContactFilterSet",)
8
+ __all__ = ("RegistrationContactFilterSet",)
9
9
 
10
10
 
11
- class ContactFilterSet(NetBoxModelFilterSet):
11
+ class RegistrationContactFilterSet(NetBoxModelFilterSet):
12
12
  class Meta:
13
- model = Contact
13
+ model = RegistrationContact
14
14
  fields = (
15
15
  "id",
16
16
  "name",
@@ -1,7 +1,10 @@
1
+ import django_filters
2
+
1
3
  from django.db.models import Q
2
4
 
3
5
  from netbox.filtersets import NetBoxModelFilterSet
4
6
  from tenancy.filtersets import TenancyFilterSet
7
+ from ipam.models import Prefix
5
8
 
6
9
  from netbox_dns.models import View
7
10
 
@@ -10,6 +13,19 @@ __all__ = ("ViewFilterSet",)
10
13
 
11
14
 
12
15
  class ViewFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
16
+ prefix_id = django_filters.ModelMultipleChoiceFilter(
17
+ queryset=Prefix.objects.all(),
18
+ field_name="prefixes",
19
+ to_field_name="id",
20
+ label="Prefixes ID",
21
+ )
22
+ prefix = django_filters.ModelMultipleChoiceFilter(
23
+ queryset=Prefix.objects.all(),
24
+ field_name="prefixes__prefix",
25
+ to_field_name="prefix",
26
+ label="Prefix",
27
+ )
28
+
13
29
  class Meta:
14
30
  model = View
15
31
  fields = ("id", "name", "default_view", "description")
@@ -7,7 +7,7 @@ from netbox.filtersets import NetBoxModelFilterSet
7
7
  from tenancy.filtersets import TenancyFilterSet
8
8
  from utilities.filters import MultiValueCharFilter
9
9
 
10
- from netbox_dns.models import View, Zone, Registrar, Contact, NameServer
10
+ from netbox_dns.models import View, Zone, Registrar, RegistrationContact, NameServer
11
11
  from netbox_dns.choices import ZoneStatusChoices
12
12
 
13
13
 
@@ -95,44 +95,44 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
95
95
  label="Registrar",
96
96
  )
97
97
  registrant_id = django_filters.ModelMultipleChoiceFilter(
98
- queryset=Contact.objects.all(),
98
+ queryset=RegistrationContact.objects.all(),
99
99
  label="Registrant ID",
100
100
  )
101
101
  registrant = django_filters.ModelMultipleChoiceFilter(
102
- queryset=Contact.objects.all(),
102
+ queryset=RegistrationContact.objects.all(),
103
103
  field_name="registrant__contact_id",
104
104
  to_field_name="contact_id",
105
105
  label="Registrant",
106
106
  )
107
107
  admin_c_id = django_filters.ModelMultipleChoiceFilter(
108
- queryset=Contact.objects.all(),
109
- label="Administrative Contact ID",
108
+ queryset=RegistrationContact.objects.all(),
109
+ label="Administrative RegistrationContact ID",
110
110
  )
111
111
  admin_c = django_filters.ModelMultipleChoiceFilter(
112
- queryset=Contact.objects.all(),
112
+ queryset=RegistrationContact.objects.all(),
113
113
  field_name="admin_c__contact_id",
114
114
  to_field_name="contact_id",
115
- label="Administrative Contact",
115
+ label="Administrative RegistrationContact",
116
116
  )
117
117
  tech_c_id = django_filters.ModelMultipleChoiceFilter(
118
- queryset=Contact.objects.all(),
119
- label="Technical Contact ID",
118
+ queryset=RegistrationContact.objects.all(),
119
+ label="Technical RegistrationContact ID",
120
120
  )
121
121
  tech_c = django_filters.ModelMultipleChoiceFilter(
122
- queryset=Contact.objects.all(),
122
+ queryset=RegistrationContact.objects.all(),
123
123
  field_name="tech_c__contact_id",
124
124
  to_field_name="contact_id",
125
- label="Technical Contact",
125
+ label="Technical RegistrationContact",
126
126
  )
127
127
  billing_c_id = django_filters.ModelMultipleChoiceFilter(
128
- queryset=Contact.objects.all(),
129
- label="Billing Contact ID",
128
+ queryset=RegistrationContact.objects.all(),
129
+ label="Billing RegistrationContact ID",
130
130
  )
131
131
  billing_c = django_filters.ModelMultipleChoiceFilter(
132
- queryset=Contact.objects.all(),
132
+ queryset=RegistrationContact.objects.all(),
133
133
  field_name="billing_c__contact_id",
134
134
  to_field_name="contact_id",
135
- label="Billing Contact",
135
+ label="Billing RegistrationContact",
136
136
  )
137
137
  active = django_filters.BooleanFilter(
138
138
  label="Zone is active",
@@ -9,7 +9,7 @@ from netbox_dns.models import (
9
9
  ZoneTemplate,
10
10
  RecordTemplate,
11
11
  Registrar,
12
- Contact,
12
+ RegistrationContact,
13
13
  NameServer,
14
14
  )
15
15
 
@@ -53,44 +53,44 @@ class ZoneTemplateFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
53
53
  label="Registrar",
54
54
  )
55
55
  registrant_id = django_filters.ModelMultipleChoiceFilter(
56
- queryset=Contact.objects.all(),
56
+ queryset=RegistrationContact.objects.all(),
57
57
  label="Registrant ID",
58
58
  )
59
59
  registrant = django_filters.ModelMultipleChoiceFilter(
60
- queryset=Contact.objects.all(),
60
+ queryset=RegistrationContact.objects.all(),
61
61
  field_name="registrant__contact_id",
62
62
  to_field_name="contact_id",
63
63
  label="Registrant",
64
64
  )
65
65
  admin_c_id = django_filters.ModelMultipleChoiceFilter(
66
- queryset=Contact.objects.all(),
67
- label="Administrative Contact ID",
66
+ queryset=RegistrationContact.objects.all(),
67
+ label="Administrative RegistrationContact ID",
68
68
  )
69
69
  admin_c = django_filters.ModelMultipleChoiceFilter(
70
- queryset=Contact.objects.all(),
70
+ queryset=RegistrationContact.objects.all(),
71
71
  field_name="admin_c__contact_id",
72
72
  to_field_name="contact_id",
73
- label="Administrative Contact",
73
+ label="Administrative RegistrationContact",
74
74
  )
75
75
  tech_c_id = django_filters.ModelMultipleChoiceFilter(
76
- queryset=Contact.objects.all(),
77
- label="Technical Contact ID",
76
+ queryset=RegistrationContact.objects.all(),
77
+ label="Technical RegistrationContact ID",
78
78
  )
79
79
  tech_c = django_filters.ModelMultipleChoiceFilter(
80
- queryset=Contact.objects.all(),
80
+ queryset=RegistrationContact.objects.all(),
81
81
  field_name="tech_c__contact_id",
82
82
  to_field_name="contact_id",
83
- label="Technical Contact",
83
+ label="Technical RegistrationContact",
84
84
  )
85
85
  billing_c_id = django_filters.ModelMultipleChoiceFilter(
86
- queryset=Contact.objects.all(),
87
- label="Billing Contact ID",
86
+ queryset=RegistrationContact.objects.all(),
87
+ label="Billing RegistrationContact ID",
88
88
  )
89
89
  billing_c = django_filters.ModelMultipleChoiceFilter(
90
- queryset=Contact.objects.all(),
90
+ queryset=RegistrationContact.objects.all(),
91
91
  field_name="billing_c__contact_id",
92
92
  to_field_name="contact_id",
93
- label="Billing Contact",
93
+ label="Billing RegistrationContact",
94
94
  )
95
95
 
96
96
  class Meta:
@@ -2,7 +2,7 @@ from .view import *
2
2
  from .zone import *
3
3
  from .nameserver import *
4
4
  from .record import *
5
- from .contact import *
5
+ from .registration_contact import *
6
6
  from .registrar import *
7
7
  from .zone_template import *
8
8
  from .record_template import *