netbox-plugin-dns 1.2.5__tar.gz → 1.2.7__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.2.5/netbox_plugin_dns.egg-info → netbox_plugin_dns-1.2.7}/PKG-INFO +3 -2
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/__init__.py +16 -8
- netbox_plugin_dns-1.2.7/netbox_dns/api/field_serializers.py +25 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/nested_serializers.py +19 -1
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers.py +3 -0
- netbox_plugin_dns-1.2.7/netbox_dns/api/serializers_/dnssec_key_template.py +59 -0
- netbox_plugin_dns-1.2.7/netbox_dns/api/serializers_/dnssec_policy.py +113 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/record.py +2 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/record_template.py +2 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/zone.py +20 -1
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/zone_template.py +13 -4
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/urls.py +4 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/views.py +18 -0
- netbox_plugin_dns-1.2.7/netbox_dns/choices/__init__.py +4 -0
- netbox_plugin_dns-1.2.7/netbox_dns/choices/dnssec_key_template.py +63 -0
- netbox_plugin_dns-1.2.7/netbox_dns/choices/dnssec_policy.py +40 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/choices/record.py +2 -25
- netbox_plugin_dns-1.2.7/netbox_dns/choices/utilities.py +26 -0
- netbox_plugin_dns-1.2.7/netbox_dns/choices/zone.py +119 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/fields/__init__.py +2 -0
- netbox_plugin_dns-1.2.7/netbox_dns/fields/choice_array.py +33 -0
- netbox_plugin_dns-1.2.7/netbox_dns/fields/timeperiod.py +33 -0
- netbox_plugin_dns-1.2.7/netbox_dns/filtersets/__init__.py +12 -0
- netbox_plugin_dns-1.2.7/netbox_dns/filtersets/dnssec_key_template.py +51 -0
- netbox_plugin_dns-1.2.7/netbox_dns/filtersets/dnssec_policy.py +97 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/zone.py +30 -6
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/zone_template.py +13 -2
- {netbox_plugin_dns-1.2.5/netbox_dns/filtersets → netbox_plugin_dns-1.2.7/netbox_dns/forms}/__init__.py +2 -1
- netbox_plugin_dns-1.2.7/netbox_dns/forms/dnssec_key_template.py +189 -0
- netbox_plugin_dns-1.2.7/netbox_dns/forms/dnssec_policy.py +593 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/nameserver.py +2 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/record.py +12 -6
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/record_template.py +10 -3
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/zone.py +142 -31
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/zone_template.py +38 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/graphql/__init__.py +7 -3
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/graphql/filters.py +16 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/graphql/schema.py +20 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/graphql/types.py +67 -3
- netbox_plugin_dns-1.2.7/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_plugin_dns-1.2.7/netbox_dns/locale/fr/LC_MESSAGES/django.mo +0 -0
- netbox_plugin_dns-1.2.7/netbox_dns/migrations/0015_dnssec.py +168 -0
- netbox_plugin_dns-1.2.7/netbox_dns/migrations/0016_dnssec_policy_status.py +18 -0
- netbox_plugin_dns-1.2.7/netbox_dns/migrations/0017_dnssec_policy_zone_zone_template.py +41 -0
- netbox_plugin_dns-1.2.7/netbox_dns/migrations/0018_zone_domain_status_zone_expiration_date.py +23 -0
- {netbox_plugin_dns-1.2.5/netbox_dns/forms → netbox_plugin_dns-1.2.7/netbox_dns/models}/__init__.py +3 -1
- netbox_plugin_dns-1.2.7/netbox_dns/models/dnssec_key_template.py +114 -0
- netbox_plugin_dns-1.2.7/netbox_dns/models/dnssec_policy.py +203 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/record.py +1 -1
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/zone.py +74 -19
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/zone_template.py +17 -7
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/navigation.py +49 -0
- netbox_plugin_dns-1.2.7/netbox_dns/signals/dnssec.py +32 -0
- {netbox_plugin_dns-1.2.5/netbox_dns/models → netbox_plugin_dns-1.2.7/netbox_dns/tables}/__init__.py +3 -1
- netbox_plugin_dns-1.2.7/netbox_dns/tables/dnssec_key_template.py +48 -0
- netbox_plugin_dns-1.2.7/netbox_dns/tables/dnssec_policy.py +131 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/zone.py +23 -2
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/zone_template.py +4 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/template_content.py +2 -1
- netbox_plugin_dns-1.2.7/netbox_dns/templates/netbox_dns/dnsseckeytemplate.html +70 -0
- netbox_plugin_dns-1.2.7/netbox_dns/templates/netbox_dns/dnssecpolicy.html +155 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/registration.html +19 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone.html +16 -0
- netbox_plugin_dns-1.2.7/netbox_dns/templates/netbox_dns/zonetemplate/child.html +46 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zonetemplate.html +12 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/urls.py +23 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/utilities/conversions.py +13 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/validators/__init__.py +1 -0
- netbox_plugin_dns-1.2.7/netbox_dns/validators/dnssec.py +148 -0
- {netbox_plugin_dns-1.2.5/netbox_dns/tables → netbox_plugin_dns-1.2.7/netbox_dns/views}/__init__.py +2 -0
- netbox_plugin_dns-1.2.7/netbox_dns/views/dnssec_key_template.py +87 -0
- netbox_plugin_dns-1.2.7/netbox_dns/views/dnssec_policy.py +155 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/zone.py +11 -1
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7/netbox_plugin_dns.egg-info}/PKG-INFO +3 -2
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_plugin_dns.egg-info/SOURCES.txt +28 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/pyproject.toml +1 -1
- netbox_plugin_dns-1.2.5/netbox_dns/choices/__init__.py +0 -2
- netbox_plugin_dns-1.2.5/netbox_dns/choices/zone.py +0 -24
- netbox_plugin_dns-1.2.5/netbox_dns/locale/de/LC_MESSAGES/django.mo +0 -0
- netbox_plugin_dns-1.2.5/netbox_dns/views/__init__.py +0 -8
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/LICENSE +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/README.md +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/__init__.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/nameserver.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/prefix.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/registrar.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/registration_contact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/fields/ipam.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/fields/network.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/fields/rfc2317.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/nameserver.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/record.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/record_template.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/registrar.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/registration_contact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/filtersets/view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/registrar.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/registration_contact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/forms/view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/locale/en/LC_MESSAGES/django.mo +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/management/commands/cleanup_database.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/management/commands/rebuild_dnssync.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/management/commands/setup_dnssync.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0003_default_view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0006_templating.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0007_alter_ordering_options.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0008_view_prefixes.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0010_view_ip_address_filter.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0011_rename_related_fields.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0012_natural_ordering.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0013_zonetemplate_soa_mname_zonetemplate_soa_rname.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0014_alter_unique_constraints_lowercase.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0024_tenancy.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0026_domain_registration.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/mixins/__init__.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/mixins/object_modification.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/nameserver.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/record_template.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/registrar.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/registration_contact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/models/view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/signals/__init__.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/signals/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/nameserver.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/record.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/record_template.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/registrar.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/registration_contact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/tables/view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/record.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/registrationcontact.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/view/button.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/view/prefix.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/view.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/delegation_record.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templatetags/__init__.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/templatetags/netbox_dns.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/utilities/__init__.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/utilities/dns.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/utilities/ipam_dnssync.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/validators/dns_name.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/validators/dns_value.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/validators/rfc2317.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/nameserver.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/record.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/record_template.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/registrar.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/registration_contact.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/view.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/views/zone_template.py +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_plugin_dns.egg-info/dependency_links.txt +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_plugin_dns.egg-info/requires.txt +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_plugin_dns.egg-info/top_level.txt +0 -0
- {netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: netbox-plugin-dns
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.7
|
|
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
|
|
@@ -13,6 +13,7 @@ Requires-Python: >=3.10
|
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: dnspython
|
|
16
|
+
Dynamic: license-file
|
|
16
17
|
|
|
17
18
|
# NetBox DNS
|
|
18
19
|
The NetBox DNS plugin enables NetBox to manage operational DNS data such as name servers, zones, records and views, as well as registration data for domains. It can automate tasks like creating PTR records, generating zone serial numbers, NS and SOA records, as well as validate names and values values for resource records to ensure zone data is consistent, up-to-date and compliant with to the relevant RFCs.
|
|
@@ -7,7 +7,7 @@ from ipam.choices import IPAddressStatusChoices
|
|
|
7
7
|
|
|
8
8
|
from netbox_dns.choices import RecordTypeChoices, RecordStatusChoices, ZoneStatusChoices
|
|
9
9
|
|
|
10
|
-
__version__ = "1.2.
|
|
10
|
+
__version__ = "1.2.7"
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _check_list(setting):
|
|
@@ -36,6 +36,7 @@ class DNSConfig(PluginConfig):
|
|
|
36
36
|
ZoneStatusChoices.STATUS_ACTIVE,
|
|
37
37
|
ZoneStatusChoices.STATUS_DYNAMIC,
|
|
38
38
|
],
|
|
39
|
+
"zone_expiration_warning_days": 30,
|
|
39
40
|
"filter_record_types": [],
|
|
40
41
|
"record_active_status": [
|
|
41
42
|
RecordStatusChoices.STATUS_ACTIVE,
|
|
@@ -65,12 +66,26 @@ class DNSConfig(PluginConfig):
|
|
|
65
66
|
"menu_name": "DNS",
|
|
66
67
|
"top_level_menu": True,
|
|
67
68
|
"convert_names_to_lowercase": False,
|
|
69
|
+
"dnssec_purge_keys": 7776000, # P90D
|
|
70
|
+
"dnssec_publish_safety": 3600, # PT1H
|
|
71
|
+
"dnssec_retire_safety": 3600, # PT1H
|
|
72
|
+
"dnssec_signatures_jitter": 43200, # PT12H
|
|
73
|
+
"dnssec_signatures_refresh": 432000, # P5D
|
|
74
|
+
"dnssec_signatures_validity": 1209600, # P14D
|
|
75
|
+
"dnssec_signatures_validity_dnskey": 1209600, # P14D
|
|
76
|
+
"dnssec_max_zone_ttl": 86400, # P1D
|
|
77
|
+
"dnssec_zone_propagation_delay": 300, # PT5M
|
|
78
|
+
"dnssec_parent_ds_ttl": 86400, # P1D
|
|
79
|
+
"dnssec_parent_propagation_delay": 3600, # PT1H
|
|
80
|
+
"dnssec_dnskey_ttl": 3600, # PT1H
|
|
68
81
|
}
|
|
69
82
|
base_url = "netbox-dns"
|
|
70
83
|
|
|
71
84
|
def ready(self):
|
|
72
85
|
super().ready()
|
|
73
86
|
|
|
87
|
+
import netbox_dns.signals.dnssec # noqa: F401
|
|
88
|
+
|
|
74
89
|
if not get_plugin_config("netbox_dns", "dnssync_disabled"):
|
|
75
90
|
import netbox_dns.signals.ipam_dnssync # noqa: F401
|
|
76
91
|
import netbox_dns.tables.ipam_dnssync # noqa: F401
|
|
@@ -83,13 +98,6 @@ class DNSConfig(PluginConfig):
|
|
|
83
98
|
):
|
|
84
99
|
_check_list(setting)
|
|
85
100
|
|
|
86
|
-
# +
|
|
87
|
-
# TODO: Remove this workaround as soon as it's no longer required
|
|
88
|
-
#
|
|
89
|
-
# Force loading views so the register_model_view is run for all views
|
|
90
|
-
# -
|
|
91
|
-
import netbox_dns.views # noqa: F401
|
|
92
|
-
|
|
93
101
|
|
|
94
102
|
#
|
|
95
103
|
# Initialize plugin config
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from django.utils.translation import gettext_lazy as _
|
|
2
|
+
from rest_framework import serializers
|
|
3
|
+
|
|
4
|
+
from netbox_dns.utilities import iso8601_to_int
|
|
5
|
+
|
|
6
|
+
__all__ = ("TimePeriodField",)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TimePeriodField(serializers.IntegerField):
|
|
10
|
+
default_error_messages = {
|
|
11
|
+
"invalid": _(
|
|
12
|
+
"Enter a positive integer or an ISO8601 duration (W, M and Y are not supported)."
|
|
13
|
+
),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
def to_internal_value(self, data):
|
|
17
|
+
try:
|
|
18
|
+
return iso8601_to_int(data)
|
|
19
|
+
except TypeError:
|
|
20
|
+
raise serializers.ValidationError(
|
|
21
|
+
"Enter a valid integer or ISO 8601 duration (W, M and Y are not supported)."
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def to_representation(self, value):
|
|
25
|
+
return value
|
|
@@ -3,7 +3,7 @@ from rest_framework import serializers
|
|
|
3
3
|
|
|
4
4
|
from netbox.api.serializers import WritableNestedSerializer
|
|
5
5
|
|
|
6
|
-
from netbox_dns.models import Zone, Record, ZoneTemplate, RecordTemplate
|
|
6
|
+
from netbox_dns.models import Zone, Record, ZoneTemplate, RecordTemplate, DNSSECPolicy
|
|
7
7
|
from netbox_dns.api.serializers_.view import ViewSerializer
|
|
8
8
|
|
|
9
9
|
|
|
@@ -12,6 +12,7 @@ __all__ = (
|
|
|
12
12
|
"NestedRecordSerializer",
|
|
13
13
|
"NestedZoneTemplateSerializer",
|
|
14
14
|
"NestedRecordTemplateSerializer",
|
|
15
|
+
"NestedDNSSECPolicySerializer",
|
|
15
16
|
)
|
|
16
17
|
|
|
17
18
|
|
|
@@ -127,3 +128,20 @@ class NestedRecordTemplateSerializer(WritableNestedSerializer):
|
|
|
127
128
|
"ttl",
|
|
128
129
|
"description",
|
|
129
130
|
)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class NestedDNSSECPolicySerializer(WritableNestedSerializer):
|
|
134
|
+
url = serializers.HyperlinkedIdentityField(
|
|
135
|
+
view_name="plugins-api:netbox_dns-api:dnssecpolicy-detail"
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
class Meta:
|
|
139
|
+
model = DNSSECPolicy
|
|
140
|
+
fields = (
|
|
141
|
+
"id",
|
|
142
|
+
"url",
|
|
143
|
+
"display",
|
|
144
|
+
"name",
|
|
145
|
+
"description",
|
|
146
|
+
"status",
|
|
147
|
+
)
|
|
@@ -6,6 +6,9 @@ from .serializers_.view import *
|
|
|
6
6
|
from .serializers_.zone import *
|
|
7
7
|
from .serializers_.zone_template import *
|
|
8
8
|
from .serializers_.record_template import *
|
|
9
|
+
from .serializers_.dnssec_key_template import *
|
|
10
|
+
from .serializers_.dnssec_policy import *
|
|
11
|
+
|
|
9
12
|
from .serializers_.prefix import *
|
|
10
13
|
|
|
11
14
|
from .nested_serializers import *
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from django.utils.translation import gettext as _
|
|
2
|
+
from rest_framework import serializers
|
|
3
|
+
|
|
4
|
+
from netbox.api.serializers import NetBoxModelSerializer
|
|
5
|
+
from tenancy.api.serializers_.tenants import TenantSerializer
|
|
6
|
+
|
|
7
|
+
from netbox_dns.models import DNSSECKeyTemplate
|
|
8
|
+
|
|
9
|
+
from ..nested_serializers import NestedDNSSECPolicySerializer
|
|
10
|
+
from ..field_serializers import TimePeriodField
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__all__ = ("DNSSECKeyTemplateSerializer",)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class DNSSECKeyTemplateSerializer(NetBoxModelSerializer):
|
|
17
|
+
url = serializers.HyperlinkedIdentityField(
|
|
18
|
+
view_name="plugins-api:netbox_dns-api:dnsseckeytemplate-detail"
|
|
19
|
+
)
|
|
20
|
+
lifetime = TimePeriodField(required=False, allow_null=True)
|
|
21
|
+
policies = NestedDNSSECPolicySerializer(
|
|
22
|
+
many=True,
|
|
23
|
+
read_only=True,
|
|
24
|
+
required=False,
|
|
25
|
+
default=None,
|
|
26
|
+
help_text=_("Policies using this Key Template"),
|
|
27
|
+
)
|
|
28
|
+
tenant = TenantSerializer(required=False, allow_null=True)
|
|
29
|
+
|
|
30
|
+
class Meta:
|
|
31
|
+
model = DNSSECKeyTemplate
|
|
32
|
+
fields = (
|
|
33
|
+
"id",
|
|
34
|
+
"url",
|
|
35
|
+
"display",
|
|
36
|
+
"name",
|
|
37
|
+
"description",
|
|
38
|
+
"policies",
|
|
39
|
+
"tags",
|
|
40
|
+
"type",
|
|
41
|
+
"lifetime",
|
|
42
|
+
"algorithm",
|
|
43
|
+
"key_size",
|
|
44
|
+
"created",
|
|
45
|
+
"last_updated",
|
|
46
|
+
"custom_fields",
|
|
47
|
+
"tenant",
|
|
48
|
+
)
|
|
49
|
+
brief_fields = (
|
|
50
|
+
"id",
|
|
51
|
+
"url",
|
|
52
|
+
"display",
|
|
53
|
+
"name",
|
|
54
|
+
"type",
|
|
55
|
+
"lifetime",
|
|
56
|
+
"algorithm",
|
|
57
|
+
"key_size",
|
|
58
|
+
"description",
|
|
59
|
+
)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
from django.utils.translation import gettext as _
|
|
2
|
+
from rest_framework import serializers
|
|
3
|
+
|
|
4
|
+
from netbox.api.serializers import NetBoxModelSerializer
|
|
5
|
+
from tenancy.api.serializers_.tenants import TenantSerializer
|
|
6
|
+
|
|
7
|
+
from netbox_dns.models import DNSSECPolicy
|
|
8
|
+
|
|
9
|
+
from .dnssec_key_template import DNSSECKeyTemplateSerializer
|
|
10
|
+
from ..nested_serializers import NestedZoneSerializer, NestedZoneTemplateSerializer
|
|
11
|
+
from ..field_serializers import TimePeriodField
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
__all__ = ("DNSSECPolicySerializer",)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DNSSECPolicySerializer(NetBoxModelSerializer):
|
|
18
|
+
url = serializers.HyperlinkedIdentityField(
|
|
19
|
+
view_name="plugins-api:netbox_dns-api:dnssecpolicy-detail"
|
|
20
|
+
)
|
|
21
|
+
key_templates = DNSSECKeyTemplateSerializer(
|
|
22
|
+
nested=True,
|
|
23
|
+
many=True,
|
|
24
|
+
read_only=False,
|
|
25
|
+
required=False,
|
|
26
|
+
default=None,
|
|
27
|
+
help_text=_("Key templates assigned to the policy"),
|
|
28
|
+
)
|
|
29
|
+
dnskey_ttl = TimePeriodField(required=False, allow_null=True)
|
|
30
|
+
purge_keys = TimePeriodField(required=False, allow_null=True)
|
|
31
|
+
publish_safety = TimePeriodField(required=False, allow_null=True)
|
|
32
|
+
retire_safety = TimePeriodField(required=False, allow_null=True)
|
|
33
|
+
signatures_jitter = TimePeriodField(required=False, allow_null=True)
|
|
34
|
+
signatures_refresh = TimePeriodField(required=False, allow_null=True)
|
|
35
|
+
signatures_validity = TimePeriodField(required=False, allow_null=True)
|
|
36
|
+
signatures_validity_dnskey = TimePeriodField(required=False, allow_null=True)
|
|
37
|
+
max_zone_ttl = TimePeriodField(required=False, allow_null=True)
|
|
38
|
+
zone_propagation_delay = TimePeriodField(required=False, allow_null=True)
|
|
39
|
+
parent_ds_ttl = TimePeriodField(required=False, allow_null=True)
|
|
40
|
+
parent_propagation_delay = TimePeriodField(required=False, allow_null=True)
|
|
41
|
+
zones = NestedZoneSerializer(
|
|
42
|
+
many=True,
|
|
43
|
+
read_only=True,
|
|
44
|
+
required=False,
|
|
45
|
+
default=None,
|
|
46
|
+
help_text=_("Zones this policy is assigned to"),
|
|
47
|
+
)
|
|
48
|
+
zone_templates = NestedZoneTemplateSerializer(
|
|
49
|
+
many=True,
|
|
50
|
+
read_only=True,
|
|
51
|
+
required=False,
|
|
52
|
+
default=None,
|
|
53
|
+
help_text=_("Zone templates this policy is assigned to"),
|
|
54
|
+
)
|
|
55
|
+
tenant = TenantSerializer(required=False, allow_null=True)
|
|
56
|
+
|
|
57
|
+
class Meta:
|
|
58
|
+
model = DNSSECPolicy
|
|
59
|
+
fields = (
|
|
60
|
+
"id",
|
|
61
|
+
"url",
|
|
62
|
+
"display",
|
|
63
|
+
"name",
|
|
64
|
+
"description",
|
|
65
|
+
"status",
|
|
66
|
+
"tags",
|
|
67
|
+
"key_templates",
|
|
68
|
+
"zones",
|
|
69
|
+
"zone_templates",
|
|
70
|
+
"dnskey_ttl",
|
|
71
|
+
"purge_keys",
|
|
72
|
+
"publish_safety",
|
|
73
|
+
"retire_safety",
|
|
74
|
+
"signatures_jitter",
|
|
75
|
+
"signatures_refresh",
|
|
76
|
+
"signatures_validity",
|
|
77
|
+
"signatures_validity_dnskey",
|
|
78
|
+
"max_zone_ttl",
|
|
79
|
+
"zone_propagation_delay",
|
|
80
|
+
"create_cdnskey",
|
|
81
|
+
"cds_digest_types",
|
|
82
|
+
"parent_ds_ttl",
|
|
83
|
+
"parent_propagation_delay",
|
|
84
|
+
"use_nsec3",
|
|
85
|
+
"nsec3_iterations",
|
|
86
|
+
"nsec3_opt_out",
|
|
87
|
+
"nsec3_salt_size",
|
|
88
|
+
"created",
|
|
89
|
+
"last_updated",
|
|
90
|
+
"custom_fields",
|
|
91
|
+
"tenant",
|
|
92
|
+
)
|
|
93
|
+
brief_fields = ("id", "url", "display", "name", "description", "status")
|
|
94
|
+
|
|
95
|
+
def create(self, validated_data):
|
|
96
|
+
dnssec_key_templates = validated_data.pop("key_templates", None)
|
|
97
|
+
|
|
98
|
+
dnssec_policy = super().create(validated_data)
|
|
99
|
+
|
|
100
|
+
if dnssec_key_templates is not None:
|
|
101
|
+
dnssec_policy.key_templates.set(dnssec_key_templates)
|
|
102
|
+
|
|
103
|
+
return dnssec_policy
|
|
104
|
+
|
|
105
|
+
def update(self, instance, validated_data):
|
|
106
|
+
dnssec_key_templates = validated_data.pop("key_templates", None)
|
|
107
|
+
|
|
108
|
+
dnssec_policy = super().update(instance, validated_data)
|
|
109
|
+
|
|
110
|
+
if dnssec_key_templates is not None:
|
|
111
|
+
dnssec_policy.key_templates.set(dnssec_key_templates)
|
|
112
|
+
|
|
113
|
+
return dnssec_policy
|
|
@@ -8,6 +8,7 @@ from tenancy.api.serializers import TenantSerializer
|
|
|
8
8
|
from netbox_dns.models import Record
|
|
9
9
|
|
|
10
10
|
from ..nested_serializers import NestedZoneSerializer, NestedRecordSerializer
|
|
11
|
+
from ..field_serializers import TimePeriodField
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
__all__ = ("RecordSerializer",)
|
|
@@ -17,6 +18,7 @@ class RecordSerializer(NetBoxModelSerializer):
|
|
|
17
18
|
url = serializers.HyperlinkedIdentityField(
|
|
18
19
|
view_name="plugins-api:netbox_dns-api:record-detail"
|
|
19
20
|
)
|
|
21
|
+
ttl = TimePeriodField(required=False, allow_null=True)
|
|
20
22
|
ptr_record = NestedRecordSerializer(
|
|
21
23
|
many=False,
|
|
22
24
|
read_only=True,
|
{netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/record_template.py
RENAMED
|
@@ -7,6 +7,7 @@ from tenancy.api.serializers import TenantSerializer
|
|
|
7
7
|
from netbox_dns.models import RecordTemplate
|
|
8
8
|
|
|
9
9
|
from ..nested_serializers import NestedZoneTemplateSerializer
|
|
10
|
+
from ..field_serializers import TimePeriodField
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
__all__ = ("RecordTemplateSerializer",)
|
|
@@ -16,6 +17,7 @@ class RecordTemplateSerializer(NetBoxModelSerializer):
|
|
|
16
17
|
url = serializers.HyperlinkedIdentityField(
|
|
17
18
|
view_name="plugins-api:netbox_dns-api:recordtemplate-detail"
|
|
18
19
|
)
|
|
20
|
+
ttl = TimePeriodField(required=False, allow_null=True)
|
|
19
21
|
tenant = TenantSerializer(nested=True, required=False, allow_null=True)
|
|
20
22
|
zone_templates = NestedZoneTemplateSerializer(
|
|
21
23
|
many=True,
|
|
@@ -9,8 +9,10 @@ from .nameserver import NameServerSerializer
|
|
|
9
9
|
from .registrar import RegistrarSerializer
|
|
10
10
|
from .registration_contact import RegistrationContactSerializer
|
|
11
11
|
from .zone_template import ZoneTemplateSerializer
|
|
12
|
+
from .dnssec_policy import DNSSECPolicySerializer
|
|
12
13
|
|
|
13
14
|
from ..nested_serializers import NestedZoneSerializer
|
|
15
|
+
from ..field_serializers import TimePeriodField
|
|
14
16
|
|
|
15
17
|
from netbox_dns.models import Zone
|
|
16
18
|
|
|
@@ -37,6 +39,8 @@ class ZoneSerializer(NetBoxModelSerializer):
|
|
|
37
39
|
required=False,
|
|
38
40
|
help_text=_("Nameservers for the zone"),
|
|
39
41
|
)
|
|
42
|
+
default_ttl = TimePeriodField(required=False, allow_null=True)
|
|
43
|
+
soa_ttl = TimePeriodField(required=False, allow_null=True)
|
|
40
44
|
soa_mname = NameServerSerializer(
|
|
41
45
|
nested=True,
|
|
42
46
|
many=False,
|
|
@@ -50,6 +54,10 @@ class ZoneSerializer(NetBoxModelSerializer):
|
|
|
50
54
|
required=False,
|
|
51
55
|
help_text=_("Contact email for the zone"),
|
|
52
56
|
)
|
|
57
|
+
soa_refresh = TimePeriodField(required=False, allow_null=True)
|
|
58
|
+
soa_retry = TimePeriodField(required=False, allow_null=True)
|
|
59
|
+
soa_expire = TimePeriodField(required=False, allow_null=True)
|
|
60
|
+
soa_minimum = TimePeriodField(required=False, allow_null=True)
|
|
53
61
|
rfc2317_parent_zone = NestedZoneSerializer(
|
|
54
62
|
many=False,
|
|
55
63
|
read_only=True,
|
|
@@ -62,6 +70,13 @@ class ZoneSerializer(NetBoxModelSerializer):
|
|
|
62
70
|
required=False,
|
|
63
71
|
help_text=_("RFC2317 child zones of the zone"),
|
|
64
72
|
)
|
|
73
|
+
dnssec_policy = DNSSECPolicySerializer(
|
|
74
|
+
nested=True,
|
|
75
|
+
many=False,
|
|
76
|
+
read_only=False,
|
|
77
|
+
required=False,
|
|
78
|
+
help_text=_("DNSSEC policy to apply to the zone"),
|
|
79
|
+
)
|
|
65
80
|
registrar = RegistrarSerializer(
|
|
66
81
|
nested=True,
|
|
67
82
|
many=False,
|
|
@@ -112,7 +127,7 @@ class ZoneSerializer(NetBoxModelSerializer):
|
|
|
112
127
|
tenant = TenantSerializer(nested=True, required=False, allow_null=True)
|
|
113
128
|
|
|
114
129
|
def validate(self, data):
|
|
115
|
-
if (template := data.get("template")) is not None:
|
|
130
|
+
if isinstance(data, dict) and (template := data.get("template")) is not None:
|
|
116
131
|
template.apply_to_zone_data(data)
|
|
117
132
|
|
|
118
133
|
return super().validate(data)
|
|
@@ -173,8 +188,12 @@ class ZoneSerializer(NetBoxModelSerializer):
|
|
|
173
188
|
"rfc2317_parent_managed",
|
|
174
189
|
"rfc2317_parent_zone",
|
|
175
190
|
"rfc2317_child_zones",
|
|
191
|
+
"dnssec_policy",
|
|
192
|
+
"inline_signing",
|
|
176
193
|
"registrar",
|
|
177
194
|
"registry_domain_id",
|
|
195
|
+
"expiration_date",
|
|
196
|
+
"domain_status",
|
|
178
197
|
"registrant",
|
|
179
198
|
"tech_c",
|
|
180
199
|
"admin_c",
|
{netbox_plugin_dns-1.2.5 → netbox_plugin_dns-1.2.7}/netbox_dns/api/serializers_/zone_template.py
RENAMED
|
@@ -10,6 +10,7 @@ from netbox_dns.api.nested_serializers import NestedRecordTemplateSerializer
|
|
|
10
10
|
from .nameserver import NameServerSerializer
|
|
11
11
|
from .registrar import RegistrarSerializer
|
|
12
12
|
from .registration_contact import RegistrationContactSerializer
|
|
13
|
+
from .dnssec_policy import DNSSECPolicySerializer
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
__all__ = ("ZoneTemplateSerializer",)
|
|
@@ -39,6 +40,13 @@ class ZoneTemplateSerializer(NetBoxModelSerializer):
|
|
|
39
40
|
required=False,
|
|
40
41
|
help_text=_("Record templates assigned to the zone template"),
|
|
41
42
|
)
|
|
43
|
+
dnssec_policy = DNSSECPolicySerializer(
|
|
44
|
+
nested=True,
|
|
45
|
+
many=False,
|
|
46
|
+
read_only=False,
|
|
47
|
+
required=False,
|
|
48
|
+
help_text=_("DNSSEC policy assigned to the zone template"),
|
|
49
|
+
)
|
|
42
50
|
registrar = RegistrarSerializer(
|
|
43
51
|
nested=True,
|
|
44
52
|
many=False,
|
|
@@ -113,20 +121,21 @@ class ZoneTemplateSerializer(NetBoxModelSerializer):
|
|
|
113
121
|
"id",
|
|
114
122
|
"url",
|
|
115
123
|
"name",
|
|
124
|
+
"description",
|
|
116
125
|
"display",
|
|
117
126
|
"nameservers",
|
|
118
127
|
"soa_mname",
|
|
119
128
|
"soa_rname",
|
|
120
|
-
"
|
|
121
|
-
"tags",
|
|
122
|
-
"created",
|
|
123
|
-
"last_updated",
|
|
129
|
+
"dnssec_policy",
|
|
124
130
|
"registrar",
|
|
125
131
|
"registrant",
|
|
126
132
|
"tech_c",
|
|
127
133
|
"admin_c",
|
|
128
134
|
"billing_c",
|
|
129
135
|
"active",
|
|
136
|
+
"tags",
|
|
137
|
+
"created",
|
|
138
|
+
"last_updated",
|
|
130
139
|
"custom_fields",
|
|
131
140
|
"tenant",
|
|
132
141
|
"record_templates",
|
|
@@ -10,6 +10,8 @@ from netbox_dns.api.views import (
|
|
|
10
10
|
RegistrationContactViewSet,
|
|
11
11
|
ZoneTemplateViewSet,
|
|
12
12
|
RecordTemplateViewSet,
|
|
13
|
+
DNSSECKeyTemplateViewSet,
|
|
14
|
+
DNSSECPolicyViewSet,
|
|
13
15
|
PrefixViewSet,
|
|
14
16
|
)
|
|
15
17
|
|
|
@@ -24,6 +26,8 @@ router.register("registrars", RegistrarViewSet)
|
|
|
24
26
|
router.register("contacts", RegistrationContactViewSet)
|
|
25
27
|
router.register("zonetemplates", ZoneTemplateViewSet)
|
|
26
28
|
router.register("recordtemplates", RecordTemplateViewSet)
|
|
29
|
+
router.register("dnsseckeytemplates", DNSSECKeyTemplateViewSet)
|
|
30
|
+
router.register("dnssecpolicies", DNSSECPolicyViewSet)
|
|
27
31
|
|
|
28
32
|
router.register("prefixes", PrefixViewSet)
|
|
29
33
|
|
|
@@ -16,6 +16,8 @@ from netbox_dns.api.serializers import (
|
|
|
16
16
|
RegistrationContactSerializer,
|
|
17
17
|
ZoneTemplateSerializer,
|
|
18
18
|
RecordTemplateSerializer,
|
|
19
|
+
DNSSECKeyTemplateSerializer,
|
|
20
|
+
DNSSECPolicySerializer,
|
|
19
21
|
PrefixSerializer,
|
|
20
22
|
)
|
|
21
23
|
from netbox_dns.filtersets import (
|
|
@@ -27,6 +29,8 @@ from netbox_dns.filtersets import (
|
|
|
27
29
|
RegistrationContactFilterSet,
|
|
28
30
|
ZoneTemplateFilterSet,
|
|
29
31
|
RecordTemplateFilterSet,
|
|
32
|
+
DNSSECKeyTemplateFilterSet,
|
|
33
|
+
DNSSECPolicyFilterSet,
|
|
30
34
|
)
|
|
31
35
|
from netbox_dns.models import (
|
|
32
36
|
View,
|
|
@@ -37,6 +41,8 @@ from netbox_dns.models import (
|
|
|
37
41
|
RegistrationContact,
|
|
38
42
|
ZoneTemplate,
|
|
39
43
|
RecordTemplate,
|
|
44
|
+
DNSSECKeyTemplate,
|
|
45
|
+
DNSSECPolicy,
|
|
40
46
|
)
|
|
41
47
|
|
|
42
48
|
|
|
@@ -135,6 +141,18 @@ class RecordTemplateViewSet(NetBoxModelViewSet):
|
|
|
135
141
|
filterset_class = RecordTemplateFilterSet
|
|
136
142
|
|
|
137
143
|
|
|
144
|
+
class DNSSECKeyTemplateViewSet(NetBoxModelViewSet):
|
|
145
|
+
queryset = DNSSECKeyTemplate.objects.all()
|
|
146
|
+
serializer_class = DNSSECKeyTemplateSerializer
|
|
147
|
+
filterset_class = DNSSECKeyTemplateFilterSet
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class DNSSECPolicyViewSet(NetBoxModelViewSet):
|
|
151
|
+
queryset = DNSSECPolicy.objects.all()
|
|
152
|
+
serializer_class = DNSSECPolicySerializer
|
|
153
|
+
filterset_class = DNSSECPolicyFilterSet
|
|
154
|
+
|
|
155
|
+
|
|
138
156
|
class PrefixViewSet(NetBoxModelViewSet):
|
|
139
157
|
queryset = Prefix.objects.all()
|
|
140
158
|
serializer_class = PrefixSerializer
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from dns.dnssectypes import Algorithm
|
|
2
|
+
|
|
3
|
+
from django.utils.translation import gettext_lazy as _
|
|
4
|
+
|
|
5
|
+
from utilities.choices import ChoiceSet
|
|
6
|
+
|
|
7
|
+
from .utilities import define_choice_attributes
|
|
8
|
+
|
|
9
|
+
DEPRECATED_ALGORITHMS = (
|
|
10
|
+
Algorithm.RSAMD5,
|
|
11
|
+
Algorithm.DH,
|
|
12
|
+
Algorithm.DSA,
|
|
13
|
+
Algorithm.ECC,
|
|
14
|
+
Algorithm.RSASHA1,
|
|
15
|
+
Algorithm.DSANSEC3SHA1,
|
|
16
|
+
Algorithm.RSASHA1NSEC3SHA1,
|
|
17
|
+
Algorithm.RSASHA512,
|
|
18
|
+
Algorithm.ECCGOST,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
__all__ = (
|
|
23
|
+
"DNSSECKeyTemplateTypeChoices",
|
|
24
|
+
"DNSSECKeyTemplateAlgorithmChoices",
|
|
25
|
+
"DNSSECKeyTemplateKeySizeChoices",
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DNSSECKeyTemplateTypeChoices(ChoiceSet):
|
|
30
|
+
TYPE_CSK = "CSK"
|
|
31
|
+
TYPE_KSK = "KSK"
|
|
32
|
+
TYPE_ZSK = "ZSK"
|
|
33
|
+
|
|
34
|
+
CHOICES = [
|
|
35
|
+
(TYPE_CSK, _("CSK"), "purple"),
|
|
36
|
+
(TYPE_KSK, _("KSK"), "blue"),
|
|
37
|
+
(TYPE_ZSK, _("ZSK"), "green"),
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class DNSSECKeyTemplateKeySizeChoices(ChoiceSet):
|
|
42
|
+
SIZE_512 = 512
|
|
43
|
+
SIZE_1024 = 1024
|
|
44
|
+
SIZE_2048 = 2048
|
|
45
|
+
SIZE_3072 = 3072
|
|
46
|
+
SIZE_4096 = 4096
|
|
47
|
+
|
|
48
|
+
CHOICES = [
|
|
49
|
+
(SIZE_512, 512),
|
|
50
|
+
(SIZE_1024, 1024),
|
|
51
|
+
(SIZE_2048, 2048),
|
|
52
|
+
(SIZE_3072, 3072),
|
|
53
|
+
(SIZE_4096, 4096),
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@define_choice_attributes()
|
|
58
|
+
class DNSSECKeyTemplateAlgorithmChoices(ChoiceSet):
|
|
59
|
+
CHOICES = [
|
|
60
|
+
(algorithm.name, f"{algorithm.name} ({algorithm.value})")
|
|
61
|
+
for algorithm in sorted(Algorithm, key=lambda a: a.value)
|
|
62
|
+
if algorithm.value < 252 and algorithm not in DEPRECATED_ALGORITHMS
|
|
63
|
+
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from dns.dnssectypes import DSDigest
|
|
2
|
+
|
|
3
|
+
from django.utils.translation import gettext_lazy as _
|
|
4
|
+
|
|
5
|
+
from utilities.choices import ChoiceSet
|
|
6
|
+
|
|
7
|
+
from .utilities import define_choice_attributes
|
|
8
|
+
|
|
9
|
+
DEPRECATED_DIGESTS = (
|
|
10
|
+
DSDigest.NULL,
|
|
11
|
+
DSDigest.SHA1,
|
|
12
|
+
DSDigest.GOST,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
__all__ = (
|
|
17
|
+
"DNSSECPolicyDigestChoices",
|
|
18
|
+
"DNSSECPolicyStatusChoices",
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@define_choice_attributes()
|
|
23
|
+
class DNSSECPolicyDigestChoices(ChoiceSet):
|
|
24
|
+
CHOICES = [
|
|
25
|
+
(digest.name, digest.name)
|
|
26
|
+
for digest in sorted(DSDigest, key=lambda a: a.name)
|
|
27
|
+
if digest not in DEPRECATED_DIGESTS
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class DNSSECPolicyStatusChoices(ChoiceSet):
|
|
32
|
+
key = "DNSSECPolicy.status"
|
|
33
|
+
|
|
34
|
+
STATUS_ACTIVE = "active"
|
|
35
|
+
STATUS_INACTIVE = "inactive"
|
|
36
|
+
|
|
37
|
+
CHOICES = [
|
|
38
|
+
(STATUS_ACTIVE, _("Active"), "blue"),
|
|
39
|
+
(STATUS_INACTIVE, _("Inactive"), "red"),
|
|
40
|
+
]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
from dns import rdatatype, rdataclass
|
|
2
2
|
|
|
3
3
|
from django.utils.translation import gettext_lazy as _
|
|
4
|
-
from django.core.exceptions import ImproperlyConfigured
|
|
5
4
|
|
|
6
|
-
from netbox.plugins.utils import get_plugin_config
|
|
7
5
|
from utilities.choices import ChoiceSet
|
|
8
6
|
|
|
7
|
+
from .utilities import define_choice_attributes
|
|
8
|
+
|
|
9
9
|
|
|
10
10
|
__all__ = (
|
|
11
11
|
"RecordTypeChoices",
|
|
@@ -15,29 +15,6 @@ __all__ = (
|
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
def define_choice_attributes(filter_name=None):
|
|
19
|
-
try:
|
|
20
|
-
if filter_name is not None:
|
|
21
|
-
filter_choices = get_plugin_config("netbox_dns", filter_name, [])
|
|
22
|
-
else:
|
|
23
|
-
filter_choices = []
|
|
24
|
-
except ImproperlyConfigured:
|
|
25
|
-
filter_choices = []
|
|
26
|
-
|
|
27
|
-
def decorator(cls):
|
|
28
|
-
choices = []
|
|
29
|
-
for choice in cls._choices:
|
|
30
|
-
if choice[0] not in filter_choices:
|
|
31
|
-
setattr(cls, choice[0], choice[0])
|
|
32
|
-
choices.append(choice)
|
|
33
|
-
cls._choices = choices
|
|
34
|
-
cls.CHOICES = choices
|
|
35
|
-
|
|
36
|
-
return cls
|
|
37
|
-
|
|
38
|
-
return decorator
|
|
39
|
-
|
|
40
|
-
|
|
41
18
|
@define_choice_attributes()
|
|
42
19
|
class RecordTypeChoices(ChoiceSet):
|
|
43
20
|
CHOICES = [
|