netbox-plugin-dns 0.22.3__tar.gz → 0.22.5__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 (116) hide show
  1. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/PKG-INFO +14 -11
  2. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/README.md +12 -10
  3. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/__init__.py +5 -4
  4. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/api/serializers.py +1 -0
  5. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/registrar.py +1 -0
  6. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/registrar.py +11 -1
  7. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/zone.py +39 -21
  8. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/management/commands/cleanup_database.py +1 -1
  9. netbox_plugin_dns-0.22.5/netbox_dns/management/commands/cleanup_rrset_ttl.py +62 -0
  10. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/record.py +142 -28
  11. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/zone.py +85 -19
  12. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/signals/ipam_coupling.py +13 -1
  13. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/registrar.html +4 -0
  14. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone.html +7 -0
  15. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/pyproject.toml +5 -2
  16. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/LICENSE +0 -0
  17. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/api/nested_serializers.py +0 -0
  18. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/api/urls.py +0 -0
  19. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/api/views.py +0 -0
  20. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/apps.py +0 -0
  21. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/fields/__init__.py +0 -0
  22. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/fields/address.py +0 -0
  23. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/fields/network.py +0 -0
  24. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/fields/rfc2317.py +0 -0
  25. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/__init__.py +0 -0
  26. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/contact.py +0 -0
  27. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/nameserver.py +0 -0
  28. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/record.py +0 -0
  29. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/view.py +0 -0
  30. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/filters/zone.py +0 -0
  31. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/__init__.py +0 -0
  32. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/contact.py +0 -0
  33. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/nameserver.py +0 -0
  34. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/record.py +0 -0
  35. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/forms/view.py +0 -0
  36. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/__init__.py +0 -0
  37. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/contact.py +0 -0
  38. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/nameserver.py +0 -0
  39. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/record.py +0 -0
  40. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/registrar.py +0 -0
  41. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/schema.py +0 -0
  42. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/view.py +0 -0
  43. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/graphql/zone.py +0 -0
  44. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/management/commands/setup_coupling.py +0 -0
  45. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/management/commands/update_soa.py +0 -0
  46. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0001_initial.py +0 -0
  47. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  48. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0002_zone_default_ttl.py +0 -0
  49. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0003_soa_managed_records.py +0 -0
  50. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0004_create_ptr_for_a_aaaa_records.py +0 -0
  51. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0005_update_ns_records.py +0 -0
  52. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0006_zone_soa_serial_auto.py +0 -0
  53. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0007_alter_zone_soa_serial_auto.py +0 -0
  54. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0008_zone_status_names.py +0 -0
  55. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0009_netbox32.py +0 -0
  56. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0010_update_soa_records.py +0 -0
  57. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0011_add_view_model.py +0 -0
  58. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0012_adjust_zone_and_record.py +0 -0
  59. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0013_add_nameserver_zone_record_description.py +0 -0
  60. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0014_add_view_description.py +0 -0
  61. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0015_add_record_status.py +0 -0
  62. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0016_cleanup_ptr_records.py +0 -0
  63. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0017_alter_record_ttl.py +0 -0
  64. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0018_zone_arpa_network.py +0 -0
  65. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0019_update_ns_ttl.py +0 -0
  66. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  67. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  68. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0022_search.py +0 -0
  69. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  70. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0024_tenancy.py +0 -0
  71. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  72. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  73. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  74. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  75. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/migrations/__init__.py +0 -0
  76. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/__init__.py +0 -0
  77. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/contact.py +0 -0
  78. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/nameserver.py +0 -0
  79. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/registrar.py +0 -0
  80. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/models/view.py +0 -0
  81. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/navigation.py +0 -0
  82. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/signals/__init__.py +0 -0
  83. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/__init__.py +0 -0
  84. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/contact.py +0 -0
  85. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/nameserver.py +0 -0
  86. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/record.py +0 -0
  87. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/registrar.py +0 -0
  88. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/view.py +0 -0
  89. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/tables/zone.py +0 -0
  90. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/template_content.py +0 -0
  91. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/contact.html +0 -0
  92. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  93. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  94. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  95. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/record.html +0 -0
  96. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -0
  97. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/view.html +0 -0
  98. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  99. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  100. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  101. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  102. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  103. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  104. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/urls.py +0 -0
  105. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/utilities/__init__.py +0 -0
  106. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/utilities/ipam_coupling.py +0 -0
  107. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/validators/__init__.py +0 -0
  108. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/validators/dns_name.py +0 -0
  109. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/validators/rfc2317.py +0 -0
  110. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/__init__.py +0 -0
  111. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/contact.py +0 -0
  112. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/nameserver.py +0 -0
  113. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/record.py +0 -0
  114. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/registrar.py +0 -0
  115. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/view.py +0 -0
  116. {netbox_plugin_dns-0.22.3 → netbox_plugin_dns-0.22.5}/netbox_dns/views/zone.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 0.22.3
