netbox-plugin-dns 1.1.0__tar.gz → 1.1.0b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of netbox-plugin-dns might be problematic. Click here for more details.
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/PKG-INFO +1 -2
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/README.md +0 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/__init__.py +6 -8
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/nested_serializers.py +16 -17
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers.py +1 -1
- netbox_plugin_dns-1.1.0/netbox_dns/api/serializers_/registration_contact.py → netbox_plugin_dns-1.1.0b2/netbox_dns/api/serializers_/contact.py +5 -5
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/record.py +0 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/zone.py +5 -5
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/zone_template.py +5 -5
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/urls.py +2 -2
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/views.py +35 -9
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/fields/ipam.py +3 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/__init__.py +1 -1
- netbox_plugin_dns-1.1.0/netbox_dns/filtersets/registration_contact.py → netbox_plugin_dns-1.1.0b2/netbox_dns/filtersets/contact.py +4 -4
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/record.py +1 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/zone.py +15 -15
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/zone_template.py +15 -15
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/__init__.py +1 -1
- netbox_plugin_dns-1.1.0/netbox_dns/forms/registration_contact.py → netbox_plugin_dns-1.1.0b2/netbox_dns/forms/contact.py +16 -16
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/view.py +4 -91
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/zone.py +17 -22
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/zone_template.py +13 -13
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/graphql/__init__.py +2 -2
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/graphql/filters.py +5 -5
- netbox_plugin_dns-1.1.0b2/netbox_dns/graphql/schema.py +103 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/graphql/types.py +12 -40
- netbox_plugin_dns-1.1.0/netbox_dns/management/commands/setup_dnssync.py → netbox_plugin_dns-1.1.0b2/netbox_dns/management/commands/setup_autodns.py +15 -19
- netbox_plugin_dns-1.1.0/netbox_dns/migrations/0008_view_prefixes.py → netbox_plugin_dns-1.1.0b2/netbox_dns/migrations/0007_view_prefixes.py +1 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/__init__.py +1 -1
- netbox_plugin_dns-1.1.0/netbox_dns/models/registration_contact.py → netbox_plugin_dns-1.1.0b2/netbox_dns/models/contact.py +9 -15
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/nameserver.py +3 -8
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/record.py +29 -60
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/record_template.py +1 -4
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/registrar.py +1 -7
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/view.py +2 -9
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/zone.py +28 -51
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/models/zone_template.py +9 -12
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/navigation.py +7 -7
- netbox_plugin_dns-1.1.0/netbox_dns/signals/ipam_dnssync.py → netbox_plugin_dns-1.1.0b2/netbox_dns/signals/ipam_autodns.py +24 -78
- {netbox_plugin_dns-1.1.0/netbox_dns/views → netbox_plugin_dns-1.1.0b2/netbox_dns/tables}/__init__.py +1 -1
- netbox_plugin_dns-1.1.0/netbox_dns/tables/registration_contact.py → netbox_plugin_dns-1.1.0b2/netbox_dns/tables/contact.py +6 -5
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/nameserver.py +7 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/record.py +30 -43
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/record_template.py +17 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/registrar.py +2 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/view.py +8 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/zone.py +15 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/tables/zone_template.py +16 -2
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/template_content.py +2 -14
- netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/registrationcontact.html → netbox_plugin_dns-1.1.0b2/netbox_dns/templates/netbox_dns/contact.html +1 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/view.html +1 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/urls/__init__.py +2 -2
- netbox_plugin_dns-1.1.0b2/netbox_dns/urls/contact.py +51 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/urls/nameserver.py +38 -14
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/urls/record.py +19 -7
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/urls/record_template.py +27 -18
- netbox_plugin_dns-1.1.0b2/netbox_dns/urls/registrar.py +63 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/urls/view.py +20 -12
- netbox_plugin_dns-1.1.0b2/netbox_dns/urls/zone.py +63 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/urls/zone_template.py +26 -16
- netbox_plugin_dns-1.1.0b2/netbox_dns/utilities/__init__.py +2 -0
- netbox_plugin_dns-1.1.0/netbox_dns/utilities/ipam_dnssync.py → netbox_plugin_dns-1.1.0b2/netbox_dns/utilities/ipam_autodns.py +41 -80
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/validators/dns_name.py +0 -9
- {netbox_plugin_dns-1.1.0/netbox_dns/tables → netbox_plugin_dns-1.1.0b2/netbox_dns/views}/__init__.py +1 -1
- netbox_plugin_dns-1.1.0b2/netbox_dns/views/contact.py +95 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/nameserver.py +3 -7
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/record.py +7 -12
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/registrar.py +1 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/view.py +2 -32
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/zone.py +6 -7
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/pyproject.toml +1 -1
- netbox_plugin_dns-1.1.0/netbox_dns/graphql/schema.py +0 -83
- netbox_plugin_dns-1.1.0/netbox_dns/management/commands/rebuild_dnssync.py +0 -18
- netbox_plugin_dns-1.1.0/netbox_dns/migrations/0007_alter_ordering_options.py +0 -25
- netbox_plugin_dns-1.1.0/netbox_dns/migrations/0009_rename_contact_registrationcontact.py +0 -27
- netbox_plugin_dns-1.1.0/netbox_dns/tables/ipam_dnssync.py +0 -11
- netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/view/button.html +0 -9
- netbox_plugin_dns-1.1.0/netbox_dns/templates/netbox_dns/view/prefix.html +0 -41
- netbox_plugin_dns-1.1.0/netbox_dns/urls/registrar.py +0 -39
- netbox_plugin_dns-1.1.0/netbox_dns/urls/registration_contact.py +0 -60
- netbox_plugin_dns-1.1.0/netbox_dns/urls/zone.py +0 -25
- netbox_plugin_dns-1.1.0/netbox_dns/utilities/__init__.py +0 -2
- netbox_plugin_dns-1.1.0/netbox_dns/views/registration_contact.py +0 -94
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/LICENSE +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/prefix.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/record_template.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/registrar.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/view.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/apps.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/choices/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/choices/record.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/choices/zone.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/fields/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/fields/address.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/fields/network.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/fields/rfc2317.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/record_template.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/registrar.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/view.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/nameserver.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/record.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/record_template.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/forms/registrar.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/management/commands/cleanup_database.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/management/commands/cleanup_rrset_ttl.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/management/commands/update_soa.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0001_squashed_netbox_dns_0_22.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0002_contact_description_registrar_description.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0003_default_view.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0004_create_and_assign_default_view.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0005_alter_zone_view_not_null.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0006_templating.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0022_search.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0024_tenancy.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0026_domain_registration.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0028_rfc2317_fields.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/0029_record_fqdn.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/migrations/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/mixins/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/mixins/object_modification.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/signals/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/record/related.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/record.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/recordtemplate.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/view/related.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/child_zone.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone/rfc2317_child_zone.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zone.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/templates/netbox_dns/zonetemplate.html +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/utilities/conversions.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/validators/__init__.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/validators/dns_value.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/validators/rfc2317.py +0 -0
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/record_template.py +1 -1
- {netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/views/zone_template.py +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: netbox-plugin-dns
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.0b2
|
|
4
4
|
Summary: NetBox DNS is a NetBox plugin for managing DNS data.
|
|
5
5
|
Home-page: https://github.com/peteeckel/netbox-plugin-dns
|
|
6
6
|
License: MIT
|
|
@@ -48,7 +48,6 @@ The main focus of the plugin is to ensure the quality of the data stored in it.
|
|
|
48
48
|
* Validation of record types such as CNAME and singletons, to ensure DNS zone validity
|
|
49
49
|
* Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
|
|
50
50
|
* Templating for zones and records enables faster creations of zones with given boilerplate object relations, such as name servers, tags, tenants or registration information, or records like standard SPF or MX records that are the same for a subset of zones
|
|
51
|
-
* IPAM DNSsync can be used to automatically create address and pointer records for IP addresses by assigning prefixes to DNS views. When an IP address has a DNS name assigned and there are zones with matching names in the DNS views linked to the IP address' prefix, a matching DNS record will be created in these zones
|
|
52
51
|
|
|
53
52
|
Other main features include:
|
|
54
53
|
|
|
@@ -28,7 +28,6 @@ The main focus of the plugin is to ensure the quality of the data stored in it.
|
|
|
28
28
|
* Validation of record types such as CNAME and singletons, to ensure DNS zone validity
|
|
29
29
|
* Support for [RFC 2317](https://datatracker.ietf.org/doc/html/rfc2317) delegation of PTR zones for IPv4 subnets longer than 24 bits
|
|
30
30
|
* Templating for zones and records enables faster creations of zones with given boilerplate object relations, such as name servers, tags, tenants or registration information, or records like standard SPF or MX records that are the same for a subset of zones
|
|
31
|
-
* IPAM DNSsync can be used to automatically create address and pointer records for IP addresses by assigning prefixes to DNS views. When an IP address has a DNS name assigned and there are zones with matching names in the DNS views linked to the IP address' prefix, a matching DNS record will be created in these zones
|
|
32
31
|
|
|
33
32
|
Other main features include:
|
|
34
33
|
|
|
@@ -5,7 +5,7 @@ from ipam.choices import IPAddressStatusChoices
|
|
|
5
5
|
|
|
6
6
|
from netbox_dns.choices import RecordTypeChoices
|
|
7
7
|
|
|
8
|
-
__version__ = "1.1.
|
|
8
|
+
__version__ = "1.1.0b2"
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class DNSConfig(PluginConfig):
|
|
@@ -25,14 +25,13 @@ class DNSConfig(PluginConfig):
|
|
|
25
25
|
"zone_soa_retry": 7200,
|
|
26
26
|
"zone_soa_expire": 2419200,
|
|
27
27
|
"zone_soa_minimum": 3600,
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"autodns_disabled": False,
|
|
29
|
+
"autodns_ipaddress_active_status": [
|
|
30
30
|
IPAddressStatusChoices.STATUS_ACTIVE,
|
|
31
31
|
IPAddressStatusChoices.STATUS_DHCP,
|
|
32
32
|
IPAddressStatusChoices.STATUS_SLAAC,
|
|
33
33
|
],
|
|
34
|
-
"
|
|
35
|
-
"dnssync_minimum_zone_labels": 2,
|
|
34
|
+
"autodns_conflict_deactivate": False,
|
|
36
35
|
"tolerate_characters_in_zone_labels": "",
|
|
37
36
|
"tolerate_underscores_in_labels": False,
|
|
38
37
|
"tolerate_underscores_in_hostnames": False, # Deprecated, will be removed in 1.2.0
|
|
@@ -52,9 +51,8 @@ class DNSConfig(PluginConfig):
|
|
|
52
51
|
def ready(self):
|
|
53
52
|
super().ready()
|
|
54
53
|
|
|
55
|
-
if not settings.PLUGINS_CONFIG["netbox_dns"].get("
|
|
56
|
-
|
|
57
|
-
import netbox_dns.tables.ipam_dnssync
|
|
54
|
+
if not settings.PLUGINS_CONFIG["netbox_dns"].get("autodns_disabled"):
|
|
55
|
+
from netbox_dns.signals import ipam_autodns
|
|
58
56
|
|
|
59
57
|
|
|
60
58
|
#
|
|
@@ -59,22 +59,6 @@ class NestedZoneSerializer(WritableNestedSerializer):
|
|
|
59
59
|
]
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
class NestedZoneTemplateSerializer(WritableNestedSerializer):
|
|
63
|
-
url = serializers.HyperlinkedIdentityField(
|
|
64
|
-
view_name="plugins-api:netbox_dns-api:zonetemplate-detail"
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
class Meta:
|
|
68
|
-
model = ZoneTemplate
|
|
69
|
-
fields = (
|
|
70
|
-
"id",
|
|
71
|
-
"url",
|
|
72
|
-
"name",
|
|
73
|
-
"display",
|
|
74
|
-
"description",
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
|
|
78
62
|
class NestedRecordSerializer(WritableNestedSerializer):
|
|
79
63
|
url = serializers.HyperlinkedIdentityField(
|
|
80
64
|
view_name="plugins-api:netbox_dns-api:record-detail"
|
|
@@ -102,7 +86,6 @@ class NestedRecordSerializer(WritableNestedSerializer):
|
|
|
102
86
|
"status",
|
|
103
87
|
"ttl",
|
|
104
88
|
"zone",
|
|
105
|
-
"managed",
|
|
106
89
|
"active",
|
|
107
90
|
]
|
|
108
91
|
|
|
@@ -126,3 +109,19 @@ class NestedRecordTemplateSerializer(WritableNestedSerializer):
|
|
|
126
109
|
"ttl",
|
|
127
110
|
"description",
|
|
128
111
|
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
class NestedZoneTemplateSerializer(WritableNestedSerializer):
|
|
115
|
+
url = serializers.HyperlinkedIdentityField(
|
|
116
|
+
view_name="plugins-api:netbox_dns-api:zonetemplate-detail"
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
class Meta:
|
|
120
|
+
model = ZoneTemplate
|
|
121
|
+
fields = (
|
|
122
|
+
"id",
|
|
123
|
+
"url",
|
|
124
|
+
"name",
|
|
125
|
+
"display",
|
|
126
|
+
"description",
|
|
127
|
+
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
from .serializers_.contact import *
|
|
1
2
|
from .serializers_.nameserver import *
|
|
2
3
|
from .serializers_.record import *
|
|
3
4
|
from .serializers_.registrar import *
|
|
4
|
-
from .serializers_.registration_contact import *
|
|
5
5
|
from .serializers_.view import *
|
|
6
6
|
from .serializers_.zone import *
|
|
7
7
|
from .serializers_.zone_template import *
|
|
@@ -2,19 +2,19 @@ from rest_framework import serializers
|
|
|
2
2
|
|
|
3
3
|
from netbox.api.serializers import NetBoxModelSerializer
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import
|
|
5
|
+
from netbox_dns.models import Contact
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
__all__ = ("
|
|
8
|
+
__all__ = ("ContactSerializer",)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class ContactSerializer(NetBoxModelSerializer):
|
|
12
12
|
url = serializers.HyperlinkedIdentityField(
|
|
13
|
-
view_name="plugins-api:netbox_dns-api:
|
|
13
|
+
view_name="plugins-api:netbox_dns-api:contact-detail"
|
|
14
14
|
)
|
|
15
15
|
|
|
16
16
|
class Meta:
|
|
17
|
-
model =
|
|
17
|
+
model = Contact
|
|
18
18
|
fields = (
|
|
19
19
|
"id",
|
|
20
20
|
"url",
|
|
@@ -6,7 +6,7 @@ from tenancy.api.serializers import TenantSerializer
|
|
|
6
6
|
from .view import ViewSerializer
|
|
7
7
|
from .nameserver import NameServerSerializer
|
|
8
8
|
from .registrar import RegistrarSerializer
|
|
9
|
-
from .
|
|
9
|
+
from .contact import ContactSerializer
|
|
10
10
|
from .zone_template import ZoneTemplateSerializer
|
|
11
11
|
|
|
12
12
|
from ..nested_serializers import NestedZoneSerializer
|
|
@@ -62,28 +62,28 @@ class ZoneSerializer(NetBoxModelSerializer):
|
|
|
62
62
|
required=False,
|
|
63
63
|
help_text="The registrar the domain is registered with",
|
|
64
64
|
)
|
|
65
|
-
registrant =
|
|
65
|
+
registrant = ContactSerializer(
|
|
66
66
|
nested=True,
|
|
67
67
|
many=False,
|
|
68
68
|
read_only=False,
|
|
69
69
|
required=False,
|
|
70
70
|
help_text="The owner of the domain",
|
|
71
71
|
)
|
|
72
|
-
admin_c =
|
|
72
|
+
admin_c = ContactSerializer(
|
|
73
73
|
nested=True,
|
|
74
74
|
many=False,
|
|
75
75
|
read_only=False,
|
|
76
76
|
required=False,
|
|
77
77
|
help_text="The administrative contact for the domain",
|
|
78
78
|
)
|
|
79
|
-
tech_c =
|
|
79
|
+
tech_c = ContactSerializer(
|
|
80
80
|
nested=True,
|
|
81
81
|
many=False,
|
|
82
82
|
read_only=False,
|
|
83
83
|
required=False,
|
|
84
84
|
help_text="The technical contact for the domain",
|
|
85
85
|
)
|
|
86
|
-
billing_c =
|
|
86
|
+
billing_c = ContactSerializer(
|
|
87
87
|
nested=True,
|
|
88
88
|
many=False,
|
|
89
89
|
read_only=False,
|
{netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/api/serializers_/zone_template.py
RENAMED
|
@@ -8,7 +8,7 @@ from netbox_dns.api.nested_serializers import NestedRecordTemplateSerializer
|
|
|
8
8
|
|
|
9
9
|
from .nameserver import NameServerSerializer
|
|
10
10
|
from .registrar import RegistrarSerializer
|
|
11
|
-
from .
|
|
11
|
+
from .contact import ContactSerializer
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
__all__ = ("ZoneTemplateSerializer",)
|
|
@@ -38,28 +38,28 @@ class ZoneTemplateSerializer(NetBoxModelSerializer):
|
|
|
38
38
|
required=False,
|
|
39
39
|
help_text="The registrar the domain is registered with",
|
|
40
40
|
)
|
|
41
|
-
registrant =
|
|
41
|
+
registrant = ContactSerializer(
|
|
42
42
|
nested=True,
|
|
43
43
|
many=False,
|
|
44
44
|
read_only=False,
|
|
45
45
|
required=False,
|
|
46
46
|
help_text="The owner of the domain",
|
|
47
47
|
)
|
|
48
|
-
admin_c =
|
|
48
|
+
admin_c = ContactSerializer(
|
|
49
49
|
nested=True,
|
|
50
50
|
many=False,
|
|
51
51
|
read_only=False,
|
|
52
52
|
required=False,
|
|
53
53
|
help_text="The administrative contact for the domain",
|
|
54
54
|
)
|
|
55
|
-
tech_c =
|
|
55
|
+
tech_c = ContactSerializer(
|
|
56
56
|
nested=True,
|
|
57
57
|
many=False,
|
|
58
58
|
read_only=False,
|
|
59
59
|
required=False,
|
|
60
60
|
help_text="The technical contact for the domain",
|
|
61
61
|
)
|
|
62
|
-
billing_c =
|
|
62
|
+
billing_c = ContactSerializer(
|
|
63
63
|
nested=True,
|
|
64
64
|
many=False,
|
|
65
65
|
read_only=False,
|
|
@@ -7,7 +7,7 @@ from netbox_dns.api.views import (
|
|
|
7
7
|
NameServerViewSet,
|
|
8
8
|
RecordViewSet,
|
|
9
9
|
RegistrarViewSet,
|
|
10
|
-
|
|
10
|
+
ContactViewSet,
|
|
11
11
|
ZoneTemplateViewSet,
|
|
12
12
|
RecordTemplateViewSet,
|
|
13
13
|
PrefixViewSet,
|
|
@@ -21,7 +21,7 @@ router.register("zones", ZoneViewSet)
|
|
|
21
21
|
router.register("nameservers", NameServerViewSet)
|
|
22
22
|
router.register("records", RecordViewSet)
|
|
23
23
|
router.register("registrars", RegistrarViewSet)
|
|
24
|
-
router.register("contacts",
|
|
24
|
+
router.register("contacts", ContactViewSet)
|
|
25
25
|
router.register("zonetemplates", ZoneTemplateViewSet)
|
|
26
26
|
router.register("recordtemplates", RecordTemplateViewSet)
|
|
27
27
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
from rest_framework import serializers
|
|
2
|
+
from rest_framework.decorators import action
|
|
3
|
+
from rest_framework.response import Response
|
|
2
4
|
from rest_framework.routers import APIRootView
|
|
3
5
|
|
|
4
6
|
from ipam.models import Prefix
|
|
5
|
-
from ipam.filtersets import PrefixFilterSet
|
|
6
7
|
|
|
7
8
|
from netbox.api.viewsets import NetBoxModelViewSet
|
|
8
9
|
|
|
@@ -12,7 +13,7 @@ from netbox_dns.api.serializers import (
|
|
|
12
13
|
NameServerSerializer,
|
|
13
14
|
RecordSerializer,
|
|
14
15
|
RegistrarSerializer,
|
|
15
|
-
|
|
16
|
+
ContactSerializer,
|
|
16
17
|
ZoneTemplateSerializer,
|
|
17
18
|
RecordTemplateSerializer,
|
|
18
19
|
PrefixSerializer,
|
|
@@ -23,7 +24,7 @@ from netbox_dns.filtersets import (
|
|
|
23
24
|
NameServerFilterSet,
|
|
24
25
|
RecordFilterSet,
|
|
25
26
|
RegistrarFilterSet,
|
|
26
|
-
|
|
27
|
+
ContactFilterSet,
|
|
27
28
|
ZoneTemplateFilterSet,
|
|
28
29
|
RecordTemplateFilterSet,
|
|
29
30
|
)
|
|
@@ -33,7 +34,7 @@ from netbox_dns.models import (
|
|
|
33
34
|
NameServer,
|
|
34
35
|
Record,
|
|
35
36
|
Registrar,
|
|
36
|
-
|
|
37
|
+
Contact,
|
|
37
38
|
ZoneTemplate,
|
|
38
39
|
RecordTemplate,
|
|
39
40
|
)
|
|
@@ -49,6 +50,12 @@ class ViewViewSet(NetBoxModelViewSet):
|
|
|
49
50
|
serializer_class = ViewSerializer
|
|
50
51
|
filterset_class = ViewFilterSet
|
|
51
52
|
|
|
53
|
+
@action(detail=True, methods=["get"])
|
|
54
|
+
def views(self, request, pk=None):
|
|
55
|
+
views = View.objects.filter(zone=pk)
|
|
56
|
+
serializer = ViewSerializer(views, many=True, context={"request": request})
|
|
57
|
+
return Response(serializer.data)
|
|
58
|
+
|
|
52
59
|
|
|
53
60
|
class ZoneViewSet(NetBoxModelViewSet):
|
|
54
61
|
queryset = Zone.objects.prefetch_related(
|
|
@@ -62,12 +69,32 @@ class ZoneViewSet(NetBoxModelViewSet):
|
|
|
62
69
|
serializer_class = ZoneSerializer
|
|
63
70
|
filterset_class = ZoneFilterSet
|
|
64
71
|
|
|
72
|
+
@action(detail=True, methods=["get"])
|
|
73
|
+
def records(self, request, pk=None):
|
|
74
|
+
records = Record.objects.filter(zone=pk)
|
|
75
|
+
serializer = RecordSerializer(records, many=True, context={"request": request})
|
|
76
|
+
return Response(serializer.data)
|
|
77
|
+
|
|
78
|
+
@action(detail=True, methods=["get"])
|
|
79
|
+
def nameservers(self, request, pk=None):
|
|
80
|
+
nameservers = NameServer.objects.filter(zones__id=pk)
|
|
81
|
+
serializer = NameServerSerializer(
|
|
82
|
+
nameservers, many=True, context={"request": request}
|
|
83
|
+
)
|
|
84
|
+
return Response(serializer.data)
|
|
85
|
+
|
|
65
86
|
|
|
66
87
|
class NameServerViewSet(NetBoxModelViewSet):
|
|
67
88
|
queryset = NameServer.objects.prefetch_related("zones", "tenant")
|
|
68
89
|
serializer_class = NameServerSerializer
|
|
69
90
|
filterset_class = NameServerFilterSet
|
|
70
91
|
|
|
92
|
+
@action(detail=True, methods=["get"])
|
|
93
|
+
def zones(self, request, pk=None):
|
|
94
|
+
zones = Zone.objects.filter(nameservers__id=pk)
|
|
95
|
+
serializer = ZoneSerializer(zones, many=True, context={"request": request})
|
|
96
|
+
return Response(serializer.data)
|
|
97
|
+
|
|
71
98
|
|
|
72
99
|
class RecordViewSet(NetBoxModelViewSet):
|
|
73
100
|
queryset = Record.objects.all().prefetch_related("zone", "zone__view", "tenant")
|
|
@@ -112,10 +139,10 @@ class RegistrarViewSet(NetBoxModelViewSet):
|
|
|
112
139
|
filterset_class = RegistrarFilterSet
|
|
113
140
|
|
|
114
141
|
|
|
115
|
-
class
|
|
116
|
-
queryset =
|
|
117
|
-
serializer_class =
|
|
118
|
-
filterset_class =
|
|
142
|
+
class ContactViewSet(NetBoxModelViewSet):
|
|
143
|
+
queryset = Contact.objects.all()
|
|
144
|
+
serializer_class = ContactSerializer
|
|
145
|
+
filterset_class = ContactFilterSet
|
|
119
146
|
|
|
120
147
|
|
|
121
148
|
class ZoneTemplateViewSet(NetBoxModelViewSet):
|
|
@@ -133,4 +160,3 @@ class RecordTemplateViewSet(NetBoxModelViewSet):
|
|
|
133
160
|
class PrefixViewSet(NetBoxModelViewSet):
|
|
134
161
|
queryset = Prefix.objects.all()
|
|
135
162
|
serializer_class = PrefixSerializer
|
|
136
|
-
filterset_class = PrefixFilterSet
|
|
@@ -6,6 +6,9 @@ __all__ = ("PrefixDynamicModelMultipleChoiceField",)
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class PrefixDynamicModelMultipleChoiceField(DynamicModelMultipleChoiceField):
|
|
9
|
+
def __init__(self, *args, **kwargs):
|
|
10
|
+
super().__init__(*args, **kwargs)
|
|
11
|
+
|
|
9
12
|
widget = APISelectMultiple(api_url="/api/plugins/netbox-dns/prefixes")
|
|
10
13
|
|
|
11
14
|
def label_from_instance(self, obj):
|
|
@@ -2,15 +2,15 @@ from django.db.models import Q
|
|
|
2
2
|
|
|
3
3
|
from netbox.filtersets import NetBoxModelFilterSet
|
|
4
4
|
|
|
5
|
-
from netbox_dns.models import
|
|
5
|
+
from netbox_dns.models import Contact
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
__all__ = ("
|
|
8
|
+
__all__ = ("ContactFilterSet",)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class ContactFilterSet(NetBoxModelFilterSet):
|
|
12
12
|
class Meta:
|
|
13
|
-
model =
|
|
13
|
+
model = Contact
|
|
14
14
|
fields = (
|
|
15
15
|
"id",
|
|
16
16
|
"name",
|
|
@@ -121,7 +121,7 @@ class RecordFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
121
121
|
if not value.strip():
|
|
122
122
|
return queryset
|
|
123
123
|
qs_filter = (
|
|
124
|
-
Q(
|
|
124
|
+
Q(name__icontains=value)
|
|
125
125
|
| Q(value__icontains=value)
|
|
126
126
|
| Q(zone__name__icontains=value)
|
|
127
127
|
)
|
|
@@ -7,7 +7,7 @@ from netbox.filtersets import NetBoxModelFilterSet
|
|
|
7
7
|
from tenancy.filtersets import TenancyFilterSet
|
|
8
8
|
from utilities.filters import MultiValueCharFilter
|
|
9
9
|
|
|
10
|
-
from netbox_dns.models import View, Zone, Registrar,
|
|
10
|
+
from netbox_dns.models import View, Zone, Registrar, Contact, NameServer
|
|
11
11
|
from netbox_dns.choices import ZoneStatusChoices
|
|
12
12
|
|
|
13
13
|
|
|
@@ -95,44 +95,44 @@ class ZoneFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
95
95
|
label="Registrar",
|
|
96
96
|
)
|
|
97
97
|
registrant_id = django_filters.ModelMultipleChoiceFilter(
|
|
98
|
-
queryset=
|
|
98
|
+
queryset=Contact.objects.all(),
|
|
99
99
|
label="Registrant ID",
|
|
100
100
|
)
|
|
101
101
|
registrant = django_filters.ModelMultipleChoiceFilter(
|
|
102
|
-
queryset=
|
|
102
|
+
queryset=Contact.objects.all(),
|
|
103
103
|
field_name="registrant__contact_id",
|
|
104
104
|
to_field_name="contact_id",
|
|
105
105
|
label="Registrant",
|
|
106
106
|
)
|
|
107
107
|
admin_c_id = django_filters.ModelMultipleChoiceFilter(
|
|
108
|
-
queryset=
|
|
109
|
-
label="Administrative
|
|
108
|
+
queryset=Contact.objects.all(),
|
|
109
|
+
label="Administrative Contact ID",
|
|
110
110
|
)
|
|
111
111
|
admin_c = django_filters.ModelMultipleChoiceFilter(
|
|
112
|
-
queryset=
|
|
112
|
+
queryset=Contact.objects.all(),
|
|
113
113
|
field_name="admin_c__contact_id",
|
|
114
114
|
to_field_name="contact_id",
|
|
115
|
-
label="Administrative
|
|
115
|
+
label="Administrative Contact",
|
|
116
116
|
)
|
|
117
117
|
tech_c_id = django_filters.ModelMultipleChoiceFilter(
|
|
118
|
-
queryset=
|
|
119
|
-
label="Technical
|
|
118
|
+
queryset=Contact.objects.all(),
|
|
119
|
+
label="Technical Contact ID",
|
|
120
120
|
)
|
|
121
121
|
tech_c = django_filters.ModelMultipleChoiceFilter(
|
|
122
|
-
queryset=
|
|
122
|
+
queryset=Contact.objects.all(),
|
|
123
123
|
field_name="tech_c__contact_id",
|
|
124
124
|
to_field_name="contact_id",
|
|
125
|
-
label="Technical
|
|
125
|
+
label="Technical Contact",
|
|
126
126
|
)
|
|
127
127
|
billing_c_id = django_filters.ModelMultipleChoiceFilter(
|
|
128
|
-
queryset=
|
|
129
|
-
label="Billing
|
|
128
|
+
queryset=Contact.objects.all(),
|
|
129
|
+
label="Billing Contact ID",
|
|
130
130
|
)
|
|
131
131
|
billing_c = django_filters.ModelMultipleChoiceFilter(
|
|
132
|
-
queryset=
|
|
132
|
+
queryset=Contact.objects.all(),
|
|
133
133
|
field_name="billing_c__contact_id",
|
|
134
134
|
to_field_name="contact_id",
|
|
135
|
-
label="Billing
|
|
135
|
+
label="Billing Contact",
|
|
136
136
|
)
|
|
137
137
|
active = django_filters.BooleanFilter(
|
|
138
138
|
label="Zone is active",
|
{netbox_plugin_dns-1.1.0 → netbox_plugin_dns-1.1.0b2}/netbox_dns/filtersets/zone_template.py
RENAMED
|
@@ -9,7 +9,7 @@ from netbox_dns.models import (
|
|
|
9
9
|
ZoneTemplate,
|
|
10
10
|
RecordTemplate,
|
|
11
11
|
Registrar,
|
|
12
|
-
|
|
12
|
+
Contact,
|
|
13
13
|
NameServer,
|
|
14
14
|
)
|
|
15
15
|
|
|
@@ -53,44 +53,44 @@ class ZoneTemplateFilterSet(TenancyFilterSet, NetBoxModelFilterSet):
|
|
|
53
53
|
label="Registrar",
|
|
54
54
|
)
|
|
55
55
|
registrant_id = django_filters.ModelMultipleChoiceFilter(
|
|
56
|
-
queryset=
|
|
56
|
+
queryset=Contact.objects.all(),
|
|
57
57
|
label="Registrant ID",
|
|
58
58
|
)
|
|
59
59
|
registrant = django_filters.ModelMultipleChoiceFilter(
|
|
60
|
-
queryset=
|
|
60
|
+
queryset=Contact.objects.all(),
|
|
61
61
|
field_name="registrant__contact_id",
|
|
62
62
|
to_field_name="contact_id",
|
|
63
63
|
label="Registrant",
|
|
64
64
|
)
|
|
65
65
|
admin_c_id = django_filters.ModelMultipleChoiceFilter(
|
|
66
|
-
queryset=
|
|
67
|
-
label="Administrative
|
|
66
|
+
queryset=Contact.objects.all(),
|
|
67
|
+
label="Administrative Contact ID",
|
|
68
68
|
)
|
|
69
69
|
admin_c = django_filters.ModelMultipleChoiceFilter(
|
|
70
|
-
queryset=
|
|
70
|
+
queryset=Contact.objects.all(),
|
|
71
71
|
field_name="admin_c__contact_id",
|
|
72
72
|
to_field_name="contact_id",
|
|
73
|
-
label="Administrative
|
|
73
|
+
label="Administrative Contact",
|
|
74
74
|
)
|
|
75
75
|
tech_c_id = django_filters.ModelMultipleChoiceFilter(
|
|
76
|
-
queryset=
|
|
77
|
-
label="Technical
|
|
76
|
+
queryset=Contact.objects.all(),
|
|
77
|
+
label="Technical Contact ID",
|
|
78
78
|
)
|
|
79
79
|
tech_c = django_filters.ModelMultipleChoiceFilter(
|
|
80
|
-
queryset=
|
|
80
|
+
queryset=Contact.objects.all(),
|
|
81
81
|
field_name="tech_c__contact_id",
|
|
82
82
|
to_field_name="contact_id",
|
|
83
|
-
label="Technical
|
|
83
|
+
label="Technical Contact",
|
|
84
84
|
)
|
|
85
85
|
billing_c_id = django_filters.ModelMultipleChoiceFilter(
|
|
86
|
-
queryset=
|
|
87
|
-
label="Billing
|
|
86
|
+
queryset=Contact.objects.all(),
|
|
87
|
+
label="Billing Contact ID",
|
|
88
88
|
)
|
|
89
89
|
billing_c = django_filters.ModelMultipleChoiceFilter(
|
|
90
|
-
queryset=
|
|
90
|
+
queryset=Contact.objects.all(),
|
|
91
91
|
field_name="billing_c__contact_id",
|
|
92
92
|
to_field_name="contact_id",
|
|
93
|
-
label="Billing
|
|
93
|
+
label="Billing Contact",
|
|
94
94
|
)
|
|
95
95
|
|
|
96
96
|
class Meta:
|
|
@@ -9,18 +9,18 @@ from netbox.forms import (
|
|
|
9
9
|
from utilities.forms.fields import TagFilterField
|
|
10
10
|
from utilities.forms.rendering import FieldSet
|
|
11
11
|
|
|
12
|
-
from netbox_dns.models import
|
|
12
|
+
from netbox_dns.models import Contact
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
__all__ = (
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
16
|
+
"ContactForm",
|
|
17
|
+
"ContactFilterForm",
|
|
18
|
+
"ContactImportForm",
|
|
19
|
+
"ContactBulkEditForm",
|
|
20
20
|
)
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class
|
|
23
|
+
class ContactForm(NetBoxModelForm):
|
|
24
24
|
fieldsets = (
|
|
25
25
|
FieldSet(
|
|
26
26
|
"name",
|
|
@@ -37,13 +37,13 @@ class RegistrationContactForm(NetBoxModelForm):
|
|
|
37
37
|
"fax",
|
|
38
38
|
"fax_ext",
|
|
39
39
|
"email",
|
|
40
|
-
name="
|
|
40
|
+
name="Contact",
|
|
41
41
|
),
|
|
42
42
|
FieldSet("tags", name="Tags"),
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
class Meta:
|
|
46
|
-
model =
|
|
46
|
+
model = Contact
|
|
47
47
|
fields = (
|
|
48
48
|
"name",
|
|
49
49
|
"description",
|
|
@@ -63,8 +63,8 @@ class RegistrationContactForm(NetBoxModelForm):
|
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
class
|
|
67
|
-
model =
|
|
66
|
+
class ContactFilterForm(NetBoxModelFilterSetForm):
|
|
67
|
+
model = Contact
|
|
68
68
|
|
|
69
69
|
fieldsets = (
|
|
70
70
|
FieldSet("q", "filter_id", "tag"),
|
|
@@ -89,7 +89,7 @@ class RegistrationContactFilterForm(NetBoxModelFilterSetForm):
|
|
|
89
89
|
)
|
|
90
90
|
contact_id = forms.CharField(
|
|
91
91
|
required=False,
|
|
92
|
-
label="
|
|
92
|
+
label="Contact ID",
|
|
93
93
|
)
|
|
94
94
|
organization = forms.CharField(
|
|
95
95
|
required=False,
|
|
@@ -128,12 +128,12 @@ class RegistrationContactFilterForm(NetBoxModelFilterSetForm):
|
|
|
128
128
|
email = forms.CharField(
|
|
129
129
|
required=False,
|
|
130
130
|
)
|
|
131
|
-
tag = TagFilterField(
|
|
131
|
+
tag = TagFilterField(Contact)
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
class
|
|
134
|
+
class ContactImportForm(NetBoxModelImportForm):
|
|
135
135
|
class Meta:
|
|
136
|
-
model =
|
|
136
|
+
model = Contact
|
|
137
137
|
fields = (
|
|
138
138
|
"name",
|
|
139
139
|
"description",
|
|
@@ -153,8 +153,8 @@ class RegistrationContactImportForm(NetBoxModelImportForm):
|
|
|
153
153
|
)
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
class
|
|
157
|
-
model =
|
|
156
|
+
class ContactBulkEditForm(NetBoxModelBulkEditForm):
|
|
157
|
+
model = Contact
|
|
158
158
|
|
|
159
159
|
name = forms.CharField(
|
|
160
160
|
required=False,
|