From 4e5736926c254277776b90ba60bf2168780fabdb Mon Sep 17 00:00:00 2001 From: Ivy Liu Date: Fri, 5 Sep 2025 12:01:46 -0700 Subject: [PATCH 1/2] [Az.ServiceFabric] Added preannoucement for removing Reimage parameters from `Set-AzServiceFabricManagedNodeType` --- src/ServiceFabric/ServiceFabric/ChangeLog.md | 1 + .../SetAzServiceFabricManagedNodeType.cs | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/ServiceFabric/ServiceFabric/ChangeLog.md b/src/ServiceFabric/ServiceFabric/ChangeLog.md index a08cddafcc94..361a4cc65367 100644 --- a/src/ServiceFabric/ServiceFabric/ChangeLog.md +++ b/src/ServiceFabric/ServiceFabric/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Added preannoucement for removing Reimage parameters from `Set-AzServiceFabricManagedNodeType`. ## Version 3.7.0 * Updated SF to latest api preview version `2023-11-01-preview` diff --git a/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs b/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs index 25dc268ec608..f51c731d4483 100644 --- a/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs +++ b/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs @@ -11,15 +11,16 @@ // limitations under the License. // ---------------------------------------------------------------------------------- -using System; -using System.Collections; -using System.Linq; -using System.Management.Automation; using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Commands.ServiceFabric.Common; using Microsoft.Azure.Commands.ServiceFabric.Models; using Microsoft.Azure.Management.ServiceFabricManagedClusters; using Microsoft.Azure.Management.ServiceFabricManagedClusters.Models; +using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; +using System; +using System.Collections; +using System.Linq; +using System.Management.Automation; namespace Microsoft.Azure.Commands.ServiceFabric.Commands { @@ -78,18 +79,21 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase #endregion #region reimage params - + public const String ChangeDesc = "Parameter is being deprecated without being replaced, use Invoke-AzServiceFabricReimageManagedNodeType cmdlet instead."; + [CmdletParameterBreakingChangeWithVersion("NodeName", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = true, ParameterSetName = ReimageByName, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageById, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageByObj, HelpMessage = "List of node names for the operation.")] [ValidateNotNullOrEmpty()] public string[] NodeName { get; set; } + [CmdletParameterBreakingChangeWithVersion("Reimage", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = true, ParameterSetName = ReimageByName, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageById, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageByObj, HelpMessage = "List of node names for the operation.")] public SwitchParameter Reimage { get; set; } + [CmdletParameterBreakingChangeWithVersion("ForceReimage", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = false, ParameterSetName = ReimageByName, HelpMessage = "Using this flag will force the reimage even if service fabric is unable to disable the nodes. Use with caution as this might cause data loss if stateful workloads are running on the node.")] [Parameter(Mandatory = false, ParameterSetName = ReimageById, @@ -98,14 +102,11 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase HelpMessage = "Using this flag will force the reimage even if service fabric is unable to disable the nodes. Use with caution as this might cause data loss if stateful workloads are running on the node.")] public SwitchParameter ForceReimage { get; set; } + [CmdletParameterBreakingChangeWithVersion("PassThru", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = false, ParameterSetName = ReimageByName)] [Parameter(Mandatory = false, ParameterSetName = ReimageById)] [Parameter(Mandatory = false, ParameterSetName = ReimageByObj)] public SwitchParameter PassThru { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background and return a Job to track progress.")] - public SwitchParameter AsJob { get; set; } - #endregion #region set params @@ -134,6 +135,9 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase [Parameter(Mandatory = false, ParameterSetName = WithParamsByName, HelpMessage = "The size of virtual machines in the pool. Updating this will override the current value and initiate an in-place sku change.")] public string VmSize { get; set; } + [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background and return a Job to track progress.")] + public SwitchParameter AsJob { get; set; } + #endregion From d4bfb4f708f56472042558256ee6b3e26630df3a Mon Sep 17 00:00:00 2001 From: Ivy Liu Date: Wed, 10 Sep 2025 12:54:29 -0700 Subject: [PATCH 2/2] change Az.ServiceFabric version to 5.0.0 --- .../NodeTypes/SetAzServiceFabricManagedNodeType.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs b/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs index f51c731d4483..b2e9a3e8f462 100644 --- a/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs +++ b/src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs @@ -80,20 +80,20 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase #region reimage params public const String ChangeDesc = "Parameter is being deprecated without being replaced, use Invoke-AzServiceFabricReimageManagedNodeType cmdlet instead."; - [CmdletParameterBreakingChangeWithVersion("NodeName", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] + [CmdletParameterBreakingChangeWithVersion("NodeName", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = true, ParameterSetName = ReimageByName, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageById, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageByObj, HelpMessage = "List of node names for the operation.")] [ValidateNotNullOrEmpty()] public string[] NodeName { get; set; } - [CmdletParameterBreakingChangeWithVersion("Reimage", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] + [CmdletParameterBreakingChangeWithVersion("Reimage", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = true, ParameterSetName = ReimageByName, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageById, HelpMessage = "List of node names for the operation.")] [Parameter(Mandatory = true, ParameterSetName = ReimageByObj, HelpMessage = "List of node names for the operation.")] public SwitchParameter Reimage { get; set; } - [CmdletParameterBreakingChangeWithVersion("ForceReimage", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] + [CmdletParameterBreakingChangeWithVersion("ForceReimage", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = false, ParameterSetName = ReimageByName, HelpMessage = "Using this flag will force the reimage even if service fabric is unable to disable the nodes. Use with caution as this might cause data loss if stateful workloads are running on the node.")] [Parameter(Mandatory = false, ParameterSetName = ReimageById, @@ -102,7 +102,7 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase HelpMessage = "Using this flag will force the reimage even if service fabric is unable to disable the nodes. Use with caution as this might cause data loss if stateful workloads are running on the node.")] public SwitchParameter ForceReimage { get; set; } - [CmdletParameterBreakingChangeWithVersion("PassThru", "15.0.0", "7.0.0", ChangeDescription = ChangeDesc)] + [CmdletParameterBreakingChangeWithVersion("PassThru", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)] [Parameter(Mandatory = false, ParameterSetName = ReimageByName)] [Parameter(Mandatory = false, ParameterSetName = ReimageById)] [Parameter(Mandatory = false, ParameterSetName = ReimageByObj)]