3
+ Version: 0.22.5
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
@@ -8,6 +8,7 @@ Keywords: netbox,netbox-plugin,dns
8
8
  Author: Peter Eckel
9
9
  Author-email: pete@netbox-dns.org
10
10
  Requires-Python: >=3.8,<4.0
11
+ Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: License :: OSI Approved :: MIT License
12
13
  Classifier: Programming Language :: Python :: 3
13
14
  Classifier: Programming Language :: Python :: 3.8
@@ -19,28 +20,30 @@ Requires-Dist: dnspython (>=2.2.1,<3.0.0)
19
20
  Project-URL: Repository, https://github.com/peteeckel/netbox-plugin-dns
20
21
  Description-Content-Type: text/markdown
21
22
 
22
- <h1 align="center">NetBox DNS</h1>
23
-
24
- <p align="center"><i>NetBox DNS is a NetBox plugin for managing DNS views, zones, name servers and records.</i></p>
23
+ # NetBox DNS
24
+ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name servers, zones, records and views, as well as registration data for domains. It can automate tasks like creating PTR records, generating zone serial numbers, NS and SOA records, as well as validate names and values values for resource records to ensure zone data is consistent, current and conforming to the relevant RFCs.
25
25
 
26
26
  <div align="center">
27
27
  <a href="https://pypi.org/project/netbox-plugin-dns/"><img src="https://img.shields.io/pypi/v/netbox-plugin-dns" alt="PyPi"/></a>
28
- <a href="https://github.com/peteeckel/netbox-plugin-dns/stargazers"><img src="https://img.shields.io/github/stars/peteeckel/netbox-plugin-dns" alt="Stars Badge"/></a>
29
- <a href="https://github.com/peteeckel/netbox-plugin-dns/network/members"><img src="https://img.shields.io/github/forks/peteeckel/netbox-plugin-dns" alt="Forks Badge"/></a>
30
- <a href="https://github.com/peteeckel/netbox-plugin-dns/pulls"><img src="https://img.shields.io/github/issues-pr/peteeckel/netbox-plugin-dns" alt="Pull Requests Badge"/></a>
28
+ <a href="https://github.com/peteeckel/netbox-plugin-dns/stargazers"><img src="https://img.shields.io/github/stars/peteeckel/netbox-plugin-dns?style=flat" alt="Stars Badge"/></a>
29
+ <a href="https://github.com/peteeckel/netbox-plugin-dns/network/members"><img src="https://img.shields.io/github/forks/peteeckel/netbox-plugin-dns?style=flat" alt="Forks Badge"/></a>
31
30
  <a href="https://github.com/peteeckel/netbox-plugin-dns/issues"><img src="https://img.shields.io/github/issues/peteeckel/netbox-plugin-dns" alt="Issues Badge"/></a>
31
+ <a href="https://github.com/peteeckel/netbox-plugin-dns/pulls"><img src="https://img.shields.io/github/issues-pr/peteeckel/netbox-plugin-dns" alt="Pull Requests Badge"/></a>
32
32
  <a href="https://github.com/peteeckel/netbox-plugin-dns/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/peteeckel/netbox-plugin-dns?color=2b9348"></a>
33
33
  <a href="https://github.com/peteeckel/netbox-plugin-dns/blob/master/LICENSE"><img src="https://img.shields.io/github/license/peteeckel/netbox-plugin-dns?color=2b9348" alt="License Badge"/></a>
34
+ <a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads" src="https://static.pepy.tech/badge/netbox-plugin-dns"></a>
35
+ <a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Week" src="https://static.pepy.tech/badge/netbox-plugin-dns/month"></a>
36
+ <a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
34
37
  </div>
35
38
 
36
39
  ## Features
37
40
 
38
41
  * Manage name servers, zones and records
39
42
  * Automatically generate SOA and NS records for zones
40
- * Automatically create and update PTR records for IPv4 and IPv6 records
41
- * Optionally organize DNS zones in views for split horizon DNS and multi-site deployments
42
- * Optionally maintain domain registrar and registrant information for zones
43
- * Maintain RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
43
+ * Automatically create and update PTR records for IPv4 and IPv6 address records
44
+ * Organize DNS zones in views for split horizon DNS and multi-site deployments
45
+ * Manage domain registrar and registrant information for domains related to zones
46
+ * Manage RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
44
47
 
45
48
  NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
46
49
 
@@ -1,25 +1,27 @@
1
- <h1 align="center">NetBox DNS</h1>
2
-
3
- <p align="center"><i>NetBox DNS is a NetBox plugin for managing DNS views, zones, name servers and records.</i></p>
1
+ # NetBox DNS
2
+ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name servers, zones, records and views, as well as registration data for domains. It can automate tasks like creating PTR records, generating zone serial numbers, NS and SOA records, as well as validate names and values values for resource records to ensure zone data is consistent, current and conforming to the relevant RFCs.
4
3
 
5
4
  <div align="center">
6
5
  <a href="https://pypi.org/project/netbox-plugin-dns/"><img src="https://img.shields.io/pypi/v/netbox-plugin-dns" alt="PyPi"/></a>
7
- <a href="https://github.com/peteeckel/netbox-plugin-dns/stargazers"><img src="https://img.shields.io/github/stars/peteeckel/netbox-plugin-dns" alt="Stars Badge"/></a>
8
- <a href="https://github.com/peteeckel/netbox-plugin-dns/network/members"><img src="https://img.shields.io/github/forks/peteeckel/netbox-plugin-dns" alt="Forks Badge"/></a>
9
- <a href="https://github.com/peteeckel/netbox-plugin-dns/pulls"><img src="https://img.shields.io/github/issues-pr/peteeckel/netbox-plugin-dns" alt="Pull Requests Badge"/></a>
6
+ <a href="https://github.com/peteeckel/netbox-plugin-dns/stargazers"><img src="https://img.shields.io/github/stars/peteeckel/netbox-plugin-dns?style=flat" alt="Stars Badge"/></a>
7
+ <a href="https://github.com/peteeckel/netbox-plugin-dns/network/members"><img src="https://img.shields.io/github/forks/peteeckel/netbox-plugin-dns?style=flat" alt="Forks Badge"/></a>
10
8
  <a href="https://github.com/peteeckel/netbox-plugin-dns/issues"><img src="https://img.shields.io/github/issues/peteeckel/netbox-plugin-dns" alt="Issues Badge"/></a>
9
+ <a href="https://github.com/peteeckel/netbox-plugin-dns/pulls"><img src="https://img.shields.io/github/issues-pr/peteeckel/netbox-plugin-dns" alt="Pull Requests Badge"/></a>
11
10
  <a href="https://github.com/peteeckel/netbox-plugin-dns/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/peteeckel/netbox-plugin-dns?color=2b9348"></a>
12
11
  <a href="https://github.com/peteeckel/netbox-plugin-dns/blob/master/LICENSE"><img src="https://img.shields.io/github/license/peteeckel/netbox-plugin-dns?color=2b9348" alt="License Badge"/></a>
