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.
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/PKG-INFO +14 -16
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/README.md +11 -11
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/__init__.py +3 -3
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/view.py +1 -6
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/network.py +21 -20
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/rfc2317.py +2 -2
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/view.py +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/zone.py +4 -4
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/record.py +2 -30
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/view.py +3 -6
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/zone.py +101 -70
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/types.py +4 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +2 -4
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/nameserver.py +1 -3
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/record.py +23 -24
- netbox_plugin_dns-1.0b2/netbox_dns/models/view.py +43 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/zone.py +46 -63
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/signals/ipam_coupling.py +2 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/view.py +2 -9
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/template_content.py +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/record.html +1 -1
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/view.html +0 -4
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone.html +4 -2
- netbox_plugin_dns-1.0b2/netbox_dns/urls.py +297 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/record.py +18 -10
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/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.0b2}/LICENSE +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/nested_serializers.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/record.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/serializers_/zone.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/urls.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/api/views.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/record.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/filtersets/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/forms/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/filters.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/graphql/schema.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/cleanup_database.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/setup_coupling.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0024_tenancy.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0026_domain_registration.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/models/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/navigation.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/signals/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/record.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/tables/zone.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/contact.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/utilities/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/utilities/ipam_coupling.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/validators/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/validators/dns_name.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/validators/rfc2317.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/__init__.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/contact.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/nameserver.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/registrar.py +0 -0
- {netbox_plugin_dns-1.0.0 → netbox_plugin_dns-1.0b2}/netbox_dns/views/view.py +0 -0
- {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.
|
|
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.
|
|
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>
|
|
@@ -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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
50
|
+
Other main features are:
|
|
53
51
|
|
|
54
52
|
* Support for BIND views, providing lightweight namespaces for zones
|
|
55
|
-
* Support for IDN,
|
|
56
|
-
*
|
|
57
|
-
* Support for all major NetBox features
|
|
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-
|
|
60
|
-
In the same way
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
30
|
+
Other main features are:
|
|
31
31
|
|
|
32
32
|
* Support for BIND views, providing lightweight namespaces for zones
|
|
33
|
-
* Support for IDN,
|
|
34
|
-
*
|
|
35
|
-
* Support for all major NetBox features
|
|
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-
|
|
38
|
-
In the same way
|
|
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
|
|
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
|
|
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
|
|
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")
|
|
@@ -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
|
)
|