-
Notifications
You must be signed in to change notification settings - Fork 234
Inventory bug: services queried by device name doesn't work for VMs, or names with spaces #142
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
This issue is similar to #156. It might be a good idea to look at generalizing "use ID (device or VM) instead of device" to be used everywhere. The Ansible bundled Netbox has had PRs for fixing it for ages but IIRC this module does not share code with it? |
@bluikko Devices and VMs are totally separate things - their IDs and names do not share a namespace. That means you can have a device and a VM using the same IDs and same names. Everything in this collection will need to maintain the devices and VMs separately, and have separate parameters to specify if you're referring to a device or VM. Unfortunately the implementation of the inventory plugin and the modules is completely separate right now, so there's 2 separate pieces of work right now. The "Ansible bundled Netbox" no longer exists as of ansible/ansible@bdd82ad and will not be included in Ansible 2.10 - this collection is its new home. The benefit is that it's much easier to manage issues and pull requests separately than in the thousands and thousands of them held up in the Ansible project. (And we can also do better integration testing now) |
I see, I've not looked into how devices/VMs are represented. I am 100% sure there were PRs in the Ansible repo that were supposed to enable actions against VMs similarly to devices. Perhaps they then have a "type" parameter or separate device/vm name parameters. |
You know there was threading added to pynetbox for I think the threading does require Python 3.6 though so up to you. |
Yeah I started having a closer look at how it handles threading compared to So, I'm thinking it'll be quicker to just resolve these last few issues without introducing |
… interfaces/services. A side effect is it resolves netbox-community#142 fetching services for VMs Includes starting to better support virtual chasis - should only take the master device and not the children. Some work on this started in ansible/ansible#60642
… interfaces/services. A side effect is it resolves netbox-community#142 fetching services for VMs Includes starting to better support virtual chasis - should only take the master device and not the children. Some work on this started in ansible/ansible#60642 See the TODO comments for work still to be done before being ready to merge.
… interfaces/services. A side effect is it resolves netbox-community#142 fetching services for VMs Includes better support virtual chasis - only take the master device and not the children. Some of this from ansible/ansible#60642 See the TODO comments for work still to be done before being ready to merge.
ISSUE TYPE
SOFTWARE VERSIONS
Ansible:
2.9.6
Netbox:
2.7.10
Collection:
0.10.1
SUMMARY
There are a few issues here: When the inventory queries the Netbox API for a list of services:
I plan to work on fixing this, by always querying for list of services by ID, and properly constructing the URL for either device or VM query.
STEPS TO REPRODUCE
Here is my inventory yaml file:
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: