/// <summary>
 /// Initializes a new instance of the ComputeNode class.
 /// </summary>
 /// <param name="id">The ID of the Compute Node.</param>
 /// <param name="url">The URL of the Compute Node.</param>
 /// <param name="state">The current state of the Compute Node.</param>
 /// <param name="schedulingState">Whether the Compute Node is available
 /// for Task scheduling.</param>
 /// <param name="stateTransitionTime">The time at which the Compute
 /// Node entered its current state.</param>
 /// <param name="lastBootTime">The last time at which the Compute Node
 /// was started.</param>
 /// <param name="allocationTime">The time at which this Compute Node
 /// was allocated to the Pool.</param>
 /// <param name="ipAddress">The IP address that other Nodes can use to
 /// communicate with this Compute Node.</param>
 /// <param name="affinityId">An identifier which can be passed when
 /// adding a Task to request that the Task be scheduled on this Compute
 /// Node.</param>
 /// <param name="vmSize">The size of the virtual machine hosting the
 /// Compute Node.</param>
 /// <param name="totalTasksRun">The total number of Job Tasks completed
 /// on the Compute Node. This includes Job Manager Tasks and normal
 /// Tasks, but not Job Preparation, Job Release or Start Tasks.</param>
 /// <param name="runningTasksCount">The total number of currently
 /// running Job Tasks on the Compute Node. This includes Job Manager
 /// Tasks and normal Tasks, but not Job Preparation, Job Release or
 /// Start Tasks.</param>
 /// <param name="runningTaskSlotsCount">The total number of scheduling
 /// slots used by currently running Job Tasks on the Compute Node. This
 /// includes Job Manager Tasks and normal Tasks, but not Job
 /// Preparation, Job Release or Start Tasks.</param>
 /// <param name="totalTasksSucceeded">The total number of Job Tasks
 /// which completed successfully (with exitCode 0) on the Compute Node.
 /// This includes Job Manager Tasks and normal Tasks, but not Job
 /// Preparation, Job Release or Start Tasks.</param>
 /// <param name="recentTasks">A list of Tasks whose state has recently
 /// changed.</param>
 /// <param name="startTask">The Task specified to run on the Compute
 /// Node as it joins the Pool.</param>
 /// <param name="startTaskInfo">Runtime information about the execution
 /// of the StartTask on the Compute Node.</param>
 /// <param name="certificateReferences">The list of Certificates
 /// installed on the Compute Node.</param>
 /// <param name="errors">The list of errors that are currently being
 /// encountered by the Compute Node.</param>
 /// <param name="isDedicated">Whether this Compute Node is a dedicated
 /// Compute Node. If false, the Compute Node is a low-priority Compute
 /// Node.</param>
 /// <param name="endpointConfiguration">The endpoint configuration for
 /// the Compute Node.</param>
 /// <param name="nodeAgentInfo">Information about the Compute Node
 /// agent version and the time the Compute Node upgraded to a new
 /// version.</param>
 /// <param name="virtualMachineInfo">Info about the current state of
 /// the virtual machine.</param>
 public ComputeNode(string id = default(string), string url = default(string), ComputeNodeState?state = default(ComputeNodeState?), SchedulingState?schedulingState = default(SchedulingState?), System.DateTime?stateTransitionTime = default(System.DateTime?), System.DateTime?lastBootTime = default(System.DateTime?), System.DateTime?allocationTime = default(System.DateTime?), string ipAddress = default(string), string affinityId = default(string), string vmSize = default(string), int?totalTasksRun = default(int?), int?runningTasksCount = default(int?), int?runningTaskSlotsCount = default(int?), int?totalTasksSucceeded = default(int?), IList <TaskInformation> recentTasks = default(IList <TaskInformation>), StartTask startTask = default(StartTask), StartTaskInformation startTaskInfo = default(StartTaskInformation), IList <CertificateReference> certificateReferences = default(IList <CertificateReference>), IList <ComputeNodeError> errors = default(IList <ComputeNodeError>), bool?isDedicated = default(bool?), ComputeNodeEndpointConfiguration endpointConfiguration = default(ComputeNodeEndpointConfiguration), NodeAgentInformation nodeAgentInfo = default(NodeAgentInformation), VirtualMachineInfo virtualMachineInfo = default(VirtualMachineInfo))
 {
     Id                    = id;
     Url                   = url;
     State                 = state;
     SchedulingState       = schedulingState;
     StateTransitionTime   = stateTransitionTime;
     LastBootTime          = lastBootTime;
     AllocationTime        = allocationTime;
     IpAddress             = ipAddress;
     AffinityId            = affinityId;
     VmSize                = vmSize;
     TotalTasksRun         = totalTasksRun;
     RunningTasksCount     = runningTasksCount;
     RunningTaskSlotsCount = runningTaskSlotsCount;
     TotalTasksSucceeded   = totalTasksSucceeded;
     RecentTasks           = recentTasks;
     StartTask             = startTask;
     StartTaskInfo         = startTaskInfo;
     CertificateReferences = certificateReferences;
     Errors                = errors;
     IsDedicated           = isDedicated;
     EndpointConfiguration = endpointConfiguration;
     NodeAgentInfo         = nodeAgentInfo;
     VirtualMachineInfo    = virtualMachineInfo;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the PoolSpecification class.
 /// </summary>
 /// <param name="vmSize">The size of the virtual machines in the Pool.
 /// All virtual machines in a Pool are the same size.</param>
 /// <param name="displayName">The display name for the Pool.</param>
 /// <param name="cloudServiceConfiguration">The cloud service
 /// configuration for the Pool.</param>
 /// <param name="virtualMachineConfiguration">The virtual machine
 /// configuration for the Pool.</param>
 /// <param name="taskSlotsPerNode">The number of task slots that can be
 /// used to run concurrent tasks on a single compute node in the
 /// pool.</param>
 /// <param name="taskSchedulingPolicy">How Tasks are distributed across
 /// Compute Nodes in a Pool.</param>
 /// <param name="resizeTimeout">The timeout for allocation of Compute
 /// Nodes to the Pool.</param>
 /// <param name="targetDedicatedNodes">The desired number of dedicated
 /// Compute Nodes in the Pool.</param>
 /// <param name="targetLowPriorityNodes">The desired number of
 /// low-priority Compute Nodes in the Pool.</param>
 /// <param name="enableAutoScale">Whether the Pool size should
 /// automatically adjust over time.</param>
 /// <param name="autoScaleFormula">The formula for the desired number
 /// of Compute Nodes in the Pool.</param>
 /// <param name="autoScaleEvaluationInterval">The time interval at
 /// which to automatically adjust the Pool size according to the
 /// autoscale formula.</param>
 /// <param name="enableInterNodeCommunication">Whether the Pool permits
 /// direct communication between Compute Nodes.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the Pool.</param>
 /// <param name="startTask">A Task to run on each Compute Node as it
 /// joins the Pool. The Task runs when the Compute Node is added to the
 /// Pool or when the Compute Node is restarted.</param>
 /// <param name="certificateReferences">A list of Certificates to be
 /// installed on each Compute Node in the Pool.</param>
 /// <param name="applicationPackageReferences">The list of Packages to
 /// be installed on each Compute Node in the Pool.</param>
 /// <param name="applicationLicenses">The list of application licenses
 /// the Batch service will make available on each Compute Node in the
 /// Pool.</param>
 /// <param name="userAccounts">The list of user Accounts to be created
 /// on each Compute Node in the Pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the Pool as metadata.</param>
 /// <param name="mountConfiguration">A list of file systems to mount on
 /// each node in the pool.</param>
 public PoolSpecification(string vmSize, string displayName = default(string), CloudServiceConfiguration cloudServiceConfiguration = default(CloudServiceConfiguration), VirtualMachineConfiguration virtualMachineConfiguration = default(VirtualMachineConfiguration), int?taskSlotsPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.TimeSpan?resizeTimeout = default(System.TimeSpan?), int?targetDedicatedNodes = default(int?), int?targetLowPriorityNodes = default(int?), bool?enableAutoScale = default(bool?), string autoScaleFormula = default(string), System.TimeSpan?autoScaleEvaluationInterval = default(System.TimeSpan?), bool?enableInterNodeCommunication = default(bool?), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), StartTask startTask = default(StartTask), IList <CertificateReference> certificateReferences = default(IList <CertificateReference>), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), IList <string> applicationLicenses = default(IList <string>), IList <UserAccount> userAccounts = default(IList <UserAccount>), IList <MetadataItem> metadata = default(IList <MetadataItem>), IList <MountConfiguration> mountConfiguration = default(IList <MountConfiguration>))
 {
     DisplayName = displayName;
     VmSize      = vmSize;
     CloudServiceConfiguration   = cloudServiceConfiguration;
     VirtualMachineConfiguration = virtualMachineConfiguration;
     TaskSlotsPerNode            = taskSlotsPerNode;
     TaskSchedulingPolicy        = taskSchedulingPolicy;
     ResizeTimeout                = resizeTimeout;
     TargetDedicatedNodes         = targetDedicatedNodes;
     TargetLowPriorityNodes       = targetLowPriorityNodes;
     EnableAutoScale              = enableAutoScale;
     AutoScaleFormula             = autoScaleFormula;
     AutoScaleEvaluationInterval  = autoScaleEvaluationInterval;
     EnableInterNodeCommunication = enableInterNodeCommunication;
     NetworkConfiguration         = networkConfiguration;
     StartTask                    = startTask;
     CertificateReferences        = certificateReferences;
     ApplicationPackageReferences = applicationPackageReferences;
     ApplicationLicenses          = applicationLicenses;
     UserAccounts                 = userAccounts;
     Metadata           = metadata;
     MountConfiguration = mountConfiguration;
     CustomInit();
 }
