netbox-plugin-dns 1.2.12__py3-none-any.whl → 1.2.14__py3-none-any.whl

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_dns/__init__.py CHANGED
@@ -4,7 +4,7 @@ from django.core.exceptions import ImproperlyConfigured
4
4
  from netbox.plugins import PluginConfig
5
5
  from netbox.plugins.utils import get_plugin_config
6
6
 
7
- __version__ = "1.2.12"
7
+ __version__ = "1.2.14"
8
8
 
9
9
 
10
10
  def _check_list(setting):
@@ -0,0 +1,35 @@
1
+ from django.core.management.base import BaseCommand
2
+
3
+ from netbox_dns.models import Record
4
+ from netbox_dns.choices import RecordTypeChoices
5
+
6
+
7
+ class Command(BaseCommand):
8
+ help = "Remove managed PTR records without an address record"
9
+
10
+ def handle(self, *model_names, **options):
11
+ orphaned_ptr_records = Record.objects.filter(
12
+ type=RecordTypeChoices.PTR,
13
+ address_record__isnull=True,
14
+ managed=True,
15
+ )
16
+
17
+ if not orphaned_ptr_records.exists():
18
+ if options.get("verbosity") >= 1:
19
+ self.stdout.write("No orphaned PTR records found")
20
+ return
21
+
22
+ if options.get("verbosity") >= 1:
23
+ self.stdout.write(
24
+ f"Removing {orphaned_ptr_records.count()} orphaned PTR record(s) ..."
25
+ )
26
+
27
+ for record in orphaned_ptr_records:
28
+ if options.get("verbosity") >= 2:
29
+ self.stdout.write(
30
+ f"removing PTR record {record} from zone {record.zone}"
31
+ )
32
+ record.delete()
33
+
34
+ if options.get("verbosity") >= 1:
35
+ self.stdout.write("... done.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: netbox-plugin-dns
3
- Version: 1.2.12
3
+ Version: 1.2.14
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
@@ -1,4 +1,4 @@
1
- netbox_dns/__init__.py,sha256=buGEXQ7YcNYRus_V5Gi8G2vPoKpgfwPcG9XKaiqIBvM,4891
1
+ netbox_dns/__init__.py,sha256=kzD4GMZiY25Zhn-hu0UMKe70zX8_t87DbTOVgbi7OjM,4891
2
2
  netbox_dns/apps.py,sha256=JCW5eS-AQBUubDJve1DjP-IRFKTFGQh1NLGWzJpC5MI,151
3
3
  netbox_dns/navigation.py,sha256=u90MwWBySg1Z9yfZEdvUctYWEkab5z1Y3019J7U_-3g,7741
4
4
  netbox_dns/template_content.py,sha256=irgHJe91TnmmL9K1Xnv07uGmOeJMn9zTrIKtJev88XI,4283
@@ -65,6 +65,7 @@ netbox_dns/locale/fr/LC_MESSAGES/django.mo,sha256=vL8TcVYyBiDFZ3GVdZe4Kkc42mmtbM
65
65
  netbox_dns/management/commands/cleanup_database.py,sha256=1-tAl0Sht80qaNZyfFyUW19Eh9gBUuc7GdbHN4aemGU,5935
66
66
  netbox_dns/management/commands/cleanup_rrset_ttl.py,sha256=UFRURLBcFeGHUS2lrYFv7UWIebjI72aG1EUQJt0XsXw,2046
67
67
  netbox_dns/management/commands/rebuild_dnssync.py,sha256=Tcl385u6kJTX47SvSyRzKm1RIx4nYRYCMcKr3uVnV60,1246
68
+ netbox_dns/management/commands/remove_orphaned_ptr_records.py,sha256=NLjphHXlS_wlXXFujAdybPqMvTRlGTw4LysCVgTqX88,1141
68
69
  netbox_dns/management/commands/setup_dnssync.py,sha256=qtVj6egSjclaQbuI60hLfl-zg89VJVbX-TB17f1k77Y,5730
69
70
  netbox_dns/management/commands/update_soa.py,sha256=Rj_Xk-qpwkAVRubVnM5OqSTwgzi93E0PqjwGb3rYjf0,660
70
71
  netbox_dns/migrations/0001_squashed_netbox_dns_0_15.py,sha256=3U0810NWSHPu2dTSHpfzlleDgwMS04FhJ_CkO76SDaw,10283
@@ -173,8 +174,8 @@ netbox_dns/views/registration_contact.py,sha256=c9KrNkfFNsb55pL74A5rN1CNx32M82V6
173
174
  netbox_dns/views/view.py,sha256=VfrKaLC9D_KNZNmRyFVohRlmMlMbtblAuPgNg0LNyf8,3421
174
175
  netbox_dns/views/zone.py,sha256=DU_esPOMHGMRQIgy5vS8miZe-FNozBcIyMLZPwZK4_c,7453
175
176
  netbox_dns/views/zone_template.py,sha256=IIW1lr6RQmhShtqJu6A6LnHdxdBrkkZQHxIDSTqQeyc,2705
176
- netbox_plugin_dns-1.2.12.dist-info/licenses/LICENSE,sha256=I3tDu11bZfhFm3EkV4zOD5TmWgLjnUNLEFwrdjniZYs,1112
177
- netbox_plugin_dns-1.2.12.dist-info/METADATA,sha256=Y6RPO7olPPhg4uGylHBCkxoIy2mcN62E2KkLsQiCays,7659
178
- netbox_plugin_dns-1.2.12.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
179
- netbox_plugin_dns-1.2.12.dist-info/top_level.txt,sha256=sA1Rwl1mRKvMC6XHe2ylZ1GF-Q1NGd08XedK9Y4xZc4,11
180
- netbox_plugin_dns-1.2.12.dist-info/RECORD,,
177
+ netbox_plugin_dns-1.2.14.dist-info/licenses/LICENSE,sha256=I3tDu11bZfhFm3EkV4zOD5TmWgLjnUNLEFwrdjniZYs,1112
178
+ netbox_plugin_dns-1.2.14.dist-info/METADATA,sha256=2B9dZ5T38A7o1v_JPNB5IXP3Y0BId8goirMoRUp9s5Y,7659
179
+ netbox_plugin_dns-1.2.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
180
+ netbox_plugin_dns-1.2.14.dist-info/top_level.txt,sha256=sA1Rwl1mRKvMC6XHe2ylZ1GF-Q1NGd08XedK9Y4xZc4,11
181
+ netbox_plugin_dns-1.2.14.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5