Skip to content

Custom attributes label exclude filter#317

Merged
bb-Ricardo merged 4 commits into
bb-Ricardo:developmentfrom
muratbulat:development
Jun 19, 2023
Merged

Custom attributes label exclude filter#317
bb-Ricardo merged 4 commits into
bb-Ricardo:developmentfrom
muratbulat:development

Conversation

@muratbulat

Copy link
Copy Markdown
Contributor

Feature:

  • adds config option to exclude custom attribute label.

@bb-Ricardo

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Generated default ini file with -g parameter.

@bb-Ricardo

Copy link
Copy Markdown
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