Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom attributes label exclude filter #317

Merged
merged 4 commits into from
Jun 19, 2023

Conversation

muratbulat
Copy link
Contributor

Feature:

  • adds config option to exclude custom attribute label.

@bb-Ricardo
Copy link
Owner

Hey,

Thank you for your PR.

You can just generate the config using the -g option.

Also not sure if it would work like this. The config value needs to be turned into a list in order to match a label. But was not able to find where this is happening.

@muratbulat
Copy link
Contributor Author

Generated default ini file with -g parameter.

@bb-Ricardo
Copy link
Owner

thank you.

But it seems to match on a substring not a list item.

If you have following attributes:

  • VB_LAST_BACKUP
  • VB_LAST_BACKUP2
  • VB_LAST_BACKUP3

and set the filter to VB_LAST_BACKUP then all the others will be excluded as well. Or just VB which also would match or LAST_BACKUP which would match as well.

have a look here. This way it turns the comma separated string into a list:

if option.key == "host_management_interface_match":
option.set_value(quoted_split(option.value))
continue

@bb-Ricardo bb-Ricardo merged commit 5b15103 into bb-Ricardo:development Jun 19, 2023
@bb-Ricardo bb-Ricardo added this to the 1.5.0 milestone Jun 19, 2023
andreiKuznets0v pushed a commit to andreiKuznets0v/netbox-sync_try_vcloud that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants