Skip to content
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

[SRP] Add new property EnabledProtocols for file shares #7815

Closed
wants to merge 9 commits into from
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "res346",
"accountName": "sto666",
"shareName": "share1235",
"api-version": "2019-06-01",
"monitor": "true",
"fileShare": {
"properties": {
"enabledProtocols": "NFS"
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"enabledProtocols": "NFS"
}
}
},
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"enabledProtocols": "NFS"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
"x-ms-examples": {
"PutShares": {
"$ref": "./examples/FileSharesPut.json"
},
"Create NFS Shares": {
"$ref": "./examples/FileSharesPut_NFS.json"
}
},
"description": "Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. ",
Expand Down Expand Up @@ -524,6 +527,32 @@
"minimum": 1,
"maximum": 100000,
"description": "The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 100000."
},
"enabledProtocols": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding writable fields to a stable api version is seen as a breaking change and requires a new api version. See the section labeled 'New property added to response' in the following link. This was introduced long back to prevent breaking previous versions of the sdk.

https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/Breaking%20changes%20guidelines.md#new-property-added-to-response

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the server side, if the new properties did not show up in the request, we will no wipe them out. We have a lot of experience in adding new properties to storage account in the existing API version. It (Get-Put model) is not a concern from my prospect..

"type": "string",
"enum": [
"SMB",
"NFS"
],
"x-ms-enum": {
"name": "EnabledProtocols",
"modelAsString": true
},
"description": "Immutable property for file shares protocol.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more description for what the value means. What's the effect when specify each of the 2 values. What's the default value.

"x-ms-mutability": ["create", "read"]
},
"rootSquash": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum name is same as one of it's value (both "RootSquash"). This will make the .NET SDK code generated from it build fail.

"type": "string",
"enum": [
"NoRootSquash",
"RootSquash",
"AllSquash"
],
"x-ms-enum": {
"name": "RootSquashType",
"modelAsString": true
},
"description": "Reduction of the access rights for the remote superuser."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more description for What's the effect when specify each of the 3 values. What's the default value.

}
},
"description": "The properties of the file share."
Expand Down