Skip to content

Commit

Permalink
Adding breaking change tags for SqlManagementType parameter as it is …
Browse files Browse the repository at this point in the history
…being removed from input and output of SqlVm cmdlets (Azure#21238)

* Deprecate SqlManagementType from input and output of SqlVm cmdlets

* Modified changelog

---------

Co-authored-by: Pruthvi Nutalapati <[email protected]>
  • Loading branch information
prnutala and Pruthvi Nutalapati authored Mar 20, 2023
1 parent 52ae892 commit a665723
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SqlVirtualMachine/SqlVirtualMachine/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 breaking change notification for SqlManagementType

## Version 1.1.0
* Added cmdlets for Availability Group Listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Management.Automation;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.SqlVirtualMachine.Common;
using Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Model;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Cmdlet
{
/// <summary>
/// This class implements the Get-AzSqlVM cmdlet. It will retrieve the information relative to one or more Sql Virtual Machine on Azure.
/// </summary>
[CmdletOutputBreakingChange(typeof(AzureSqlVMModel), DeprecatedOutputProperties = new String[] { "SqlManagementType" })]
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlVM", DefaultParameterSetName = ParameterSet.ResourceGroupOnly)]
[OutputType(typeof(AzureSqlVMModel))]
public class GetAzureSqlVM : AzureSqlVMCmdletBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
Expand All @@ -22,13 +23,15 @@
using static Microsoft.Azure.Commands.SqlVirtualMachine.Common.ParameterSet;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.SqlVirtualMachine.Common.ArgumentCompleters;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Cmdlet
{
/// <summary>
/// This class implements the New-AzSqlVM cmdlet. It creates a new instance of an Azure Sql Virtual machine and returns its information to the powershell
/// user as a AzureSqlVMModel object.
/// </summary>
[CmdletOutputBreakingChange(typeof(AzureSqlVMModel), DeprecatedOutputProperties = new String[] { "SqlManagementType" })]
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlVM", DefaultParameterSetName = NameParameterList, SupportsShouldProcess = true)]
[OutputType(typeof(AzureSqlVMModel))]
public class NewAzureSqlVM : AzureSqlVMUpsertCmdletBase
Expand Down Expand Up @@ -65,6 +68,7 @@ public class NewAzureSqlVM : AzureSqlVMUpsertCmdletBase
/// <summary>
/// Sql virtual machine to be updated
/// </summary>
[CmdletParameterBreakingChange("SqlManagementType", ChangeDescription = "SqlManagementType parameter is being deprecated")]
[Parameter(Mandatory = true,
ParameterSetName = NameInputObject,
ValueFromPipeline = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Management.Automation;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.SqlVirtualMachine.Common;
using Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Model;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Cmdlet
{
/// <summary>
/// This class implements the Remove-AzSqlVM cmdlet. It will delete the Azure Sql virtual machine instance corresponding to the parameter given as input and
/// it will return an AzureSqlVMModel object containing the information of the deleted sqlvm.
/// </summary>
[CmdletOutputBreakingChange(typeof(AzureSqlVMModel), DeprecatedOutputProperties = new String[] { "SqlManagementType" })]
[Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlVM", DefaultParameterSetName = ParameterSet.Name, SupportsShouldProcess = true)]
[OutputType(typeof(AzureSqlVMModel))]
public class RemoveAzureSqlVM : AzureSqlVMCmdletBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -22,13 +23,15 @@
using Microsoft.Azure.Commands.SqlVirtualMachine.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Model;
using static Microsoft.Azure.Commands.SqlVirtualMachine.Common.ParameterSet;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;

namespace Microsoft.Azure.Commands.SqlVirtualMachine.SqlVirtualMachine.Cmdlet
{
/// <summary>
/// This class implements the Update-AzSqlVM cmdlet. It allows to update the information relative to an Azure Sql Virtual Machine
/// and return to the user an AzureSqlVMModel object corresponding to the instance updated.
/// </summary>
[CmdletOutputBreakingChange(typeof(AzureSqlVMModel), DeprecatedOutputProperties = new String[] { "SqlManagementType" })]
[Cmdlet(VerbsData.Update, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SqlVM", DefaultParameterSetName = NameParameterList, SupportsShouldProcess = true)]
[OutputType(typeof(AzureSqlVMModel))]
public class UpdateAzureSqlVM : AzureSqlVMUpsertCmdletBase
Expand Down Expand Up @@ -102,6 +105,7 @@ public class UpdateAzureSqlVM : AzureSqlVMUpsertCmdletBase
/// <summary>
/// SqlManagementType of the new sql virtual machine
/// </summary>
[CmdletParameterBreakingChange("SqlManagementType", ChangeDescription = "SqlManagementType parameter is being deprecated")]
[Parameter(Mandatory = false,
ParameterSetName = NameParameterList,
HelpMessage = HelpMessages.SqlManagementTypeSqlVM)]
Expand Down

0 comments on commit a665723

Please sign in to comment.