12
+ <a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads" src="https://static.pepy.tech/badge/netbox-plugin-dns"></a>
13
+ <a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Week" src="https://static.pepy.tech/badge/netbox-plugin-dns/month"></a>
14
+ <a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
13
15
  </div>
14
16
 
15
17
  ## Features
16
18
 
17
19
  * Manage name servers, zones and records
18
20
  * Automatically generate SOA and NS records for zones
19
- * Automatically create and update PTR records for IPv4 and IPv6 records
20
- * Optionally organize DNS zones in views for split horizon DNS and multi-site deployments
21
- * Optionally maintain domain registrar and registrant information for zones
22
- * Maintain RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
21
+ * Automatically create and update PTR records for IPv4 and IPv6 address records
22
+ * Organize DNS zones in views for split horizon DNS and multi-site deployments
23
+ * Manage domain registrar and registrant information for domains related to zones
24
+ * Manage RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
23
25
 
24
26
  NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
25
27
 
@@ -10,7 +10,7 @@ except ImportError:
10
10
  # NetBox 3.5.8
11
11
  from extras.plugins.utils import get_plugin_config
12
12
 
13
- __version__ = "0.22.3"
13
+ __version__ = "0.22.5"
14
14
 
15
15
 
16
16
  class DNSConfig(PluginConfig):
@@ -26,9 +26,9 @@ class DNSConfig(PluginConfig):
26
26
  "zone_default_ttl": 86400,
27
27
  "zone_soa_serial_auto": True,
28
28
  "zone_soa_serial": 1,
29
- "zone_soa_refresh": 172800,
29
+ "zone_soa_refresh": 43200,
30
30
  "zone_soa_retry": 7200,
31
- "zone_soa_expire": 2592000,
31
+ "zone_soa_expire": 2419200,
32
32
  "zone_soa_minimum": 3600,
33
33
  "feature_ipam_coupling": False,
34
34
  "tolerate_underscores_in_hostnames": False,
@@ -38,7 +38,8 @@ class DNSConfig(PluginConfig):
38
38
  ],
39
39
  "tolerate_non_rfc1035_types": [],
40
40
  "enable_root_zones": False,
41
- "enforce_unique_records": False,
41
+ "enforce_unique_records": True,
42
+ "enforce_unique_rrset_ttl": True,
42
43
  }
43
44
  base_url = "netbox-dns"
44
45
 
@@ -272,6 +272,7 @@ class RegistrarSerializer(NetBoxModelSerializer):
272
272
  "display",
273
273
  "name",
274
274
  "iana_id",
275
+ "address",
275
276
  "referral_url",
276
277
  "whois_server",
277
278
  "abuse_email",
@@ -12,6 +12,7 @@ class RegistrarFilter(NetBoxModelFilterSet):
12
12
  "id",
13
13
  "name",
14
14
  "iana_id",
15
+ "address",
15
16
  "referral_url",
16
17
  "whois_server",
17
18
  "abuse_email",
