Skip to content

Commit 3851012

Browse files
committedMar 15, 2023
fixes issue with pruning data bb-Ricardo#273
1 parent 513bcab commit 3851012

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎module/netbox/connection.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,8 @@ def prune_data(self):
708708

709709
log.info("Pruning orphaned data in NetBox")
710710

711-
disabled_sources_tags = [x.source_tag for x in self.inventory.source_list if getattr(x, "enabled") is False]
711+
disabled_sources_tags = \
712+
[x.source_tag for x in self.inventory.source_list if grab(x, "settings.enabled", fallback=False) is False]
712713

713714
# update all items in NetBox accordingly
714715
today = datetime.now()

‎module/sources/vmware/config.py

+4
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ def __init__(self):
293293
bool,
294294
description="disables syncing of any VLANs visible in vCenter to NetBox",
295295
default_value=False),
296+
ConfigOption("exclude_vlan_by_name",
297+
str),
298+
ConfigOption("exclude_vlan_by_id",
299+
str),
296300
ConfigOption("track_vm_host",
297301
bool,
298302
description="""enabling this option will add the ESXi host

0 commit comments

Comments
 (0)