netbox-plugin-dns 0.21.12__tar.gz → 0.21.14__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.

Files changed (110) hide show
  1. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/PKG-INFO +13 -20
  2. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/README.md +13 -19
  3. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/__init__.py +1 -1
  4. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/management/commands/setup_coupling.py +20 -0
  5. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0026_domain_registration.py +1 -1
  6. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/signals/ipam_coupling.py +4 -3
  7. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/template_content.py +8 -1
  8. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/record/related.html +8 -0
  9. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/record.html +1 -1
  10. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/utilities/ipam_coupling.py +11 -4
  11. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/pyproject.toml +1 -1
  12. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/LICENSE +0 -0
  13. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/api/nested_serializers.py +0 -0
  14. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/api/serializers.py +0 -0
  15. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/api/urls.py +0 -0
  16. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/api/views.py +0 -0
  17. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/apps.py +0 -0
  18. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/fields/__init__.py +0 -0
  19. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/fields/address.py +0 -0
  20. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/fields/network.py +0 -0
  21. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/__init__.py +0 -0
  22. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/contact.py +0 -0
  23. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/nameserver.py +0 -0
  24. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/record.py +0 -0
  25. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/registrar.py +0 -0
  26. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/view.py +0 -0
  27. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/filters/zone.py +0 -0
  28. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/__init__.py +0 -0
  29. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/contact.py +0 -0
  30. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/nameserver.py +0 -0
  31. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/record.py +0 -0
  32. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/registrar.py +0 -0
  33. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/view.py +0 -0
  34. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/forms/zone.py +0 -0
  35. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/__init__.py +0 -0
  36. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/contact.py +0 -0
  37. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/nameserver.py +0 -0
  38. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/record.py +0 -0
  39. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/registrar.py +0 -0
  40. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/schema.py +0 -0
  41. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/view.py +0 -0
  42. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/graphql/zone.py +0 -0
  43. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/management/commands/cleanup_database.py +0 -0
  44. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/management/commands/update_soa.py +0 -0
  45. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0001_initial.py +0 -0
  46. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py +0 -0
  47. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0002_zone_default_ttl.py +0 -0
  48. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0003_soa_managed_records.py +0 -0
  49. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0004_create_ptr_for_a_aaaa_records.py +0 -0
  50. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0005_update_ns_records.py +0 -0
  51. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0006_zone_soa_serial_auto.py +0 -0
  52. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0007_alter_zone_soa_serial_auto.py +0 -0
  53. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0008_zone_status_names.py +0 -0
  54. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0009_netbox32.py +0 -0
  55. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0010_update_soa_records.py +0 -0
  56. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0011_add_view_model.py +0 -0
  57. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0012_adjust_zone_and_record.py +0 -0
  58. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0013_add_nameserver_zone_record_description.py +0 -0
  59. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0014_add_view_description.py +0 -0
  60. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0015_add_record_status.py +0 -0
  61. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0016_cleanup_ptr_records.py +0 -0
  62. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0017_alter_record_ttl.py +0 -0
  63. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0018_zone_arpa_network.py +0 -0
  64. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0019_update_ns_ttl.py +0 -0
  65. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0020_netbox_3_4.py +0 -0
  66. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0021_record_ip_address.py +0 -0
  67. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0022_search.py +0 -0
  68. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0023_alter_record_value.py +0 -0
  69. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0024_tenancy.py +0 -0
  70. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0025_ipam_coupling_cf.py +0 -0
  71. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/0027_alter_registrar_iana_id.py +0 -0
  72. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/migrations/__init__.py +0 -0
  73. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/__init__.py +0 -0
  74. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/contact.py +0 -0
  75. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/nameserver.py +0 -0
  76. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/record.py +0 -0
  77. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/registrar.py +0 -0
  78. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/view.py +0 -0
  79. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/models/zone.py +0 -0
  80. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/navigation.py +0 -0
  81. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/signals/__init__.py +0 -0
  82. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/__init__.py +0 -0
  83. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/contact.py +0 -0
  84. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/nameserver.py +0 -0
  85. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/record.py +0 -0
  86. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/registrar.py +0 -0
  87. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/view.py +0 -0
  88. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/tables/zone.py +0 -0
  89. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/contact.html +0 -0
  90. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/nameserver.html +0 -0
  91. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/record/managed.html +0 -0
  92. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/registrar.html +0 -0
  93. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/related_dns_objects.html +0 -0
  94. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/view.html +0 -0
  95. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/zone/base.html +0 -0
  96. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/zone/child.html +0 -0
  97. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/zone/managed_record.html +0 -0
  98. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/zone/record.html +0 -0
  99. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/zone/registration.html +0 -0
  100. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/templates/netbox_dns/zone.html +0 -0
  101. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/urls.py +0 -0
  102. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/utilities/__init__.py +0 -0
  103. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/validators.py +0 -0
  104. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/__init__.py +0 -0
  105. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/contact.py +0 -0
  106. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/nameserver.py +0 -0
  107. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/record.py +0 -0
  108. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/registrar.py +0 -0
  109. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/view.py +0 -0
  110. {netbox_plugin_dns-0.21.12 → netbox_plugin_dns-0.21.14}/netbox_dns/views/zone.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: netbox-plugin-dns
