Skip to content

Commit

Permalink
[Storage] Update StorageAccount.KeyCreationTime type (#20219)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueww authored Apr 12, 2021
1 parent 97d47c6 commit 7276cc9
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 14 deletions.
5 changes: 3 additions & 2 deletions eng/mgmt/mgmtmetadata/storage_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/storage/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\code\srpsdk\sdk\storage\Microsoft.Azure.Management.Storage\src\Generated
2021-03-25 08:19:48 UTC
Autorest CSharp Version: 2.3.90
2021-04-08 09:43:18 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: fe28323894e41f58ee668f4f6542956197f0baca
Commit: 5d89c9807d3e84a5890b381a68a308198f9ef141
AutoRest information
Requested version: v2
Bootstrapper version: [email protected]
6 changes: 6 additions & 0 deletions sdk/storage/Microsoft.Azure.Management.Storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Microsoft.Azure.Management.Storage release notes

### Changes in 21.0.0

**Breaking changes**

- StorageAccount.KeyCreationTime type change from Dictionary to 'Microsoft.Azure.Management.Storage.Models.KeyCreationTime'.

### Changes in 20.0.0
- Upgrade to rest api version 2021-02-01.
- Support KeyPolicy,SasPolicy in create/update Storage account.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Development of this library has shifted focus to the Azure Unified SDK. The future development will be focused on "Azure.ResourceManager.Storage" (https://www.nuget.org/packages/Azure.ResourceManager.Storage/). Please see the package changelog for more information.
</Description>
<AssemblyName>Microsoft.Azure.Management.Storage</AssemblyName>
<Version>20.0.0</Version>
<Version>21.0.0</Version>
<PackageTags>Microsoft Azure Storage management;Storage;Storage management;</PackageTags>
<PackageReleaseNotes>See https://aka.ms/asdotnetsdkchangelog for release notes.</PackageReleaseNotes>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
[assembly: AssemblyTitle("Microsoft Azure Storage Management Library")]
[assembly: AssemblyDescription("Provides Microsoft Azure Storage management functions for managing the Microsoft Azure Storage service.")]

[assembly: AssemblyVersion("20.0.0.0")]
[assembly: AssemblyFileVersion("19.0.0.0")]
[assembly: AssemblyVersion("21.0.0.0")]
[assembly: AssemblyFileVersion("21.0.0.0")]

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,6 @@ public void StorageAccountSASKeyPolicy()
var account = storageMgmtClient.StorageAccounts.Create(rgname, accountName, parameters);
StorageManagementTestUtilities.VerifyAccountProperties(account, false);
Assert.Equal(2, account.KeyPolicy.KeyExpirationPeriodInDays);
//Assert.Equal(ExpirationAction.Log, account.SasPolicy.ExpirationAction);
Assert.Equal("2.02:03:59", account.SasPolicy.SasExpirationPeriod);

// Update storage account type
Expand All @@ -2622,14 +2621,16 @@ public void StorageAccountSASKeyPolicy()
};
account = storageMgmtClient.StorageAccounts.Update(rgname, accountName, updateParameters);
Assert.Equal(9, account.KeyPolicy.KeyExpirationPeriodInDays);
//Assert.Equal(ExpirationAction.Log, account.SasPolicy.ExpirationAction);
Assert.Equal("0.02:03:59", account.SasPolicy.SasExpirationPeriod);
Assert.NotNull(account.KeyCreationTime.Key1);
Assert.NotNull(account.KeyCreationTime.Key2);

// Validate
account = storageMgmtClient.StorageAccounts.GetProperties(rgname, accountName);
Assert.Equal(9, account.KeyPolicy.KeyExpirationPeriodInDays);
//Assert.Equal(ExpirationAction.Log, account.SasPolicy.ExpirationAction);
Assert.Equal("0.02:03:59", account.SasPolicy.SasExpirationPeriod);
Assert.NotNull(account.KeyCreationTime.Key1);
Assert.NotNull(account.KeyCreationTime.Key2);
}
}
}
Expand Down

0 comments on commit 7276cc9

Please sign in to comment.