Example #3
0
        public void GetPoolStartTask()
        {
            var startTask = new Microsoft.Azure.Batch.Protocol.Models.StartTask
            {
                CommandLine         = "-start",
                EnvironmentSettings = new[] { new EnvironmentSetting {
                                                  Name = "windows", Value = "foo"
                                              } },
                MaxTaskRetryCount = 3,
                RunElevated       = false,
                WaitForSuccess    = false
            };


            using (var client = FakeBatchClient.ConnectWithFakeCredentials(ClientUnitTestCommon.DummyBaseUrl))
            {
                client.FakeProtocolLayer.GetPoolHandler = (skipToken, behaviors) => Task.FromResult(
                    new AzureOperationResponse <ProxyModels.CloudPool, ProxyModels.PoolGetHeaders>()
                {
                    Body = new ProxyModels.CloudPool {
                        DisplayName = "batch-test", StartTask = startTask,
                    }
                });

                var pool = client.PoolOperations.GetPool("batch-test");

                Assert.Equal("batch-test", pool.DisplayName);
                Assert.Equal(pool.StartTask.CommandLine, "-start");
                Assert.Equal(pool.StartTask.EnvironmentSettings.FirstOrDefault().Name, "windows");
                Assert.Equal(pool.StartTask.EnvironmentSettings.FirstOrDefault().Value, "foo");
                Assert.Equal(pool.StartTask.MaxTaskRetryCount, 3);
                Assert.Equal(pool.StartTask.RunElevated, false);
                Assert.Equal(pool.StartTask.WaitForSuccess, false);
            }
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the PoolPatchParameter class.
 /// </summary>
 /// <param name="startTask">A task to run on each compute node as it
 /// joins the pool.</param>
 /// <param name="certificateReferences">A list of certificates to be
 /// installed on each compute node in the pool.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages to be installed on each compute node in the pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the pool as metadata.</param>
 public PoolPatchParameter(StartTask startTask = default(StartTask), System.Collections.Generic.IList <CertificateReference> certificateReferences = default(System.Collections.Generic.IList <CertificateReference>), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>), System.Collections.Generic.IList <MetadataItem> metadata = default(System.Collections.Generic.IList <MetadataItem>))
 {
     StartTask                    = startTask;
     CertificateReferences        = certificateReferences;
     ApplicationPackageReferences = applicationPackageReferences;
     Metadata = metadata;
 }
Example #5
0
 public PropertyContainer(Models.StartTask protocolObject) : base(BindingState.Bound)
 {
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         nameof(CommandLine),
         BindingAccess.Read | BindingAccess.Write);
     this.ContainerSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerSettings, o => new TaskContainerSettings(o).Freeze()),
         nameof(ContainerSettings),
         BindingAccess.Read);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.EnvironmentSettings),
         nameof(EnvironmentSettings),
         BindingAccess.Read | BindingAccess.Write);
     this.MaxTaskRetryCountProperty = this.CreatePropertyAccessor(
         protocolObject.MaxTaskRetryCount,
         nameof(MaxTaskRetryCount),
         BindingAccess.Read | BindingAccess.Write);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollection(protocolObject.ResourceFiles),
         nameof(ResourceFiles),
         BindingAccess.Read | BindingAccess.Write);
     this.UserIdentityProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.UserIdentity, o => new UserIdentity(o)),
         nameof(UserIdentity),
         BindingAccess.Read | BindingAccess.Write);
     this.WaitForSuccessProperty = this.CreatePropertyAccessor(
         protocolObject.WaitForSuccess,
         nameof(WaitForSuccess),
         BindingAccess.Read | BindingAccess.Write);
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the CloudPool class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the pool within
 /// the account.</param>
 /// <param name="displayName">The display name for the pool.</param>
 /// <param name="url">The URL of the pool.</param>
 /// <param name="eTag">The ETag of the pool.</param>
 /// <param name="lastModified">The last modified time of the
 /// pool.</param>
 /// <param name="creationTime">The creation time of the pool.</param>
 /// <param name="state">The current state of the pool.</param>
 /// <param name="stateTransitionTime">The time at which the pool
 /// entered its current state.</param>
 /// <param name="allocationState">Whether the pool is resizing.</param>
 /// <param name="allocationStateTransitionTime">The time at which the
 /// pool entered its current allocation state.</param>
 /// <param name="vmSize">The size of virtual machines in the pool. All
 /// virtual machines in a pool are the same size.</param>
 /// <param name="cloudServiceConfiguration">The cloud service
 /// configuration for the pool.</param>
 /// <param name="virtualMachineConfiguration">The virtual machine
 /// configuration for the pool.</param>
 /// <param name="resizeTimeout">The timeout for allocation of compute
 /// nodes to the pool.</param>
 /// <param name="resizeError">Details of any error encountered while
 /// performing the last resize on the pool.</param>
 /// <param name="currentDedicated">The number of compute nodes
 /// currently in the pool.</param>
 /// <param name="targetDedicated">The desired number of compute nodes
 /// in the pool.</param>
 /// <param name="enableAutoScale">Whether the pool size should
 /// automatically adjust over time.</param>
 /// <param name="autoScaleFormula">A formula for the desired number of
 /// compute nodes in the pool.</param>
 /// <param name="autoScaleEvaluationInterval">A time interval for the
 /// desired AutoScale evaluation period in the pool.</param>
 /// <param name="autoScaleRun">The results and errors from the last
 /// execution of the autoscale formula.</param>
 /// <param name="enableInterNodeCommunication">Whether the pool
 /// permits direct communication between nodes.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the pool.</param>
 /// <param name="startTask">A task specified to run on each compute
 /// node as it joins the pool.</param>
 /// <param name="certificateReferences">The list of certificates to be
 /// installed on each compute node in the pool.</param>
 /// <param name="applicationPackageReferences">The list of application
 /// packages to be installed on each compute node in the pool.</param>
 /// <param name="maxTasksPerNode">The maximum number of tasks that can
 /// run concurrently on a single compute node in the pool.</param>
 /// <param name="taskSchedulingPolicy">How the Batch service
 /// distributes tasks between compute nodes in the pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the pool as metadata.</param>
 /// <param name="stats">Utilization and resource usage statistics for
 /// the entire lifetime of the pool.</param>
 public CloudPool(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), PoolState?state = default(PoolState?), System.DateTime?stateTransitionTime = default(System.DateTime?), AllocationState?allocationState = default(AllocationState?), System.DateTime?allocationStateTransitionTime = default(System.DateTime?), string vmSize = default(string), CloudServiceConfiguration cloudServiceConfiguration = default(CloudServiceConfiguration), VirtualMachineConfiguration virtualMachineConfiguration = default(VirtualMachineConfiguration), System.TimeSpan?resizeTimeout = default(System.TimeSpan?), ResizeError resizeError = default(ResizeError), int?currentDedicated = default(int?), int?targetDedicated = default(int?), bool?enableAutoScale = default(bool?), string autoScaleFormula = default(string), System.TimeSpan?autoScaleEvaluationInterval = default(System.TimeSpan?), AutoScaleRun autoScaleRun = default(AutoScaleRun), bool?enableInterNodeCommunication = default(bool?), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), StartTask startTask = default(StartTask), System.Collections.Generic.IList <CertificateReference> certificateReferences = default(System.Collections.Generic.IList <CertificateReference>), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>), int?maxTasksPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.Collections.Generic.IList <MetadataItem> metadata = default(System.Collections.Generic.IList <MetadataItem>), PoolStatistics stats = default(PoolStatistics))
 {
     Id                            = id;
     DisplayName                   = displayName;
     Url                           = url;
     ETag                          = eTag;
     LastModified                  = lastModified;
     CreationTime                  = creationTime;
     State                         = state;
     StateTransitionTime           = stateTransitionTime;
     AllocationState               = allocationState;
     AllocationStateTransitionTime = allocationStateTransitionTime;
     VmSize                        = vmSize;
     CloudServiceConfiguration     = cloudServiceConfiguration;
     VirtualMachineConfiguration   = virtualMachineConfiguration;
     ResizeTimeout                 = resizeTimeout;
     ResizeError                   = resizeError;
     CurrentDedicated              = currentDedicated;
     TargetDedicated               = targetDedicated;
     EnableAutoScale               = enableAutoScale;
     AutoScaleFormula              = autoScaleFormula;
     AutoScaleEvaluationInterval   = autoScaleEvaluationInterval;
     AutoScaleRun                  = autoScaleRun;
     EnableInterNodeCommunication  = enableInterNodeCommunication;
     NetworkConfiguration          = networkConfiguration;
     StartTask                     = startTask;
     CertificateReferences         = certificateReferences;
     ApplicationPackageReferences  = applicationPackageReferences;
     MaxTasksPerNode               = maxTasksPerNode;
     TaskSchedulingPolicy          = taskSchedulingPolicy;
     Metadata                      = metadata;
     Stats                         = stats;
 }