@@ -17,6 +17,7 @@ class RegistrarForm(NetBoxModelForm):
17
17
  fields = (
18
18
  "name",
19
19
  "iana_id",
20
+ "address",
20
21
  "referral_url",
21
22
  "whois_server",
22
23
  "abuse_email",
@@ -29,12 +30,18 @@ class RegistrarFilterForm(NetBoxModelFilterSetForm):
29
30
  model = Registrar
30
31
  fieldsets = (
31
32
  (None, ("q", "name", "iana_id", "tags")),
32
- ("Contact", ("referral_url", "whois_server", "abuse_email", "abuse_phone")),
33
+ (
34
+ "Contact",
35
+ ("address", "referral_url", "whois_server", "abuse_email", "abuse_phone"),
36
+ ),
33
37
  )
34
38
 
35
39
  name = forms.CharField(
36
40
  required=False,
37
41
  )
42
+ address = forms.CharField(
43
+ required=False,
44
+ )
38
45
  iana_id = forms.IntegerField(
39
46
  required=False,
40
47
  label="IANA ID",
@@ -64,6 +71,7 @@ class RegistrarImportForm(NetBoxModelImportForm):
64
71
  fields = (
65
72
  "name",
66
73
  "iana_id",
74
+ "address",
67
75
  "referral_url",
68
76
  "whois_server",
69
77
  "abuse_email",
@@ -96,6 +104,7 @@ class RegistrarBulkEditForm(NetBoxModelBulkEditForm):
96
104
  (
97
105
  None,
98
106
  (
107
+ "address",
99
108
  "referral_url",
100
109
  "whois_server",
101
110
  "abuse_email",
@@ -105,6 +114,7 @@ class RegistrarBulkEditForm(NetBoxModelBulkEditForm):
105
114
  )
106
115
 
107
116
  nullable_fields = (
117
+ "address",
108
118
  "referral_url",
109
119
  "whois_server",
110
120
  "abuse_email",
@@ -15,6 +15,7 @@ from utilities.forms.fields import (
15
15
  TagFilterField,
16
16
  CSVChoiceField,
17
17
  CSVModelChoiceField,
18
+ CSVModelMultipleChoiceField,
18
19
  DynamicModelChoiceField,
19
20
  )
20
21
  from utilities.forms.widgets import BulkEditNullBooleanSelect, APISelect
@@ -287,6 +288,12 @@ class ZoneImportForm(NetBoxModelImportForm):
287
288
  required=False,
288
289
  help_text="Zone status",
289
290
  )
291
+ nameservers = CSVModelMultipleChoiceField(
292
+ queryset=NameServer.objects.all(),
293
+ to_field_name="name",
294
+ required=False,
295
+ help_text="Name servers for the zone",
296
+ )
290
297
  default_ttl = forms.IntegerField(
291
298
  required=False,
292
299
  help_text="Default TTL",
@@ -308,7 +315,7 @@ class ZoneImportForm(NetBoxModelImportForm):
308
315
  required=False,
309
316
  help_text="Mailbox of the zone's administrator",
310
317
  )
311
- soa_serial_auto = forms.BooleanField(
318
+ soa_serial_auto = forms.NullBooleanField(
312
319
  required=False,
313
320
  help_text="Generate the SOA serial",
314
321
  )
@@ -436,26 +443,6 @@ class ZoneImportForm(NetBoxModelImportForm):
436
443
  def clean_soa_rname(self):
437
444
  return self._clean_field_with_defaults("soa_rname")
438
445
 
439
- def clean_soa_serial_auto(self):
440
- try:
441
- return self._clean_field_with_defaults("soa_serial_auto")
442
- except ValidationError:
443
- if self.cleaned_data["soa_serial"] or self._get_default_value("soa_serial"):
444
- return None
445
-
446
- raise
447
-
448
- def clean_soa_serial(self):
449
- try:
450
- return self._clean_field_with_defaults("soa_serial")
451
- except ValidationError:
452
- if self.cleaned_data["soa_serial_auto"] or self._get_default_value(
453
- "soa_serial_auto"
454
- ):
455
- return None
456
-
457
- raise
458
-
459
446
  def clean_soa_refresh(self):
460
447
  return self._clean_field_with_defaults("soa_refresh")
461
448
 
@@ -468,6 +455,36 @@ class ZoneImportForm(NetBoxModelImportForm):
468
455
  def clean_soa_minimum(self):
469
456
  return self._clean_field_with_defaults("soa_minimum")
470
457
 
458
+ def clean(self, *args, **kwargs):
459
+ super().clean(*args, **kwargs)
460
+
461
+ soa_serial_auto = self.cleaned_data.get("soa_serial_auto")
462
+ soa_serial = self.cleaned_data.get("soa_serial")
463
+
464
+ if soa_serial is None:
465
+ soa_serial = self._get_default_value("soa_serial")
466
+
467
+ if soa_serial_auto is None:
468
+ if self._get_default_value("soa_serial_auto") is not None:
469
+ soa_serial_auto = self._get_default_value("soa_serial_auto")
470
+
471
+ elif soa_serial is not None:
472
+ soa_serial_auto = False
473
+
474
+ else:
475
+ raise ValidationError(
476
+ "SOA Serial Auto not set and no default value and SOA Serial available"
477
+ )
478
+
479
+ if "soa_serial_auto" in self.cleaned_data:
480
+ self.cleaned_data["soa_serial_auto"] = soa_serial_auto
481
+
482
+ if "soa_serial" in self.cleaned_data:
483
+ if soa_serial_auto:
484
+ self.cleaned_data["soa_serial"] = None
485
+ else:
486
+ self.cleaned_data["soa_serial"] = soa_serial
487
+
471
488
  class Meta:
472
489
  model = Zone
473
490
 
@@ -475,6 +492,7 @@ class ZoneImportForm(NetBoxModelImportForm):
475
492
  "view",
476
493
  "name",
477
494
  "status",
495
+ "nameservers",
478
496
  "default_ttl",
479
497
  "description",
480
498
  "soa_ttl",
@@ -141,7 +141,7 @@ def record_update_ptr_records(verbose=False):
141
141
  for record in Record.objects.filter(
142
142
  type__in=(RecordTypeChoices.A, RecordTypeChoices.AAAA)
143
143
  ):
144
- record.update_ptr_record()
144
+ record.save(update_fields=["ptr_record"])
145
145
 
146
146
 
147
147
  def record_update_ip_address(verbose=False):
@@ -0,0 +1,62 @@
1
+ from django.core.management.base import BaseCommand
2
+ from django.db.models import Max, Min
3
+
4
+ from netbox_dns.models import (
5
+ Record,
6
+ RecordTypeChoices,
7
+ )
8
+
9
+
10
+ class Command(BaseCommand):
11
+ help = "Clean up the TTLs for RRSets"
12
+
13
+ def add_arguments(self, parser):
14
+ min_max = parser.add_mutually_exclusive_group()
15
+ min_max.add_argument(
16
+ "--min",
17
+ action="store_true",
18
+ help="Use the minimum TTL of an RRSet for all Records",
19
+ )
20
+ min_max.add_argument(
21
+ "--max",
22
+ action="store_true",
23
+ help="Use the maximum TTL of an RRSet for all Records",
24
+ )
25
+
26
+ def handle(self, *model_names, **options):
27
+ self.cleanup_rrset_ttl(**options)
28
+
29
+ self.stdout.write("RRSet cleanup completed.")
30
+
31
+ def cleanup_rrset_ttl(self, **options):
32
+ verbose = options.get("verbosity") > 1
33
+
34
+ ttl_records = (
35
+ Record.objects.filter(ttl__isnull=False)
36
+ .exclude(type=RecordTypeChoices.SOA)
37
+ .exclude(type=RecordTypeChoices.PTR, maanged=True)
38
+ )
39
+ for record in ttl_records:
40
+ records = Record.objects.filter(
41
+ name=record.name,
42
+ zone=record.zone,
43
+ type=record.type,
44
+ ).exclude(type=RecordTypeChoices.PTR, maanged=True)
45
+
46
+ if records.count() == 1:
47
+ if options.get("verbosity") > 2:
48
+ self.stdout.write(f"Ignoring single record {record.id} ({record})")
49
+ continue
50
+
51
+ if options.get("max"):
52
+ ttl = records.aggregate(Max("ttl")).get("ttl__max")
53
+ else:
54
+ ttl = records.aggregate(Min("ttl")).get("ttl__min")
55
+
56
+ for record in records.exclude(ttl=ttl):
57
+ if options.get("verbosity") > 1:
58
+ self.stdout.write(
59
+ f"Updating TTL for record {record.id} ({record}) to {ttl}"
60
+ )
61
+ record.ttl = ttl
62
+ record.save(update_fields=["ttl"], update_rrset_ttl=False)