Skip to content

Commit

Permalink
fixes cluster include/exclude filter and clarify filtering in setting…
Browse files Browse the repository at this point in the history
…s example
  • Loading branch information
bb-Ricardo committed Aug 26, 2022
1 parent 7ce3a0f commit 0d84a8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion module/sources/vmware/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ def add_cluster(self, obj):

# check for full name and then for cluster name only
if self.passes_filter(full_cluster_name, self.cluster_include_filter, self.cluster_exclude_filter) is False \
and self.passes_filter(name, self.cluster_include_filter, self.cluster_exclude_filter) is False:
or self.passes_filter(name, self.cluster_include_filter, self.cluster_exclude_filter) is False:
return

site_name = self.get_site_name(NBCluster, full_cluster_name)
Expand Down
3 changes: 3 additions & 0 deletions settings-example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ permitted_subnets = 172.16.0.0/12, 10.0.0.0/8, 192.168.0.0/16, fd00::/8
# Include filters are checked first and exclude filters after. An object name has to
# pass both filters to be synced to NetBox. If a filter is unset it will be ignored.
# Filters are all treated as regex expressions!
# If more then one expression should match a '|' needs to be used
# Example: (exclude all VMs with "replica" in their name and all VMs starting with "backup")
# vm_exclude_filter = *.replica.*|^backup.*

# If a cluster is excluded from sync then ALL VMs and HOSTS inside the cluster will
# be ignored!
Expand Down

0 comments on commit 0d84a8a

Please sign in to comment.