Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ServiceFabric/ServiceFabric/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Added preannoucement for removing Reimage parameters from `Set-AzServiceFabricManagedNodeType`.
* Added new cmdlets for managed node types:
- `Invoke-AzServiceFabricDeallocateManagedNodeType`
- `Invoke-AzServiceFabricRedeployManagedNodeType`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +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
{
Expand Down Expand Up @@ -79,21 +79,21 @@ public class SetAzServiceFabricManagedNodeType : ServiceFabricManagedCmdletBase
#endregion

#region reimage params

[CmdletParameterBreakingChangeWithVersion("NodeName", "15.0.0", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
public const String ChangeDesc = "Parameter is being deprecated without being replaced, use Invoke-AzServiceFabricReimageManagedNodeType cmdlet instead.";
[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", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
[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", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
[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,
Expand All @@ -102,15 +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", "15.0.0", ChangeDescription = "Reimage operations should be performed with Invoke-AzServiceFabricReimageManagedNodeType instead.")]
[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)]
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
Expand Down Expand Up @@ -139,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


Expand Down