netbox-plugin-dns 1.1.4__tar.gz → 1.1.6__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.1.4 → netbox_plugin_dns-1.1.6}/PKG-INFO +2 -1
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/README.md +1 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/__init__.py +18 -4
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/views.py +2 -2
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/record.py +0 -1
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/zone.py +1 -2
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/record.py +12 -8
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/view.py +2 -3
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/zone.py +8 -9
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/zone_template.py +5 -5
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/types.py +37 -0
- netbox_plugin_dns-1.1.6/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/cleanup_database.py +4 -6
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/rebuild_dnssync.py +3 -1
- netbox_plugin_dns-1.1.6/netbox_dns/migrations/0011_rename_related_fields.py +63 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/mixins/object_modification.py +4 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/nameserver.py +5 -9
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/record.py +23 -38
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/record_template.py +4 -4
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/registration_contact.py +1 -1
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/view.py +2 -3
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/zone.py +96 -48
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/record.py +14 -2
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/zone.py +1 -2
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/template_content.py +16 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/record.html +12 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view.html +1 -1
- netbox_plugin_dns-1.1.6/netbox_dns/templates/netbox_dns/zone/delegation_record.html +18 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone.html +1 -1
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/__init__.py +1 -0
- netbox_plugin_dns-1.1.6/netbox_dns/utilities/dns.py +12 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/ipam_dnssync.py +10 -13
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/nameserver.py +5 -5
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/record.py +44 -11
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/registrar.py +3 -3
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/registration_contact.py +2 -2
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/view.py +4 -4
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/zone.py +50 -21
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/PKG-INFO +2 -1
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/SOURCES.txt +3 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/pyproject.toml +1 -1
- netbox_plugin_dns-1.1.4/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/LICENSE +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/nested_serializers.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/prefix.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/record.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/record_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/registrar.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/registration_contact.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/view.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/zone.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/serializers_/zone_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/api/urls.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/choices/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/choices/record.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/choices/zone.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/ipam.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/network.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/fields/rfc2317.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/record_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/registrar.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/registration_contact.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/view.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/filtersets/zone_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/record_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/registrar.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/forms/registration_contact.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/filters.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/graphql/schema.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/locale/en/LC_MESSAGES/django.mo +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/setup_dnssync.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0003_default_view.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0006_templating.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0008_view_prefixes.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0010_view_ip_address_filter.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0024_tenancy.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0026_domain_registration.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/mixins/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/registrar.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/models/zone_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/navigation.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/signals/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/signals/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/record_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/registrar.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/registration_contact.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/view.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/tables/zone_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/registrationcontact.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view/button.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view/prefix.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/record.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/record_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/registrar.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/registration_contact.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/view.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/zone.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/urls/zone_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/utilities/conversions.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/dns_name.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/dns_value.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/validators/rfc2317.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/__init__.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/record_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/views/zone_template.py +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/dependency_links.txt +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/requires.txt +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_plugin_dns.egg-info/top_level.txt +0 -0
- {netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-plugin-dns
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.6
|
|
4
4
|
Summary: NetBox DNS is a NetBox plugin for managing DNS data.
|
|
5
5
|
Author-email: Peter Eckel <pete@netbox-dns.org>
|
|
6
6
|
Project-URL: Homepage, https://github.com/peteeckel/netbox-plugin-dns
|
|
@@ -25,6 +25,7 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
|
|
|
25
25
|
<a href="https://github.com/peteeckel/netbox-plugin-dns/pulls"><img src="https://img.shields.io/github/issues-pr/peteeckel/netbox-plugin-dns" alt="Pull Requests Badge"/></a>
|
|
26
26
|
<a href="https://github.com/peteeckel/netbox-plugin-dns/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/peteeckel/netbox-plugin-dns?color=2b9348"></a>
|
|
27
27
|
<a href="https://github.com/peteeckel/netbox-plugin-dns/blob/master/LICENSE"><img src="https://img.shields.io/github/license/peteeckel/netbox-plugin-dns?color=2b9348" alt="License Badge"/></a>
|
|
28
|
+
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style Black"/></a>
|
|
28
29
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads" src="https://static.pepy.tech/badge/netbox-plugin-dns"></a>
|
|
29
30
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Week" src="https://static.pepy.tech/badge/netbox-plugin-dns/month"></a>
|
|
30
31
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
|
|
@@ -9,6 +9,7 @@ The NetBox DNS plugin enables NetBox to manage operational DNS data such as name
|
|
|
9
9
|
<a href="https://github.com/peteeckel/netbox-plugin-dns/pulls"><img src="https://img.shields.io/github/issues-pr/peteeckel/netbox-plugin-dns" alt="Pull Requests Badge"/></a>
|
|
10
10
|
<a href="https://github.com/peteeckel/netbox-plugin-dns/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/peteeckel/netbox-plugin-dns?color=2b9348"></a>
|
|
11
11
|
<a href="https://github.com/peteeckel/netbox-plugin-dns/blob/master/LICENSE"><img src="https://img.shields.io/github/license/peteeckel/netbox-plugin-dns?color=2b9348" alt="License Badge"/></a>
|
|
12
|
+
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style Black"/></a>
|
|
12
13
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads" src="https://static.pepy.tech/badge/netbox-plugin-dns"></a>
|
|
13
14
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Week" src="https://static.pepy.tech/badge/netbox-plugin-dns/month"></a>
|
|
14
15
|
<a href="https://pepy.tech/project/netbox-plugin-dns"><img alt="Downloads/Month" src="https://static.pepy.tech/badge/netbox-plugin-dns/week"></a>
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
from django.conf import settings
|
|
2
1
|
from django.utils.translation import gettext_lazy as _
|
|
2
|
+
from django.core.exceptions import ImproperlyConfigured
|
|
3
3
|
|
|
4
4
|
from netbox.plugins import PluginConfig
|
|
5
|
+
from netbox.plugins.utils import get_plugin_config
|
|
5
6
|
from ipam.choices import IPAddressStatusChoices
|
|
6
7
|
|
|
7
8
|
from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices, ZoneStatusChoices
|
|
8
9
|
|
|
9
|
-
__version__ = "1.1.
|
|
10
|
+
__version__ = "1.1.6"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _check_list(setting):
|
|
14
|
+
if not isinstance(get_plugin_config("netbox_dns", setting), list):
|
|
15
|
+
raise ImproperlyConfigured(f"{setting} must be a list")
|
|
10
16
|
|
|
11
17
|
|
|
12
18
|
class DNSConfig(PluginConfig):
|
|
@@ -53,7 +59,7 @@ class DNSConfig(PluginConfig):
|
|
|
53
59
|
"enable_root_zones": False,
|
|
54
60
|
"enforce_unique_records": True,
|
|
55
61
|
"enforce_unique_rrset_ttl": True,
|
|
56
|
-
"menu_name": "
|
|
62
|
+
"menu_name": "DNS",
|
|
57
63
|
"top_level_menu": True,
|
|
58
64
|
}
|
|
59
65
|
base_url = "netbox-dns"
|
|
@@ -61,10 +67,18 @@ class DNSConfig(PluginConfig):
|
|
|
61
67
|
def ready(self):
|
|
62
68
|
super().ready()
|
|
63
69
|
|
|
64
|
-
if not
|
|
70
|
+
if not get_plugin_config("netbox_dns", "dnssync_disabled"):
|
|
65
71
|
import netbox_dns.signals.ipam_dnssync # noqa: F401
|
|
66
72
|
import netbox_dns.tables.ipam_dnssync # noqa: F401
|
|
67
73
|
|
|
74
|
+
for setting in (
|
|
75
|
+
"zone_active_status",
|
|
76
|
+
"record_active_status",
|
|
77
|
+
"dnssync_ipaddress_active_status",
|
|
78
|
+
"tolerate_leading_underscore_types",
|
|
79
|
+
):
|
|
80
|
+
_check_list(setting)
|
|
81
|
+
|
|
68
82
|
|
|
69
83
|
#
|
|
70
84
|
# Initialize plugin config
|
|
@@ -57,7 +57,7 @@ class ZoneViewSet(NetBoxModelViewSet):
|
|
|
57
57
|
"nameservers",
|
|
58
58
|
"tags",
|
|
59
59
|
"soa_mname",
|
|
60
|
-
"
|
|
60
|
+
"records",
|
|
61
61
|
"tenant",
|
|
62
62
|
)
|
|
63
63
|
serializer_class = ZoneSerializer
|
|
@@ -71,7 +71,7 @@ class NameServerViewSet(NetBoxModelViewSet):
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
class RecordViewSet(NetBoxModelViewSet):
|
|
74
|
-
queryset = Record.objects.
|
|
74
|
+
queryset = Record.objects.prefetch_related("zone", "zone__view", "tenant")
|
|
75
75
|
serializer_class = RecordSerializer
|
|
76
76
|
filterset_class = RecordFilterSet
|
|
77
77
|
|
|
@@ -3,7 +3,6 @@ import netaddr
|
|
|
3
3
|
import django_filters
|
|
4
4
|
from django.db.models import Q
|
|
5
5
|
from django.utils.translation import gettext as _
|
|
6
|
-
from django.utils.translation import pgettext as _p
|
|
7
6
|
|
|
8
7
|
from netbox.filtersets import NetBoxModelFilterSet
|
|
9
8
|
from tenancy.filtersets import TenancyFilterSet
|
|
@@ -28,7 +27,7 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
28
27
|
queryset=View.objects.all(),
|
|
29
28
|
field_name="view__name",
|
|
30
29
|
to_field_name="name",
|
|
31
|
-
label=
|
|
30
|
+
label=_("View"),
|
|
32
31
|
)
|
|
33
32
|
# DEPRECATED: Remove in 1.1
|
|
34
33
|
name_server_id = django_filters.ModelMultipleChoiceFilter(
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from django import forms
|
|
2
2
|
from django.utils.translation import gettext_lazy as _
|
|
3
|
-
from django.utils.translation import pgettext_lazy as _p
|
|
4
3
|
|
|
5
4
|
from netbox.forms import (
|
|
6
5
|
NetBoxModelBulkEditForm,
|
|
@@ -46,9 +45,9 @@ class RecordForm(TenancyForm, NetBoxModelForm):
|
|
|
46
45
|
queryset=View.objects.all(),
|
|
47
46
|
required=False,
|
|
48
47
|
initial_params={
|
|
49
|
-
"
|
|
48
|
+
"zones": "$zone",
|
|
50
49
|
},
|
|
51
|
-
label=
|
|
50
|
+
label=_("View"),
|
|
52
51
|
)
|
|
53
52
|
zone = DynamicModelChoiceField(
|
|
54
53
|
queryset=Zone.objects.all(),
|
|
@@ -187,23 +186,28 @@ class RecordImportForm(NetBoxModelImportForm):
|
|
|
187
186
|
pass
|
|
188
187
|
|
|
189
188
|
if view is not None:
|
|
190
|
-
self.fields["zone"].queryset =
|
|
189
|
+
self.fields["zone"].queryset = view.zones
|
|
191
190
|
else:
|
|
192
|
-
self.fields["zone"].queryset =
|
|
193
|
-
view=View.get_default_view()
|
|
194
|
-
)
|
|
191
|
+
self.fields["zone"].queryset = View.get_default_view().zones
|
|
195
192
|
|
|
196
193
|
zone = CSVModelChoiceField(
|
|
197
194
|
queryset=Zone.objects.all(),
|
|
198
195
|
to_field_name="name",
|
|
199
196
|
required=True,
|
|
200
197
|
label=_("Zone"),
|
|
198
|
+
error_messages={
|
|
199
|
+
"invalid_choice": _("Zone %(value)s not found"),
|
|
200
|
+
},
|
|
201
201
|
)
|
|
202
202
|
view = CSVModelChoiceField(
|
|
203
203
|
queryset=View.objects.all(),
|
|
204
204
|
to_field_name="name",
|
|
205
205
|
required=False,
|
|
206
|
-
label=
|
|
206
|
+
label=_("View"),
|
|
207
|
+
error_messages={
|
|
208
|
+
"invalid_choice": _("View %(value)s not found"),
|
|
209
|
+
},
|
|
210
|
+
help_text=_("This field is required if the zone is not in the default view"),
|
|
207
211
|
)
|
|
208
212
|
type = CSVChoiceField(
|
|
209
213
|
choices=RecordTypeChoices,
|
|
@@ -3,7 +3,6 @@ from django.conf import settings
|
|
|
3
3
|
from django.core.exceptions import ValidationError, FieldError
|
|
4
4
|
from django.db.models import Q, Count
|
|
5
5
|
from django.utils.translation import gettext_lazy as _
|
|
6
|
-
from django.utils.translation import pgettext_lazy as _p
|
|
7
6
|
|
|
8
7
|
from netbox.forms import (
|
|
9
8
|
NetBoxModelBulkEditForm,
|
|
@@ -127,7 +126,7 @@ class ViewForm(ViewPrefixUpdateMixin, TenancyForm, NetBoxModelForm):
|
|
|
127
126
|
)
|
|
128
127
|
|
|
129
128
|
fieldsets = (
|
|
130
|
-
FieldSet("name", "default_view", "description", name=
|
|
129
|
+
FieldSet("name", "default_view", "description", name=_("View")),
|
|
131
130
|
FieldSet("prefixes", "ip_address_filter"),
|
|
132
131
|
FieldSet("tenant_group", "tenant", name=_("Tenancy")),
|
|
133
132
|
FieldSet("tags", name=_("Tags")),
|
|
@@ -302,7 +301,7 @@ class ViewPrefixEditForm(forms.ModelForm):
|
|
|
302
301
|
|
|
303
302
|
if not views.exists():
|
|
304
303
|
if (parent := prefix.get_parents().last()) is not None:
|
|
305
|
-
check_views = parent.netbox_dns_views.
|
|
304
|
+
check_views = parent.netbox_dns_views.difference(old_views)
|
|
306
305
|
|
|
307
306
|
else:
|
|
308
307
|
check_views = views.difference(old_views)
|
|
@@ -4,7 +4,6 @@ from django.conf import settings
|
|
|
4
4
|
from django.core.validators import MinValueValidator, MaxValueValidator
|
|
5
5
|
from django.core.exceptions import ValidationError
|
|
6
6
|
from django.utils.translation import gettext_lazy as _
|
|
7
|
-
from django.utils.translation import pgettext_lazy as _p
|
|
8
7
|
|
|
9
8
|
from netbox.forms import (
|
|
10
9
|
NetBoxModelBulkEditForm,
|
|
@@ -385,7 +384,7 @@ class ZoneFilterForm(TenancyFilterForm, NetBoxModelFilterSetForm):
|
|
|
385
384
|
view_id = DynamicModelMultipleChoiceField(
|
|
386
385
|
queryset=View.objects.all(),
|
|
387
386
|
required=False,
|
|
388
|
-
label=
|
|
387
|
+
label=_("View"),
|
|
389
388
|
)
|
|
390
389
|
status = forms.MultipleChoiceField(
|
|
391
390
|
choices=ZoneStatusChoices,
|
|
@@ -476,7 +475,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
476
475
|
required=False,
|
|
477
476
|
to_field_name="name",
|
|
478
477
|
error_messages={
|
|
479
|
-
"invalid_choice": _("View not found
|
|
478
|
+
"invalid_choice": _("View %(value)s not found"),
|
|
480
479
|
},
|
|
481
480
|
label=_("View"),
|
|
482
481
|
)
|
|
@@ -505,7 +504,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
505
504
|
required=False,
|
|
506
505
|
to_field_name="name",
|
|
507
506
|
error_messages={
|
|
508
|
-
"invalid_choice": _("Nameserver not found
|
|
507
|
+
"invalid_choice": _("Nameserver %(value)s not found"),
|
|
509
508
|
},
|
|
510
509
|
help_text=_("Primary nameserver for the zone"),
|
|
511
510
|
label=_("SOA MName"),
|
|
@@ -560,7 +559,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
560
559
|
required=False,
|
|
561
560
|
to_field_name="name",
|
|
562
561
|
error_messages={
|
|
563
|
-
"invalid_choice": _("Registrar not found
|
|
562
|
+
"invalid_choice": _("Registrar %(value)s not found"),
|
|
564
563
|
},
|
|
565
564
|
label=_("Registrar"),
|
|
566
565
|
)
|
|
@@ -573,7 +572,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
573
572
|
required=False,
|
|
574
573
|
to_field_name="contact_id",
|
|
575
574
|
error_messages={
|
|
576
|
-
"invalid_choice": _("Registrant contact ID not found"),
|
|
575
|
+
"invalid_choice": _("Registrant contact ID %(value)s not found"),
|
|
577
576
|
},
|
|
578
577
|
label=_("Registrant"),
|
|
579
578
|
)
|
|
@@ -582,7 +581,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
582
581
|
required=False,
|
|
583
582
|
to_field_name="contact_id",
|
|
584
583
|
error_messages={
|
|
585
|
-
"invalid_choice": _("Administrative contact ID not found"),
|
|
584
|
+
"invalid_choice": _("Administrative contact ID %(value)s not found"),
|
|
586
585
|
},
|
|
587
586
|
label=_("Administrative Contact"),
|
|
588
587
|
)
|
|
@@ -591,7 +590,7 @@ class ZoneImportForm(ZoneTemplateUpdateMixin, NetBoxModelImportForm):
|
|
|
591
590
|
required=False,
|
|
592
591
|
to_field_name="contact_id",
|
|
593
592
|
error_messages={
|
|
594
|
-
"invalid_choice": _("Technical contact ID not found"),
|
|
593
|
+
"invalid_choice": _("Technical contact ID %(value)s not found"),
|
|
595
594
|
},
|
|
596
595
|
label=_("Technical Contact"),
|
|
597
596
|
)
|
|
@@ -675,7 +674,7 @@ class ZoneBulkEditForm(NetBoxModelBulkEditForm):
|
|
|
675
674
|
view = DynamicModelChoiceField(
|
|
676
675
|
queryset=View.objects.all(),
|
|
677
676
|
required=False,
|
|
678
|
-
label=
|
|
677
|
+
label=_("View"),
|
|
679
678
|
)
|
|
680
679
|
status = forms.ChoiceField(
|
|
681
680
|
choices=add_blank_choice(ZoneStatusChoices),
|
|
@@ -159,7 +159,7 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
159
159
|
required=False,
|
|
160
160
|
to_field_name="name",
|
|
161
161
|
error_messages={
|
|
162
|
-
"invalid_choice": _("Registrar not found
|
|
162
|
+
"invalid_choice": _("Registrar %(value)s not found"),
|
|
163
163
|
},
|
|
164
164
|
label=_("Registrar"),
|
|
165
165
|
)
|
|
@@ -168,7 +168,7 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
168
168
|
required=False,
|
|
169
169
|
to_field_name="contact_id",
|
|
170
170
|
error_messages={
|
|
171
|
-
"invalid_choice": _("Registrant contact ID not found"),
|
|
171
|
+
"invalid_choice": _("Registrant contact ID %(value)s not found"),
|
|
172
172
|
},
|
|
173
173
|
label=_("Registrant"),
|
|
174
174
|
)
|
|
@@ -177,7 +177,7 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
177
177
|
required=False,
|
|
178
178
|
to_field_name="contact_id",
|
|
179
179
|
error_messages={
|
|
180
|
-
"invalid_choice": _("Administrative contact ID not found"),
|
|
180
|
+
"invalid_choice": _("Administrative contact ID %(value)s not found"),
|
|
181
181
|
},
|
|
182
182
|
label=_("Administrative Contact"),
|
|
183
183
|
)
|
|
@@ -186,7 +186,7 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
186
186
|
required=False,
|
|
187
187
|
to_field_name="contact_id",
|
|
188
188
|
error_messages={
|
|
189
|
-
"invalid_choice": _("Technical contact ID not found"),
|
|
189
|
+
"invalid_choice": _("Technical contact ID %(value)s not found"),
|
|
190
190
|
},
|
|
191
191
|
label=_("Technical Contact"),
|
|
192
192
|
)
|
|
@@ -195,7 +195,7 @@ class ZoneTemplateImportForm(NetBoxModelImportForm):
|
|
|
195
195
|
required=False,
|
|
196
196
|
to_field_name="contact_id",
|
|
197
197
|
error_messages={
|
|
198
|
-
"invalid_choice": _("Billing contact ID not found"),
|
|
198
|
+
"invalid_choice": _("Billing contact ID %(value)s not found"),
|
|
199
199
|
},
|
|
200
200
|
label=_("Billing Contact"),
|
|
201
201
|
)
|
|
@@ -35,6 +35,12 @@ class NetBoxDNSNameServerType(NetBoxObjectType):
|
|
|
35
35
|
name: str
|
|
36
36
|
description: str
|
|
37
37
|
tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
|
|
38
|
+
zones: List[
|
|
39
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
40
|
+
]
|
|
41
|
+
soa_zones: List[
|
|
42
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
43
|
+
]
|
|
38
44
|
|
|
39
45
|
|
|
40
46
|
@strawberry_django.type(View, fields="__all__", filters=NetBoxDNSViewFilter)
|
|
@@ -44,6 +50,9 @@ class NetBoxDNSViewType(NetBoxObjectType):
|
|
|
44
50
|
tenant: Annotated["TenantType", strawberry.lazy("tenancy.graphql.types")] | None
|
|
45
51
|
prefixes: List[Annotated["PrefixType", strawberry.lazy("ipam.graphql.types")]]
|
|
46
52
|
ip_address_filter: str | None
|
|
53
|
+
zones: List[
|
|
54
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
55
|
+
]
|
|
47
56
|
|
|
48
57
|
|
|
49
58
|
@strawberry_django.type(Zone, fields="__all__", filters=NetBoxDNSZoneFilter)
|
|
@@ -111,6 +120,12 @@ class NetBoxDNSZoneType(NetBoxObjectType):
|
|
|
111
120
|
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
112
121
|
| None
|
|
113
122
|
)
|
|
123
|
+
records: List[
|
|
124
|
+
Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
125
|
+
]
|
|
126
|
+
rfc2317_child_zones: List[
|
|
127
|
+
Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
128
|
+
]
|
|
114
129
|
|
|
115
130
|
|
|
116
131
|
@strawberry_django.type(Record, fields="__all__", filters=NetBoxDNSRecordFilter)
|
|
@@ -137,6 +152,13 @@ class NetBoxDNSRecordType(NetBoxObjectType):
|
|
|
137
152
|
Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
138
153
|
| None
|
|
139
154
|
)
|
|
155
|
+
address_record: (
|
|
156
|
+
Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
157
|
+
| None
|
|
158
|
+
)
|
|
159
|
+
rfc2317_ptr_records: List[
|
|
160
|
+
Annotated["NetBoxDNSRecordType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
161
|
+
]
|
|
140
162
|
|
|
141
163
|
|
|
142
164
|
@strawberry_django.type(
|
|
@@ -157,6 +179,18 @@ class NetBoxDNSRegistrationContactType(NetBoxObjectType):
|
|
|
157
179
|
fax: str
|
|
158
180
|
fax_ext: str
|
|
159
181
|
email: str
|
|
182
|
+
registrant_zones: List[
|
|
183
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
184
|
+
]
|
|
185
|
+
admin_c_zones: List[
|
|
186
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
187
|
+
]
|
|
188
|
+
tech_c_zones: List[
|
|
189
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
190
|
+
]
|
|
191
|
+
billing_c_zones: List[
|
|
192
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
193
|
+
]
|
|
160
194
|
|
|
161
195
|
|
|
162
196
|
@strawberry_django.type(Registrar, fields="__all__", filters=NetBoxDNSRegistrarFilter)
|
|
@@ -169,6 +203,9 @@ class NetBoxDNSRegistrarType(NetBoxObjectType):
|
|
|
169
203
|
address: str
|
|
170
204
|
abuse_email: str
|
|
171
205
|
abuse_phone: str
|
|
206
|
+
zones: List[
|
|
207
|
+
Annotated["NetBoxDNSZoneType", strawberry.lazy("netbox_dns.graphql.types")]
|
|
208
|
+
]
|
|
172
209
|
|
|
173
210
|
|
|
174
211
|
@strawberry_django.type(
|
|
Binary file
|
|
@@ -24,7 +24,7 @@ def zone_cleanup_ns_records(verbose=False):
|
|
|
24
24
|
nameservers = zone.nameservers.all()
|
|
25
25
|
nameserver_names = [f'{ns.name.rstrip(".")}.' for ns in nameservers]
|
|
26
26
|
|
|
27
|
-
delete_ns = zone.
|
|
27
|
+
delete_ns = zone.records.filter(
|
|
28
28
|
name=ns_name, type=RecordTypeChoices.NS
|
|
29
29
|
).exclude(value__in=nameserver_names)
|
|
30
30
|
for record in delete_ns:
|
|
@@ -33,7 +33,7 @@ def zone_cleanup_ns_records(verbose=False):
|
|
|
33
33
|
record.delete()
|
|
34
34
|
|
|
35
35
|
for ns in nameserver_names:
|
|
36
|
-
ns_records = zone.
|
|
36
|
+
ns_records = zone.records.filter(
|
|
37
37
|
name=ns_name,
|
|
38
38
|
type=RecordTypeChoices.NS,
|
|
39
39
|
value=ns,
|
|
@@ -46,7 +46,7 @@ def zone_cleanup_ns_records(verbose=False):
|
|
|
46
46
|
record.delete()
|
|
47
47
|
|
|
48
48
|
try:
|
|
49
|
-
ns_record = zone.
|
|
49
|
+
ns_record = zone.records.get(
|
|
50
50
|
name=ns_name,
|
|
51
51
|
type=RecordTypeChoices.NS,
|
|
52
52
|
value=ns,
|
|
@@ -76,9 +76,7 @@ def zone_update_soa_records(verbose=False):
|
|
|
76
76
|
soa_name = "@"
|
|
77
77
|
|
|
78
78
|
for zone in Zone.objects.all():
|
|
79
|
-
delete_soa = zone.
|
|
80
|
-
1:
|
|
81
|
-
]
|
|
79
|
+
delete_soa = zone.records.filter(name=soa_name, type=RecordTypeChoices.SOA)[1:]
|
|
82
80
|
for record in delete_soa:
|
|
83
81
|
if verbose:
|
|
84
82
|
print(f"Deleting duplicate SOA record {record}")
|
|
@@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand
|
|
|
2
2
|
|
|
3
3
|
from ipam.models import IPAddress
|
|
4
4
|
|
|
5
|
-
from netbox_dns.utilities import update_dns_records
|
|
5
|
+
from netbox_dns.utilities import update_dns_records, get_zones
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Command(BaseCommand):
|
|
@@ -22,6 +22,8 @@ class Command(BaseCommand):
|
|
|
22
22
|
self.stdout.write(
|
|
23
23
|
f"Updating DNS records for IP Address {ip_address}, VRF {ip_address.vrf}"
|
|
24
24
|
)
|
|
25
|
+
if options.get("verbosity") >= 3:
|
|
26
|
+
self.stdout.write(f" Zones: {get_zones(ip_address)}")
|
|
25
27
|
if (
|
|
26
28
|
update_dns_records(ip_address, force=options.get("force"))
|
|
27
29
|
and options.get("verbosity") >= 1
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Generated by Django 5.0.9 on 2024-11-11 08:09
|
|
2
|
+
|
|
3
|
+
import django.db.models.deletion
|
|
4
|
+
from django.db import migrations, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Migration(migrations.Migration):
|
|
8
|
+
|
|
9
|
+
dependencies = [
|
|
10
|
+
("netbox_dns", "0010_view_ip_address_filter"),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
operations = [
|
|
14
|
+
migrations.AlterField(
|
|
15
|
+
model_name="record",
|
|
16
|
+
name="zone",
|
|
17
|
+
field=models.ForeignKey(
|
|
18
|
+
on_delete=django.db.models.deletion.CASCADE,
|
|
19
|
+
related_name="records",
|
|
20
|
+
to="netbox_dns.zone",
|
|
21
|
+
),
|
|
22
|
+
),
|
|
23
|
+
migrations.AlterField(
|
|
24
|
+
model_name="zone",
|
|
25
|
+
name="registrant",
|
|
26
|
+
field=models.ForeignKey(
|
|
27
|
+
blank=True,
|
|
28
|
+
null=True,
|
|
29
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
30
|
+
related_name="registrant_zones",
|
|
31
|
+
to="netbox_dns.registrationcontact",
|
|
32
|
+
),
|
|
33
|
+
),
|
|
34
|
+
migrations.AlterField(
|
|
35
|
+
model_name="zone",
|
|
36
|
+
name="registrar",
|
|
37
|
+
field=models.ForeignKey(
|
|
38
|
+
blank=True,
|
|
39
|
+
null=True,
|
|
40
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
41
|
+
related_name="zones",
|
|
42
|
+
to="netbox_dns.registrar",
|
|
43
|
+
),
|
|
44
|
+
),
|
|
45
|
+
migrations.AlterField(
|
|
46
|
+
model_name="zone",
|
|
47
|
+
name="soa_mname",
|
|
48
|
+
field=models.ForeignKey(
|
|
49
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
50
|
+
related_name="soa_zones",
|
|
51
|
+
to="netbox_dns.nameserver",
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
migrations.AlterField(
|
|
55
|
+
model_name="zone",
|
|
56
|
+
name="view",
|
|
57
|
+
field=models.ForeignKey(
|
|
58
|
+
on_delete=django.db.models.deletion.PROTECT,
|
|
59
|
+
related_name="zones",
|
|
60
|
+
to="netbox_dns.view",
|
|
61
|
+
),
|
|
62
|
+
),
|
|
63
|
+
]
|
{netbox_plugin_dns-1.1.4 → netbox_plugin_dns-1.1.6}/netbox_dns/mixins/object_modification.py
RENAMED
|
@@ -21,6 +21,10 @@ class ObjectModificationMixin:
|
|
|
21
21
|
|
|
22
22
|
def _save_field_values(self):
|
|
23
23
|
for field in self.check_fields:
|
|
24
|
+
if field == "custom_field_data":
|
|
25
|
+
self._saved_custom_field_data = self.custom_field_data.copy()
|
|
26
|
+
continue
|
|
27
|
+
|
|
24
28
|
if f"{field}_id" in self.__dict__:
|
|
25
29
|
setattr(self, f"_saved_{field}_id", self.__dict__.get(f"{field}_id"))
|
|
26
30
|
else:
|
|
@@ -19,8 +19,6 @@ from netbox_dns.choices import RecordTypeChoices
|
|
|
19
19
|
from netbox_dns.validators import validate_fqdn
|
|
20
20
|
from netbox_dns.mixins import ObjectModificationMixin
|
|
21
21
|
|
|
22
|
-
from .record import Record
|
|
23
|
-
|
|
24
22
|
|
|
25
23
|
__all__ = (
|
|
26
24
|
"NameServer",
|
|
@@ -80,7 +78,7 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
80
78
|
{
|
|
81
79
|
"name": str(exc),
|
|
82
80
|
}
|
|
83
|
-
)
|
|
81
|
+
)
|
|
84
82
|
|
|
85
83
|
try:
|
|
86
84
|
validate_fqdn(self.name)
|
|
@@ -89,7 +87,7 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
89
87
|
{
|
|
90
88
|
"name": exc,
|
|
91
89
|
}
|
|
92
|
-
)
|
|
90
|
+
)
|
|
93
91
|
|
|
94
92
|
super().clean(*args, **kwargs)
|
|
95
93
|
|
|
@@ -102,7 +100,7 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
102
100
|
super().save(*args, **kwargs)
|
|
103
101
|
|
|
104
102
|
if changed_fields is not None and "name" in changed_fields:
|
|
105
|
-
soa_zones = self.
|
|
103
|
+
soa_zones = self.soa_zones.all()
|
|
106
104
|
for soa_zone in soa_zones:
|
|
107
105
|
soa_zone.update_soa_record()
|
|
108
106
|
|
|
@@ -112,10 +110,8 @@ class NameServer(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
112
110
|
|
|
113
111
|
def delete(self, *args, **kwargs):
|
|
114
112
|
with transaction.atomic():
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Record.objects.filter(
|
|
118
|
-
Q(zone=zone),
|
|
113
|
+
for zone in self.zones.all():
|
|
114
|
+
zone.records.filter(
|
|
119
115
|
Q(managed=True),
|
|
120
116
|
Q(value=f"{self.name}."),
|
|
121
117
|
Q(type=RecordTypeChoices.NS),
|