aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHåkon Solbjørg <hakon@solbj.org>2023-04-02 12:23:45 +0200
committerHåkon Solbjørg <hakon@solbj.org>2023-04-02 12:23:45 +0200
commit60167e892e85dd8879a4f57c8f76515917975765 (patch)
tree38b1d34f914fd02a6061c2ae47732fa2de573df9 /tools
parentdbd488d021098321b37cfd284bb0ea4e08d8a8aa (diff)
fix(netbox2gondul): Skip importing invalid configured devices
Diffstat (limited to 'tools')
-rw-r--r--tools/netbox/scripts/netbox2gondul/netbox2gondul.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/netbox/scripts/netbox2gondul/netbox2gondul.py b/tools/netbox/scripts/netbox2gondul/netbox2gondul.py
index 0613350..400e257 100644
--- a/tools/netbox/scripts/netbox2gondul/netbox2gondul.py
+++ b/tools/netbox/scripts/netbox2gondul/netbox2gondul.py
@@ -205,8 +205,8 @@ class Netbox2Gondul(Script):
# sanity check
for device in input_devices:
if not device.primary_ip4 and not device.primary_ip6:
- self.log_failure(f'Device <a href="{device.get_absolute_url()}">{device.name}</a> is missing primary IPv4 and IPv6 address.')
- return
+ self.log_warning(f'Device <a href="{device.get_absolute_url()}">{device.name}</a> is missing primary IPv4 and IPv6 address, skipping...')
+ continue
vlan: VLAN = None
prefix_v4: Prefix = None
@@ -224,8 +224,8 @@ class Netbox2Gondul(Script):
self.log_warning(f'Device <a href="{device.get_absolute_url()}">{device.name}</a> is missing primary IPv6 address.')
if prefix_v4 is not None and prefix_v6 is not None and prefix_v4.vlan != prefix_v6.vlan:
- self.log_failure(f'VLANs differ for the IPv4 and IPv6 addresses.')
- return
+ self.log_warning(f'VLANs differ for the IPv4 and IPv6 addresses, skipping...')
+ continue
networks.append(self.network_to_gondul_format(vlan, prefix_v4, prefix_v6))