-
Notifications
You must be signed in to change notification settings - Fork 234
Inventory: warning about query parameters that aren't valid for both devices and VMs #140
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
Comments
If we were to get rid of the warning, I'd be worried that if someone specified an invalid And tbh, we could have |
A more important bug related to this - if ansible_modules/plugins/inventory/nb_inventory.py Lines 563 to 564 in 2d6894b
|
Yeah I made an update to it since someone was having the issue of it returning all VMs if the query filter wasn't valid for VM. More input would be helpful but I assume if something doesn't match a filter, you wouldn't just want to get everything, but really would want more input from others to get the proper functionality |
My particular use case is using the I'm working right now on adding separate Maybe we can solve this by maintaining the existing behaviour - if you put a device or vm specific filter in |
Another thought - once the inventory is built there's no host variable that clearly identifies if a host is a physical device or a VM. You could infer it based on if variables like Might be nice if there was a And maybe a special |
I've specifically started with tests for netbox-community#140 new query_filters options and refresh_url
I've specifically started with tests for netbox-community#140 new query_filters options and refresh_url
I've specifically started with tests for netbox-community#140 new query_filters options and refresh_url
netbox-community#140) Wrote a quite little script to fetch these once-off when this list needs updating. In future, this list could be fetched at runtime by querying the API /api/docs/?format=openapi
I've specifically started with tests for netbox-community#140 new query_filters options and refresh_url
netbox-community#140) Wrote a quite little script to fetch these once-off when this list needs updating. In future, this list could be fetched at runtime by querying the API /api/docs/?format=openapi
…es this for us already (netbox-community#140)
Should this be closed via merge of #153 |
ISSUE TYPE
SOFTWARE VERSIONS
Ansible:
2.9.6
Netbox:
2.7.10
Collection:
v0.1.10
SUMMARY
STEPS TO REPRODUCE
Add to the inventory yml:
EXPECTED RESULTS
Filter devices to only those that have primary IPs set (ie. exclude patch panels and passive devices), not show any warning.
ACTUAL RESULTS
Seems to work, but prints the following warning:
Not sure how this should be fixed. The fundamental issue is the
query_filters
setting is validated against 2 separate lists of parametes. Either need to only report a warning if a filter isn't valid for either, or have allow users to set a separate set of filters for devices and VMs.I beleive this was introduced by #63 #103
The text was updated successfully, but these errors were encountered: