Skip to content

Adding new parameters ro all_hosts_filter filter#62

Merged
Tishka17 merged 3 commits intoannetutil:mainfrom
krasotinpa:new_params/all_hosts_filter
Aug 11, 2025
Merged

Adding new parameters ro all_hosts_filter filter#62
Tishka17 merged 3 commits intoannetutil:mainfrom
krasotinpa:new_params/all_hosts_filter

Conversation

@krasotinpa
Copy link
Copy Markdown
Contributor

... has_oob_ip, has_primary_ip, location_id

Value of location_id must be int

Example:

storage:
  netbox:
    adapter: netbox
    params:
      ...
      all_hosts_filter:
        has_primary_ip: [true]
        has_oob_ip: [false]
        location_id: [3]

…primary_ip, location_id

Value of `location_id` must be int

Example:
```yaml
storage:
  netbox:
    adapter: netbox
    params:
      ...
      all_hosts_filter:
        has_primary_ip: [true]
        has_oob_ip: [false]
        location_id: [3]
```
@Tishka17
Copy link
Copy Markdown
Collaborator

Can we use list[int] in type hint if it is needed to be int? If there any problems with serialization,pls, share

@krasotinpa
Copy link
Copy Markdown
Contributor Author

Yes, you are right. location_id is definitely list[int].
Even more: variable has_oob_ip and has_primary_ip cannot be a list. They are simple boolean.

I've added commit changing it.

Configuration will liiks like:

storage:
  netbox:
    adapter: netbox
    params:
      ...
      all_hosts_filter:
        has_primary_ip: true
        has_oob_ip: false
        location_id: [3]

@Tishka17 Tishka17 merged commit adf81c0 into annetutil:main Aug 11, 2025
3 checks passed
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