Skip to content

Commit

Permalink
fixes issue with pruning data bb-Ricardo#273
Browse files Browse the repository at this point in the history
  • Loading branch information
bb-Ricardo authored and kuznetsov andrei committed Oct 9, 2024
1 parent 8a8f217 commit d41ef3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/netbox/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@ def prune_data(self):

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

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

# update all items in NetBox accordingly
today = datetime.now()
Expand Down
4 changes: 4 additions & 0 deletions module/sources/vmware/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ def __init__(self):
bool,
description="disables syncing of any VLANs visible in vCenter to NetBox",
default_value=False),
ConfigOption("exclude_vlan_by_name",
str),
ConfigOption("exclude_vlan_by_id",
str),
ConfigOption("track_vm_host",
bool,
description="""enabling this option will add the ESXi host
Expand Down

0 comments on commit d41ef3d

Please sign in to comment.