Skip to content

Commit 0322208

Browse files
UpdateAndActivateSet renamed to UploadAndActivateSet. Updated the help text. added "fithPath" to ANE
1 parent 67c89b2 commit 0322208

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/ResourceManager/AzureBatch/Commands.Batch/Applications/NewBatchApplicationPackageCommand.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@
1919

2020
namespace Microsoft.Azure.Commands.Batch
2121
{
22-
[Cmdlet(VerbsCommon.New, Constants.AzureRmBatchApplicationPackage), OutputType(typeof(PSApplicationPackage))]
22+
[Cmdlet(VerbsCommon.New, Constants.AzureRmBatchApplicationPackage, DefaultParameterSetName = UploadAndActivateSet), OutputType(typeof(PSApplicationPackage))]
2323
public class NewBatchApplicationPackageCommand : BatchCmdletBase
2424
{
2525
internal const string ActivateOnlySet = "ActivateOnly";
26-
internal const string UpdateAndActivateSet = "UpdateAndActivate";
26+
internal const string UploadAndActivateSet = "UpdateAndActivate";
2727

28-
[Parameter(Position = 0, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")]
28+
[Parameter(Position = 0, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")]
2929
[Parameter(Position = 0, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the Batch account.")]
3030
[ValidateNotNullOrEmpty]
3131
public string AccountName { get; set; }
3232

33-
[Parameter(Position = 1, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")]
33+
[Parameter(Position = 1, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")]
3434
[Parameter(Position = 1, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the name of the resource group that contains the Batch account.")]
3535
[ValidateNotNullOrEmpty]
3636
public string ResourceGroupName { get; set; }
3737

38-
[Parameter(Position = 2, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")]
38+
[Parameter(Position = 2, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")]
3939
[Parameter(Position = 2, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the id of the application.")]
4040
[ValidateNotNullOrEmpty]
4141

4242
public string ApplicationId { get; set; }
4343

44-
[Parameter(Position = 3, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")]
44+
[Parameter(Position = 3, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")]
4545
[Parameter(Position = 3, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the version of the application.")]
4646
[ValidateNotNullOrEmpty]
4747
public string ApplicationVersion { get; set; }
4848

49-
[Parameter(Position = 4, ParameterSetName = UpdateAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")]
49+
[Parameter(Position = 4, ParameterSetName = UploadAndActivateSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")]
5050
[Parameter(Position = 4, ParameterSetName = ActivateOnlySet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "Specifies the format of the application package binary file.")]
5151
[ValidateNotNullOrEmpty]
5252
public string Format { get; set; }
5353

54-
[Parameter(ValueFromPipelineByPropertyName = true, ParameterSetName = UpdateAndActivateSet, Mandatory = true, HelpMessage = "Specifies the file path of the application that will be uploaded to Azure Storage.")]
54+
[Parameter(ValueFromPipelineByPropertyName = true, ParameterSetName = UploadAndActivateSet, Mandatory = true, HelpMessage = "Specifies the file path of the application that will be uploaded to Azure Storage.")]
5555
[ValidateNotNullOrEmpty]
5656
public string FilePath { get; set; }
5757

src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9768,7 +9768,7 @@
97689768
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named">
97699769
<maml:name>FilePath</maml:name>
97709770
<maml:description>
9771-
<maml:para>Specifies the file to be uploaded as the application package binary file.</maml:para>
9771+
<maml:para>Specifies the file to be uploaded as the application package binary file. If the -ActivateOnly switch is present, do not specify FilePath</maml:para>
97729772
</maml:description>
97739773
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
97749774
</command:parameter>
@@ -9836,7 +9836,7 @@
98369836
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named">
98379837
<maml:name>FilePath</maml:name>
98389838
<maml:description>
9839-
<maml:para>Specifies the file to be uploaded as the application package binary file.</maml:para>
9839+
<maml:para>Specifies the file to be uploaded as the application package binary file. If the -ActivateOnly switch is present, do not specify FilePath</maml:para>
98409840
</maml:description>
98419841
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
98429842
<dev:type>

src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Applications.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public virtual PSApplicationPackage UploadAndActivateApplicationPackage(
186186
{
187187
if (string.IsNullOrEmpty(filePath))
188188
{
189-
throw new ArgumentNullException(Resources.NewAppPackageNoPathSpecified);
189+
throw new ArgumentNullException("filePath", Resources.NewAppPackageNoPathSpecified);
190190
}
191191

192192
if (!File.Exists(filePath))

0 commit comments

Comments
 (0)