Example #7
0
 public PropertyContainer(Models.StartTask protocolObject) : base(BindingState.Bound)
 {
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         "CommandLine",
         BindingAccess.Read | BindingAccess.Write);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.EnvironmentSettings),
         "EnvironmentSettings",
         BindingAccess.Read | BindingAccess.Write);
     this.MaxTaskRetryCountProperty = this.CreatePropertyAccessor(
         protocolObject.MaxTaskRetryCount,
         "MaxTaskRetryCount",
         BindingAccess.Read | BindingAccess.Write);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollection(protocolObject.ResourceFiles),
         "ResourceFiles",
         BindingAccess.Read | BindingAccess.Write);
     this.RunElevatedProperty = this.CreatePropertyAccessor(
         protocolObject.RunElevated,
         "RunElevated",
         BindingAccess.Read | BindingAccess.Write);
     this.WaitForSuccessProperty = this.CreatePropertyAccessor(
         protocolObject.WaitForSuccess,
         "WaitForSuccess",
         BindingAccess.Read | BindingAccess.Write);
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the PoolPatchParameter class.
 /// </summary>
 /// <param name="startTask">A task to run on each compute node as it
 /// joins the pool. The task runs when the node is added to the pool or
 /// when the node is restarted.</param>
 /// <param name="certificateReferences">A list of certificates to be
 /// installed on each compute node in the pool.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages to be installed on each compute node in the pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the pool as metadata.</param>
 public PoolPatchParameter(StartTask startTask = default(StartTask), IList <CertificateReference> certificateReferences = default(IList <CertificateReference>), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), IList <MetadataItem> metadata = default(IList <MetadataItem>))
 {
     StartTask                    = startTask;
     CertificateReferences        = certificateReferences;
     ApplicationPackageReferences = applicationPackageReferences;
     Metadata = metadata;
     CustomInit();
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the PoolUpdatePropertiesParameter
 /// class.
 /// </summary>
 /// <param name="certificateReferences">A list of certificates to be
 /// installed on each compute node in the pool.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages to be installed on each compute node in the pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the pool as metadata.</param>
 /// <param name="startTask">A task to run on each compute node as it
 /// joins the pool. The task runs when the node is added to the pool or
 /// when the node is restarted.</param>
 public PoolUpdatePropertiesParameter(IList <CertificateReference> certificateReferences, IList <ApplicationPackageReference> applicationPackageReferences, IList <MetadataItem> metadata, StartTask startTask = default(StartTask))
 {
     StartTask                    = startTask;
     CertificateReferences        = certificateReferences;
     ApplicationPackageReferences = applicationPackageReferences;
     Metadata = metadata;
     CustomInit();
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the PoolSpecification class.
 /// </summary>
 /// <param name="vmSize">The size of the virtual machines in the pool.
 /// All virtual machines in a pool are the same size.</param>
 /// <param name="displayName">The display name for the pool.</param>
 /// <param name="cloudServiceConfiguration">The cloud service
 /// configuration for the pool.</param>
 /// <param name="virtualMachineConfiguration">The virtual machine
 /// configuration for the pool.</param>
 /// <param name="maxTasksPerNode">The maximum number of tasks that can
 /// run concurrently on a single compute node in the pool.</param>
 /// <param name="taskSchedulingPolicy">How tasks are distributed among
 /// compute nodes in the pool.</param>
 /// <param name="resizeTimeout">The timeout for allocation of compute
 /// nodes to the pool.</param>
 /// <param name="targetDedicated">The desired number of compute nodes
 /// in the pool.</param>
 /// <param name="enableAutoScale">Whether the pool size should
 /// automatically adjust over time.</param>
 /// <param name="autoScaleFormula">The formula for the desired number
 /// of compute nodes in the pool.</param>
 /// <param name="autoScaleEvaluationInterval">A time interval for the
 /// desired AutoScale evaluation period in the pool.</param>
 /// <param name="enableInterNodeCommunication">Whether the pool
 /// permits direct communication between nodes.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the pool.</param>
 /// <param name="startTask">A task to run on each compute node as it
 /// joins the pool. The task runs when the node is added to the pool
 /// or when the node is restarted.</param>
 /// <param name="certificateReferences">A list of certificates to be
 /// installed on each compute node in the pool.</param>
 /// <param name="applicationPackageReferences">The list of application
 /// packages to be installed on each compute node in the pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the pool as metadata.</param>
 public PoolSpecification(string vmSize, string displayName = default(string), CloudServiceConfiguration cloudServiceConfiguration = default(CloudServiceConfiguration), VirtualMachineConfiguration virtualMachineConfiguration = default(VirtualMachineConfiguration), int?maxTasksPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.TimeSpan?resizeTimeout = default(System.TimeSpan?), int?targetDedicated = default(int?), bool?enableAutoScale = default(bool?), string autoScaleFormula = default(string), System.TimeSpan?autoScaleEvaluationInterval = default(System.TimeSpan?), bool?enableInterNodeCommunication = default(bool?), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), StartTask startTask = default(StartTask), System.Collections.Generic.IList <CertificateReference> certificateReferences = default(System.Collections.Generic.IList <CertificateReference>), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>), System.Collections.Generic.IList <MetadataItem> metadata = default(System.Collections.Generic.IList <MetadataItem>))
 {
     DisplayName = displayName;
     VmSize      = vmSize;
     CloudServiceConfiguration   = cloudServiceConfiguration;
     VirtualMachineConfiguration = virtualMachineConfiguration;
     MaxTasksPerNode             = maxTasksPerNode;
     TaskSchedulingPolicy        = taskSchedulingPolicy;
     ResizeTimeout                = resizeTimeout;
     TargetDedicated              = targetDedicated;
     EnableAutoScale              = enableAutoScale;
     AutoScaleFormula             = autoScaleFormula;
     AutoScaleEvaluationInterval  = autoScaleEvaluationInterval;
     EnableInterNodeCommunication = enableInterNodeCommunication;
     NetworkConfiguration         = networkConfiguration;
     StartTask                    = startTask;
     CertificateReferences        = certificateReferences;
     ApplicationPackageReferences = applicationPackageReferences;
     Metadata = metadata;
 }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the ComputeNode class.
 /// </summary>
 /// <param name="id">The id of the compute node.</param>
 /// <param name="url">The URL of the compute node.</param>
 /// <param name="state">The current state of the compute node.</param>
 /// <param name="schedulingState">Whether the compute node should be
 /// available for task scheduling.</param>
 /// <param name="stateTransitionTime">The time at which the compute
 /// node entered its current state.</param>
 /// <param name="lastBootTime">The time at which the compute node was
 /// started.</param>
 /// <param name="allocationTime">The time at which this compute node
 /// was allocated to the pool.</param>
 /// <param name="ipAddress">The IP address that other compute nodes
 /// can use to communicate with this compute node.</param>
 /// <param name="affinityId">An identifier which can be passed in the
 /// Add Task API to request that the task be scheduled close to this
 /// compute node.</param>
 /// <param name="vmSize">The size of the virtual machine hosting the
 /// compute node.</param>
 /// <param name="totalTasksRun">The total number of job tasks
 /// completed on the compute node. This includes Job Preparation, Job
 /// Release and Job Manager tasks, but not the pool start
 /// task.</param>
 /// <param name="runningTasksCount">The total number of currently
 /// running job tasks on the compute node. This includes Job
 /// Preparation, Job Release, and Job Manager tasks, but not the pool
 /// start task.</param>
 /// <param name="totalTasksSucceeded">The total number of job tasks
 /// which completed successfully (with exitCode 0) on the compute
 /// node. This includes Job Preparation, Job Release, and Job Manager
 /// tasks, but not the pool start task.</param>
 /// <param name="recentTasks">The list of tasks that are currently
 /// running on the compute node.</param>
 /// <param name="startTask">The task specified to run on the compute
 /// node as it joins the pool.</param>
 /// <param name="startTaskInfo">Runtime information about the
 /// execution of the start task on the compute node.</param>
 /// <param name="certificateReferences">The list of certificates
 /// installed on the compute node.</param>
 /// <param name="errors">The list of errors that are currently being
 /// encountered by the compute node.</param>
 public ComputeNode(string id = default(string), string url = default(string), ComputeNodeState?state = default(ComputeNodeState?), SchedulingState?schedulingState = default(SchedulingState?), System.DateTime?stateTransitionTime = default(System.DateTime?), System.DateTime?lastBootTime = default(System.DateTime?), System.DateTime?allocationTime = default(System.DateTime?), string ipAddress = default(string), string affinityId = default(string), string vmSize = default(string), int?totalTasksRun = default(int?), int?runningTasksCount = default(int?), int?totalTasksSucceeded = default(int?), System.Collections.Generic.IList <TaskInformation> recentTasks = default(System.Collections.Generic.IList <TaskInformation>), StartTask startTask = default(StartTask), StartTaskInformation startTaskInfo = default(StartTaskInformation), System.Collections.Generic.IList <CertificateReference> certificateReferences = default(System.Collections.Generic.IList <CertificateReference>), System.Collections.Generic.IList <ComputeNodeError> errors = default(System.Collections.Generic.IList <ComputeNodeError>))
 {
     Id                    = id;
     Url                   = url;
     State                 = state;
     SchedulingState       = schedulingState;
     StateTransitionTime   = stateTransitionTime;
     LastBootTime          = lastBootTime;
     AllocationTime        = allocationTime;
     IpAddress             = ipAddress;
     AffinityId            = affinityId;
     VmSize                = vmSize;
     TotalTasksRun         = totalTasksRun;
     RunningTasksCount     = runningTasksCount;
     TotalTasksSucceeded   = totalTasksSucceeded;
     RecentTasks           = recentTasks;
     StartTask             = startTask;
     StartTaskInfo         = startTaskInfo;
     CertificateReferences = certificateReferences;
     Errors                = errors;
 }
