From 43555c2229092a043f4d2f0e2e803df7b3e51120 Mon Sep 17 00:00:00 2001 From: Peter Eckel Date: Wed, 20 Nov 2024 18:06:13 +0100 Subject: [PATCH] Provided slightly more detailed debugging for rebuild_dnssync --- netbox_dns/management/commands/rebuild_dnssync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netbox_dns/management/commands/rebuild_dnssync.py b/netbox_dns/management/commands/rebuild_dnssync.py index e3936a4b..049083b7 100644 --- a/netbox_dns/management/commands/rebuild_dnssync.py +++ b/netbox_dns/management/commands/rebuild_dnssync.py @@ -2,7 +2,7 @@ from ipam.models import IPAddress -from netbox_dns.utilities import update_dns_records +from netbox_dns.utilities import update_dns_records, get_zones class Command(BaseCommand): @@ -22,6 +22,8 @@ def handle(self, *model_names, **options): self.stdout.write( f"Updating DNS records for IP Address {ip_address}, VRF {ip_address.vrf}" ) + if options.get("verbosity") >= 3: + self.stdout.write(f" Zones: {get_zones(ip_address)}") if ( update_dns_records(ip_address, force=options.get("force")) and options.get("verbosity") >= 1