netbox-plugin-dns 1.0.0__tar.gz → 1.0b1__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.
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/PKG-INFO +13 -29
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/README.md +10 -24
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/__init__.py +3 -3
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/view.py +1 -6
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/zone.py +11 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/fields/network.py +21 -20
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/fields/rfc2317.py +2 -2
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/view.py +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/zone.py +4 -4
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/record.py +2 -30
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/view.py +3 -6
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/zone.py +101 -70
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/graphql/types.py +4 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/management/commands/cleanup_rrset_ttl.py +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +2 -4
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/models/nameserver.py +1 -3
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/models/record.py +24 -26
- netbox_plugin_dns-1.0b1/netbox_dns/models/view.py +43 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/models/zone.py +46 -63
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/signals/ipam_coupling.py +2 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/view.py +2 -9
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/template_content.py +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/record.html +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/view.html +0 -4
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone.html +4 -2
- netbox_plugin_dns-1.0b1/netbox_dns/urls.py +297 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/views/record.py +24 -9
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/pyproject.toml +3 -3
- netbox_plugin_dns-1.0.0/netbox_dns/migrations/0003_default_view.py +0 -15
- netbox_plugin_dns-1.0.0/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -26
- netbox_plugin_dns-1.0.0/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -18
- netbox_plugin_dns-1.0.0/netbox_dns/models/view.py +0 -96
- netbox_plugin_dns-1.0.0/netbox_dns/urls/__init__.py +0 -17
- netbox_plugin_dns-1.0.0/netbox_dns/urls/contact.py +0 -51
- netbox_plugin_dns-1.0.0/netbox_dns/urls/nameserver.py +0 -69
- netbox_plugin_dns-1.0.0/netbox_dns/urls/record.py +0 -41
- netbox_plugin_dns-1.0.0/netbox_dns/urls/registrar.py +0 -63
- netbox_plugin_dns-1.0.0/netbox_dns/urls/view.py +0 -39
- netbox_plugin_dns-1.0.0/netbox_dns/urls/zone.py +0 -57
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/LICENSE +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/nested_serializers.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/record.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/serializers_/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/urls.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/api/views.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/fields/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/record.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/filtersets/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/forms/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/graphql/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/graphql/filters.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/graphql/schema.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/management/commands/cleanup_database.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/management/commands/setup_coupling.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0024_tenancy.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0026_domain_registration.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/models/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/models/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/models/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/navigation.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/signals/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/record.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/tables/zone.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/contact.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/utilities/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/utilities/ipam_coupling.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/validators/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/validators/dns_name.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/validators/rfc2317.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/views/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/views/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/views/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/views/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/netbox_dns/views/view.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b1}/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.
|
|
3
|
+
Version: 1.0b1
|
|
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.
|
|
11
|
-
Classifier: Development Status ::
|
|
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,
|
|
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>
|
|
@@ -36,30 +34,16 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
|
|
|
36
34
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
|
|
37
35
|
</div>
|
|
38
36
|
|
|
39
|
-
##
|
|
40
|
-
NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
|
|
37
|
+
## Features
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
* Manage name servers, zones and records
|
|
40
|
+
* Automatically generate SOA and NS records for zones
|
|
41
|
+
* Automatically create and update PTR records for IPv4 and IPv6 address records
|
|
42
|
+
* Organize DNS zones in views for split horizon DNS and multi-site deployments
|
|
43
|
+
* Manage domain registrar and registrant information for domains related to zones
|
|
44
|
+
* Manage RFC2317 reverse zones for IPv4 prefixes with a network mask length longer than 24 bits
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
* Validation of record names and values
|
|
47
|
-
* Automatic maintenance of PTR records for IPv6 and IPv4 address records
|
|
48
|
-
* Automatic generation of SOA records, optionally including the serial number of the zone data
|
|
49
|
-
* 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
|
|
51
|
-
|
|
52
|
-
Other main features include:
|
|
53
|
-
|
|
54
|
-
* 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.
|
|
58
|
-
|
|
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.
|
|
61
|
-
|
|
62
|
-
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.
|
|
46
|
+
NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
|
|
63
47
|
|
|
64
48
|
## Requirements
|
|
65
49
|
|
|
@@ -101,7 +85,7 @@ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documen
|
|
|
101
85
|
|
|
102
86
|
## Contribute
|
|
103
87
|
|
|
104
|
-
Contributions are always welcome! Please see
|
|
88
|
+
Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
|
|
105
89
|
|
|
106
90
|
## Documentation
|
|
107
91
|
|
|
@@ -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,
|
|
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>
|
|
@@ -14,30 +14,16 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
|
|
|
14
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>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
NetBox DNS is designed to be the 'DNS Source of Truth' analogous to NetBox being the 'Network Source of Truth'.
|
|
17
|
+
## Features
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
* Manage name servers, zones and records
|
|
20
|
+
* Automatically generate SOA and NS records for zones
|
|
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
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* Validation of record names and values
|
|
25
|
-
* Automatic maintenance of PTR records for IPv6 and IPv4 address records
|
|
26
|
-
* Automatic generation of SOA records, optionally including the serial number of the zone data
|
|
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
|
|
29
|
-
|
|
30
|
-
Other main features include:
|
|
31
|
-
|
|
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.
|
|
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.
|
|
39
|
-
|
|
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.
|
|
26
|
+
NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
|
|
41
27
|
|
|
42
28
|
## Requirements
|
|
43
29
|
|
|
@@ -79,7 +65,7 @@ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documen
|
|
|
79
65
|
|
|
80
66
|
## Contribute
|
|
81
67
|
|
|
82
|
-
Contributions are always welcome! Please see
|
|
68
|
+
Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
|
|
83
69
|
|
|
84
70
|
## Documentation
|
|
85
71
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
from netbox.plugins import PluginConfig
|
|
2
2
|
|
|
3
|
-
__version__ = "1.0
|
|
3
|
+
__version__ = "1.0-beta1"
|
|
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
|
|
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
|
-
"
|
|
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", "
|
|
29
|
+
brief_fields = ("id", "url", "display", "name", "description")
|
|
@@ -13,6 +13,17 @@ from netbox_dns.models import Zone
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class ZoneSerializer(NetBoxModelSerializer):
|
|
16
|
+
# +
|
|
17
|
+
# This is a hack to avoid the exception raised by the UniqueTogetherValidator
|
|
18
|
+
# after NetBox commit https://github.com/netbox-community/netbox/commit/78e284c
|
|
19
|
+
#
|
|
20
|
+
# See https://github.com/netbox-community/netbox/issues/15351 for details.
|
|
21
|
+
# -
|
|
22
|
+
def __init__(self, *args, **kwargs):
|
|
23
|
+
super().__init__(*args, **kwargs)
|
|
24
|
+
if self.nested:
|
|
25
|
+
self.validators = []
|
|
26
|
+
|
|
16
27
|
url = serializers.HyperlinkedIdentityField(
|
|
17
28
|
view_name="plugins-api:netbox_dns-api:zone-detail"
|
|
18
29
|
)
|
|
@@ -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,
|
|
13
|
-
lhs, lhs_params = self.process_lhs(
|
|
14
|
-
rhs, rhs_params = self.process_rhs(
|
|
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
|
|
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,
|
|
23
|
-
lhs, lhs_params = self.process_lhs(
|
|
24
|
-
rhs, rhs_params = self.process_rhs(
|
|
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
|
|
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,
|
|
33
|
-
lhs, lhs_params = self.process_lhs(
|
|
34
|
-
rhs, rhs_params = self.process_rhs(
|
|
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
|
|
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,
|
|
43
|
-
lhs, lhs_params = self.process_lhs(
|
|
44
|
-
rhs, rhs_params = self.process_rhs(
|
|
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
|
|
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,
|
|
53
|
-
lhs, lhs_params = self.process_lhs(
|
|
54
|
-
rhs, rhs_params = self.process_rhs(
|
|
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
|
|
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
|
-
|
|
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", "
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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", "
|
|
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", "
|
|
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", "
|
|
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
|
)
|