Add VM id and VM host to opennebula inventory data
SUMMARY
To enable greater use of the inventory, add the ID of the VM, and the hostname of the host the VM is running on to the inventory outputISSUE TYPE
- Feature Pull Request
COMPONENT NAME
opennebula.pyADDITIONAL INFORMATION
"host": "foo23.host",
"id": 1234,
cc @feldsam click here for bot help
Not sure why the tests are failing as I'm not adding a new import for the pyone library...?
Hi, problem is, that you added new method which is calling pyone package. To pass test, you need to also update tests to reflect this.
Anyway, for such infromation - host on which is VM running, there is easier method to get this. It is already in VM object, in history records, you just need to get last history record of VM to get host. So no need to do aditional api call and searching for host.
@feldsam updated PR to reflect the new information you provided. It's a very simple PR now!
I'm afraid I don't understand how to fix the tests.
@abakanovskii noticed you've created a few OpenNebula PRs with good tests. Any chance you could take a look at this small inventory improvement please?
Hello @aioue! See comments below, I will commit them if you don't mind
@aioue Could you provide me access to your repository so I can commit changes directly to this PR?
@aioue Could you provide me access to your repository so I can commit changes directly to this PR?
Thank you! Have invited you as a collaborator.
@aioue this PR contains the following merge commits:
- https://github.com/ansible-collections/community.general/commit/43ed9c851db62f1a59fc471961f7bbadb420484a
Please rebase your branch to remove these commits.
@aioue This PR was evaluated as a potentially problematic PR for the following reasons:
- More than 50 changed files.
- More than 50 commits.
Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on Libera.chat IRC
Made a mess of that rebase 🤦 I should learn more before trying this again.
Made a mess of that rebase 🤦 I should learn more before trying this again.
haha, same thing happened to me before :)
there was still a merge commit hanging, now it should be fine
Thank you @abakanovskii 🙌
Appreciate your time and skilled help with this.
Looks good to me as far as I can judge this. If nobody objects, I'll merge this on the weekend.
Backport to stable-9: 💚 backport PR created
✅ Backport PR branch: patchback/backports/stable-9/24b74cc4b9976dd0e3cacf94316e4d131c409fbf/pr-8532
Backported as https://github.com/ansible-collections/community.general/pull/9003
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
@aioue @abakanovskii thanks for your contribution! @feldsam @russoz thanks for reviewing!
@felixfontein possibly silly question, but should the commit message leak email addresses like that?
@aioue that's how GitHub works, if you don't tell it to hide your email address in commit messages. (https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors#creating-co-authored-commits-on-the-command-line)
(I'm not sure whether the Co-authored-by: name <email> syntax is GitHub specific or also used elsewhere in the Git ecosystem.)