netbox-plugin-dns 1.0b2__tar.gz → 1.0.1__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 (114) hide show
  1. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/PKG-INFO +14 -14
  2. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/README.md +11 -11
  3. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/__init__.py +3 -3
  4. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/view.py +6 -1
  5. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/fields/network.py +20 -21
  6. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/fields/rfc2317.py +2 -2
  7. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/view.py +1 -1
  8. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/zone.py +4 -4
  9. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/record.py +30 -2
  10. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/view.py +6 -3
  11. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/zone.py +71 -102
  12. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/graphql/types.py +1 -4
  13. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +4 -2
  14. netbox_plugin_dns-1.0.1/netbox_dns/migrations/0003_default_view.py +15 -0
  15. netbox_plugin_dns-1.0.1/netbox_dns/migrations/0004_create_and_assign_default_view.py +26 -0
  16. netbox_plugin_dns-1.0.1/netbox_dns/migrations/0005_alter_zone_view_not_null.py +18 -0
  17. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/models/nameserver.py +3 -1
  18. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/models/record.py +84 -31
  19. netbox_plugin_dns-1.0.1/netbox_dns/models/view.py +96 -0
  20. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/models/zone.py +91 -46
  21. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/signals/ipam_coupling.py +1 -2
  22. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/view.py +12 -2
  23. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/template_content.py +1 -1
  24. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/record.html +1 -1
  25. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/view.html +4 -0
  26. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone.html +2 -4
  27. netbox_plugin_dns-1.0.1/netbox_dns/urls/__init__.py +17 -0
  28. netbox_plugin_dns-1.0.1/netbox_dns/urls/contact.py +51 -0
  29. netbox_plugin_dns-1.0.1/netbox_dns/urls/nameserver.py +69 -0
  30. netbox_plugin_dns-1.0.1/netbox_dns/urls/record.py +41 -0
  31. netbox_plugin_dns-1.0.1/netbox_dns/urls/registrar.py +63 -0
  32. netbox_plugin_dns-1.0.1/netbox_dns/urls/view.py +39 -0
  33. netbox_plugin_dns-1.0.1/netbox_dns/urls/zone.py +57 -0
  34. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/validators/dns_name.py +24 -11
  35. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/views/record.py +10 -18
  36. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/pyproject.toml +4 -4
  37. netbox_plugin_dns-1.0b2/netbox_dns/models/view.py +0 -43
  38. netbox_plugin_dns-1.0b2/netbox_dns/urls.py +0 -297
  39. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/LICENSE +0 -0
  40. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/nested_serializers.py +0 -0
  41. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers.py +0 -0
  42. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/__init__.py +0 -0
  43. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/contact.py +0 -0
  44. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/nameserver.py +0 -0
  45. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/record.py +0 -0
  46. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/registrar.py +0 -0
  47. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/serializers_/zone.py +0 -0
  48. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/urls.py +0 -0
  49. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/api/views.py +0 -0
  50. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/apps.py +0 -0
  51. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/fields/__init__.py +0 -0
  52. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/fields/address.py +0 -0
  53. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/__init__.py +0 -0
  54. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/contact.py +0 -0
  55. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/nameserver.py +0 -0
  56. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/record.py +0 -0
  57. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/filtersets/registrar.py +0 -0
  58. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/__init__.py +0 -0
  59. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/contact.py +0 -0
  60. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/nameserver.py +0 -0
  61. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/forms/registrar.py +0 -0
  62. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/graphql/__init__.py +0 -0
  63. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/graphql/filters.py +0 -0
  64. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/graphql/schema.py +0 -0
  65. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/management/commands/cleanup_database.py +0 -0
  66. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
  67. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/management/commands/setup_coupling.py +0 -0
  68. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/management/commands/update_soa.py +0 -0
  69. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  70. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
  71. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  72. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  73. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0022_search.py +0 -0
  74. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  75. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0024_tenancy.py +0 -0
  76. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  77. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  78. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  79. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  80. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
  81. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/migrations/__init__.py +0 -0
  82. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/models/__init__.py +0 -0
  83. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/models/contact.py +0 -0
  84. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/models/registrar.py +0 -0
  85. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/navigation.py +0 -0
  86. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/signals/__init__.py +0 -0
  87. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/__init__.py +0 -0
  88. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/contact.py +0 -0
  89. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/nameserver.py +0 -0
  90. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/record.py +0 -0
  91. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/registrar.py +0 -0
  92. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/tables/zone.py +0 -0
  93. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/contact.html +0 -0
  94. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  95. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  96. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  97. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  98. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -0
  99. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  100. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  101. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  102. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  103. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  104. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  105. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/utilities/__init__.py +0 -0
  106. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/utilities/ipam_coupling.py +0 -0
  107. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/validators/__init__.py +0 -0
  108. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/validators/rfc2317.py +0 -0
  109. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/views/__init__.py +0 -0
  110. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/views/contact.py +0 -0
  111. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/views/nameserver.py +0 -0
  112. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/views/registrar.py +0 -0
  113. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/netbox_dns/views/view.py +0 -0
  114. {netbox_plugin_dns-1.0b2 → netbox_plugin_dns-1.0.1}/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: 1.0b2
