-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
OpenNebula/one_vm implement the one.vm.updateconf API call #5812
OpenNebula/one_vm implement the one.vm.updateconf API call #5812
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sk4zuzu
Thank you for the contribution! Please add a changelog fragment.
I saw you wrote tests, but only for the module_utils
stuff. It would be great if you could think of tests to the actual update_conf()
code. It might be something for another PR though, I will defer that decision to your judgement.
Cheers
Co-authored-by: Alexei Znamensky <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
Hello @russoz Thank you for the review.
Done. :)
Actually I was thinking about it and concluded this should be some other PR, that's because there were no tests for The CI checks fail for python2.6, is it something that needs to addressed? I believe python 2.6 is not listed here. 🤔 Cheers |
Yes, this needs to be adressed (otherwise CI wouldn't complain). ansible-core 2.11 (which this collection still supports) supports Python 2.6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. I've added some comments.
Co-authored-by: Felix Fontein <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this codebase, but from a generic Ansible POV this looks ok. If nobody objects in the next two weeks, I'll merge this.
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #5905 🤖 @patchback |
* opennebula: Add template manipulation helpers * one_vm: Use 'updateconf' API call to modify running VMs * one_vm: Emulate 'updateconf' API call for newly created VMs * opennebula/one_vm: Satisfy linter checks * opennebula/one_vm: Apply suggestions from code review Co-authored-by: Alexei Znamensky <[email protected]> * opennebula/one_vm: Drop 'extend' function, use 'dict_merge' instead * Add changelog fragment * one_vm: Refactor 'parse_updateconf' function * opennebula/one_vm: Apply suggestions from code review Co-authored-by: Felix Fontein <[email protected]> * one_vm: Allow for using updateconf in all scenarios --------- Co-authored-by: Alexei Znamensky <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 8818a6f)
…e one.vm.updateconf API call (#5905) OpenNebula/one_vm implement the one.vm.updateconf API call (#5812) * opennebula: Add template manipulation helpers * one_vm: Use 'updateconf' API call to modify running VMs * one_vm: Emulate 'updateconf' API call for newly created VMs * opennebula/one_vm: Satisfy linter checks * opennebula/one_vm: Apply suggestions from code review Co-authored-by: Alexei Znamensky <[email protected]> * opennebula/one_vm: Drop 'extend' function, use 'dict_merge' instead * Add changelog fragment * one_vm: Refactor 'parse_updateconf' function * opennebula/one_vm: Apply suggestions from code review Co-authored-by: Felix Fontein <[email protected]> * one_vm: Allow for using updateconf in all scenarios --------- Co-authored-by: Alexei Znamensky <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 8818a6f) Co-authored-by: Michal Opala <[email protected]>
SUMMARY
OpenNebula provides the one.vm.updateconf API call, that can be used to modify the context of a VM. For example
SSH_PUBLIC_KEY
,PASSWORD
or evenSTART_SCRIPT
variables can be set. This PR implements exactly that, it allows for updating running VMs and setting the same parameters for freshly created ones. We believe this can prove useful for some users.ISSUE TYPE
COMPONENT NAME
one_vm module
ADDITIONAL INFORMATION
NA