3
- Version: 0.21.12
3
+ Version: 0.21.14
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
@@ -35,11 +35,11 @@ Description-Content-Type: text/markdown
35
35
 
36
36
  ## Features
37
37
 
38
- * Manage DNS name servers
39
- * Manage DNS zone information, automatically generating SOA and NS records
40
- * Manage DNS records
41
- * Automatically create and update PTR records for A and AAAA records
42
- * Optionally organize DNS zones in views to cater for split horizon DNS and multi-site deployments
38
+ * Manage name servers, zones and records
39
+ * Automatically generate SOA and NS records for zones
40
+ * Automatically create and update PTR records for IPv4 and IPv6 records
41
+ * Optionally organize DNS zones in views for split horizon DNS and multi-site deployments
42
+ * Optionally maintain domain registrar and registrant information for zones
43
43
 
44
44
  NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
45
45
 
@@ -57,7 +57,7 @@ $ source /opt/netbox/venv/bin/activate
57
57
  (venv) $ pip install netbox-plugin-dns
58
58
  ```
59
59
 
60
- ### Configuration
60
+ ### NetBox Configuration
61
61
 
62
62
  Add the plugin to the NetBox config. `~/netbox/configuration.py`
63
63
 
@@ -67,7 +67,7 @@ PLUGINS = [
67
67
  ]
68
68
  ```
69
69
 
70
- To permanently mount the plugin when updating NetBox:
70
+ To permanently keep the plugin installed when updating NetBox via `update.sh`:
71
71
 
72
72
  ```
73
73
  echo netbox-plugin-dns >> ~/netbox/local_requirements.txt
@@ -79,23 +79,16 @@ To add the required netbox_dns tables to your database run the following command
79
79
  ./manage.py migrate
80
80
  ```
81
81
 
