-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix: Allow modifying NFS Export with valid zero values #186
base: main
Are you sure you want to change the base?
Conversation
Merging this branch will not change overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
@@ -103,23 +104,30 @@ type NFSExportModify struct { | |||
// NFS enforced security type for users accessing an NFS Export. | |||
MinSecurity string `json:"min_security,omitempty"` | |||
// Hosts with no access to the NFS export or its snapshots. | |||
NoAccessHosts []string `json:"no_access_hosts,omitempty"` | |||
// Empty list is a valid value, so omitempty should not be used. | |||
NoAccessHosts []string `json:"no_access_hosts"` |
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,
For all the hosts list, there are 'add' and 'remove' lists in NFSExportModify. Could you check if you can make use of those fields to add or remove a host from the list during modify operation.?
Removing omitempty for these lists have an effect on other Client library users.
// Specifies the user ID of the anonymous account. | ||
AnonymousUID int32 `json:"anonymous_UID,omitempty"` | ||
// Zero ID is a valid value, so omitempty should not be used. | ||
AnonymousUID int32 `json:"anonymous_UID"` |
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 am not sure if one can unset AnonymousUID and GID. If that is not allowed, let's not remove 'omitempty'.
PR Submission checklist
GitHub Issues
List the GitHub issues impacted by this PR:
Common PR Checklist:
Description of your changes:
Allowing patching NFS Export with valid zero values.
The JSON tag for NFS Owner Username field. Fixed that.
This fix is similar to #184
Tested via
Integration Tests