From f313b67c41d9ad381f8e12139940ea71a00e9507 Mon Sep 17 00:00:00 2001 From: Wei Wei Date: Fri, 3 Apr 2020 23:05:52 +0800 Subject: [PATCH] [Storage] Add breaking notice for File cmdlets in Build --- src/Storage/Storage.Management/ChangeLog.md | 1 + src/Storage/Storage/File/Cmdlet/GetAzureStorageFile.cs | 2 ++ src/Storage/Storage/File/Cmdlet/GetAzureStorageFileContent.cs | 2 ++ src/Storage/Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs | 2 ++ src/Storage/Storage/File/Cmdlet/GetAzureStorageShare.cs | 2 ++ src/Storage/Storage/File/Cmdlet/NewAzureStorageDirectory.cs | 2 ++ src/Storage/Storage/File/Cmdlet/NewAzureStorageShare.cs | 2 ++ src/Storage/Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs | 2 ++ src/Storage/Storage/File/Cmdlet/RemoveAzureStorageFile.cs | 2 ++ src/Storage/Storage/File/Cmdlet/RemoveAzureStorageShare.cs | 2 ++ src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs | 2 ++ src/Storage/Storage/File/Cmdlet/SetAzureStorageShareQuota.cs | 2 ++ src/Storage/Storage/File/Cmdlet/StartAzureStorageFileCopy.cs | 2 ++ 13 files changed, 25 insertions(+) diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md index df3461394725..ad19f1e0044c 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Add breaking change notice for Azure File cmdlets output change in a future release ## Version 1.13.0 * Supported AllowProtectedAppendWrite in ImmutabilityPolicy diff --git a/src/Storage/Storage/File/Cmdlet/GetAzureStorageFile.cs b/src/Storage/Storage/File/Cmdlet/GetAzureStorageFile.cs index 34e5e1024944..b11df81d6a26 100644 --- a/src/Storage/Storage/File/Cmdlet/GetAzureStorageFile.cs +++ b/src/Storage/Storage/File/Cmdlet/GetAzureStorageFile.cs @@ -16,12 +16,14 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { using Microsoft.Azure.Storage; using Microsoft.Azure.Storage.File; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Globalization; using System.Management.Automation; using System.Net; [Cmdlet("Get", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFile", DefaultParameterSetName = Constants.ShareNameParameterSetName)] [OutputType(typeof(CloudFile))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFile to AzureStorageFile, and AzureStorageFile will have CloudFile as a child property.")] public class GetAzureStorageFile : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileContent.cs b/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileContent.cs index 31ff937c583d..1623192bdf15 100644 --- a/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileContent.cs +++ b/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileContent.cs @@ -28,9 +28,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet using LocalDirectory = System.IO.Directory; using LocalPath = System.IO.Path; using System.Runtime.InteropServices; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; [Cmdlet("Get", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFileContent", SupportsShouldProcess = true, DefaultParameterSetName = LocalConstants.ShareNameParameterSetName)] [OutputType(typeof(CloudFile))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFile to AzureStorageFile, and AzureStorageFile will have CloudFile as a child property.")] public class GetAzureStorageFileContent : StorageFileDataManagementCmdletBase, IDynamicParameters { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs b/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs index 016c1fb49d1c..1d5147fef26e 100644 --- a/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs +++ b/src/Storage/Storage/File/Cmdlet/GetAzureStorageFileCopyState.cs @@ -22,11 +22,13 @@ using System.Security.Permissions; using System.Threading; using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { [Cmdlet("Get", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFileCopyState")] [OutputType(typeof(CloudFile))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFile to AzureStorageFile, and AzureStorageFile will have CloudFile as a child property.")] public class GetAzureStorageFileCopyStateCommand : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/GetAzureStorageShare.cs b/src/Storage/Storage/File/Cmdlet/GetAzureStorageShare.cs index 5f416aa71553..c954189530c1 100644 --- a/src/Storage/Storage/File/Cmdlet/GetAzureStorageShare.cs +++ b/src/Storage/Storage/File/Cmdlet/GetAzureStorageShare.cs @@ -21,9 +21,11 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet using System; using System.Globalization; using System.Management.Automation; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; [Cmdlet("Get", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageShare", DefaultParameterSetName = Constants.MatchingPrefixParameterSetName)] [OutputType(typeof(CloudFileShare))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFileShare to AzureStorageFileShare, and AzureStorageFileShare will have CloudFileShare as a child property.")] public class GetAzureStorageShare : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/NewAzureStorageDirectory.cs b/src/Storage/Storage/File/Cmdlet/NewAzureStorageDirectory.cs index 4f78790f3dda..48d07cdf8156 100644 --- a/src/Storage/Storage/File/Cmdlet/NewAzureStorageDirectory.cs +++ b/src/Storage/Storage/File/Cmdlet/NewAzureStorageDirectory.cs @@ -15,10 +15,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { using Microsoft.Azure.Storage.File; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Globalization; using System.Management.Automation; [Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageDirectory", DefaultParameterSetName = Constants.ShareNameParameterSetName), OutputType(typeof(CloudFileDirectory))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFileDirectory to AzureStorageFileDirectory, and AzureStorageFileDirectory will have CloudFileDirectory as a child property.")] public class NewAzureStorageDirectory : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/NewAzureStorageShare.cs b/src/Storage/Storage/File/Cmdlet/NewAzureStorageShare.cs index c472b664c992..bcd850c4161a 100644 --- a/src/Storage/Storage/File/Cmdlet/NewAzureStorageShare.cs +++ b/src/Storage/Storage/File/Cmdlet/NewAzureStorageShare.cs @@ -16,8 +16,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { using System.Management.Automation; using Azure.Storage.File; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; [Cmdlet("New", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageShare", DefaultParameterSetName = Constants.ShareNameParameterSetName), OutputType(typeof(CloudFileShare))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFileShare to AzureStorageFileShare, and AzureStorageFileShare will have CloudFileShare as a child property.")] public class NewAzureStorageShare : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs b/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs index 5ee4606242ba..ab48cfefbbe4 100644 --- a/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs +++ b/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageDirectory.cs @@ -15,10 +15,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { using Microsoft.Azure.Storage.File; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Globalization; using System.Management.Automation; [Cmdlet("Remove", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageDirectory",SupportsShouldProcess = true,DefaultParameterSetName = Constants.ShareNameParameterSetName), OutputType(typeof(CloudFileDirectory))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFileDirectory to AzureStorageFileDirectory, and AzureStorageFileDirectory will have CloudFileDirectory as a child property.")] public class RemoveAzureStorageDirectory : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageFile.cs b/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageFile.cs index a0b3e27ffce0..fb5596be1edb 100644 --- a/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageFile.cs +++ b/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageFile.cs @@ -15,10 +15,12 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { using Microsoft.Azure.Storage.File; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System.Globalization; using System.Management.Automation; [Cmdlet("Remove", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFile",SupportsShouldProcess = true,DefaultParameterSetName = Constants.ShareNameParameterSetName), OutputType(typeof(CloudFile))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFile to AzureStorageFile, and AzureStorageFile will have CloudFile as a child property.")] public class RemoveAzureStorageFile : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageShare.cs b/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageShare.cs index 9dfa85adb597..80167576ce01 100644 --- a/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageShare.cs +++ b/src/Storage/Storage/File/Cmdlet/RemoveAzureStorageShare.cs @@ -19,8 +19,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet using Microsoft.Azure.Storage.File; using System.Globalization; using System.Management.Automation; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; [Cmdlet("Remove", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageShare",DefaultParameterSetName = Constants.ShareNameParameterSetName,SupportsShouldProcess = true), OutputType(typeof(CloudFileShare))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFileShare to AzureStorageFileShare, and AzureStorageFileShare will have CloudFileShare as a child property.")] public class RemoveAzureStorageShare : AzureStorageFileCmdletBase { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs b/src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs index 4b0e83abd94c..891508212728 100644 --- a/src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs +++ b/src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs @@ -28,8 +28,10 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet using LocalConstants = Microsoft.WindowsAzure.Commands.Storage.File.Constants; using System.Runtime.InteropServices; using Microsoft.Azure.Storage.DataMovement; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; [Cmdlet("Set", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFileContent", SupportsShouldProcess = true, DefaultParameterSetName = LocalConstants.ShareNameParameterSetName), OutputType(typeof(CloudFile))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFile to AzureStorageFile, and AzureStorageFile will have CloudFile as a child property.")] public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase, IDynamicParameters { [Parameter( diff --git a/src/Storage/Storage/File/Cmdlet/SetAzureStorageShareQuota.cs b/src/Storage/Storage/File/Cmdlet/SetAzureStorageShareQuota.cs index 85d30801d3cf..e0f4f2c1b494 100644 --- a/src/Storage/Storage/File/Cmdlet/SetAzureStorageShareQuota.cs +++ b/src/Storage/Storage/File/Cmdlet/SetAzureStorageShareQuota.cs @@ -17,10 +17,12 @@ using System.Globalization; using System.Management.Automation; using System.Security.Permissions; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { [Cmdlet("Set", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageShareQuota"), OutputType(typeof(FileShareProperties))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from FileShareProperties to AzureStorageFileShare, and AzureStorageFileShare will have FileShareProperties in child property.")] public class SetAzureStorageShareQuota : AzureStorageFileCmdletBase { [Alias("N", "Name")] diff --git a/src/Storage/Storage/File/Cmdlet/StartAzureStorageFileCopy.cs b/src/Storage/Storage/File/Cmdlet/StartAzureStorageFileCopy.cs index f361211a363e..39f3ccd31373 100644 --- a/src/Storage/Storage/File/Cmdlet/StartAzureStorageFileCopy.cs +++ b/src/Storage/Storage/File/Cmdlet/StartAzureStorageFileCopy.cs @@ -23,10 +23,12 @@ using System.Management.Automation; using System.Security.Permissions; using System.Threading.Tasks; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; namespace Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet { [Cmdlet("Start", Azure.Commands.ResourceManager.Common.AzureRMConstants.AzurePrefix + "StorageFileCopy", SupportsShouldProcess = true), OutputType(typeof(void))] + [CmdletOutputBreakingChange(typeof(CloudFile), ChangeDescription = "The output type will change from CloudFile to AzureStorageFile, and AzureStorageFile will have CloudFile as a child property.")] public class StartAzureStorageFileCopyCommand : StorageFileDataManagementCmdletBase { private const string ContainerNameParameterSet = "ContainerName";