-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Feature/storage/share enable protocol share squash root #16123
Merged
seanmcc-msft
merged 9 commits into
Azure:feature/storage/stg75base
from
seanmcc-msft:feature/storage/shareEnableProtocolShareSquashRoot
Nov 6, 2020
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
be1bca7
Working on Share Enabled Protocols and Share Squash Root
seanmcc-msft bc62a6d
Merge branch 'feature/storage/stg75base' into feature/storage/shareEn…
seanmcc-msft b26111a
Added more tests
seanmcc-msft c17c133
recorded tests
seanmcc-msft 150e578
Merge branch 'feature/storage/stg75base' into feature/storage/shareEn…
seanmcc-msft b26c26e
PR comments
seanmcc-msft 0e5c148
PR comments
seanmcc-msft b7ce85d
PR comments
seanmcc-msft 06c6551
PR comments
seanmcc-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note that
EnabledProtocols
is a string, butRootSquash
is an enum. I did this because it is not possible to create a Flags enum in swagger, and in the future, it will be possible enable multiple protocols on a share. I manually created a Flags EnumShareEnabledProtocols
to be used inShareCreateOptions
. To use the flag enum here, we would have to make the original generatedShareProperties
class internal, and hand-write a new one and the conversion between. This would also break swagger for the other platforms. We can do this, but it would be more work.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 think enum here would be better experience. Otherwise we're asking customer to parse the property themselves - it really contains a list - maybe this should be list of enums?
I.e. in Java this probably would be something like https://github.com/Azure/azure-sdk-for-java/blob/52bd42b258c242af24fe59a80fb2bed9a324b201/sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java#L14
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 think use
string
in generated code is fine and we should do some wrapping in the convenience layer.Note that in the future, the possible values for the
EnabledProtocols
could be"SMB"/"NFS" without version is to support all versions. And "SMBv2;SMBv3;" is to support both SMB v2 and v3.
To me, this is similar to the
include
option of List Blob except that the service is accepting a joined string instead of an array.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.
@ljian3377, we are going to leave this as a string in the generated code, but we are going to make it a flags enum in the ShareItem that is actually returned to the customer.