Example #12
0
 /// <summary>
 /// Initializes a new instance of the CloudPool class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Pool within
 /// the Account.</param>
 /// <param name="displayName">The display name for the Pool.</param>
 /// <param name="url">The URL of the Pool.</param>
 /// <param name="eTag">The ETag of the Pool.</param>
 /// <param name="lastModified">The last modified time of the
 /// Pool.</param>
 /// <param name="creationTime">The creation time of the Pool.</param>
 /// <param name="state">The current state of the Pool.</param>
 /// <param name="stateTransitionTime">The time at which the Pool
 /// entered its current state.</param>
 /// <param name="allocationState">Whether the Pool is resizing.</param>
 /// <param name="allocationStateTransitionTime">The time at which the
 /// Pool entered its current allocation state.</param>
 /// <param name="vmSize">The size of virtual machines in the Pool. All
 /// virtual machines in a Pool are the same size.</param>
 /// <param name="cloudServiceConfiguration">The cloud service
 /// configuration for the Pool.</param>
 /// <param name="virtualMachineConfiguration">The virtual machine
 /// configuration for the Pool.</param>
 /// <param name="resizeTimeout">The timeout for allocation of Compute
 /// Nodes to the Pool.</param>
 /// <param name="resizeErrors">A list of errors encountered while
 /// performing the last resize on the Pool.</param>
 /// <param name="currentDedicatedNodes">The number of dedicated Compute
 /// Nodes currently in the Pool.</param>
 /// <param name="currentLowPriorityNodes">The number of low-priority
 /// Compute Nodes currently in the Pool.</param>
 /// <param name="targetDedicatedNodes">The desired number of dedicated
 /// Compute Nodes in the Pool.</param>
 /// <param name="targetLowPriorityNodes">The desired number of
 /// low-priority Compute Nodes in the Pool.</param>
 /// <param name="enableAutoScale">Whether the Pool size should
 /// automatically adjust over time.</param>
 /// <param name="autoScaleFormula">A formula for the desired number of
 /// Compute Nodes in the Pool.</param>
 /// <param name="autoScaleEvaluationInterval">The time interval at
 /// which to automatically adjust the Pool size according to the
 /// autoscale formula.</param>
 /// <param name="autoScaleRun">The results and errors from the last
 /// execution of the autoscale formula.</param>
 /// <param name="enableInterNodeCommunication">Whether the Pool permits
 /// direct communication between Compute Nodes.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the Pool.</param>
 /// <param name="startTask">A Task specified to run on each Compute
 /// Node as it joins the Pool.</param>
 /// <param name="certificateReferences">The list of Certificates to be
 /// installed on each Compute Node in the Pool.</param>
 /// <param name="applicationPackageReferences">The list of Packages to
 /// be installed on each Compute Node in the Pool.</param>
 /// <param name="applicationLicenses">The list of application licenses
 /// the Batch service will make available on each Compute Node in the
 /// Pool.</param>
 /// <param name="taskSlotsPerNode">The number of task slots that can be
 /// used to run concurrent tasks on a single compute node in the
 /// pool.</param>
 /// <param name="taskSchedulingPolicy">How Tasks are distributed across
 /// Compute Nodes in a Pool.</param>
 /// <param name="userAccounts">The list of user Accounts to be created
 /// on each Compute Node in the Pool.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the Pool as metadata.</param>
 /// <param name="stats">Utilization and resource usage statistics for
 /// the entire lifetime of the Pool.</param>
 /// <param name="mountConfiguration">A list of file systems to mount on
 /// each node in the pool.</param>
 /// <param name="identity">The identity of the Batch pool, if
 /// configured.</param>
 public CloudPool(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), PoolState?state = default(PoolState?), System.DateTime?stateTransitionTime = default(System.DateTime?), AllocationState?allocationState = default(AllocationState?), System.DateTime?allocationStateTransitionTime = default(System.DateTime?), string vmSize = default(string), CloudServiceConfiguration cloudServiceConfiguration = default(CloudServiceConfiguration), VirtualMachineConfiguration virtualMachineConfiguration = default(VirtualMachineConfiguration), System.TimeSpan?resizeTimeout = default(System.TimeSpan?), IList <ResizeError> resizeErrors = default(IList <ResizeError>), int?currentDedicatedNodes = default(int?), int?currentLowPriorityNodes = default(int?), int?targetDedicatedNodes = default(int?), int?targetLowPriorityNodes = default(int?), bool?enableAutoScale = default(bool?), string autoScaleFormula = default(string), System.TimeSpan?autoScaleEvaluationInterval = default(System.TimeSpan?), AutoScaleRun autoScaleRun = default(AutoScaleRun), bool?enableInterNodeCommunication = default(bool?), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), StartTask startTask = default(StartTask), IList <CertificateReference> certificateReferences = default(IList <CertificateReference>), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), IList <string> applicationLicenses = default(IList <string>), int?taskSlotsPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), IList <UserAccount> userAccounts = default(IList <UserAccount>), IList <MetadataItem> metadata = default(IList <MetadataItem>), PoolStatistics stats = default(PoolStatistics), IList <MountConfiguration> mountConfiguration = default(IList <MountConfiguration>), BatchPoolIdentity identity = default(BatchPoolIdentity))
 {
     Id                            = id;
     DisplayName                   = displayName;
     Url                           = url;
     ETag                          = eTag;
     LastModified                  = lastModified;
     CreationTime                  = creationTime;
     State                         = state;
     StateTransitionTime           = stateTransitionTime;
     AllocationState               = allocationState;
     AllocationStateTransitionTime = allocationStateTransitionTime;
     VmSize                        = vmSize;
     CloudServiceConfiguration     = cloudServiceConfiguration;
     VirtualMachineConfiguration   = virtualMachineConfiguration;
     ResizeTimeout                 = resizeTimeout;
     ResizeErrors                  = resizeErrors;
     CurrentDedicatedNodes         = currentDedicatedNodes;
     CurrentLowPriorityNodes       = currentLowPriorityNodes;
     TargetDedicatedNodes          = targetDedicatedNodes;
     TargetLowPriorityNodes        = targetLowPriorityNodes;
     EnableAutoScale               = enableAutoScale;
     AutoScaleFormula              = autoScaleFormula;
     AutoScaleEvaluationInterval   = autoScaleEvaluationInterval;
     AutoScaleRun                  = autoScaleRun;
     EnableInterNodeCommunication  = enableInterNodeCommunication;
     NetworkConfiguration          = networkConfiguration;
     StartTask                     = startTask;
     CertificateReferences         = certificateReferences;
     ApplicationPackageReferences  = applicationPackageReferences;
     ApplicationLicenses           = applicationLicenses;
     TaskSlotsPerNode              = taskSlotsPerNode;
     TaskSchedulingPolicy          = taskSchedulingPolicy;
     UserAccounts                  = userAccounts;
     Metadata                      = metadata;
     Stats                         = stats;
     MountConfiguration            = mountConfiguration;
     Identity                      = identity;
     CustomInit();
 }