3
+ Version: 1.0.1
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,18 +8,18 @@ Keywords: netbox,netbox-plugin,dns
8
8
  Author: Peter Eckel
9
9
  Author-email: pete@netbox-dns.org
10
10
  Requires-Python: >=3.10,<4.0
11
- Classifier: Development Status :: 4 - Beta
11
+ Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
- Requires-Dist: dnspython (>=2.2.1,<3.0.0)
17
+ Requires-Dist: dnspython (>=2.6.1,<3.0.0)
18
18
  Project-URL: Repository, https://github.com/peteeckel/netbox-plugin-dns
19
19
  Description-Content-Type: text/markdown
20
20
 
21
21
  # NetBox DNS
22
- 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.
22
+ 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, up-to-date and compliant with to the relevant RFCs.
23
23
 
24
24
  <div align="center">
25
25
  <a href="https://pypi.org/project/netbox-plugin-dns/"><img src="https://img.shields.io/pypi/v/netbox-plugin-dns" alt="PyPi"/></a>
@@ -37,25 +37,25 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
37
37
  ## Objectives
38
38
  NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
39
39
 
40
- The plugin holds information about DNS name servers, DNS Views and Zones, and DNS Records, making it a data source for automatically provisioning DNS instances. Registrarion information about DNS registrars and contacts for DNS domains can also be stored and associated with zones.
40
+ The plugin stores information about DNS name servers, DNS views and zones, and DNS records, making it a data source for automatic provisioning of DNS instances. Registration information about DNS registrars and contacts for DNS domains can also be stored and associated with zones.
41
41
 
42
- The main focus of the plugin is to ensure the quality of data stored in it. To achieve this, many validation and automation mechanisms are in place:
42
+ The main focus of the plugin is to ensure the quality of the data stored in it. To achieve this, there are many validation and automation mechanisms in place:
43
43
 
44
44
  * Validation of record names and values
45
45
  * Automatic maintenance of PTR records for IPv6 and IPv4 address records
46
46
  * Automatic generation of SOA records, optionally including the serial number of the zone data
47
47
  * Validation of record types such as CNAME and singletons, to ensure DNS zone validity
48
- * [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) support for delegation of PTR zones for IPv4 subnets longer than 24 bits
48
+ * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
49
49
 
50
- Other main features are:
50
+ Other main features include:
51
51
 
52
52
  * Support for BIND views, providing lightweight namespaces for zones
53
- * Support for IDN, inclucing the validation of punycode names
54
- * Fully supported NetBox REST and GraphQL API
55
- * Support for all major NetBox features like Global Search, Tenancy, Change Logs, Tagging, Journaling etc.
53
+ * Support for IDN, including the validation of punycode names
54
+ * Full support for the NetBox REST and GraphQL APIs
55
+ * Support for all major NetBox features such as global search, tenancy, change logs, tagging, journaling etc.
56
56
 
57
- ## Non-Objectives
58
- In the same way in which NetBox is not a network management application, NetBox DNS does not provide functionality to manage specific name servers or DNS service providers or generate input like configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services actually using the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.
57
+ ## Non-objectives
58
+ In the same way as NetBox is not a network management application, NetBox DNS does not provide any functionality to manage specific name servers or DNS service providers or to generate input such as configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services that actually use the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.
59
59
 
60
60
  For integration with a large number of DNS server implementations integration tools like [octodns-netbox-dns](https://pypi.org/project/octodns-netbox-dns/) are available.
61
61
 
@@ -99,7 +99,7 @@ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documen
99
99
 
100
100
  ## Contribute
101
101
 
102
- Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
102
+ Contributions are always welcome! Please see the [Contribution Guidelines](CONTRIBUTING.md)
103
103
 
104
104
  ## Documentation
105
105
 
@@ -1,5 +1,5 @@
1
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.
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, up-to-date and compliant with to the relevant RFCs.
3
3
 
4
4
  <div align="center">
5
5
  <a href="https://pypi.org/project/netbox-plugin-dns/"><img src="https://img.shields.io/pypi/v/netbox-plugin-dns" alt="PyPi"/></a>
@@ -17,25 +17,25 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
17
17
  ## Objectives
18
18
  NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
19
19
 
20
- The plugin holds information about DNS name servers, DNS Views and Zones, and DNS Records, making it a data source for automatically provisioning DNS instances. Registrarion information about DNS registrars and contacts for DNS domains can also be stored and associated with zones.
20
+ The plugin stores information about DNS name servers, DNS views and zones, and DNS records, making it a data source for automatic provisioning of DNS instances. Registration information about DNS registrars and contacts for DNS domains can also be stored and associated with zones.
21
21
 
22
- The main focus of the plugin is to ensure the quality of data stored in it. To achieve this, many validation and automation mechanisms are in place:
22
+ The main focus of the plugin is to ensure the quality of the data stored in it. To achieve this, there are many validation and automation mechanisms in place:
23
23
 
24
24
  * Validation of record names and values
25
25
  * Automatic maintenance of PTR records for IPv6 and IPv4 address records
26
26
  * Automatic generation of SOA records, optionally including the serial number of the zone data
27
27
  * Validation of record types such as CNAME and singletons, to ensure DNS zone validity
28
- * [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) support for delegation of PTR zones for IPv4 subnets longer than 24 bits
28
+ * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
29
29
 
30
- Other main features are:
30
+ Other main features include:
31
31
 
32
32
  * Support for BIND views, providing lightweight namespaces for zones
33
- * Support for IDN, inclucing the validation of punycode names
34
- * Fully supported NetBox REST and GraphQL API
35
- * Support for all major NetBox features like Global Search, Tenancy, Change Logs, Tagging, Journaling etc.
33
+ * Support for IDN, including the validation of punycode names
34
+ * Full support for the NetBox REST and GraphQL APIs
35
+ * Support for all major NetBox features such as global search, tenancy, change logs, tagging, journaling etc.
36
36
 
37
- ## Non-Objectives
38
- In the same way in which NetBox is not a network management application, NetBox DNS does not provide functionality to manage specific name servers or DNS service providers or generate input like configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services actually using the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.
37
+ ## Non-objectives
38
+ In the same way as NetBox is not a network management application, NetBox DNS does not provide any functionality to manage specific name servers or DNS service providers or to generate input such as configuration and zone files for them. The focus is on the completeness and integrity of the data needed to run DNS zones, not on the peculiarities of a plethora of servers and services that actually use the data. This functionality is left to specialized integration tools, or in many cases it can be easily implemented using Ansible or similar tools based on NetBox DNS data. Example code for some simple use cases is provided.
39
39
 
40
40
  For integration with a large number of DNS server implementations integration tools like [octodns-netbox-dns](https://pypi.org/project/octodns-netbox-dns/) are available.
41
41
 
@@ -79,7 +79,7 @@ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documen
79
79
 
80
80
  ## Contribute
81
81
 
82
- Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
82
+ Contributions are always welcome! Please see the [Contribution Guidelines](CONTRIBUTING.md)
83
83
 
84
84
  ## Documentation
85
85
 
@@ -1,20 +1,20 @@
1
1
  from netbox.plugins import PluginConfig
2
2
 
3
- __version__ = "1.0-beta2"
3
+ __version__ = "1.0.1"
4
4
 
5
5
 
6
6
  class DNSConfig(PluginConfig):
7
7
  name = "netbox_dns"
8
8
  verbose_name = "NetBox DNS"
9
9
  description = "NetBox plugin for DNS data"
10
- min_version = "4.0-beta1"
10
+ min_version = "4.0.0"
11
11
  version = __version__
12
12
  author = "Peter Eckel"
13
13
  author_email = "pete@netbox-dns.org"
14
14
  required_settings = []
15
15
  default_settings = {
16
16
  "zone_default_ttl": 86400,
17
- "zone_soa_serial_auto": True,
17
+ "zone_soa_ttl": 86400,
18
18
  "zone_soa_serial": 1,
19
19
  "zone_soa_refresh": 43200,
20
20
  "zone_soa_retry": 7200,
@@ -10,6 +10,10 @@ class ViewSerializer(NetBoxModelSerializer):
10
10
  url = serializers.HyperlinkedIdentityField(
11
11
  view_name="plugins-api:netbox_dns-api:view-detail"
12
12
  )
13
+ default_view = serializers.BooleanField(
14
+ read_only=True,
15
+ )
16
+
13
17
  tenant = TenantSerializer(nested=True, required=False, allow_null=True)
14
18
 
15
19
  class Meta:
@@ -19,6 +23,7 @@ class ViewSerializer(NetBoxModelSerializer):
19
23
  "url",
20
24
  "display",
21
25
  "name",
26
+ "default_view",
22
27
  "tags",
23
28
  "description",
24
29
  "created",
@@ -26,4 +31,4 @@ class ViewSerializer(NetBoxModelSerializer):
26
31
  "custom_fields",
27
32
  "tenant",
28
33
  )
29
- brief_fields = ("id", "url", "display", "name", "description")
34
+ brief_fields = ("id", "url", "display", "name", "default_view", "description")
@@ -9,51 +9,51 @@ from netaddr import AddrFormatError, IPNetwork
9
9
  class NetContains(Lookup):
10
10
  lookup_name = "net_contains"
11
11
 
12
- def as_sql(self, qn, connection):
13
- lhs, lhs_params = self.process_lhs(qn, connection)
14
- rhs, rhs_params = self.process_rhs(qn, connection)
12
+ def as_sql(self, compiler, connection):
13
+ lhs, lhs_params = self.process_lhs(compiler, connection)
14
+ rhs, rhs_params = self.process_rhs(compiler, connection)
15
15
  params = lhs_params + rhs_params
16
- return "%s >> %s" % (lhs, rhs), params
16
+ return f"{lhs} >> {rhs}", params
17
17
 
18
18
 
19
19
  class NetContainsOrEquals(Lookup):
20
20
  lookup_name = "net_contains_or_equals"
21
21
 
22
- def as_sql(self, qn, connection):
23
- lhs, lhs_params = self.process_lhs(qn, connection)
24
- rhs, rhs_params = self.process_rhs(qn, connection)
22
+ def as_sql(self, compiler, connection):
23
+ lhs, lhs_params = self.process_lhs(compiler, connection)
24
+ rhs, rhs_params = self.process_rhs(compiler, connection)
25
25
  params = lhs_params + rhs_params
26
- return "%s >>= %s" % (lhs, rhs), params
26
+ return f"{lhs} >>= {rhs}", params
27
27
 
28
28
 
29
29
  class NetContained(Lookup):
30
30
  lookup_name = "net_contained"
31
31
 
32
- def as_sql(self, qn, connection):
33
- lhs, lhs_params = self.process_lhs(qn, connection)
34
- rhs, rhs_params = self.process_rhs(qn, connection)
32
+ def as_sql(self, compiler, connection):
33
+ lhs, lhs_params = self.process_lhs(compiler, connection)
34
+ rhs, rhs_params = self.process_rhs(compiler, connection)
35
35
  params = lhs_params + rhs_params
36
- return "%s << %s" % (lhs, rhs), params
36
+ return f"{lhs} << {rhs}", params
37
37
 
38
38
 
39
39
  class NetContainedOrEqual(Lookup):
40
40
  lookup_name = "net_contained_or_equal"
41
41
 
42
- def as_sql(self, qn, connection):
43
- lhs, lhs_params = self.process_lhs(qn, connection)
44
- rhs, rhs_params = self.process_rhs(qn, connection)
42
+ def as_sql(self, compiler, connection):
43
+ lhs, lhs_params = self.process_lhs(compiler, connection)
44
+ rhs, rhs_params = self.process_rhs(compiler, connection)
45
45
  params = lhs_params + rhs_params
46
- return "%s <<= %s" % (lhs, rhs), params
46
+ return f"{lhs} <<= {rhs}", params
47
47
 
48
48
 
49
49
  class NetOverlap(Lookup):
50
50
  lookup_name = "net_overlap"
51
51
 
52
- def as_sql(self, qn, connection):
53
- lhs, lhs_params = self.process_lhs(qn, connection)
54
- rhs, rhs_params = self.process_rhs(qn, connection)
52
+ def as_sql(self, compiler, connection):
53
+ lhs, lhs_params = self.process_lhs(compiler, connection)
54
+ rhs, rhs_params = self.process_rhs(compiler, connection)
55
55
  params = lhs_params + rhs_params
56
- return "%s && %s" % (lhs, rhs), params
56
+ return f"{lhs} && {rhs}", params
57
57
 
58
58
 
59
59
  class NetworkFormField(forms.Field):
@@ -118,7 +118,6 @@ class NetMaskLength(Transform):
118
118
  function = "MASKLEN"
119
119
  lookup_name = "net_mask_length"
120
120
 
121
- @property
122
121
  def output_field(self):
123
122
  return IntegerField()
124
123
 
@@ -18,8 +18,8 @@ class RFC2317NetworkFormField(forms.Field):
18
18
  if isinstance(value, IPNetwork):
19
19
  if value.version == 4 and value.prefixlen > 24:
20
20
  return value
21
- else:
22
- raise ValidationError(INVALID_RFC2317)
21
+
22
+ raise ValidationError(INVALID_RFC2317)
23
23
 
24
24
  if len(value.split("/")) != 2:
25
25
  raise ValidationError("Please specify the prefix length")
@@ -9,7 +9,7 @@ from netbox_dns.models import View
9
9
  class ViewFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
10
10
  class Meta:
11
11
  model = View
12
- fields = ("id", "name", "description")
12
+ fields = ("id", "name", "default_view", "description")
13
13
 
14
14
  def search(self, queryset, name, value):
15
15
  if not value.strip():
@@ -31,14 +31,14 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
31
31
  to_field_name="name",
32
32
  label="View",
33
33
  )
34
- # DEPRECATED: Remove in 1.0
34
+ # DEPRECATED: Remove in 1.1
35
35
  name_server_id = django_filters.ModelMultipleChoiceFilter(
36
36
  queryset=NameServer.objects.all(),
37
37
  field_name="nameservers",
38
38
  to_field_name="id",
39
39
  label="Nameserver IDs",
40
40
  )
41
- # DEPRECATED: Remove in 1.0
41
+ # DEPRECATED: Remove in 1.1
42
42
  name_server = django_filters.ModelMultipleChoiceFilter(
43
43
  queryset=NameServer.objects.all(),
44
44
  field_name="nameservers__name",
@@ -59,13 +59,13 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
59
59
  )
60
60
  soa_mname_id = django_filters.ModelMultipleChoiceFilter(
61
61
  queryset=NameServer.objects.all(),
62
- label="SOA MNname ID",
62
+ label="SOA MName ID",
63
63
  )
64
64
  soa_mname = django_filters.ModelMultipleChoiceFilter(
65
65
  queryset=NameServer.objects.all(),
66
66
  field_name="soa_mname__name",
67
67
  to_field_name="name",
68
- label="SOA MNname",
68
+ label="SOA MName",
69
69
  )
70
70
  arpa_network = MultiValueCharFilter(
71
71
  method="filter_arpa_network",
@@ -28,10 +28,30 @@ class RecordForm(TenancyForm, NetBoxModelForm):
28
28
  def __init__(self, *args, **kwargs):
29
29
  super().__init__(*args, **kwargs)
30
30
 
31
+ initial_zone_id = self.initial.get("zone")
32
+ if initial_zone_id is not None:
33
+ self.initial["view"] = Zone.objects.get(pk=initial_zone_id).view
34
+ else:
35
+ self.initial["view"] = View.get_default_view()
36
+
31
37
  initial_name = self.initial.get("name")
32
38
  if initial_name:
33
39
  self.initial["name"] = name_to_unicode(initial_name)
34
40
 
41
+ view = DynamicModelChoiceField(
42
+ queryset=View.objects.all(),
43
+ required=False,
44
+ label="View",
45
+ )
46
+ zone = DynamicModelChoiceField(
47
+ queryset=Zone.objects.all(),
48
+ required=True,
49
+ query_params={
50
+ "view_id": "$view",
51
+ },
52
+ label="Zone",
53
+ )
54
+
35
55
  disable_ptr = forms.BooleanField(
36
56
  label="Disable PTR",
37
57
  required=False,
@@ -44,6 +64,7 @@ class RecordForm(TenancyForm, NetBoxModelForm):
44
64
  fieldsets = (
45
65
  FieldSet(
46
66
  "name",
67
+ "view",
47
68
  "zone",
48
69
  "type",
49
70
  "value",
@@ -84,6 +105,7 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
84
105
  "fqdn",
85
106
  "type",
86
107
  "value",
108
+ "disable_ptr",
87
109
  "status",
88
110
  "description",
89
111
  name="Attributes",
@@ -105,6 +127,10 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
105
127
  value = forms.CharField(
106
128
  required=False,
107
129
  )
130
+ disable_ptr = forms.NullBooleanField(
131
+ required=False,
132
+ label="Disable PTR",
133
+ )
108
134
  status = forms.MultipleChoiceField(
109
135
  choices=RecordStatusChoices,
110
136
  required=False,
@@ -131,10 +157,12 @@ class RecordImportForm(NetBoxModelImportForm):
131
157
  except forms.ValidationError:
132
158
  pass
133
159
 
134
- if view:
160
+ if view is not None:
135
161
  self.fields["zone"].queryset = Zone.objects.filter(view=view)
136
162
  else:
137
- self.fields["zone"].queryset = Zone.objects.filter(view__isnull=True)
163
+ self.fields["zone"].queryset = Zone.objects.filter(
164
+ view=View.get_default_view()
165
+ )
138
166
 
139
167
  zone = CSVModelChoiceField(
140
168
  queryset=Zone.objects.all(),
@@ -20,26 +20,29 @@ from netbox_dns.models import View
20
20
 
21
21
  class ViewForm(TenancyForm, NetBoxModelForm):
22
22
  fieldsets = (
23
- FieldSet("name", "description", "tags", name="View"),
23
+ FieldSet("name", "default_view", "description", "tags", name="View"),
24
24
  FieldSet("tenant_group", "tenant", name="Tenancy"),
25
25
  )
26
26
 
27
27
  class Meta:
28
28
  model = View
29
- fields = ("name", "description", "tags", "tenant")
29
+ fields = ("name", "default_view", "description", "tags", "tenant")
30
30
 
31
31
 
32
32
  class ViewFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
33
33
  model = View
34
34
  fieldsets = (
35
35
  FieldSet("q", "filter_id", "tag"),
36
- FieldSet("name", "description", name="Attributes"),
36
+ FieldSet("name", "default_view", "description", name="Attributes"),
37
37
  FieldSet("tenant_group_id", "tenant_id", name="Tenancy"),
38
38
  )
39
39
 
40
40
  name = forms.CharField(
41
41
  required=False,
42
42
  )
43
+ default_view = forms.NullBooleanField(
44
+ required=False,
45
+ )
43
46
  description = forms.CharField(
44
47
  required=False,
45
48
  )