netbox-plugin-dns 1.0.0__tar.gz → 1.0b2__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.
Files changed (114) hide show
  1. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/PKG-INFO +14 -16
  2. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/README.md +11 -11
  3. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/__init__.py +3 -3
  4. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/view.py +1 -6
  5. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/network.py +21 -20
  6. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/rfc2317.py +2 -2
  7. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/view.py +1 -1
  8. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/zone.py +4 -4
  9. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/record.py +2 -30
  10. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/view.py +3 -6
  11. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/zone.py +101 -70
  12. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/types.py +4 -1
  13. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +2 -4
  14. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/nameserver.py +1 -3
  15. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/record.py +23 -24
  16. netbox_plugin_dns-1.0b2/netbox_dns/models/view.py +43 -0
  17. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/zone.py +46 -63
  18. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/signals/ipam_coupling.py +2 -1
  19. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/view.py +2 -9
  20. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/template_content.py +1 -1
  21. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/record.html +1 -1
  22. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/view.html +0 -4
  23. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone.html +4 -2
  24. netbox_plugin_dns-1.0b2/netbox_dns/urls.py +297 -0
  25. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/record.py +18 -10
  26. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/pyproject.toml +3 -3
  27. netbox_plugin_dns-1.0.0/netbox_dns/migrations/0003_default_view.py +0 -15
  28. netbox_plugin_dns-1.0.0/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -26
  29. netbox_plugin_dns-1.0.0/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -18
  30. netbox_plugin_dns-1.0.0/netbox_dns/models/view.py +0 -96
  31. netbox_plugin_dns-1.0.0/netbox_dns/urls/__init__.py +0 -17
  32. netbox_plugin_dns-1.0.0/netbox_dns/urls/contact.py +0 -51
  33. netbox_plugin_dns-1.0.0/netbox_dns/urls/nameserver.py +0 -69
  34. netbox_plugin_dns-1.0.0/netbox_dns/urls/record.py +0 -41
  35. netbox_plugin_dns-1.0.0/netbox_dns/urls/registrar.py +0 -63
  36. netbox_plugin_dns-1.0.0/netbox_dns/urls/view.py +0 -39
  37. netbox_plugin_dns-1.0.0/netbox_dns/urls/zone.py +0 -57
  38. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/LICENSE +0 -0
  39. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/nested_serializers.py +0 -0
  40. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers.py +0 -0
  41. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/__init__.py +0 -0
  42. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/contact.py +0 -0
  43. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/nameserver.py +0 -0
  44. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/record.py +0 -0
  45. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/registrar.py +0 -0
  46. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/zone.py +0 -0
  47. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/urls.py +0 -0
  48. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/views.py +0 -0
  49. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/apps.py +0 -0
  50. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/__init__.py +0 -0
  51. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/address.py +0 -0
  52. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/__init__.py +0 -0
  53. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/contact.py +0 -0
  54. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/nameserver.py +0 -0
  55. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/record.py +0 -0
  56. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/registrar.py +0 -0
  57. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/__init__.py +0 -0
  58. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/contact.py +0 -0
  59. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/nameserver.py +0 -0
  60. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/registrar.py +0 -0
  61. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/__init__.py +0 -0
  62. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/filters.py +0 -0
  63. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/schema.py +0 -0
  64. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/cleanup_database.py +0 -0
  65. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
  66. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/setup_coupling.py +0 -0
  67. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/update_soa.py +0 -0
  68. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  69. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
  70. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  71. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  72. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0022_search.py +0 -0
  73. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  74. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0024_tenancy.py +0 -0
  75. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  76. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0026_domain_registration.py +0 -0
  77. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  78. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
  79. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
  80. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/__init__.py +0 -0
  81. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/__init__.py +0 -0
  82. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/contact.py +0 -0
  83. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/registrar.py +0 -0
  84. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/navigation.py +0 -0
  85. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/signals/__init__.py +0 -0
  86. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/__init__.py +0 -0
  87. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/contact.py +0 -0
  88. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/nameserver.py +0 -0
  89. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/record.py +0 -0
  90. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/registrar.py +0 -0
  91. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/zone.py +0 -0
  92. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/contact.html +0 -0
  93. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  94. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  95. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
  96. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  97. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -0
  98. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  99. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  100. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  101. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  102. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  103. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
  104. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/utilities/__init__.py +0 -0
  105. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/utilities/ipam_coupling.py +0 -0
  106. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/validators/__init__.py +0 -0
  107. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/validators/dns_name.py +0 -0
  108. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/validators/rfc2317.py +0 -0
  109. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/__init__.py +0 -0
  110. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/contact.py +0 -0
  111. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/nameserver.py +0 -0
  112. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/registrar.py +0 -0
  113. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/view.py +0 -0
  114. {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/zone.py +0 -0
@@ -1,18 +1,16 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 1.0.0
3
+ Version: 1.0b2
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
7
7
  Keywords: netbox,netbox-plugin,dns
8
8
  Author: Peter Eckel
9
9
  Author-email: pete@netbox-dns.org
10
- Requires-Python: >=3.8,<4.0
11
- Classifier: Development Status :: 5 - Production/Stable
10
+ Requires-Python: >=3.10,<4.0
11
+ Classifier: Development Status :: 4 - Beta
12
12
  Classifier: License :: OSI Approved :: MIT License
13
13
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
14
  Classifier: Programming Language :: Python :: 3.10
17
15
  Classifier: Programming Language :: Python :: 3.11
18
16
  Classifier: Programming Language :: Python :: 3.12
@@ -21,7 +19,7 @@ Project-URL: Repository, https://github.com/peteeckel/netbox-plugin-dns
21
19
  Description-Content-Type: text/markdown
22
20
 
23
21
  # 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, up-to-date and compliant with 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, current and conforming to the relevant RFCs.
25
23
 
26
24
  <div align="center">
27
25
  <a href="https://pypi.org/project/netbox-plugin-dns/"><img src="https://img.shields.io/pypi/v/netbox-plugin-dns" alt="PyPi"/></a>
@@ -39,25 +37,25 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
39
37
  ## Objectives
40
38
  NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
41
39
 
42
- 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.
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.
43
41
 
44
- 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:
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:
45
43
 
46
44
  * Validation of record names and values
47
45
  * Automatic maintenance of PTR records for IPv6 and IPv4 address records
48
46
  * Automatic generation of SOA records, optionally including the serial number of the zone data
49
47
  * Validation of record types such as CNAME and singletons, to ensure DNS zone validity
50
- * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
48
+ * [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) support for delegation of PTR zones for IPv4 subnets longer than 24 bits
51
49
 
52
- Other main features include:
50
+ Other main features are:
53
51
 
54
52
  * Support for BIND views, providing lightweight namespaces for zones
55
- * Support for IDN, including the validation of punycode names
56
- * Full support for the NetBox REST and GraphQL APIs
57
- * Support for all major NetBox features such as global search, tenancy, change logs, tagging, journaling etc.
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.
58
56
 
59
- ## Non-objectives
60
- 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.
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.
61
59
 
62
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.
63
61
 
@@ -101,7 +99,7 @@ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documen
101
99
 
102
100
  ## Contribute
103
101
 
104
- Contributions are always welcome! Please see the [Contribution Guidelines](CONTRIBUTING.md)
102
+ Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
105
103
 
106
104
  ## Documentation
107
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, up-to-date and compliant with 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, current and conforming 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 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.
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.
21
21
 
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:
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:
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
- * Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
28
+ * [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) support for delegation of PTR zones for IPv4 subnets longer than 24 bits
29
29
 
30
- Other main features include:
30
+ Other main features are:
31
31
 
32
32
  * Support for BIND views, providing lightweight namespaces for zones
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.
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.
36
36
 
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.
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.
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 the [Contribution Guidelines](CONTRIBUTING.md)
82
+ Contributions are always welcome! Please see: [contributing guide](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.0"
3
+ __version__ = "1.0-beta2"
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.0"
10
+ min_version = "4.0-beta1"
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_ttl": 86400,
17
+ "zone_soa_serial_auto": True,
18
18
  "zone_soa_serial": 1,
19
19
  "zone_soa_refresh": 43200,
20
20
  "zone_soa_retry": 7200,
@@ -10,10 +10,6 @@ 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
-
17
13
  tenant = TenantSerializer(nested=True, required=False, allow_null=True)
18
14
 
19
15
  class Meta:
@@ -23,7 +19,6 @@ class ViewSerializer(NetBoxModelSerializer):
23
19
  "url",
24
20
  "display",
25
21
  "name",
26
- "default_view",
27
22
  "tags",
28
23
  "description",
29
24
  "created",
@@ -31,4 +26,4 @@ class ViewSerializer(NetBoxModelSerializer):
31
26
  "custom_fields",
32
27
  "tenant",
33
28
  )
34
- brief_fields = ("id", "url", "display", "name", "default_view", "description")
29
+ brief_fields = ("id", "url", "display", "name", "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, compiler, connection):
13
- lhs, lhs_params = self.process_lhs(compiler, connection)
14
- rhs, rhs_params = self.process_rhs(compiler, connection)
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)
15
15
  params = lhs_params + rhs_params
16
- return f"{lhs} >> {rhs}", params
16
+ return "%s >> %s" % (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, compiler, connection):
23
- lhs, lhs_params = self.process_lhs(compiler, connection)
24
- rhs, rhs_params = self.process_rhs(compiler, connection)
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)
25
25
  params = lhs_params + rhs_params
26
- return f"{lhs} >>= {rhs}", params
26
+ return "%s >>= %s" % (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, compiler, connection):
33
- lhs, lhs_params = self.process_lhs(compiler, connection)
34
- rhs, rhs_params = self.process_rhs(compiler, connection)
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)
35
35
  params = lhs_params + rhs_params
36
- return f"{lhs} << {rhs}", params
36
+ return "%s << %s" % (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, compiler, connection):
43
- lhs, lhs_params = self.process_lhs(compiler, connection)
44
- rhs, rhs_params = self.process_rhs(compiler, connection)
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)
45
45
  params = lhs_params + rhs_params
46
- return f"{lhs} <<= {rhs}", params
46
+ return "%s <<= %s" % (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, compiler, connection):
53
- lhs, lhs_params = self.process_lhs(compiler, connection)
54
- rhs, rhs_params = self.process_rhs(compiler, connection)
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)
55
55
  params = lhs_params + rhs_params
56
- return f"{lhs} && {rhs}", params
56
+ return "%s && %s" % (lhs, rhs), params
57
57
 
58
58
 
59
59
  class NetworkFormField(forms.Field):
@@ -118,6 +118,7 @@ class NetMaskLength(Transform):
118
118
  function = "MASKLEN"
119
119
  lookup_name = "net_mask_length"
