Skip to content

Commit 0344d2a

Browse files
authored
[Az.ServiceFabric] Added preannoucement for removing Reimage parameters from Set-AzServiceFabricManagedNodeType (#28520)
1 parent 571636c commit 0344d2a

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/ServiceFabric/ServiceFabric/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added preannoucement for removing Reimage parameters from `Set-AzServiceFabricManagedNodeType`.
2122
* Added new cmdlets for managed node types:
2223
- `Invoke-AzServiceFabricDeallocateManagedNodeType`
2324
- `Invoke-AzServiceFabricRedeployManagedNodeType`

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
// limitations under the License.
1212
// ----------------------------------------------------------------------------------
1313

14-
using System;
15-
using System.Collections;
16-
using System.Linq;
17-
using System.Management.Automation;
1814
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1915
using Microsoft.Azure.Commands.ServiceFabric.Common;
2016
using Microsoft.Azure.Commands.ServiceFabric.Models;
2117
using Microsoft.Azure.Management.ServiceFabricManagedClusters;
2218
using Microsoft.Azure.Management.ServiceFabricManagedClusters.Models;
2319
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
20+
using System;
21+
using System.Collections;
22+
using System.Linq;
23+
using System.Management.Automation;
2424

2525
namespace Microsoft.Azure.Commands.ServiceFabric.Commands
2626
{
@@ -79,21 +79,21 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase
7979
#endregion
8080

8181
#region reimage params
82-
83-
[CmdletParameterBreakingChangeWithVersion("NodeName", "15.0.0", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
82+
public const String ChangeDesc = "Parameter is being deprecated without being replaced, use Invoke-AzServiceFabricReimageManagedNodeType cmdlet instead.";
83+
[CmdletParameterBreakingChangeWithVersion("NodeName", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)]
8484
[Parameter(Mandatory = true, ParameterSetName = ReimageByName, HelpMessage = "List of node names for the operation.")]
8585
[Parameter(Mandatory = true, ParameterSetName = ReimageById, HelpMessage = "List of node names for the operation.")]
8686
[Parameter(Mandatory = true, ParameterSetName = ReimageByObj, HelpMessage = "List of node names for the operation.")]
8787
[ValidateNotNullOrEmpty()]
8888
public string[] NodeName { get; set; }
8989

90-
[CmdletParameterBreakingChangeWithVersion("Reimage", "15.0.0", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
90+
[CmdletParameterBreakingChangeWithVersion("Reimage", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)]
9191
[Parameter(Mandatory = true, ParameterSetName = ReimageByName, HelpMessage = "List of node names for the operation.")]
9292
[Parameter(Mandatory = true, ParameterSetName = ReimageById, HelpMessage = "List of node names for the operation.")]
9393
[Parameter(Mandatory = true, ParameterSetName = ReimageByObj, HelpMessage = "List of node names for the operation.")]
9494
public SwitchParameter Reimage { get; set; }
9595

96-
[CmdletParameterBreakingChangeWithVersion("ForceReimage", "15.0.0", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
96+
[CmdletParameterBreakingChangeWithVersion("ForceReimage", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)]
9797
[Parameter(Mandatory = false, ParameterSetName = ReimageByName,
9898
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.")]
9999
[Parameter(Mandatory = false, ParameterSetName = ReimageById,
@@ -102,15 +102,11 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase
102102
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.")]
103103
public SwitchParameter ForceReimage { get; set; }
104104

105-
[CmdletParameterBreakingChangeWithVersion("PassThru", "15.0.0", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
105+
[CmdletParameterBreakingChangeWithVersion("PassThru", "15.0.0", "5.0.0", ChangeDescription = ChangeDesc)]
106106
[Parameter(Mandatory = false, ParameterSetName = ReimageByName)]
107107
[Parameter(Mandatory = false, ParameterSetName = ReimageById)]
108108
[Parameter(Mandatory = false, ParameterSetName = ReimageByObj)]
109109
public SwitchParameter PassThru { get; set; }
110-
111-
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background and return a Job to track progress.")]
112-
public SwitchParameter AsJob { get; set; }
113-
114110
#endregion
115111

116112
#region set params
@@ -139,6 +135,9 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase
139135
[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.")]
140136
public string VmSize { get; set; }
141137

138+
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background and return a Job to track progress.")]
139+
public SwitchParameter AsJob { get; set; }
140+
142141
#endregion
143142

144143

0 commit comments

Comments
 (0)