Skip to content

Commit

Permalink
Batch/feature/app pack on tasks
Browse files Browse the repository at this point in the history
* Update documentation in C# generated protocol

* Add script to regenerate batch protocol (Azure#7)

* Add Roslyn parser/code generator (Azure#8)

Add Roslyn parser/code generation

* Regenerate generated protocol with latest AutoRest (Azure#9)

* Batch Add CommitChanges support in object model (Azure#11)

* Comment tidying (Azure#10)

* Fixed spelling error in Batch behavior manager comments

* Removed obsolete comment in regarding Batch CloudJob committal

* Removed comment about not having a CancellationToken (since we now do)

* Regenerate Batch protocol based on newest version of AutoRest (Azure#12)

* Fix RoslynParser dll copies

* Regenerate Batch protocol layer with latest AutoRest

* Added APR to a few Tasks in the BatchProperites file

* Add support for job autocomplete

Squashed commit of the following:

commit 9cc1a68afb1090185fd2c9f006beccc0acfeadf2
Author: Matthew Rollitt <[email protected]>
Date:   Thu Jun 9 09:22:12 2016 +1200

    Started cleaning up a few doc strings

commit a9ebcd69754b81af7db0ed3026feea037ab283d9
Author: Matthew Rollitt <[email protected]>
Date:   Wed Jun 8 13:44:50 2016 +1200

    Updated a few swagger generated files with autorest.0.17.0-Nightly20160601 build

commit 93b3e8be890cd487070fc92c526a4fd3f8ac3b2b
Author: Matthew Rollitt <[email protected]>
Date:   Wed Jun 8 13:28:05 2016 +1200

    Splitting up tests in the BindingStateConstraintUnitTests.

commit 46cb5eb34f8142d25b197c4153885f9a19cc0218
Merge: fbb1e78 17badc2
Author: Matthew Rollitt <[email protected]>
Date:   Tue Jun 7 13:01:27 2016 +1200

    Merge branch 'batch/develop' into batch/feature/job-autocomplete

    # Conflicts:
    #	src/Batch/Src/GeneratedProtocol/Models/CloudJob.cs
    #	src/Batch/Src/GeneratedProtocol/Models/CloudTask.cs
    #	src/Batch/Src/GeneratedProtocol/Models/JobAddParameter.cs
    #	src/Batch/Src/GeneratedProtocol/Models/JobUpdateParameter.cs

commit fbb1e78ad96efd9a730bd89c6fe7e2de25255541
Author: Matthew Rollitt <[email protected]>
Date:   Tue Jun 7 12:44:24 2016 +1200

    First Code review changes,

commit 76d7e242db5742da96d904aff33ba5c56228177e
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 31 13:06:01 2016 +1200

    removed remarksComment = null from batchProperties.json

commit 915c2d48a60ff7b45b640fafccc87f52a39285d8
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 31 13:02:11 2016 +1200

    Forgot copyright notice

commit afc3cb84034ae53047ac86740219591c32605b01
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 31 12:38:06 2016 +1200

    Added /// into BatchProperties.json file

commit 759d973308ca0da59d43f43040ccec9cc8ad5c62
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 31 11:56:54 2016 +1200

    Used the most recent autorest build

commit 22bb4a9772de67d4d70627c9d589ef90e620aa05
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 31 10:59:44 2016 +1200

    Updated generated protocol layer

commit dc678a2bdcb20423358def2893ae1afd98af3919
Merge: 3e01884 8bb4302
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 31 09:43:51 2016 +1200

    Merge branch 'batch/develop' into batch/feature/job-autocomplete

    Conflicts:
    	src/Batch/Src/GeneratedProtocol/Models/AccountListNodeAgentSkusNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/AccountListNodeAgentSkusOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/AffinityInformation.cs
    	src/Batch/Src/GeneratedProtocol/Models/ApplicationGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ApplicationListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ApplicationListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ApplicationPackageReference.cs
    	src/Batch/Src/GeneratedProtocol/Models/AutoScaleRun.cs
    	src/Batch/Src/GeneratedProtocol/Models/AutoScaleRunError.cs
    	src/Batch/Src/GeneratedProtocol/Models/Certificate.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateAddOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateAddParameter.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateCancelDeletionOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateDeleteOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/CertificateReference.cs
    	src/Batch/Src/GeneratedProtocol/Models/CloudJob.cs
    	src/Batch/Src/GeneratedProtocol/Models/CloudPool.cs
    	src/Batch/Src/GeneratedProtocol/Models/CloudTask.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeAddUserOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeDeleteUserOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeDisableSchedulingOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeEnableSchedulingOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeError.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeGetRemoteDesktopOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeGetRemoteLoginSettingsOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeRebootOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeReimageOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/ComputeNodeUpdateUserOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/DeleteCertificateError.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileDeleteFromComputeNodeOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileDeleteFromTaskOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileGetFromComputeNodeOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileGetFromTaskOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileGetNodeFilePropertiesFromComputeNodeOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileGetNodeFilePropertiesFromTaskOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileListFromComputeNodeNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileListFromComputeNodeOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileListFromTaskNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/FileListFromTaskOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobAddOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobAddParameter.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobDeleteOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobDisableOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobEnableOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobGetAllJobsLifetimeStatisticsOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobListFromJobScheduleNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobListFromJobScheduleOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobListPreparationAndReleaseTaskStatusNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobListPreparationAndReleaseTaskStatusOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobManagerTask.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobPatchOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobPatchParameter.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobReleaseTask.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleAddOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleDeleteOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleDisableOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleEnableOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleExistsOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobSchedulePatchOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleStatistics.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleTerminateOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobScheduleUpdateOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobSchedulingError.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobSpecification.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobStatistics.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobTerminateOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/JobUpdateOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolAddOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolAddParameter.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolDeleteOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolDisableAutoScaleOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolEnableAutoScaleOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolEvaluateAutoScaleOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolExistsOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolGetAllPoolsLifetimeStatisticsOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolListPoolUsageMetricsNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolListPoolUsageMetricsOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolPatchOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolRemoveNodesOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolResizeOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolStopResizeOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolUpdatePropertiesOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolUpgradeOSOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/PoolUsageMetrics.cs
    	src/Batch/Src/GeneratedProtocol/Models/ResizeError.cs
    	src/Batch/Src/GeneratedProtocol/Models/Schedule.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskAddCollectionOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskAddOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskAddParameter.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskDeleteOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskGetOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskListNextOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskListOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskListSubtasksOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskSchedulingError.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskStatistics.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskTerminateOptions.cs
    	src/Batch/Src/GeneratedProtocol/Models/TaskUpdateOptions.cs

commit 3e01884e53f3d581b98cedef5b8b521af8bde9cf
Author: Matthew Rollitt <[email protected]>
Date:   Mon May 30 16:49:06 2016 +1200

    Job auto termination code generated code and unit tests added

commit d43eb9291281c3b60885a08a7cfcf2f92aba5009
Author: Matthew Rollitt <[email protected]>
Date:   Wed May 25 14:44:32 2016 +1200

    Job auto termination all objects generating and mock tests working, still need to fix all the doc strings

commit 1ce64d2c6dd234b6096d8f89814cee3ca0d53a45
Author: Matthew Rollitt <[email protected]>
Date:   Tue May 24 10:55:43 2016 +1200

    Job auto termination all objects generating, still need to fix read write access and docs.

commit 3ad10ca111acd11fac71a5e2c4922c7d3ceae4f6
Author: Matthew Rollitt <[email protected]>
Date:   Mon May 23 14:28:58 2016 +1200

    Partial commit: Generated some of the OM code for exitConditions and add job

commit 7e8f3fdedc1b3cb4df9907b849cfea30d1fadc74
Author: Matthew Rollitt <[email protected]>
Date:   Fri May 13 12:25:29 2016 +1200

    Updated generated files with the new /// comments, error codes also added to the generated files

commit 1d88be3207cf5b4ed5d72ff1f3a51960d1d67b17
Merge: 3650344 d5f52e5
Author: Matthew Rollitt <[email protected]>
Date:   Thu May 12 15:20:26 2016 +1200

    Merge branch 'batch/develop' into batch/feature/job-autocomplete

* Documentation string consistency pass

* APR is only on CloudTask and JobManagerTask

* fixed /// comments and a few tests

* Updated a few doc strings and made a few small changes to the UnitTests

* Updated a few docs and tests

* Updating some doc strings

* A few small changes to the tests

* Small doc changes

* regenerated APR.cs

* more doc clean up and  some code changes

* reversed code path in /program.cs

* cleaning up test methods

* started working on int tests for APR on tasks

* Added integration tests.

* reverted spacing

* small clean up of tests before a CR

* code changes from a CR

* rename test name

* Refactoring a few tests

* void to async signatures

* Code review changes

* just a quick clean up

* WaitForJobStateAsync will now just throw an error if it goes over time

* Regenerated protocol layer from the vnext swagger branch

* Revert "Regenerated protocol layer from the vnext swagger branch"

This reverts commit 4e09b33ff630d1bb3e33155fea1c08c737280bd5.

* Regenerated protocol layer based on v0.17.0-Nightly20160629

* updated autorest version

* Fix RegenerateBatch script

* updated doc strings

* Apr on tasks tests

* Re-worked Integration tests

* A few CR changes

* fixing patch tests

* Small clean up

* cleaned up /// comment on JobAction.cs

* few changes based on matt-c suggestions

* removed commented out code

* Removed src/Batch/RegenerateBatch.cmd

* Regenerated the protocol layer from the swagger spec
  • Loading branch information
matthew-rollitt authored and matthchr committed Jul 27, 2016
1 parent bfbd40e commit d8d2959
Show file tree
Hide file tree
Showing 30 changed files with 1,861 additions and 25 deletions.
8 changes: 4 additions & 4 deletions src/Batch/Client/Src/Generated/ApplicationPackageReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Batch
using System.Linq;

/// <summary>
/// A reference to an application package to be installed on compute nodes in a pool.
/// A reference to an application package to be deployed to compute nodes.
/// </summary>
public partial class ApplicationPackageReference : ITransportObjectProvider<Models.ApplicationPackageReference>, IPropertyMetadata
{
Expand Down Expand Up @@ -60,7 +60,7 @@ internal ApplicationPackageReference(Models.ApplicationPackageReference protocol
#region ApplicationPackageReference

/// <summary>
/// Gets or sets the id of the application to be installed on the compute nodes.
/// Gets or sets the id of the application to be deployed on compute nodes.
/// </summary>
public string ApplicationId
{
Expand All @@ -69,10 +69,10 @@ public string ApplicationId
}

/// <summary>
/// Gets or sets the version of the application to be installed on the compute nodes.
/// Gets or sets the version of the application to be deployed on compute nodes.
/// </summary>
/// <remarks>
/// If not specified, the default version of the application, as defined in the application settings, is installed.
/// If not specified, the default version of the application, as defined in the application settings, is deployed.
/// If no default version is defined in the application settings, you must specify a version in the <see cref="ApplicationPackageReference"/>.
/// </remarks>
public string Version
Expand Down
20 changes: 20 additions & 0 deletions src/Batch/Client/Src/Generated/CloudTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public partial class CloudTask : ITransportObjectProvider<Models.TaskAddParamete
private class PropertyContainer : PropertyCollection
{
public readonly PropertyAccessor<AffinityInformation> AffinityInformationProperty;
public readonly PropertyAccessor<IList<ApplicationPackageReference>> ApplicationPackageReferencesProperty;
public readonly PropertyAccessor<string> CommandLineProperty;
public readonly PropertyAccessor<ComputeNodeInformation> ComputeNodeInformationProperty;
public readonly PropertyAccessor<TaskConstraints> ConstraintsProperty;
Expand All @@ -44,6 +45,7 @@ private class PropertyContainer : PropertyCollection
public PropertyContainer() : base(BindingState.Unbound)
{
this.AffinityInformationProperty = this.CreatePropertyAccessor<AffinityInformation>("AffinityInformation", BindingAccess.Read | BindingAccess.Write);
this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor<IList<ApplicationPackageReference>>("ApplicationPackageReferences", BindingAccess.Read | BindingAccess.Write);
this.CommandLineProperty = this.CreatePropertyAccessor<string>("CommandLine", BindingAccess.Read | BindingAccess.Write);
this.ComputeNodeInformationProperty = this.CreatePropertyAccessor<ComputeNodeInformation>("ComputeNodeInformation", BindingAccess.None);
this.ConstraintsProperty = this.CreatePropertyAccessor<TaskConstraints>("Constraints", BindingAccess.Read | BindingAccess.Write);
Expand Down Expand Up @@ -74,6 +76,10 @@ public PropertyContainer(Models.CloudTask protocolObject) : base(BindingState.Bo
UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.AffinityInfo, o => new AffinityInformation(o).Freeze()),
"AffinityInformation",
BindingAccess.Read);
this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
ApplicationPackageReference.ConvertFromProtocolCollectionAndFreeze(protocolObject.ApplicationPackageReferences),
"ApplicationPackageReferences",
BindingAccess.Read);
this.CommandLineProperty = this.CreatePropertyAccessor(
protocolObject.CommandLine,
"CommandLine",
Expand Down Expand Up @@ -218,6 +224,19 @@ public AffinityInformation AffinityInformation
set { this.propertyContainer.AffinityInformationProperty.Value = value; }
}

/// <summary>
/// Gets or sets a list of application packages that the Batch service will deploy to the compute node before running
/// the command line.
/// </summary>
public IList<ApplicationPackageReference> ApplicationPackageReferences
{
get { return this.propertyContainer.ApplicationPackageReferencesProperty.Value; }
set
{
this.propertyContainer.ApplicationPackageReferencesProperty.Value = ConcurrentChangeTrackedModifiableList<ApplicationPackageReference>.TransformEnumerableToConcurrentModifiableList(value);
}
}

/// <summary>
/// Gets or sets the command line of the task.
/// </summary>
Expand Down Expand Up @@ -464,6 +483,7 @@ bool IReadOnly.IsReadOnly
Models.TaskAddParameter result = new Models.TaskAddParameter()
{
AffinityInfo = UtilitiesInternal.CreateObjectWithNullCheck(this.AffinityInformation, (o) => o.GetTransportObject()),
ApplicationPackageReferences = UtilitiesInternal.ConvertToProtocolCollection(this.ApplicationPackageReferences),
CommandLine = this.CommandLine,
Constraints = UtilitiesInternal.CreateObjectWithNullCheck(this.Constraints, (o) => o.GetTransportObject()),
DependsOn = UtilitiesInternal.CreateObjectWithNullCheck(this.DependsOn, (o) => o.GetTransportObject()),
Expand Down
20 changes: 20 additions & 0 deletions src/Batch/Client/Src/Generated/JobManagerTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public partial class JobManagerTask : ITransportObjectProvider<Models.JobManager
{
private class PropertyContainer : PropertyCollection
{
public readonly PropertyAccessor<IList<ApplicationPackageReference>> ApplicationPackageReferencesProperty;
public readonly PropertyAccessor<string> CommandLineProperty;
public readonly PropertyAccessor<TaskConstraints> ConstraintsProperty;
public readonly PropertyAccessor<string> DisplayNameProperty;
Expand All @@ -28,6 +29,7 @@ private class PropertyContainer : PropertyCollection

public PropertyContainer() : base(BindingState.Unbound)
{
this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor<IList<ApplicationPackageReference>>("ApplicationPackageReferences", BindingAccess.Read | BindingAccess.Write);
this.CommandLineProperty = this.CreatePropertyAccessor<string>("CommandLine", BindingAccess.Read | BindingAccess.Write);
this.ConstraintsProperty = this.CreatePropertyAccessor<TaskConstraints>("Constraints", BindingAccess.Read | BindingAccess.Write);
this.DisplayNameProperty = this.CreatePropertyAccessor<string>("DisplayName", BindingAccess.Read | BindingAccess.Write);
Expand All @@ -41,6 +43,10 @@ public PropertyContainer() : base(BindingState.Unbound)

public PropertyContainer(Models.JobManagerTask protocolObject) : base(BindingState.Bound)
{
this.ApplicationPackageReferencesProperty = this.CreatePropertyAccessor(
ApplicationPackageReference.ConvertFromProtocolCollectionAndFreeze(protocolObject.ApplicationPackageReferences),
"ApplicationPackageReferences",
BindingAccess.Read);
this.CommandLineProperty = this.CreatePropertyAccessor(
protocolObject.CommandLine,
"CommandLine",
Expand Down Expand Up @@ -107,6 +113,19 @@ internal JobManagerTask(Models.JobManagerTask protocolObject)

#region JobManagerTask

/// <summary>
/// Gets or sets a list of application packages that the Batch service will deploy to the compute node before running
/// the command line.
/// </summary>
public IList<ApplicationPackageReference> ApplicationPackageReferences
{
get { return this.propertyContainer.ApplicationPackageReferencesProperty.Value; }
set
{
this.propertyContainer.ApplicationPackageReferencesProperty.Value = ConcurrentChangeTrackedModifiableList<ApplicationPackageReference>.TransformEnumerableToConcurrentModifiableList(value);
}
}

/// <summary>
/// Gets or sets the command line of the task.
/// </summary>
Expand Down Expand Up @@ -227,6 +246,7 @@ bool IReadOnly.IsReadOnly
{
Models.JobManagerTask result = new Models.JobManagerTask()
{
ApplicationPackageReferences = UtilitiesInternal.ConvertToProtocolCollection(this.ApplicationPackageReferences),
CommandLine = this.CommandLine,
Constraints = UtilitiesInternal.CreateObjectWithNullCheck(this.Constraints, (o) => o.GetTransportObject()),
DisplayName = this.DisplayName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ namespace Microsoft.Azure.Batch.Protocol.Models
using Microsoft.Rest.Azure;

/// <summary>
/// A reference to an application package to be installed on compute nodes
/// in a pool.
/// A reference to an application package to be deployed to compute nodes.
/// </summary>
public partial class ApplicationPackageReference
{
Expand All @@ -42,23 +41,23 @@ public ApplicationPackageReference() { }
/// Initializes a new instance of the ApplicationPackageReference
/// class.
/// </summary>
/// <param name="applicationId">The id of the application to install.</param>
/// <param name="version">The version of the application to install. If omitted, the default version is installed.</param>
/// <param name="applicationId">The id of the application to deploy.</param>
/// <param name="version">The version of the application to deploy. If omitted, the default version is deployed.</param>
public ApplicationPackageReference(string applicationId, string version = default(string))
{
ApplicationId = applicationId;
Version = version;
}

/// <summary>
/// Gets or sets the id of the application to install.
/// Gets or sets the id of the application to deploy.
/// </summary>
[JsonProperty(PropertyName = "applicationId")]
public string ApplicationId { get; set; }

/// <summary>
/// Gets or sets the version of the application to install. If
/// omitted, the default version is installed.
/// Gets or sets the version of the application to deploy. If omitted,
/// the default version is deployed.
/// </summary>
[JsonProperty(PropertyName = "version")]
public string Version { get; set; }
Expand Down
21 changes: 20 additions & 1 deletion src/Batch/Client/Src/GeneratedProtocol/Models/CloudTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public CloudTask() { }
/// <param name="multiInstanceSettings">Information about how to run the multi-instance task.</param>
/// <param name="stats">Resource usage statistics for the task.</param>
/// <param name="dependsOn">Any dependencies this task has.</param>
public CloudTask(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), DateTime? lastModified = default(DateTime?), DateTime? creationTime = default(DateTime?), ExitConditions exitConditions = default(ExitConditions), TaskState? state = default(TaskState?), DateTime? stateTransitionTime = default(DateTime?), TaskState? previousState = default(TaskState?), DateTime? previousStateTransitionTime = default(DateTime?), string commandLine = default(string), IList<ResourceFile> resourceFiles = default(IList<ResourceFile>), IList<EnvironmentSetting> environmentSettings = default(IList<EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), bool? runElevated = default(bool?), TaskExecutionInformation executionInfo = default(TaskExecutionInformation), ComputeNodeInformation nodeInfo = default(ComputeNodeInformation), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskStatistics stats = default(TaskStatistics), TaskDependencies dependsOn = default(TaskDependencies))
/// <param name="applicationPackageReferences">A list of application packages that the Batch service will deploy to the compute node before running the command line.</param>
public CloudTask(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), DateTime? lastModified = default(DateTime?), DateTime? creationTime = default(DateTime?), ExitConditions exitConditions = default(ExitConditions), TaskState? state = default(TaskState?), DateTime? stateTransitionTime = default(DateTime?), TaskState? previousState = default(TaskState?), DateTime? previousStateTransitionTime = default(DateTime?), string commandLine = default(string), IList<ResourceFile> resourceFiles = default(IList<ResourceFile>), IList<EnvironmentSetting> environmentSettings = default(IList<EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), bool? runElevated = default(bool?), TaskExecutionInformation executionInfo = default(TaskExecutionInformation), ComputeNodeInformation nodeInfo = default(ComputeNodeInformation), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskStatistics stats = default(TaskStatistics), TaskDependencies dependsOn = default(TaskDependencies), IList<ApplicationPackageReference> applicationPackageReferences = default(IList<ApplicationPackageReference>))
{
Id = id;
DisplayName = displayName;
Expand All @@ -85,6 +86,7 @@ public CloudTask() { }
MultiInstanceSettings = multiInstanceSettings;
Stats = stats;
DependsOn = dependsOn;
ApplicationPackageReferences = applicationPackageReferences;
}

/// <summary>
Expand Down Expand Up @@ -257,6 +259,13 @@ public CloudTask() { }
[JsonProperty(PropertyName = "dependsOn")]
public TaskDependencies DependsOn { get; set; }

/// <summary>
/// Gets or sets a list of application packages that the Batch service
/// will deploy to the compute node before running the command line.
/// </summary>
[JsonProperty(PropertyName = "applicationPackageReferences")]
public IList<ApplicationPackageReference> ApplicationPackageReferences { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down Expand Up @@ -301,6 +310,16 @@ public virtual void Validate()
{
this.Stats.Validate();
}
if (this.ApplicationPackageReferences != null)
{
foreach (var element2 in this.ApplicationPackageReferences)
{
if (element2 != null)
{
element2.Validate();
}
}
}
}
}
}
21 changes: 20 additions & 1 deletion src/Batch/Client/Src/GeneratedProtocol/Models/JobManagerTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public JobManagerTask() { }
/// <param name="killJobOnCompletion">Whether completion of the Job Manager task signifies completion of the entire job.</param>
/// <param name="runElevated">Whether to run the Job Manager task in elevated mode. The default value is false.</param>
/// <param name="runExclusive">Whether the Job Manager task requires exclusive use of the compute node where it runs.</param>
public JobManagerTask(string id, string commandLine, string displayName = default(string), IList<ResourceFile> resourceFiles = default(IList<ResourceFile>), IList<EnvironmentSetting> environmentSettings = default(IList<EnvironmentSetting>), TaskConstraints constraints = default(TaskConstraints), bool? killJobOnCompletion = default(bool?), bool? runElevated = default(bool?), bool? runExclusive = default(bool?))
/// <param name="applicationPackageReferences">A list of application packages that the Batch service will deploy to the compute node before running the command line.</param>
public JobManagerTask(string id, string commandLine, string displayName = default(string), IList<ResourceFile> resourceFiles = default(IList<ResourceFile>), IList<EnvironmentSetting> environmentSettings = default(IList<EnvironmentSetting>), TaskConstraints constraints = default(TaskConstraints), bool? killJobOnCompletion = default(bool?), bool? runElevated = default(bool?), bool? runExclusive = default(bool?), IList<ApplicationPackageReference> applicationPackageReferences = default(IList<ApplicationPackageReference>))
{
Id = id;
DisplayName = displayName;
Expand All @@ -59,6 +60,7 @@ public JobManagerTask() { }
KillJobOnCompletion = killJobOnCompletion;
RunElevated = runElevated;
RunExclusive = runExclusive;
ApplicationPackageReferences = applicationPackageReferences;
}

/// <summary>
Expand Down Expand Up @@ -136,6 +138,13 @@ public JobManagerTask() { }
[JsonProperty(PropertyName = "runExclusive")]
public bool? RunExclusive { get; set; }

/// <summary>
/// Gets or sets a list of application packages that the Batch service
/// will deploy to the compute node before running the command line.
/// </summary>
[JsonProperty(PropertyName = "applicationPackageReferences")]
public IList<ApplicationPackageReference> ApplicationPackageReferences { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down Expand Up @@ -172,6 +181,16 @@ public virtual void Validate()
}
}
}
if (this.ApplicationPackageReferences != null)
{
foreach (var element2 in this.ApplicationPackageReferences)
{
if (element2 != null)
{
element2.Validate();
}
}
}
}
}
}
Loading

0 comments on commit d8d2959

Please sign in to comment.