120
120
 
121
+ @property
121
122
  def output_field(self):
122
123
  return IntegerField()
123
124
 
@@ -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
-
22
- raise ValidationError(INVALID_RFC2317)
21
+ else:
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", "default_view", "description")
12
+ fields = ("id", "name", "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.1
34
+ # DEPRECATED: Remove in 1.0
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.1
41
+ # DEPRECATED: Remove in 1.0
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 MName ID",
62
+ label="SOA MNname 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 MName",
68
+ label="SOA MNname",
69
69
  )
70
70
  arpa_network = MultiValueCharFilter(
71
71
  method="filter_arpa_network",
@@ -28,30 +28,10 @@ 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
-
37
31
  initial_name = self.initial.get("name")
38
32
  if initial_name:
39
33
  self.initial["name"] = name_to_unicode(initial_name)
40
34
 
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
-
55
35
  disable_ptr = forms.BooleanField(
56
36
  label="Disable PTR",
57
37
  required=False,
@@ -64,7 +44,6 @@ class RecordForm(TenancyForm, NetBoxModelForm):
64
44
  fieldsets = (
65
45
  FieldSet(
66
46
  "name",
67
- "view",
68
47
  "zone",
69
48
  "type",
70
49
  "value",
@@ -105,7 +84,6 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
105
84
  "fqdn",
106
85
  "type",
107
86
  "value",
108
- "disable_ptr",
109
87
  "status",
110
88
  "description",
111
89
  name="Attributes",
@@ -127,10 +105,6 @@ class RecordFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
127
105
  value = forms.CharField(
128
106
  required=False,
129
107
  )
130
- disable_ptr = forms.NullBooleanField(
131
- required=False,
132
- label="Disable PTR",
133
- )
134
108
  status = forms.MultipleChoiceField(
135
109
  choices=RecordStatusChoices,
136
110
  required=False,
@@ -157,12 +131,10 @@ class RecordImportForm(NetBoxModelImportForm):
157
131
  except forms.ValidationError:
158
132
  pass
159
133
 
160
- if view is not None:
134
+ if view:
161
135
  self.fields["zone"].queryset = Zone.objects.filter(view=view)
162
136
  else:
163
- self.fields["zone"].queryset = Zone.objects.filter(
164
- view=View.get_default_view()
165
- )
137
+ self.fields["zone"].queryset = Zone.objects.filter(view__isnull=True)
166
138
 
167
139
  zone = CSVModelChoiceField(
168
140
  queryset=Zone.objects.all(),
@@ -20,29 +20,26 @@ from netbox_dns.models import View
20
20
 
21
21
  class ViewForm(TenancyForm, NetBoxModelForm):
22
22
  fieldsets = (
23
- FieldSet("name", "default_view", "description", "tags", name="View"),
23
+ FieldSet("name", "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", "default_view", "description", "tags", "tenant")
29
+ fields = ("name", "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", "default_view", "description", name="Attributes"),
36
+ FieldSet("name", "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
- )
46
43
  description = forms.CharField(
47
44
  required=False,
48
45
  )