82
- Full reference: [Using Plugins - NetBox Documentation](https://netbox.readthedocs.io/en/stable/plugins/)
83
-
84
- ## Screenshots
85
-
86
- ![Zones](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/ZoneList.png)
87
-
88
- ![Zone Detail](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/ZoneDetail.png)
89
-
90
- ![Records](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/RecordList.png)
91
-
92
- ![Record Detail](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/RecordDetail.png)
82
+ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documentation](https://netbox.readthedocs.io/en/stable/plugins/)
93
83
 
94
84
  ## Contribute
95
85
 
96
86
  Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
97
87
 
88
+ ## Documentation
89
+
90
+ For further information, please refer to the full documentation: [Using NetBox DNS](docs/using_netbox_dns.md)
91
+
98
92
  ## License
99
93
 
100
94
  MIT
101
-
@@ -14,11 +14,11 @@
14
14
 
15
15
  ## Features
16
16
 
17
- * Manage DNS name servers
18
- * Manage DNS zone information, automatically generating SOA and NS records
19
- * Manage DNS records
20
- * Automatically create and update PTR records for A and AAAA records
21
- * Optionally organize DNS zones in views to cater for split horizon DNS and multi-site deployments
17
+ * Manage name servers, zones and records
18
+ * Automatically generate SOA and NS records for zones
19
+ * Automatically create and update PTR records for IPv4 and IPv6 records
20
+ * Optionally organize DNS zones in views for split horizon DNS and multi-site deployments
21
+ * Optionally maintain domain registrar and registrant information for zones
22
22
 
23
23
  NetBox DNS is using the standardized NetBox plugin interface, so it also takes advantage of the NetBox tagging and change log features.
24
24
 
@@ -36,7 +36,7 @@ $ source /opt/netbox/venv/bin/activate
36
36
  (venv) $ pip install netbox-plugin-dns
37
37
  ```
38
38
 
39
- ### Configuration
39
+ ### NetBox Configuration
40
40
 
41
41
  Add the plugin to the NetBox config. `~/netbox/configuration.py`
42
42
 
@@ -46,7 +46,7 @@ PLUGINS = [
46
46
  ]
47
47
  ```
48
48
 
49
- To permanently mount the plugin when updating NetBox:
49
+ To permanently keep the plugin installed when updating NetBox via `update.sh`:
50
50
 
51
51
  ```
52
52
  echo netbox-plugin-dns >> ~/netbox/local_requirements.txt
@@ -58,22 +58,16 @@ To add the required netbox_dns tables to your database run the following command
58
58
  ./manage.py migrate
59
59
  ```
60
60
 
61
- Full reference: [Using Plugins - NetBox Documentation](https://netbox.readthedocs.io/en/stable/plugins/)
62
-
63
- ## Screenshots
64
-
65
- ![Zones](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/ZoneList.png)
66
-
67
- ![Zone Detail](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/ZoneDetail.png)
68
-
69
- ![Records](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/RecordList.png)
70
-
71
- ![Record Detail](https://raw.githubusercontent.com/peteeckel/netbox-plugin-dns/main/docs/images/RecordDetail.png)
61
+ Full documentation on using plugins with NetBox: [Using Plugins - NetBox Documentation](https://netbox.readthedocs.io/en/stable/plugins/)
72
62
 
73
63
  ## Contribute
74
64
 
75
65
  Contributions are always welcome! Please see: [contributing guide](CONTRIBUTING.md)
76
66
 
67
+ ## Documentation
68
+
69
+ For further information, please refer to the full documentation: [Using NetBox DNS](docs/using_netbox_dns.md)
70
+
77
71
  ## License
78
72
 
79
- MIT
73
+ MIT
@@ -9,7 +9,7 @@ except ImportError:
9
9
  # NetBox 3.5.8
10
10
  from extras.plugins.utils import get_plugin_config
11
11
 
12
- __version__ = "0.21.12"
12
+ __version__ = "0.21.14"
13
13
 
14
14
 
15
15
  class DNSConfig(PluginConfig):
@@ -23,6 +23,7 @@ class Command(BaseCommand):
23
23
  for cf in (
24
24
  "ipaddress_dns_record_name",
25
25
  "ipaddress_dns_record_ttl",
26
+ "ipaddress_dns_record_disable_ptr",
26
27
  "ipaddress_dns_zone_id",
27
28
  ):
28
29
  try:
@@ -71,6 +72,25 @@ class Command(BaseCommand):
71
72
  if options.get("verbose"):
72
73
  self.stdout.write("Created custom field 'ipaddress_dns_record_ttl'")
73
74
 
75
+ if not CustomField.objects.filter(
76
+ name="ipaddress_dns_record_disable_ptr",
77
+ type=CustomFieldTypeChoices.TYPE_BOOLEAN,
78
+ content_types=ipaddress_object_type,
79
+ ).exists():
80
+ cf_disable_ptr = CustomField.objects.create(
81
+ name="ipaddress_dns_record_disable_ptr",
82
+ label="Disable PTR",
83
+ type=CustomFieldTypeChoices.TYPE_BOOLEAN,
84
+ required=False,
85
+ default=False,
86
+ group_name="DNS",
87
+ )
88
+ cf_disable_ptr.content_types.set([ipaddress_object_type])
89
+ if options.get("verbose"):
90
+ self.stdout.write(
91
+ "Created custom field 'ipaddress_dns_record_disable_ptr'"
92
+ )
93
+
74
94
  if not CustomField.objects.filter(
75
95
  name="ipaddress_dns_zone_id",
76
96
  type=CustomFieldTypeChoices.TYPE_OBJECT,
@@ -7,7 +7,7 @@ import utilities.json
7
7
  class Migration(migrations.Migration):
8
8
  dependencies = [
9
9
  ("netbox_dns", "0025_ipam_coupling_cf"),
10
- ("extras", "0098_webhook_custom_field_data_webhook_tags"),
10
+ ("extras", "0092_delete_jobresult"),
11
11
  ]
12
12
 
13
13
  operations = [
@@ -48,7 +48,7 @@ def ip_address_check_permissions_save(instance, **kwargs):
48
48
 
49
49
  record = get_address_record(instance)
50
50
  if record is not None:
51
- name, ttl, zone_id = ipaddress_cf_data(instance)
51
+ name, ttl, disable_ptr, zone_id = ipaddress_cf_data(instance)
52
52
  if zone_id is not None:
53
53
  update_address_record(record, instance)
54
54
  record.full_clean()
@@ -112,7 +112,7 @@ def ip_address_update_dns_information(instance, **kwargs):
112
112
  if not get_plugin_config("netbox_dns", "feature_ipam_coupling"):
113
113
  return
114
114
 
115
- name, ttl, zone_id = ipaddress_cf_data(instance)
115
+ name, ttl, disable_ptr, zone_id = ipaddress_cf_data(instance)
116
116
 
117
117
  if zone_id is not None:
118
118
  instance.dns_name = f"{name}.{Zone.objects.get(pk=zone_id).name}"
@@ -120,6 +120,7 @@ def ip_address_update_dns_information(instance, **kwargs):
120
120
  instance.dns_name = ""
121
121
  instance.custom_field_data["ipaddress_dns_record_name"] = None
122
122
  instance.custom_field_data["ipaddress_dns_record_ttl"] = None
123
+ instance.custom_field_data["ipaddress_dns_record_disable_ptr"] = False
123
124
  instance.custom_field_data["ipaddress_dns_zone_id"] = None
124
125
 
125
126
 
@@ -131,7 +132,7 @@ def ip_address_update_address_record(instance, **kwargs):
131
132
  if not get_plugin_config("netbox_dns", "feature_ipam_coupling"):
132
133
  return
133
134
 
134
- name, ttl, zone_id = ipaddress_cf_data(instance)
135
+ name, ttl, disable_ptr, zone_id = ipaddress_cf_data(instance)
135
136
 
136
137
  if zone_id is None:
137
138
  #
@@ -1,3 +1,6 @@
1
+ from packaging import version
2
+ from django.conf import settings
3
+
1
4
  try:
2
5
  # NetBox 3.5.0 - 3.5.7, 3.5.9+
3
6
  from extras.plugins import get_plugin_config
@@ -118,7 +121,11 @@ class RelatedDNSObjects(PluginTemplateExtension):
118
121
  )
119
122
 
120
123
 
121
- template_extensions = [RelatedDNSObjects]
124
+ template_extensions = list()
125
+
126
+ if version.parse(settings.VERSION) < version.parse("3.7.0"):
127
+ template_extensions.append(RelatedDNSObjects)
128
+
122
129
  if get_plugin_config("netbox_dns", "feature_ipam_coupling"):
123
130
  template_extensions.append(RelatedDNSRecords)
124
131
  elif get_plugin_config("netbox_dns", "feature_ipam_dns_info"):
@@ -2,9 +2,17 @@
2
2
 
3
3
  {% if perms.netbox_dns.view_record %}
4
4
  {% if related_address_records %}
5
+ {% if related_address_records.rows|length == 1 %}
6
+ {% include 'inc/panel_table.html' with table=related_address_records heading='Related DNS Address Record' %}
7
+ {% else %}
5
8
  {% include 'inc/panel_table.html' with table=related_address_records heading='Related DNS Address Records' %}
6
9
  {% endif %}
10
+ {% endif %}
7
11
  {% if related_pointer_records %}
12
+ {% if related_pointer_records.rows|length == 1 %}
13
+ {% include 'inc/panel_table.html' with table=related_pointer_records heading='Related DNS Pointer Record' %}
14
+ {% else %}
8
15
  {% include 'inc/panel_table.html' with table=related_pointer_records heading='Related DNS Pointer Records' %}
9
16
  {% endif %}
10
17
  {% endif %}
18
+ {% endif %}
@@ -80,7 +80,7 @@
80
80
  {% endif %}
81
81
  <tr>
82
82
  <th scope="row">TTL</th>
83
- <td>{{ object.ttl }}</td>
83
+ <td>{{ object.ttl|placeholder }}</td>
84
84
  </tr>
85
85
  {% if object.type == 'A' or object.type == 'AAAA' %}
86
86
  <tr>
@@ -11,12 +11,15 @@ class DNSPermissionDenied(Exception):
11
11
  def ipaddress_cf_data(ip_address):
12
12
  name = ip_address.custom_field_data.get("ipaddress_dns_record_name")
13
13
  ttl = ip_address.custom_field_data.get("ipaddress_dns_record_ttl")
14
+ disable_ptr = ip_address.custom_field_data.get(
15
+ "ipaddress_dns_record_disable_ptr", False
16
+ )
14
17
  zone_id = ip_address.custom_field_data.get("ipaddress_dns_zone_id")
15
18
 
16
19
  if name is None or zone_id is None:
17
- return None, None, None
20
+ return None, None, False, None
18
21
 
19
- return name, ttl, zone_id
22
+ return name, ttl, disable_ptr, zone_id
20
23
 
21
24
 
22
25
  def address_record_type(ip_address):
@@ -36,7 +39,7 @@ def get_address_record(ip_address):
36
39
 
37
40
 
38
41
  def new_address_record(instance):
39
- name, ttl, zone_id = ipaddress_cf_data(instance)
42
+ name, ttl, disable_ptr, zone_id = ipaddress_cf_data(instance)
40
43
 
41
44
  if zone_id is None:
42
45
  return None
@@ -45,6 +48,7 @@ def new_address_record(instance):
45
48
  name=name,
46
49
  zone_id=zone_id,
47
50
  ttl=ttl,
51
+ disable_ptr=disable_ptr,
48
52
  status=address_record_status(instance),
49
53
  type=address_record_type(instance),
50
54
  value=str(instance.address.ip),
@@ -54,10 +58,11 @@ def new_address_record(instance):
54
58
 
55
59
 
56
60
  def update_address_record(record, ip_address):
57
- name, ttl, zone_id = ipaddress_cf_data(ip_address)
61
+ name, ttl, disable_ptr, zone_id = ipaddress_cf_data(ip_address)
58
62
 
59
63
  record.name = name
60
64
  record.ttl = ttl
65
+ record.disable_ptr = disable_ptr
61
66
  record.zone_id = zone_id
62
67
  record.status = address_record_status(ip_address)
63
68
  record.value = str(ip_address.address.ip)
@@ -86,6 +91,8 @@ def dns_changed(old, new):
86
91
  != new.custom_field_data.get("ipaddress_dns_record_name"),
87
92
  old.custom_field_data.get("ipaddress_dns_record_ttl")
88
93
  != new.custom_field_data.get("ipaddress_dns_record_ttl"),
94
+ old.custom_field_data.get("ipaddress_dns_record_disable_ptr")
95
+ != new.custom_field_data.get("ipaddress_dns_record_disable_ptr"),
89
96
  old.custom_field_data.get("ipaddress_dns_zone_id")
90
97
  != new.custom_field_data.get("ipaddress_dns_zone_id"),
91
98
  )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "netbox-plugin-dns"
3
- version = "0.21.12"
3
+ version = "0.21.14"
4
4
  description = "NetBox DNS is a NetBox plugin for managing DNS data."
5
5
  authors = ["Peter Eckel <pe-netbox-dns@hindenburgring.com>"]
6
6
  homepage = "https://github.com/peteeckel/netbox-plugin-dns"