From a67cc1bf50280077d870167705d96a999dc9bc9e Mon Sep 17 00:00:00 2001 From: wyunchi-ms Date: Fri, 23 Oct 2020 08:37:29 +0800 Subject: [PATCH] Add the alias of AksCluster back. --- src/Aks/Aks/ChangeLog.md | 1 - src/Aks/Aks/Commands/GetAzureRmAks.cs | 2 ++ src/Aks/Aks/Commands/NewAzureRmAks.cs | 2 ++ src/Aks/Aks/Commands/RemoveAzureRmAks.cs | 2 ++ src/Aks/Aks/Commands/SetAzureRmAks.cs | 2 ++ .../StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv | 4 ---- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Aks/Aks/ChangeLog.md b/src/Aks/Aks/ChangeLog.md index 211a2e91192d..4f7e40efe57b 100644 --- a/src/Aks/Aks/ChangeLog.md +++ b/src/Aks/Aks/ChangeLog.md @@ -18,7 +18,6 @@ - Additional information about change #1 --> ## Upcoming Release -* [Breaking Change] Removed cmdlet alias `Get-AzAks`, `New-AzAks`, `Remove-AzAks` and `Set-AzAks`. * [Breaking Change] Removed parameter alias `ClientIdAndSecret` in `New-AzAksCluster` and `Set-AzAksCluster`. * [Breaking Change] Changed the default value of `NodeVmSetType` in `New-AzAksCluster` from `AvailabilitySet` to `VirtualMachineScaleSets`. * [Breaking Change] Changed the default value of `NetworkPlugin` in `New-AzAksCluster` from `None` to `azure`. diff --git a/src/Aks/Aks/Commands/GetAzureRmAks.cs b/src/Aks/Aks/Commands/GetAzureRmAks.cs index a526daa3f752..e66dcc82bb26 100644 --- a/src/Aks/Aks/Commands/GetAzureRmAks.cs +++ b/src/Aks/Aks/Commands/GetAzureRmAks.cs @@ -25,7 +25,9 @@ namespace Microsoft.Azure.Commands.Aks { + [CmdletDeprecation(ReplacementCmdletName = "Get-AzAksCluster")] [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "AksCluster", DefaultParameterSetName = ResourceGroupParameterSet)] + [Alias("Get-" + ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Aks")] [OutputType(typeof(PSKubernetesCluster))] public class GetAzureRmAks : KubeCmdletBase { diff --git a/src/Aks/Aks/Commands/NewAzureRmAks.cs b/src/Aks/Aks/Commands/NewAzureRmAks.cs index 8bc5172943c8..2da69f997e5a 100644 --- a/src/Aks/Aks/Commands/NewAzureRmAks.cs +++ b/src/Aks/Aks/Commands/NewAzureRmAks.cs @@ -26,7 +26,9 @@ namespace Microsoft.Azure.Commands.Aks { + [CmdletDeprecation(ReplacementCmdletName = "New-AzAksCluster")] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "AksCluster", DefaultParameterSetName = DefaultParamSet, SupportsShouldProcess = true)] + [Alias("New-" + ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Aks")] [OutputType(typeof(PSKubernetesCluster))] public class NewAzureRmAks : NewKubeBase { diff --git a/src/Aks/Aks/Commands/RemoveAzureRmAks.cs b/src/Aks/Aks/Commands/RemoveAzureRmAks.cs index cb1264648e81..316d771be851 100644 --- a/src/Aks/Aks/Commands/RemoveAzureRmAks.cs +++ b/src/Aks/Aks/Commands/RemoveAzureRmAks.cs @@ -22,7 +22,9 @@ namespace Microsoft.Azure.Commands.Aks { + [CmdletDeprecation(ReplacementCmdletName = "Remove-AzAksCluster")] [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "AksCluster", SupportsShouldProcess = true, DefaultParameterSetName = GroupNameParameterSet)] + [Alias("Remove-" + ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Aks")] [OutputType(typeof(bool))] public class RemoveAzureRmAks : KubeCmdletBase { diff --git a/src/Aks/Aks/Commands/SetAzureRmAks.cs b/src/Aks/Aks/Commands/SetAzureRmAks.cs index 7029675c6411..16200a450985 100644 --- a/src/Aks/Aks/Commands/SetAzureRmAks.cs +++ b/src/Aks/Aks/Commands/SetAzureRmAks.cs @@ -27,7 +27,9 @@ namespace Microsoft.Azure.Commands.Aks { + [CmdletDeprecation(ReplacementCmdletName = "Set-AzAksCluster")] [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "AksCluster", DefaultParameterSetName = DefaultParamSet, SupportsShouldProcess = true)] + [Alias("Set-" + ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Aks")] [OutputType(typeof(PSKubernetesCluster))] public class SetAzureRmAks : CreateOrUpdateKubeBase { diff --git a/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv index 436ca230d7ad..9b4efa19dfa7 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv @@ -1,10 +1,6 @@ "AssemblyFileName","ClassName","Target","Severity","ProblemId","Description","Remediation" -"Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.GetAzureRmAks","Get-AzAksCluster","0","1010","The cmdlet 'Get-AzAksCluster' no longer supports the alias 'Get-AzAks'.","Add the alias 'Get-AzAks back to the cmdlet 'Get-AzAksCluster'." -"Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","1010","The cmdlet 'New-AzAksCluster' no longer supports the alias 'New-AzAks'.","Add the alias 'New-AzAks back to the cmdlet 'New-AzAksCluster'." "Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","2000","The cmdlet 'New-AzAksCluster' no longer supports the parameter 'NodeOsType' and no alias was found for the original parameter name.","Add the parameter 'NodeOsType' back to the cmdlet 'New-AzAksCluster', or add an alias to the original parameter name." "Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","2010","The cmdlet 'New-AzAksCluster' no longer supports the alias 'ClientIdAndSecret' for parameter 'ServicePrincipalIdAndSecret'.","Add the alias 'ClientIdAndSecret' back to parameter 'ServicePrincipalIdAndSecret'." "Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzAksCluster' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzAksCluster'." "Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","1050","The parameter set 'defaultParameterSet' for cmdlet 'New-AzAksCluster' has been removed.","Add parameter set 'defaultParameterSet' back to cmdlet 'New-AzAksCluster'." -"Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.RemoveAzureRmAks","Remove-AzAksCluster","0","1010","The cmdlet 'Remove-AzAksCluster' no longer supports the alias 'Remove-AzAks'.","Add the alias 'Remove-AzAks back to the cmdlet 'Remove-AzAksCluster'." -"Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzAksCluster","0","1010","The cmdlet 'Set-AzAksCluster' no longer supports the alias 'Set-AzAks'.","Add the alias 'Set-AzAks back to the cmdlet 'Set-AzAksCluster'." "Microsoft.Azure.PowerShell.Cmdlets.Aks.dll","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzAksCluster","0","2010","The cmdlet 'Set-AzAksCluster' no longer supports the alias 'ClientIdAndSecret' for parameter 'ServicePrincipalIdAndSecret'.","Add the alias 'ClientIdAndSecret' back to parameter 'ServicePrincipalIdAndSecret'."