-
Notifications
You must be signed in to change notification settings - Fork 8
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
Rework Proxmox Cloud Provider #33
Conversation
Codecov ReportAttention: ❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
📢 Thoughts on this report? Let us know!. |
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.
chore (blocking): please add a changelog
Are you talking about a changelog as explained in https://docs.saltproject.io/en/latest/topics/development/changelog.html ? |
Yup. |
Added changelogs for the fixed issues. Is that enough or do we need a separate changelog for the rework like an extended version of this PRs description? I believe the remaining changes that are not listed in the other changelogs are these:
|
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.
Looks good 👍
What does this PR do?
Rework Proxmox Cloud Provider
What issues does this PR fix or reference?
Fixes: #9 #12 #21 #29
Previous Behavior
Removed undocumented features:
use_dns
flag that set the IP address by using a DNS resolver -> not quite sure why this was a thing. I guess they wanted to configure the IP only on their DNS server. But that indicates a bad network/server architecture.
verify_ssl
flag to disable ssl verification for the proxmox url -> big security nono, especially since the user account most likely is full-admin (MitM with admin creds)
_reconfigure_clone()
function that reconfigured a VM -> generally not a bad idea but badly implemented. it reconfigured right after cloning a VM inside the create() function instead of being a separate function.
using username and password as credentials needs a lot of code to use the correct CSRF token and ticket -> the correct way (with the currently supported API) is to use an API token that is scoped and has an expiration date
_get_properties()
a function to retrieve valid options for the API call which drops invalid options -> the cloud module shouldn't try to reimplement the proxmox API business logic but rather let the call fail and report back
New Behavior
The Proxmox cloud module is now basically a wrapper without reimplementing any business logic of Proxmox API. Instead, the proxmox API is used to check for correctness of inputs.
I updated the documentation and test cases, however, I'm not quite sure all of those tests make sense. I also don't know if chasing 100% code coverage is feasible.
Regarding the new functionality please check the documentation.
If anything is unclear we should probably add it to the documentation anyway.
While we're at it we should probably also remove the version coupling to salt. With the extensions now being in a separate repository they can (and should) be versioned independently. The documentation currently does not indicate that.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
No