Skip to content

Commit 5baef4a

Browse files
authored
Marking Additional Azure Batch future breaking changes (#28479)
1 parent c455196 commit 5baef4a

12 files changed

+29
-10
lines changed

src/Batch/Batch/JobSchedules/GetBatchJobScheduleCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
using Microsoft.Azure.Commands.Batch.Models;
1717
using System.Management.Automation;
1818
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
namespace Microsoft.Azure.Commands.Batch
2122
{
22-
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchJobSchedule", DefaultParameterSetName = Constants.ODataFilterParameterSet),OutputType(typeof(PSCloudJobSchedule))]
23+
[GenericBreakingChangeWithVersion("The following properties of the PSPoolSpecification class found under the returned PSCloudJobSchedule class are being deprecated: TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
24+
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchJobSchedule", DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudJobSchedule))]
2325
public class GetBatchJobScheduleCommand : BatchObjectModelCmdletBase
2426
{
2527
private int maxCount = Constants.DefaultMaxCount;

src/Batch/Batch/JobSchedules/NewBatchJobScheduleCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using System.Collections;
1818
using System.Management.Automation;
1919
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
20+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2021

2122
namespace Microsoft.Azure.Commands.Batch
2223
{
@@ -38,6 +39,7 @@ public class NewBatchJobScheduleCommand : BatchObjectModelCmdletBase
3839

3940
[Parameter(Mandatory = true, HelpMessage = "Specifies details of the jobs to be created on this schedule.")]
4041
[ValidateNotNullOrEmpty]
42+
[GenericBreakingChangeWithVersion("The following properties of the PSPoolSpecification class found under the PSJobSpecification class are being deprecated: TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
4143
public PSJobSpecification JobSpecification { get; set; }
4244

4345
[Parameter]

src/Batch/Batch/Jobs/GetBatchJobCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
using Microsoft.Azure.Commands.Batch.Models;
1717
using System.Management.Automation;
1818
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
namespace Microsoft.Azure.Commands.Batch
2122
{
22-
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchJob", DefaultParameterSetName = Constants.ODataFilterParameterSet),OutputType(typeof(PSCloudJob))]
23+
[GenericBreakingChangeWithVersion("The following properties of the PSPoolSpecification class found under the returned PSCloudJob class are being deprecated: TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
24+
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchJob", DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudJob))]
2325
public class GetBatchJobCommand : BatchObjectModelCmdletBase
2426
{
2527
private int maxCount = Constants.DefaultMaxCount;

src/Batch/Batch/Jobs/NewBatchJobCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using System.Management.Automation;
1919
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
2020
using System.Collections.Generic;
21+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2122

2223
namespace Microsoft.Azure.Commands.Batch
2324
{
@@ -60,6 +61,7 @@ public class NewBatchJobCommand : BatchObjectModelCmdletBase
6061

6162
[Parameter(Mandatory = true, HelpMessage = "The pool information for the job.")]
6263
[ValidateNotNullOrEmpty]
64+
[GenericBreakingChangeWithVersion("The following properties of the PSPoolSpecification class found under the PSPoolInformation class are being deprecated: TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
6365
public PSPoolInformation PoolInformation { get; set; }
6466

6567
[Parameter]

src/Batch/Batch/Pools/GetBatchPoolCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
using Microsoft.Azure.Commands.Batch.Models;
1717
using System.Management.Automation;
1818
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
namespace Microsoft.Azure.Commands.Batch
2122
{
23+
[CmdletOutputBreakingChangeWithVersion(typeof(PSCloudPool), "15.0.0", "4.0.0", DeprecatedOutputProperties = new string[] {"CurrentNodeCommunicationMode", "TargetNodeCommunicationMode", "ResourceTags", "CertificateReferences", "ApplicationLicenses", "CloudServiceConfiguration"})]
2224
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchPool", DefaultParameterSetName = Constants.ODataFilterParameterSet), OutputType(typeof(PSCloudPool))]
2325
public class GetBatchPoolCommand : BatchObjectModelCmdletBase
2426
{

src/Batch/Batch/Pools/GetBatchPoolNodeCountCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ public class GetBatchPoolNodeCountCommand : BatchObjectModelCmdletBase
3131
[ValidateNotNullOrEmpty]
3232
public string PoolId { get; set; }
3333

34-
[Parameter(ParameterSetName = Constants.ParentObjectParameterSet,
34+
[Parameter(ParameterSetName = Constants.ParentObjectParameterSet,
3535
ValueFromPipeline = true, Mandatory = false, HelpMessage = "The pool object for which to get node counts.")]
3636
[ValidateNotNullOrEmpty]
37+
[GenericBreakingChangeWithVersion("The following properties of PSCloudPool are being deprecated: CurrentNodeCommunicationMode, TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
3738
public PSCloudPool Pool { get; set; }
3839

3940
[Parameter(ParameterSetName = Constants.ODataFilterParameterSet), ValidateRange(1, defaultMaxCount)]

src/Batch/Batch/Pools/NewBatchPoolCommand.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase
3131
internal const string CloudServiceAutoScaleParameterSet = "CloudServiceAndAutoScale";
3232
internal const string VirtualMachineTargetDedicatedParameterSet = "VirtualMachineAndTargetDedicated";
3333
internal const string VirtualMachineAutoScaleParameterSet = "VirtualMachineAndAutoScale";
34-
internal const string ChangeDesc = "Parameter is being deprecated without being replaced";
34+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
3535

3636
[Parameter(Position = 0, Mandatory = true, HelpMessage = "The id of the pool to create.")]
3737
[ValidateNotNullOrEmpty]
@@ -84,7 +84,7 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase
8484
[ValidateNotNullOrEmpty]
8585
public PSTaskSchedulingPolicy TaskSchedulingPolicy { get; set; }
8686

87-
[CmdletParameterBreakingChangeWithVersion("ResourceTag", "15.0.0", "4.0.0")]
87+
[CmdletParameterBreakingChangeWithVersion("ResourceTag", "15.0.0", "4.0.0", ChangeDescription = ChangeDesc)]
8888
[Parameter(Mandatory = false, HelpMessage = "The user defined tags to be associated with the Azure Batch Pool.When specified, these tags are propagated to the backing Azure resources associated with the pool.This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.")]
8989
[ValidateNotNullOrEmpty]
9090
public IDictionary ResourceTag { get; set; }
@@ -102,7 +102,7 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase
102102
[Parameter]
103103
[ValidateNotNullOrEmpty]
104104
[Alias("CertificateReference")]
105-
[CmdletParameterBreakingChangeWithVersion("CertificateReference", "15.0.0", "4.0.0")]
105+
[CmdletParameterBreakingChangeWithVersion("CertificateReference", "15.0.0", "4.0.0", ChangeDescription = ChangeDesc)]
106106
public PSCertificateReference[] CertificateReferences { get; set; }
107107

108108
[Parameter]
@@ -113,7 +113,7 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase
113113
[Parameter]
114114
[ValidateNotNullOrEmpty]
115115
[Alias("ApplicationLicense")]
116-
[CmdletParameterBreakingChangeWithVersion("ApplicationLicense", "15.0.0", "4.0.0")]
116+
[CmdletParameterBreakingChangeWithVersion("ApplicationLicense", "15.0.0", "4.0.0", ChangeDescription = ChangeDesc)]
117117
public List<string> ApplicationLicenses { get; set; }
118118

119119
[Parameter(ParameterSetName = VirtualMachineAutoScaleParameterSet)]
@@ -124,7 +124,7 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase
124124
[Parameter(ParameterSetName = CloudServiceAutoScaleParameterSet)]
125125
[Parameter(ParameterSetName = CloudServiceTargetDedicatedParameterSet)]
126126
[ValidateNotNullOrEmpty]
127-
[CmdletParameterBreakingChangeWithVersion("CloudServiceConfiguration", "15.0.0", "4.0.0")]
127+
[CmdletParameterBreakingChangeWithVersion("CloudServiceConfiguration", "15.0.0", "4.0.0", ChangeDescription = ChangeDesc)]
128128
public PSCloudServiceConfiguration CloudServiceConfiguration { get; set; }
129129

130130
[Parameter]
@@ -146,7 +146,7 @@ public class NewBatchPoolCommand : BatchObjectModelCmdletBase
146146
[Parameter]
147147
[ValidateNotNullOrEmpty]
148148
[PSArgumentCompleter("Default", "Classic", "Simplified")]
149-
[CmdletParameterBreakingChangeWithVersion("TargetNodeCommunicationMode", "15.0.0", "4.0.0")]
149+
[CmdletParameterBreakingChangeWithVersion("TargetNodeCommunicationMode", "15.0.0", "4.0.0", ChangeDescription = ChangeDesc)]
150150
public NodeCommunicationMode TargetNodeCommunicationMode { get; set; }
151151

152152
protected override void ExecuteCmdletImpl()

src/Batch/Batch/Pools/SetBatchPoolCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.Batch.Models;
1616
using System.Management.Automation;
1717
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1819

1920
namespace Microsoft.Azure.Commands.Batch
2021
{
@@ -24,6 +25,7 @@ public class SetBatchPoolCommand : BatchObjectModelCmdletBase
2425
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true,
2526
HelpMessage = "The PSCloudPool object with changes to commit to the Batch Service.")]
2627
[ValidateNotNullOrEmpty]
28+
[GenericBreakingChangeWithVersion("The following properties of PSCloudPool are being deprecated: CurrentNodeCommunicationMode, TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
2729
public PSCloudPool Pool { get; set; }
2830

2931
protected override void ExecuteCmdletImpl()

src/Batch/Batch/Tasks/GetBatchTaskCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.Batch.Models;
1717
using System.Management.Automation;
1818
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1920

2021
namespace Microsoft.Azure.Commands.Batch
2122
{
@@ -37,6 +38,7 @@ public class GetBatchTaskCommand : BatchObjectModelCmdletBase
3738

3839
[Parameter(Position = 0, ParameterSetName = Constants.ParentObjectParameterSet, ValueFromPipeline = true)]
3940
[ValidateNotNullOrEmpty]
41+
[GenericBreakingChangeWithVersion("The following properties of the PSPoolSpecification class found under the PSCloudJob class are being deprecated: TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
4042
public PSCloudJob Job { get; set; }
4143

4244
[Parameter(ParameterSetName = Constants.ODataFilterParameterSet)]

src/Batch/Batch/Tasks/GetBatchTaskCountCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public class GetBatchTaskCountCommand : BatchObjectModelCmdletBase
3131

3232
[Parameter(Position = 0, ParameterSetName = Constants.ParentObjectParameterSet, ValueFromPipeline = true)]
3333
[ValidateNotNullOrEmpty]
34+
[GenericBreakingChangeWithVersion("The following properties of the PSPoolSpecification class found under the PSCloudJob class are being deprecated: TargetNodeCommunicationMode, ResourceTags, CertificateReferences, ApplicationLicenses, CloudServiceConfiguration","15.0.0", "4.0.0")]
3435
public PSCloudJob Job { get; set; }
3536

3637
protected override void ExecuteCmdletImpl()

0 commit comments

Comments
 (0)