-
Notifications
You must be signed in to change notification settings - Fork 4k
[Azure.Storage] Support defaultserviceversion #5219
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
Conversation
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.
Please add tests and I'll take a look.
@@ -115,7 +115,9 @@ CmdletsToExport = 'Get-AzureStorageTable', 'New-AzureStorageTableSASToken', | |||
'Set-AzureStorageContainerStoredAccessPolicy', |
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.
Please update the changelog with these changes.
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.
change log is added
@@ -115,7 +115,9 @@ CmdletsToExport = 'Get-AzureStorageTable', 'New-AzureStorageTableSASToken', | |||
'Set-AzureStorageContainerStoredAccessPolicy', | |||
'Start-AzureStorageBlobCopy', | |||
'Start-AzureStorageBlobIncrementalCopy', |
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.
Please add tests for your new cmdlets.
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.
As the Storage Client library request can't be record in Unit test framework, generally we don't add unit test in PowerShell solution for data plan cmdelts. We will add functional test for the new cmdelts in storage team regression test. Let me know if you would like to review the CR for the our team regression test.
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'd love to review the regression tests before this change goes into our repo.
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 Maddie,
Following is the CR link for the test cases. I have sent you another mail for the CR and attached the test log. You can see the powershell cmdelts tested and result validation of the test cases in the test log.
codeflow://open/?server=https%3A%2F%2Fmsazure.visualstudio.com%2F&review=One.664474&host=vso&alert=true
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 have added the Unit test for the service properties parse function as we discussed into the PR.
Please help to review.
aa596fd
to
3f4c69a
Compare
on-demand test updated: https://azuresdkci.westus2.cloudapp.azure.com/job/powershell-demand/331/ |
3f4c69a
to
c821f27
Compare
@blueww Cormac will take a look at this PR now, as he did the cmdlet review. |
@cormacpayne |
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.
@blueww a few minor comments that need to be addressed
|
||
### Example 1: Get Azure Storage services property of the Blob service | ||
``` | ||
C:\PS>Get-AzureStorageServiceProperty -ServiceType Blob |
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.
@blueww would you mind providing the output from this command as well so users have an idea of what will be returned?
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.
The output is provided
|
||
### Example 1: Set Blob Service DefaultServiceVersion to 2017-04-17 | ||
``` | ||
C:\PS>Set-AzureStorageServiceProperty -ServiceType Blob -DefaultServiceVersion 2017-04-17 |
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.
@blueww same comment about providing the corresponding output from running this command
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.
As we talked in the meeting, since we don't have output by default (output serviceProperties when user add -passthru, since this serviceProperties is set to server not get from server), so it's OK not add the output here.
/// <summary> | ||
/// Modify Azure Storage service properties | ||
/// </summary> | ||
[Cmdlet(VerbsCommon.Set, StorageNouns.StorageServiceProperty, SupportsShouldProcess = true), OutputType(typeof(PSSeriviceProperties))] |
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.
@blueww what do you think about changing the name of this cmdlet to Update-*
instead of Set-*
? It seems like when more parameters are added to this cmdlet, only the values of properties provided should be updated and the other values should remain the same.
The Update
verb is usually reserved for PATCH commands, which is what I think you would want to do in the future with this cmdlet, and the Set
verb is usually reserved for PUT commands. Let me know what you think.
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.
Has updated the cmdelts name to Update-AzureStorageServiceProperty, help and changelog also updated.
…roperty, and fix help
c821f27
to
ee0abd3
Compare
@cormacpayne |
@cormacpayne |
Description
This PR will support set/get Default service version in Powershell cmdlet.
The design is reviewed in https://github.com/Azure/azure-powershell-pr/wiki/Storage-Blob-Service-Default-Service-Version.
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines