-
Notifications
You must be signed in to change notification settings - Fork 288
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
Refactoring to fail on vsphere perms validations #6188
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6188 +/- ##
==========================================
- Coverage 75.03% 75.01% -0.02%
==========================================
Files 448 448
Lines 37040 36971 -69
==========================================
- Hits 27792 27734 -58
- Misses 7673 7675 +2
+ Partials 1575 1562 -13
|
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.
/lgtm
pkg/providers/vsphere/validator.go
Outdated
privs, err = v.getMissingPrivs(ctx, vsc, path, t, privsContent, username) | ||
if err != nil { | ||
return passed, err | ||
return passed, fmt.Errorf("failed to get missing privs: %v", err) |
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.
If this error is something we return to the users, should we be more explicit and say privileges or permissions?
return passed, fmt.Errorf("failed to get missing privs: %v", err) | |
return passed, fmt.Errorf("failed to get missing privileges: %v", err) |
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.
ah yes!
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pokearu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue #5865:
Description of changes:
Modified to fail on vsphere missing user permissions.
Testing:
Created a user with missing permissions and tested validations. Now the error shows as
Tested creating a cluster
Documentation added/planned :
Plan to document the change in user experience.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.