netbox-plugin-dns 1.3.1__tar.gz → 1.3.3__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.3.1 → netbox_plugin_dns-1.3.3}/PKG-INFO +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/__init__.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/zone.py +9 -2
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/dnssec_key_template.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/dnssec_policy.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/nameserver.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/record.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/record_template.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/registrar.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/registration_contact.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/view.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/zone.py +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/zone_template.py +1 -1
- netbox_plugin_dns-1.3.3/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_plugin_dns-1.3.3/netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
- netbox_plugin_dns-1.3.3/netbox_dns/management/commands/remove_orphaned_ptr_records.py +35 -0
- netbox_plugin_dns-1.3.3/netbox_dns/migrations/0022_alter_record_ipam_ip_address.py +26 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/record.py +58 -44
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/zone.py +30 -24
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/zone_template.py +2 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record.html +7 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/base.html +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone.html +7 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/ipam_dnssync.py +21 -3
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/zone.py +2 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/PKG-INFO +1 -1
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/SOURCES.txt +2 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/pyproject.toml +4 -2
- netbox_plugin_dns-1.3.1/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_plugin_dns-1.3.1/netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/LICENSE +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/README.md +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/field_serializers.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/nested_serializers.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/nameserver.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/prefix.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/record_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/registrar.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/registration_contact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/zone.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/zone_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/urls.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/views.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/utilities.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/choices/zone.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/choice_array.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/ipam.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/network.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/rfc2317.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/fields/timeperiod.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/nameserver.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/record_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/registrar.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/registration_contact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/zone.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/filtersets/zone_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/nameserver.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/record_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/registrar.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/registration_contact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/forms/zone_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/enums.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filter_lookups.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/schema.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/types.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/locale/en/LC_MESSAGES/django.mo +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/cleanup_database.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/rebuild_dnssync.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/setup_dnssync.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0003_default_view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0006_templating.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0008_view_prefixes.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0010_view_ip_address_filter.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0011_rename_related_fields.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0012_natural_ordering.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0013_zonetemplate_soa_mname_zonetemplate_soa_rname.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0014_alter_unique_constraints_lowercase.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0015_dnssec.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0016_dnssec_policy_status.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0017_dnssec_policy_zone_zone_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0018_zone_domain_status_zone_expiration_date.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0019_dnssecpolicy_parental_agents.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0020_remove_dnssecpolicy_parental_agents_and_more.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0021_alter_record_ptr_record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0024_tenancy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0026_domain_registration.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/mixins/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/mixins/object_modification.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/nameserver.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/record_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/registrar.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/registration_contact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/models/view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/navigation.py +55 -55
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/signals/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/signals/dnssec.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/signals/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/nameserver.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/record_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/registrar.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/registration_contact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/zone.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/tables/zone_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/template_content.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/dnsseckeytemplate.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/dnssecpolicy.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/registrationcontact.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view/button.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view/prefix.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/view.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/delegation_record.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zonetemplate/child.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templatetags/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templatetags/netbox_dns.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/urls.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/conversions.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/utilities/dns.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/dns_name.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/dns_value.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/dnssec.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/validators/rfc2317.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/__init__.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/dnssec_key_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/dnssec_policy.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/nameserver.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/record.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/record_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/registrar.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/registration_contact.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/view.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/views/zone_template.py +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/dependency_links.txt +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/requires.txt +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_plugin_dns.egg-info/top_level.txt +0 -0
- {netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/setup.cfg +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from django import forms
|
|
2
|
-
from django.db import transaction
|
|
2
|
+
from django.db import models, transaction
|
|
3
3
|
from django.conf import settings
|
|
4
4
|
from django.core.validators import MinValueValidator, MaxValueValidator
|
|
5
5
|
from django.core.exceptions import ValidationError
|
|
@@ -101,7 +101,14 @@ class ZoneTemplateUpdateMixin:
|
|
|
101
101
|
custom_fields = {}
|
|
102
102
|
for key, value in zone_data.copy().items():
|
|
103
103
|
if key.startswith("cf_"):
|
|
104
|
-
|
|
104
|
+
if isinstance(value, models.Model):
|
|
105
|
+
custom_fields[key[3:]] = value.pk
|
|
106
|
+
elif isinstance(value, models.QuerySet):
|
|
107
|
+
custom_fields[key[3:]] = list(
|
|
108
|
+
value.values_list("pk", flat=True)
|
|
109
|
+
)
|
|
110
|
+
else:
|
|
111
|
+
custom_fields[key[3:]] = value
|
|
105
112
|
zone_data.pop(key)
|
|
106
113
|
if custom_fields:
|
|
107
114
|
zone_data["custom_field_data"] = custom_fields
|
|
@@ -23,7 +23,7 @@ from netbox_dns.models import DNSSECKeyTemplate
|
|
|
23
23
|
__all__ = ("NetBoxDNSDNSSECKeyTemplateFilter",)
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
@strawberry_django.
|
|
26
|
+
@strawberry_django.filter_type(DNSSECKeyTemplate, lookups=True)
|
|
27
27
|
class NetBoxDNSDNSSECKeyTemplateFilter(
|
|
28
28
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
29
29
|
):
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/dnssec_policy.py
RENAMED
|
@@ -21,7 +21,7 @@ from netbox_dns.graphql.filter_lookups import PolicyDigestArrayLookup
|
|
|
21
21
|
__all__ = ("NetBoxDNSDNSSECPolicyFilter", "PolicyDigestArrayLookup")
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
@strawberry_django.
|
|
24
|
+
@strawberry_django.filter_type(DNSSECPolicy, lookups=True)
|
|
25
25
|
class NetBoxDNSDNSSECPolicyFilter(
|
|
26
26
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
27
27
|
):
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/nameserver.py
RENAMED
|
@@ -16,7 +16,7 @@ from netbox_dns.models import NameServer
|
|
|
16
16
|
__all__ = ("NetBoxDNSNameServerFilter",)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
@strawberry_django.
|
|
19
|
+
@strawberry_django.filter_type(NameServer, lookups=True)
|
|
20
20
|
class NetBoxDNSNameServerFilter(
|
|
21
21
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
22
22
|
):
|
|
@@ -24,7 +24,7 @@ from netbox_dns.models import Record
|
|
|
24
24
|
__all__ = ("NetBoxDNSRecordFilter",)
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@strawberry_django.
|
|
27
|
+
@strawberry_django.filter_type(Record, lookups=True)
|
|
28
28
|
class NetBoxDNSRecordFilter(
|
|
29
29
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
30
30
|
):
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/record_template.py
RENAMED
|
@@ -20,7 +20,7 @@ from netbox_dns.models import RecordTemplate
|
|
|
20
20
|
__all__ = ("NetBoxDNSRecordTemplateFilter",)
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
@strawberry_django.
|
|
23
|
+
@strawberry_django.filter_type(RecordTemplate, lookups=True)
|
|
24
24
|
class NetBoxDNSRecordTemplateFilter(
|
|
25
25
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
26
26
|
):
|
|
@@ -15,7 +15,7 @@ from netbox_dns.models import Registrar
|
|
|
15
15
|
__all__ = ("NetBoxDNSRegistrarFilter",)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
@strawberry_django.
|
|
18
|
+
@strawberry_django.filter_type(Registrar, lookups=True)
|
|
19
19
|
class NetBoxDNSRegistrarFilter(NetBoxModelFilterMixin):
|
|
20
20
|
name: FilterLookup[str] | None = strawberry_django.filter_field()
|
|
21
21
|
description: FilterLookup[str] | None = strawberry_django.filter_field()
|
|
@@ -9,7 +9,7 @@ from netbox_dns.models import RegistrationContact
|
|
|
9
9
|
__all__ = ("NetBoxDNSRegistrationContactFilter",)
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@strawberry_django.
|
|
12
|
+
@strawberry_django.filter_type(RegistrationContact, lookups=True)
|
|
13
13
|
class NetBoxDNSRegistrationContactFilter(NetBoxModelFilterMixin):
|
|
14
14
|
name: FilterLookup[str] | None = strawberry_django.filter_field()
|
|
15
15
|
description: FilterLookup[str] | None = strawberry_django.filter_field()
|
|
@@ -16,7 +16,7 @@ from netbox_dns.models import View
|
|
|
16
16
|
__all__ = ("NetBoxDNSViewFilter",)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
@strawberry_django.
|
|
19
|
+
@strawberry_django.filter_type(View, lookups=True)
|
|
20
20
|
class NetBoxDNSViewFilter(
|
|
21
21
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
22
22
|
):
|
|
@@ -23,7 +23,7 @@ from netbox_dns.models import Zone
|
|
|
23
23
|
__all__ = ("NetBoxDNSZoneFilter",)
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
@strawberry_django.
|
|
26
|
+
@strawberry_django.filter_type(Zone, lookups=True)
|
|
27
27
|
class NetBoxDNSZoneFilter(
|
|
28
28
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
29
29
|
):
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/graphql/filters/zone_template.py
RENAMED
|
@@ -21,7 +21,7 @@ from netbox_dns.models import ZoneTemplate
|
|
|
21
21
|
__all__ = ("NetBoxDNSZoneTemplateFilter",)
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
@strawberry_django.
|
|
24
|
+
@strawberry_django.filter_type(ZoneTemplate, lookups=True)
|
|
25
25
|
class NetBoxDNSZoneTemplateFilter(
|
|
26
26
|
ContactFilterMixin, TenancyFilterMixin, NetBoxModelFilterMixin
|
|
27
27
|
):
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from django.core.management.base import BaseCommand
|
|
2
|
+
|
|
3
|
+
from netbox_dns.models import Record
|
|
4
|
+
from netbox_dns.choices import RecordTypeChoices
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Command(BaseCommand):
|
|
8
|
+
help = "Remove managed PTR records without an address record"
|
|
9
|
+
|
|
10
|
+
def handle(self, *model_names, **options):
|
|
11
|
+
orphaned_ptr_records = Record.objects.filter(
|
|
12
|
+
type=RecordTypeChoices.PTR,
|
|
13
|
+
address_records__isnull=True,
|
|
14
|
+
managed=True,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if not orphaned_ptr_records.exists():
|
|
18
|
+
if options.get("verbosity") >= 1:
|
|
19
|
+
self.stdout.write("No orphaned PTR records found")
|
|
20
|
+
return
|
|
21
|
+
|
|
22
|
+
if options.get("verbosity") >= 1:
|
|
23
|
+
self.stdout.write(
|
|
24
|
+
f"Removing {orphaned_ptr_records.count()} orphaned PTR record(s) ..."
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
for record in orphaned_ptr_records:
|
|
28
|
+
if options.get("verbosity") >= 2:
|
|
29
|
+
self.stdout.write(
|
|
30
|
+
f"removing PTR record {record} from zone {record.zone}"
|
|
31
|
+
)
|
|
32
|
+
record.delete()
|
|
33
|
+
|
|
34
|
+
if options.get("verbosity") >= 1:
|
|
35
|
+
self.stdout.write("... done.")
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by Django 5.2.1 on 2025-05-19 19:34
|
|
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
|
+
("ipam", "0081_remove_service_device_virtual_machine_add_parent_gfk_index"),
|
|
11
|
+
("netbox_dns", "0021_alter_record_ptr_record"),
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
operations = [
|
|
15
|
+
migrations.AlterField(
|
|
16
|
+
model_name="record",
|
|
17
|
+
name="ipam_ip_address",
|
|
18
|
+
field=models.ForeignKey(
|
|
19
|
+
blank=True,
|
|
20
|
+
null=True,
|
|
21
|
+
on_delete=django.db.models.deletion.SET_NULL,
|
|
22
|
+
related_name="netbox_dns_records",
|
|
23
|
+
to="ipam.ipaddress",
|
|
24
|
+
),
|
|
25
|
+
),
|
|
26
|
+
]
|
|
@@ -6,7 +6,7 @@ from dns import name as dns_name
|
|
|
6
6
|
from dns import rdata
|
|
7
7
|
|
|
8
8
|
from django.core.exceptions import ValidationError
|
|
9
|
-
from django.db import
|
|
9
|
+
from django.db import models
|
|
10
10
|
from django.db.models import Q, ExpressionWrapper, BooleanField, Min
|
|
11
11
|
from django.conf import settings
|
|
12
12
|
from django.utils.translation import gettext_lazy as _
|
|
@@ -245,7 +245,7 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
245
245
|
ipam_ip_address = models.ForeignKey(
|
|
246
246
|
verbose_name=_("IPAM IP Address"),
|
|
247
247
|
to="ipam.IPAddress",
|
|
248
|
-
on_delete=models.
|
|
248
|
+
on_delete=models.SET_NULL,
|
|
249
249
|
related_name="netbox_dns_records",
|
|
250
250
|
blank=True,
|
|
251
251
|
null=True,
|
|
@@ -378,6 +378,10 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
378
378
|
def update_ptr_record(self, update_rfc2317_cname=True, save_zone_serial=True):
|
|
379
379
|
ptr_zone = self.ptr_zone
|
|
380
380
|
|
|
381
|
+
# +
|
|
382
|
+
# Check whether a PTR record is optioned for and return if that is not the
|
|
383
|
+
# case.
|
|
384
|
+
# -
|
|
381
385
|
if (
|
|
382
386
|
ptr_zone is None
|
|
383
387
|
or self.disable_ptr
|
|
@@ -388,6 +392,10 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
388
392
|
self.ptr_record = None
|
|
389
393
|
return
|
|
390
394
|
|
|
395
|
+
# +
|
|
396
|
+
# Determine the ptr_name and ptr_value related to the ptr_zone. RFC2317
|
|
397
|
+
# PTR names and zones need to be handled differently.
|
|
398
|
+
# -
|
|
391
399
|
if ptr_zone.is_rfc2317_zone:
|
|
392
400
|
ptr_name = self.rfc2317_ptr_name
|
|
393
401
|
else:
|
|
@@ -396,9 +404,12 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
396
404
|
.relativize(dns_name.from_text(ptr_zone.name))
|
|
397
405
|
.to_text()
|
|
398
406
|
)
|
|
399
|
-
|
|
400
407
|
ptr_value = self.fqdn
|
|
401
|
-
|
|
408
|
+
|
|
409
|
+
# +
|
|
410
|
+
# If there is an existing and matching PTR record there is nothing to be done.
|
|
411
|
+
# -
|
|
412
|
+
if (ptr_record := self.ptr_record) is not None:
|
|
402
413
|
if (
|
|
403
414
|
ptr_record.zone == ptr_zone
|
|
404
415
|
and ptr_record.name == ptr_name
|
|
@@ -407,15 +418,37 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
407
418
|
):
|
|
408
419
|
return
|
|
409
420
|
|
|
410
|
-
|
|
421
|
+
# +
|
|
422
|
+
# If there is an RFC2317 CNAME for the PTR record and it is either
|
|
423
|
+
# not required or needs to be changed, remove it.
|
|
424
|
+
# -
|
|
411
425
|
if (
|
|
412
|
-
not ptr_record.zone.is_rfc2317_zone
|
|
413
|
-
|
|
414
|
-
):
|
|
426
|
+
ptr_record.zone.pk != ptr_zone.pk or not ptr_record.zone.is_rfc2317_zone
|
|
427
|
+
) and ptr_record.rfc2317_cname_record is not None:
|
|
415
428
|
ptr_record.rfc2317_cname_record.delete(
|
|
416
429
|
save_zone_serial=save_zone_serial
|
|
417
430
|
)
|
|
431
|
+
ptr_record.rfc2317_cname_record = None
|
|
432
|
+
|
|
433
|
+
# +
|
|
434
|
+
# If the PTR record is used exclusively by the address record it can be
|
|
435
|
+
# modified to match the new name, zone, value and TTL.
|
|
436
|
+
# -
|
|
437
|
+
if ptr_record.address_records.count() == 1:
|
|
438
|
+
ptr_record.zone = ptr_zone
|
|
439
|
+
ptr_record.name = ptr_name
|
|
440
|
+
ptr_record.value = ptr_value
|
|
441
|
+
ptr_record.ttl = self.ttl
|
|
442
|
+
ptr_record.save(
|
|
443
|
+
update_rfc2317_cname=update_rfc2317_cname,
|
|
444
|
+
save_zone_serial=save_zone_serial,
|
|
445
|
+
)
|
|
446
|
+
return
|
|
418
447
|
|
|
448
|
+
# +
|
|
449
|
+
# Either there was no PTR record or the existing PTR record could not be re-used,
|
|
450
|
+
# so we need to either get find a matching PTR record or create a new one.
|
|
451
|
+
# -
|
|
419
452
|
try:
|
|
420
453
|
ptr_record = Record.objects.get(
|
|
421
454
|
name=ptr_name,
|
|
@@ -423,43 +456,24 @@ class Record(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
423
456
|
type=RecordTypeChoices.PTR,
|
|
424
457
|
value=ptr_value,
|
|
425
458
|
)
|
|
426
|
-
except Record.DoesNotExist:
|
|
427
|
-
pass
|
|
428
|
-
|
|
429
|
-
with transaction.atomic():
|
|
430
|
-
if ptr_record is not None:
|
|
431
|
-
if ptr_record.zone.pk != ptr_zone.pk:
|
|
432
|
-
if ptr_record.rfc2317_cname_record is not None:
|
|
433
|
-
ptr_record.rfc2317_cname_record.delete()
|
|
434
|
-
ptr_record.rfc2317_cname_record = None
|
|
435
|
-
|
|
436
|
-
if ptr_record.address_records.count() == 1:
|
|
437
|
-
ptr_record.zone = ptr_zone
|
|
438
|
-
ptr_record.name = ptr_name
|
|
439
|
-
ptr_record.value = ptr_value
|
|
440
|
-
ptr_record.ttl = self.ttl
|
|
441
|
-
ptr_record.save(
|
|
442
|
-
update_rfc2317_cname=update_rfc2317_cname,
|
|
443
|
-
save_zone_serial=save_zone_serial,
|
|
444
|
-
)
|
|
445
459
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
460
|
+
# +
|
|
461
|
+
# If no existing PTR record could be found in the database, create a new
|
|
462
|
+
# one from scratch.
|
|
463
|
+
# -
|
|
464
|
+
except Record.DoesNotExist:
|
|
465
|
+
ptr_record = Record(
|
|
466
|
+
zone_id=ptr_zone.pk,
|
|
467
|
+
type=RecordTypeChoices.PTR,
|
|
468
|
+
name=ptr_name,
|
|
469
|
+
ttl=self.ttl,
|
|
470
|
+
value=ptr_value,
|
|
471
|
+
managed=True,
|
|
472
|
+
)
|
|
473
|
+
ptr_record.save(
|
|
474
|
+
update_rfc2317_cname=update_rfc2317_cname,
|
|
475
|
+
save_zone_serial=save_zone_serial,
|
|
476
|
+
)
|
|
463
477
|
|
|
464
478
|
self.ptr_record = ptr_record
|
|
465
479
|
|
|
@@ -585,6 +585,30 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
585
585
|
managed=True,
|
|
586
586
|
)
|
|
587
587
|
|
|
588
|
+
def _check_nameserver_address_records(self, nameserver):
|
|
589
|
+
name = dns_name.from_text(nameserver.name, origin=None)
|
|
590
|
+
parent = name.parent()
|
|
591
|
+
|
|
592
|
+
if len(parent) < 2:
|
|
593
|
+
return None
|
|
594
|
+
|
|
595
|
+
try:
|
|
596
|
+
ns_zone = Zone.objects.get(view_id=self.view.pk, name=parent.to_text())
|
|
597
|
+
except ObjectDoesNotExist:
|
|
598
|
+
return None
|
|
599
|
+
|
|
600
|
+
relative_name = name.relativize(parent).to_text()
|
|
601
|
+
address_records = ns_zone.records.filter(
|
|
602
|
+
Q(status__in=RECORD_ACTIVE_STATUS_LIST),
|
|
603
|
+
Q(Q(name=f"{nameserver.name}.") | Q(name=relative_name)),
|
|
604
|
+
Q(Q(type=RecordTypeChoices.A) | Q(type=RecordTypeChoices.AAAA)),
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
if not address_records.exists():
|
|
608
|
+
return _(
|
|
609
|
+
"Nameserver {ns} does not have an active address record in zone {zone}"
|
|
610
|
+
).format(ns=nameserver.name, zone=ns_zone)
|
|
611
|
+
|
|
588
612
|
def check_nameservers(self):
|
|
589
613
|
nameservers = self.nameservers.all()
|
|
590
614
|
|
|
@@ -597,33 +621,15 @@ class Zone(ObjectModificationMixin, ContactsMixin, NetBoxModel):
|
|
|
597
621
|
)
|
|
598
622
|
|
|
599
623
|
for _nameserver in nameservers:
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
if len(parent) < 2:
|
|
604
|
-
continue
|
|
605
|
-
|
|
606
|
-
try:
|
|
607
|
-
ns_zone = Zone.objects.get(view_id=self.view.pk, name=parent.to_text())
|
|
608
|
-
except ObjectDoesNotExist:
|
|
609
|
-
continue
|
|
610
|
-
|
|
611
|
-
relative_name = name.relativize(parent).to_text()
|
|
612
|
-
address_records = ns_zone.records.filter(
|
|
613
|
-
Q(status__in=RECORD_ACTIVE_STATUS_LIST),
|
|
614
|
-
Q(Q(name=f"{_nameserver.name}.") | Q(name=relative_name)),
|
|
615
|
-
Q(Q(type=RecordTypeChoices.A) | Q(type=RecordTypeChoices.AAAA)),
|
|
616
|
-
)
|
|
617
|
-
|
|
618
|
-
if not address_records:
|
|
619
|
-
ns_warnings.append(
|
|
620
|
-
_(
|
|
621
|
-
"Nameserver {nameserver} does not have an active address record in zone {zone}"
|
|
622
|
-
).format(nameserver=_nameserver.name, zone=ns_zone)
|
|
623
|
-
)
|
|
624
|
+
warning = self._check_nameserver_address_records(_nameserver)
|
|
625
|
+
if warning is not None:
|
|
626
|
+
ns_warnings.append(warning)
|
|
624
627
|
|
|
625
628
|
return ns_warnings, ns_errors
|
|
626
629
|
|
|
630
|
+
def check_soa_mname(self):
|
|
631
|
+
return self._check_nameserver_address_records(self.soa_mname)
|
|
632
|
+
|
|
627
633
|
def check_expiration(self):
|
|
628
634
|
if self.expiration_date is None:
|
|
629
635
|
return None, None
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/record.html
RENAMED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
{% load i18n %}
|
|
7
7
|
|
|
8
8
|
{% block control-buttons %}
|
|
9
|
+
{% if perms.netbox_dns.add_record and object.type != "CNAME" %}
|
|
10
|
+
<a href="{% url 'plugins:netbox_dns:record_add' %}?view={{ object.zone.view.pk }}&zone={{ object.zone.pk }}&value={{ object.fqdn }}&type=CNAME&return_url={{ object.get_absolute_url }}">
|
|
11
|
+
<button type="submit" class="btn btn-primary" name="add-record">
|
|
12
|
+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>{% trans "Add CNAME" %}
|
|
13
|
+
</button>
|
|
14
|
+
</a>
|
|
15
|
+
{% endif %}
|
|
9
16
|
{% if object.managed %}
|
|
10
17
|
{% else %}
|
|
11
18
|
{{ block.super }}
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone/base.html
RENAMED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
{% block extra_controls %}
|
|
9
9
|
{% if perms.netbox_dns.add_record %}
|
|
10
|
-
<a href="{% url 'plugins:netbox_dns:record_add' %}?zone={{ object.pk }}&return_url={
|
|
10
|
+
<a href="{% url 'plugins:netbox_dns:record_add' %}?zone={{ object.pk }}&return_url={% url 'plugins:netbox_dns:zone_records' pk=object.pk %}">
|
|
11
11
|
<button type="submit" class="btn btn-primary" name="add-record">
|
|
12
12
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>{% trans "Add Record" %}
|
|
13
13
|
</button>
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/templates/netbox_dns/zone.html
RENAMED
|
@@ -137,6 +137,13 @@
|
|
|
137
137
|
<th scope="row">{% trans "MName" %}</th>
|
|
138
138
|
<td>{{ object.soa_mname|linkify }}</td>
|
|
139
139
|
</tr>
|
|
140
|
+
{% if mname_warning %}
|
|
141
|
+
<tr>
|
|
142
|
+
<th class="text-warning" scope="row">{% trans "Warning" %}</th>
|
|
143
|
+
<td class="text-warning">{{ mname_warning }}</td>
|
|
144
|
+
</tr>
|
|
145
|
+
{% endif %}
|
|
146
|
+
|
|
140
147
|
<tr>
|
|
141
148
|
<th scope="row">{% trans "RName" %}</th>
|
|
142
149
|
<td>{{ object.soa_rname }}</td>
|
|
@@ -10,7 +10,7 @@ from django.db.models import Q
|
|
|
10
10
|
from netbox.context import current_request
|
|
11
11
|
from ipam.models import IPAddress, Prefix
|
|
12
12
|
|
|
13
|
-
from netbox_dns.choices import RecordStatusChoices
|
|
13
|
+
from netbox_dns.choices import RecordStatusChoices, RecordTypeChoices
|
|
14
14
|
|
|
15
15
|
from .dns import get_parent_zone_names
|
|
16
16
|
from .conversions import regex_from_list
|
|
@@ -213,10 +213,28 @@ def update_dns_records(ip_address, view=None, force=False):
|
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
def delete_dns_records(ip_address, view=None):
|
|
216
|
-
|
|
216
|
+
from netbox_dns.models import Record
|
|
217
|
+
|
|
218
|
+
if current_request.get() is None:
|
|
217
219
|
address_records = ip_address.netbox_dns_records.all()
|
|
218
220
|
else:
|
|
219
|
-
|
|
221
|
+
# +
|
|
222
|
+
# This is a dirty hack made necessary by NetBox grand idea of manipulating
|
|
223
|
+
# objects in its event handling code, removing references to related objects
|
|
224
|
+
# in pre_delete() before our pre_delete() handler has the chance to handle
|
|
225
|
+
# them.
|
|
226
|
+
#
|
|
227
|
+
# TODO: Find something better. This is really awful.
|
|
228
|
+
# -
|
|
229
|
+
address_records = Record.objects.filter(
|
|
230
|
+
type__in=(RecordTypeChoices.A, RecordTypeChoices.AAAA),
|
|
231
|
+
managed=True,
|
|
232
|
+
ip_address=ip_address.address.ip,
|
|
233
|
+
ipam_ip_address__isnull=True,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
if view is not None:
|
|
237
|
+
address_records &= Record.objects.filter(zone__view=view)
|
|
220
238
|
|
|
221
239
|
if not address_records.exists():
|
|
222
240
|
return False
|
|
@@ -52,10 +52,12 @@ class ZoneView(generic.ObjectView):
|
|
|
52
52
|
|
|
53
53
|
def get_extra_context(self, request, instance):
|
|
54
54
|
ns_warnings, ns_errors = instance.check_nameservers()
|
|
55
|
+
mname_warning = instance.check_soa_mname()
|
|
55
56
|
|
|
56
57
|
context = {
|
|
57
58
|
"nameserver_warnings": ns_warnings,
|
|
58
59
|
"nameserver_errors": ns_errors,
|
|
60
|
+
"mname_warning": mname_warning,
|
|
59
61
|
"parent_zone": instance.parent_zone,
|
|
60
62
|
}
|
|
61
63
|
|
|
@@ -80,6 +80,7 @@ netbox_dns/locale/fr/LC_MESSAGES/django.mo
|
|
|
80
80
|
netbox_dns/management/commands/cleanup_database.py
|
|
81
81
|
netbox_dns/management/commands/cleanup_rrset_ttl.py
|
|
82
82
|
netbox_dns/management/commands/rebuild_dnssync.py
|
|
83
|
+
netbox_dns/management/commands/remove_orphaned_ptr_records.py
|
|
83
84
|
netbox_dns/management/commands/setup_dnssync.py
|
|
84
85
|
netbox_dns/management/commands/update_soa.py
|
|
85
86
|
netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py
|
|
@@ -106,6 +107,7 @@ netbox_dns/migrations/0020_netbox_3_4.py
|
|
|
106
107
|
netbox_dns/migrations/0020_remove_dnssecpolicy_parental_agents_and_more.py
|
|
107
108
|
netbox_dns/migrations/0021_alter_record_ptr_record.py
|
|
108
109
|
netbox_dns/migrations/0021_record_ip_address.py
|
|
110
|
+
netbox_dns/migrations/0022_alter_record_ipam_ip_address.py
|
|
109
111
|
netbox_dns/migrations/0022_search.py
|
|
110
112
|
netbox_dns/migrations/0023_alter_record_value.py
|
|
111
113
|
netbox_dns/migrations/0024_tenancy.py
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "netbox-plugin-dns"
|
|
3
|
-
version = "1.3.
|
|
3
|
+
version = "1.3.3"
|
|
4
4
|
description = "NetBox DNS is a NetBox plugin for managing DNS data."
|
|
5
5
|
authors = [
|
|
6
6
|
{name="Peter Eckel", email="pete@netbox-dns.org"},
|
|
7
7
|
]
|
|
8
|
-
license =
|
|
8
|
+
license-files = [
|
|
9
|
+
"LICENSE"
|
|
10
|
+
]
|
|
9
11
|
readme = "README.md"
|
|
10
12
|
keywords = ["netbox", "netbox-plugin", "dns"]
|
|
11
13
|
classifiers = [
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/dnssec_policy.py
RENAMED
|
File without changes
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/nameserver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/record_template.py
RENAMED
|
File without changes
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/registrar.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netbox_plugin_dns-1.3.1 → netbox_plugin_dns-1.3.3}/netbox_dns/api/serializers_/zone_template.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|