< Summary

Class:Microsoft.Azure.Batch.ComputeNode
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\ComputeNode.cs
C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\ComputeNode.cs
Covered lines:118
Uncovered lines:219
Coverable lines:337
Total lines:964
Line coverage:35% (118 of 337)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
CreateComputeNodeUser()-0%100%
DeleteComputeNodeUserAsync(...)-100%100%
.ctor(...)-100%100%
DeleteComputeNodeUser(...)-100%100%
GetRDPFileAsync(...)-100%100%
GetRDPFile(...)-100%100%
GetRDPFileAsync(...)-100%100%
GetRDPFile(...)-100%100%
GetRemoteLoginSettingsAsync(...)-0%100%
get_ParentPoolId()-0%100%
.ctor(...)-100%100%
GetRemoteLoginSettings(...)-0%100%
get_CustomBehaviors()-0%100%
RemoveFromPoolAsync(...)-25%100%
get_AffinityId()-100%100%
get_AllocationTime()-100%100%
get_CertificateReferences()-100%100%
RemoveFromPool(...)-0%100%
get_EndpointConfiguration()-100%100%
get_Errors()-100%100%
RebootAsync(...)-33.33%100%
get_Id()-100%100%
get_IPAddress()-100%100%
Reboot(...)-0%100%
get_IsDedicated()-100%100%
get_LastBootTime()-100%100%
ReimageAsync(...)-0%100%
get_NodeAgentInformation()-100%100%
Reimage(...)-33.33%100%
get_RecentTasks()-100%100%
get_RunningTasksCount()-100%100%
GetNodeFileAsync(...)-25%100%
get_SchedulingState()-100%100%
get_StartTask()-100%100%
GetNodeFile(...)-0%100%
get_StartTaskInformation()-100%100%
get_State()-100%100%
get_StateTransitionTime()-100%100%
CopyNodeFileContentToStreamAsync(...)-10%100%
get_TotalTasksRun()-100%100%
get_TotalTasksSucceeded()-100%100%
get_Url()-100%100%
CopyNodeFileContentToStream(...)-0%100%
get_VirtualMachineSize()-100%100%
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()-0%100%
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()-0%100%
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)-100%100%
CopyNodeFileContentToStringAsync(...)-0%100%
CopyNodeFileContentToString(...)-0%100%
ListNodeFiles(...)-0%100%
EnableSchedulingAsync(...)-0%100%
EnableScheduling(...)-0%100%
DisableSchedulingAsync(...)-0%100%
DisableScheduling(...)-0%100%
UploadComputeNodeBatchServiceLogsAsync(...)-0%100%
UploadComputeNodeBatchServiceLogs(...)-0%100%
RefreshAsync()-0%100%
Refresh(...)-0%100%
.ctor(...)-0%100%
get_ParentPoolId()-0%100%
.ctor(...)-0%100%
get_CustomBehaviors()-0%100%
get_AffinityId()-0%100%
get_AllocationTime()-0%100%
get_CertificateReferences()-0%100%
get_EndpointConfiguration()-0%100%
get_Errors()-0%100%
get_Id()-0%100%
get_IPAddress()-0%100%
get_IsDedicated()-0%100%
get_LastBootTime()-0%100%
get_NodeAgentInformation()-0%100%
get_RecentTasks()-0%100%
get_RunningTasksCount()-0%100%
get_SchedulingState()-0%100%
get_StartTask()-0%100%
get_StartTaskInformation()-0%100%
get_State()-0%100%
get_StateTransitionTime()-0%100%
get_TotalTasksRun()-0%100%
get_TotalTasksSucceeded()-0%100%
get_Url()-0%100%
get_VirtualMachineSize()-0%100%
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()-0%100%
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()-0%100%
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\ComputeNode.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for license information.
 3
 4using System.Text;
 5
 6namespace Microsoft.Azure.Batch
 7{
 8    using System;
 9    using System.Collections.Generic;
 10    using System.IO;
 11    using System.Threading;
 12    using System.Threading.Tasks;
 13    using Microsoft.Rest.Azure;
 14    using Models = Microsoft.Azure.Batch.Protocol.Models;
 15
 16    /// <summary>
 17    /// Summarizes the state of a compute node.
 18    /// </summary>
 19    public partial class ComputeNode : IRefreshable
 20    {
 21
 22#region ComputeNode
 23
 24        /// <summary>
 25        /// Instantiates an unbound ComputeNodeUser object to be populated by the caller and used to create a user accou
 26        /// </summary>
 27        /// <returns>An <see cref="ComputeNodeUser"/> object.</returns>
 28        public ComputeNodeUser CreateComputeNodeUser()
 29        {
 030            ComputeNodeUser newUser = new ComputeNodeUser(this.parentBatchClient, this.CustomBehaviors, this.parentPoolI
 31
 032            return newUser;
 33        }
 34
 35        /// <summary>
 36        /// Begins an asynchronous call to delete the specified ComputeNodeUser.
 37        /// </summary>
 38        /// <param name="userName">The name of the ComputeNodeUser to be deleted.</param>
 39        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 40        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 41        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 42        public Task DeleteComputeNodeUserAsync(
 43            string userName,
 44            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 45            CancellationToken cancellationToken = default(CancellationToken))
 46        {
 47            // create the behavior managaer
 100348            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 49
 100350            Task asyncTask = this.parentBatchClient.ProtocolLayer.DeleteComputeNodeUser(this.parentPoolId, this.Id, user
 100351
 100352            return asyncTask;
 100353        }
 100354
 100355        /// <summary>
 100356        /// Blocking call to delete the specified ComputeNodeUser.
 100357        /// </summary>
 100358        /// <param name="userName">The name of the ComputeNodeUser to be deleted.</param>
 100359        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 100360
 100361        public void DeleteComputeNodeUser(string userName, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 100362        {
 149163            Task asyncTask = DeleteComputeNodeUserAsync(userName, additionalBehaviors);
 100364            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 100365        }
 100366
 100367        /// <summary>
 100368        /// Begins an asynchronous call to get RDP file data targeting the compute node of the current instance and writ
 100369        /// </summary>
 100370        /// <param name="rdpStream">The Stream into which the RDP file data will be written.  This stream will not be cl
 100371        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 100372        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 100373        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 100374        public Task GetRDPFileAsync(Stream rdpStream, IEnumerable<BatchClientBehavior> additionalBehaviors = null, Cance
 100375        {
 100376            // create the behavior managaer
 100377            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 100378
 100379            Task asyncTask = this.parentBatchClient.ProtocolLayer.GetComputeNodeRDPFile(this.parentPoolId, this.Id, rdpS
 100380
 100381            return asyncTask;
 100382        }
 100383
 100384        /// <summary>
 100385        /// Blocking call to get RDP file data targeting the compute node of the current instance and write them to a sp
 100386        /// </summary>
 150987        /// <param name="rdpStream">The Stream into which the RDP file data will be written.  This stream will not be cl
 100388        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 100389        public void GetRDPFile(Stream rdpStream, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 100390        {
 100391            Task asyncTask = GetRDPFileAsync(rdpStream, additionalBehaviors);
 100392            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 100393        }
 100394
 100395        /// <summary>
 100396        /// Begins an asynchronous call to get RDP file data targeting the compute node of the current instance and writ
 100397        /// </summary>
 100398        /// <param name="rdpFileNameToCreate">The name of the RDP file to be created.</param>
 100399        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 1003100        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 1003101        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 1003102        public Task GetRDPFileAsync(
 1511103            string rdpFileNameToCreate,
 1003104            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 1003105            CancellationToken cancellationToken = default(CancellationToken))
 1003106        {
 1506107            // create the behavior managaer
 1003108            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 1003109
 1003110            Task asyncTask = this.parentBatchClient.PoolOperations.GetRDPFileViaFileNameAsyncImpl(this.parentPoolId, thi
 1003111
 1003112            return asyncTask;
 1003113        }
 1003114
 1003115        /// <summary>
 1003116        /// Blocking call to get RDP file data targeting the compute node of the current instance and write them to a fi
 1003117        /// </summary>
 1003118        /// <param name="rdpFileNameToCreate">The name of the RDP file to be created.</param>
 1003119        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 1003120        public void GetRDPFile(string rdpFileNameToCreate, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 1003121        {
 1003122            Task asyncTask = GetRDPFileAsync(rdpFileNameToCreate, additionalBehaviors);
 1003123            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 1003124        }
 1003125
 1003126        /// <summary>
 1003127        /// Gets the settings required for remote login to a compute node.
 1003128        /// </summary>
 1003129        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 1003130        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 1003131        /// <returns>A <see cref="System.Threading.Tasks.Task"/> that represents the asynchronous operation.</returns>
 1003132        /// <remarks>
 1003133        /// <para>The get remote login settings operation runs asynchronously.</para>
 1003134        /// <para>This method can be invoked only if the pool is created with a <see cref="VirtualMachineConfiguration"/
 135        /// If this method is invoked on pools created with <see cref="CloudServiceConfiguration" />, then Batch service
 136        /// For pools with a <see cref="CloudServiceConfiguration" /> property, one of the GetRDPFileAsync/GetRDPFile me
 137        /// </remarks>
 138        public System.Threading.Tasks.Task<RemoteLoginSettings> GetRemoteLoginSettingsAsync(IEnumerable<BatchClientBehav
 139        {
 140            // create the behavior manager
 0141            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 142
 0143            System.Threading.Tasks.Task<RemoteLoginSettings> asyncTask = this.parentBatchClient.PoolOperations.GetRemote
 0144                    this.parentPoolId,
 0145                    this.Id,
 0146                    bhMgr,
 0147                    cancellationToken);
 148
 0149            return asyncTask;
 150        }
 151
 1003152        /// <summary>
 1003153        /// Gets the settings required for remote login to a compute node.
 1003154        /// </summary>
 1003155        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 1003156        /// <remarks>
 157        /// <para>This is a blocking operation. For a non-blocking equivalent, see <see cref="Microsoft.Azure.Batch.Comp
 1003158        /// <para>This method can be invoked only if the pool is created with a <see cref="Microsoft.Azure.Batch.Virtual
 1003159        /// If this method is invoked on pools created with <see cref="Microsoft.Azure.Batch.CloudServiceConfiguration" 
 1003160        /// For pools with a <see cref="Microsoft.Azure.Batch.CloudServiceConfiguration" /> property, one of the GetRDPF
 1003161        /// </remarks>
 1003162        public RemoteLoginSettings GetRemoteLoginSettings(IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 163        {
 0164            Task<RemoteLoginSettings> asyncTask = GetRemoteLoginSettingsAsync(additionalBehaviors);
 0165            RemoteLoginSettings rls = asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 166
 0167            return rls;
 168        }
 169
 170        /// <summary>
 171        /// Begins an asynchronous call to remove the compute node from the pool.
 172        /// </summary>
 173        /// <param name="deallocationOption">
 174        /// Specifies how to handle tasks already running, and when the nodes running them may be removed from the pool.
 175        /// </param>
 0176        /// <param name="resizeTimeout">The maximum amount of time which the RemoveFromPool operation can take before be
 177        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 178        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 179        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 180        public Task RemoveFromPoolAsync(
 181            Common.ComputeNodeDeallocationOption? deallocationOption = null,
 182            TimeSpan? resizeTimeout = null,
 183            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 184            CancellationToken cancellationToken = default(CancellationToken))
 185        {
 186            // create the behavior managaer
 1001187            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 188
 0189            List<string> computeNodeIds = new List<string> {this.Id};
 190
 0191            Task asyncTask = this.parentBatchClient.PoolOperations.RemoveFromPoolAsyncImpl(this.parentPoolId, computeNod
 192
 0193            return asyncTask;
 194        }
 1001195
 196        /// <summary>
 197        /// Blocking call to remove the compute node from the pool.
 198        /// </summary>
 199        /// <param name="deallocationOption">
 200        /// Specifies how to handle tasks already running, and when the nodes running them may be removed from the pool.
 201        /// </param>
 202        /// <param name="resizeTimeout">The maximum amount of time which the RemoveFromPool operation can take before be
 1002203        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 204        public void RemoveFromPool(Common.ComputeNodeDeallocationOption? deallocationOption = null, TimeSpan? resizeTime
 205        {
 0206            Task asyncTask = RemoveFromPoolAsync(deallocationOption, resizeTimeout, additionalBehaviors);
 0207            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0208        }
 209
 210        /// <summary>
 1001211        /// Begins an asynchronous call to reboot the compute node.
 212        /// </summary>
 213        /// <param name="rebootOption">The reboot option associated with the reboot.</param>
 214        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 215        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 216        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 217        public Task RebootAsync(
 218            Common.ComputeNodeRebootOption? rebootOption = null,
 1001219            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 220            CancellationToken cancellationToken = default(CancellationToken))
 221        {
 222            // create the behavior manager
 0223            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 224
 0225            Task asyncTask = this.parentBatchClient.ProtocolLayer.RebootComputeNode(this.parentPoolId, this.Id, rebootOp
 226
 1002227            return asyncTask;
 228        }
 229
 230        /// <summary>
 231        /// Blocking call to reboot the compute node.
 232        /// </summary>
 233        /// <param name="rebootOption">The reboot option associated with the reboot.</param>
 234        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 1001235        public void Reboot(Common.ComputeNodeRebootOption? rebootOption = null, IEnumerable<BatchClientBehavior> additio
 236        {
 0237            Task asyncTask = RebootAsync(rebootOption, additionalBehaviors);
 0238            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0239        }
 240
 241        /// <summary>
 242        /// Begins an asynchronous call to reimage the compute node.
 1001243        /// </summary>
 244        /// <param name="reimageOption">The reimage option associated with the reimage.</param>
 245        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 246        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 247        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 248        public Task ReimageAsync(
 249            Common.ComputeNodeReimageOption? reimageOption = null,
 250            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 1002251            CancellationToken cancellationToken = default(CancellationToken))
 252        {
 253            // create the behavior manager
 0254            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 255
 0256            Task asyncTask = this.parentBatchClient.ProtocolLayer.ReimageComputeNode(this.parentPoolId, this.Id, reimage
 257
 0258            return asyncTask;
 1001259        }
 260
 261        /// <summary>
 262        /// Blocking call to reimage the compute node.
 263        /// </summary>
 264        /// <param name="reimageOption">The reimage option associated with the reimage.</param>
 265        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 266        public void Reimage(Common.ComputeNodeReimageOption? reimageOption = null, IEnumerable<BatchClientBehavior> addi
 267        {
 0268            Task asyncTask = ReimageAsync(reimageOption, additionalBehaviors);
 1001269            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0270        }
 271
 272        /// <summary>
 273        /// Begins an asynchronous request to get the specified NodeFile.
 274        /// </summary>
 275        /// <param name="filePath">The path of the file to retrieve.</param>
 276        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 277        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 1001278        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 279        public System.Threading.Tasks.Task<NodeFile> GetNodeFileAsync(
 280            string filePath,
 281            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 282            CancellationToken cancellationToken = default(CancellationToken))
 283        {
 284            // create the behavior manager
 0285            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 1001286
 0287            Task<NodeFile> asyncTask = this.parentBatchClient.PoolOperations.GetNodeFileAsyncImpl(this.parentPoolId, thi
 288
 0289            return asyncTask;
 290        }
 291
 292        /// <summary>
 293        /// Blocking call to get the specified NodeFile.
 1001294        /// </summary>
 295        /// <param name="filePath">The path of the file to retrieve.</param>
 296        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 297        /// <returns>A bound <see cref="NodeFile"/> object.</returns>
 298        public NodeFile GetNodeFile(string filePath, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 299        {
 0300            Task<NodeFile> asyncTask = this.GetNodeFileAsync(filePath, additionalBehaviors);
 0301            return asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 302        }
 1001303
 304        /// <summary>
 305        /// Copies the contents of a file from the node to the given <see cref="Stream"/>.
 306        /// </summary>
 307        /// <param name="filePath">The path of the file to retrieve.</param>
 308        /// <param name="stream">The stream to copy the file contents to.</param>
 309        /// <param name="byteRange">A byte range defining what section of the file to copy. If omitted, the entire file 
 310        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 1002311        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 312        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 313        public Task CopyNodeFileContentToStreamAsync(
 314            string filePath,
 315            Stream stream,
 316            GetFileRequestByteRange byteRange = null,
 317            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 318            CancellationToken cancellationToken = default(CancellationToken))
 1001319        {
 320            // create the behavior manager
 0321            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 0322            Task asyncTask = this.parentBatchClient.PoolOperations.CopyNodeFileContentToStreamAsyncImpl(
 0323                this.parentPoolId,
 0324                this.Id,
 0325                filePath,
 0326                stream,
 0327                byteRange,
 1001328                bhMgr,
 0329                cancellationToken);
 330
 0331            return asyncTask;
 332        }
 333
 334        /// <summary>
 335        /// Copies the contents of a file from the node to the given <see cref="Stream"/>.
 336        /// </summary>
 1001337        /// <param name="filePath">The path of the file to retrieve.</param>
 338        /// <param name="stream">The stream to copy the file contents to.</param>
 339        /// <param name="byteRange">A byte range defining what section of the file to copy. If omitted, the entire file 
 340        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 341        /// <returns>A bound <see cref="NodeFile"/> object.</returns>
 342        public void CopyNodeFileContentToStream(
 343            string filePath,
 344            Stream stream,
 1001345            GetFileRequestByteRange byteRange = null,
 346            IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 347        {
 0348            Task asyncTask = this.CopyNodeFileContentToStreamAsync(filePath, stream, byteRange, additionalBehaviors);
 0349            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0350        }
 351
 352        /// <summary>
 1001353        /// Reads the contents of a file from the specified node into a string.
 354        /// </summary>
 355        /// <param name="filePath">The path of the file to retrieve.</param>
 356        /// <param name="encoding">The encoding to use. If no value or null is specified, UTF8 is used.</param>
 357        /// <param name="byteRange">A byte range defining what section of the file to copy. If omitted, the entire file 
 358        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 359        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 360        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</ret
 361        public Task<string> CopyNodeFileContentToStringAsync(
 0362            string filePath,
 363            Encoding encoding = null,
 364            GetFileRequestByteRange byteRange = null,
 365            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 366            CancellationToken cancellationToken = default(CancellationToken))
 0367        {
 2368            // create the behavior manager
 0369            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 0370            return this.parentBatchClient.PoolOperations.CopyNodeFileContentToStringAsyncImpl(
 0371                this.parentPoolId,
 0372                this.Id,
 0373                filePath,
 0374                encoding,
 0375                byteRange,
 0376                bhMgr,
 0377                cancellationToken);
 378        }
 379
 380        /// <summary>
 381        /// Reads the contents of a file from the specified node into a string.
 382        /// </summary>
 383        /// <param name="filePath">The path of the file to retrieve.</param>
 384        /// <param name="encoding">The encoding to use. If no value or null is specified, UTF8 is used.</param>
 385        /// <param name="byteRange">A byte range defining what section of the file to copy. If omitted, the entire file 
 386        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 387        /// <returns>A bound <see cref="NodeFile"/> object.</returns>
 388        public string CopyNodeFileContentToString(
 389            string filePath,
 390            Encoding encoding = null,
 391            GetFileRequestByteRange byteRange = null,
 392            IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 393        {
 0394            Task<string> asyncTask = this.CopyNodeFileContentToStringAsync(filePath, encoding, byteRange, additionalBeha
 0395            return asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 396        }
 397
 398        /// <summary>
 399        /// Exposes synchronous and asynchronous enumeration of the files for the node.
 400        /// </summary>
 401        /// <param name="recursive">If true, performs a recursive list of all files of the node. If false, returns only 
 402        /// <param name="detailLevel">Controls the detail level of the data returned by a call to the Azure Batch Servic
 403        /// <param name="additionalBehaviors">A collection of BatchClientBehavior instances that are applied after the C
 404        /// <returns>An instance of IPagedEnumerable that can be used to enumerate objects using either synchronous or a
 405        public IPagedEnumerable<NodeFile> ListNodeFiles(bool? recursive = null, DetailLevel detailLevel = null, IEnumera
 406        {
 407            // craft the behavior manager for this call
 0408            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 409
 0410            IPagedEnumerable<NodeFile> enumerator = this.parentBatchClient.PoolOperations.ListNodeFilesImpl(this.parentP
 411
 0412            return enumerator;
 413        }
 414
 415        /// <summary>
 416        /// Enables task scheduling on the compute node.
 417        /// </summary>
 418        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 419        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 420        /// <returns>A <see cref="System.Threading.Tasks.Task"/> that represents the asynchronous operation.</returns>
 421        /// <remarks>This operation runs asynchronously.</remarks>
 422        public System.Threading.Tasks.Task EnableSchedulingAsync(
 423            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 424            CancellationToken cancellationToken = default(CancellationToken))
 425        {
 0426            System.Threading.Tasks.Task asyncTask = this.parentBatchClient.PoolOperations.EnableComputeNodeSchedulingAsy
 427
 0428            return asyncTask;
 429        }
 430
 431        /// <summary>
 432        /// Enables task scheduling on the compute node.
 433        /// </summary>
 434        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 435        /// <remarks>This is a blocking operation. For a non-blocking equivalent, see <see cref="EnableScheduling"/>.</r
 436        public void EnableScheduling(IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 437        {
 0438            Task asyncTask = EnableSchedulingAsync(additionalBehaviors, CancellationToken.None);
 0439            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0440        }
 441
 442        /// <summary>
 443        /// Disables task scheduling on the compute node.
 444        /// </summary>
 445        /// <param name="disableComputeNodeSchedulingOption">Specifies what to do with currently running tasks. The defa
 446        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 447        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 448        /// <returns>A <see cref="System.Threading.Tasks.Task"/> that represents the asynchronous operation.</returns>
 449        /// <remarks>This operation runs asynchronously.</remarks>
 450        public System.Threading.Tasks.Task DisableSchedulingAsync(
 451            Common.DisableComputeNodeSchedulingOption? disableComputeNodeSchedulingOption,
 452            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 453            CancellationToken cancellationToken = default(CancellationToken))
 454        {
 0455            System.Threading.Tasks.Task asyncTask = this.parentBatchClient.PoolOperations.DisableComputeNodeSchedulingAs
 456
 0457            return asyncTask;
 458        }
 459
 460        /// <summary>
 461        /// Disables task scheduling on the compute node.
 462        /// </summary>
 463        /// <param name="disableComputeNodeSchedulingOption">Specifies what to do with currently running tasks. The defa
 464        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 465        /// <remarks>This is a blocking operation. For a non-blocking equivalent, see <see cref="DisableSchedulingAsync"
 466        public void DisableScheduling(
 467            Common.DisableComputeNodeSchedulingOption? disableComputeNodeSchedulingOption,
 468            IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 469        {
 0470            Task asyncTask = DisableSchedulingAsync(disableComputeNodeSchedulingOption, additionalBehaviors, Cancellatio
 0471            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0472        }
 473
 474        /// <summary>
 475        /// Upload Azure Batch service log files from the compute node.
 476        /// </summary>
 477        /// <param name="containerUrl">
 478        /// The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). The URL
 479        /// </param>
 480        /// <param name="startTime">
 481        /// The start of the time range from which to upload Batch Service log file(s). Any log file containing a log me
 482        /// This means that the operation might retrieve more logs than have been requested since the entire log file is
 483        /// </param>
 484        /// <param name="endTime">
 485        /// The end of the time range from which to upload Batch Service log file(s). Any log file containing a log mess
 486        /// This means that the operation might retrieve more logs than have been requested since the entire log file is
 487        /// </param>
 488        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 489        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 490        /// <returns>A <see cref="System.Threading.Tasks.Task"/> that represents the asynchronous operation.</returns>
 491        /// <remarks>
 492        /// This is for gathering Azure Batch service log files in an automated fashion from nodes if you are experienci
 493        /// The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Ba
 494        /// </remarks>
 495        public System.Threading.Tasks.Task<UploadBatchServiceLogsResult> UploadComputeNodeBatchServiceLogsAsync(
 496            string containerUrl,
 497            DateTime startTime,
 498            DateTime? endTime = null,
 499            IEnumerable<BatchClientBehavior> additionalBehaviors = null,
 500            CancellationToken cancellationToken = default(CancellationToken))
 501        {
 502            // craft the behavior manager for this call
 0503            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);
 504
 0505            return this.parentBatchClient.PoolOperations.UploadComputeNodeBatchServiceLogsAsyncImpl(
 0506                this.parentPoolId,
 0507                this.Id,
 0508                containerUrl,
 0509                startTime,
 0510                endTime,
 0511                bhMgr,
 0512                cancellationToken);
 513        }
 514
 515        /// <summary>
 516        /// Upload Azure Batch service log files from the specified compute node.
 517        /// </summary>
 518        /// <param name="containerUrl">
 519        /// The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). The URL
 520        /// </param>
 521        /// <param name="startTime">
 522        /// The start of the time range from which to upload Batch Service log file(s). Any log file containing a log me
 523        /// This means that the operation might retrieve more logs than have been requested since the entire log file is
 524        /// </param>
 525        /// <param name="endTime">
 526        /// The end of the time range from which to upload Batch Service log file(s). Any log file containing a log mess
 527        /// This means that the operation might retrieve more logs than have been requested since the entire log file is
 528        /// </param>
 529        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 530        /// <remarks>
 531        /// This is for gathering Azure Batch service log files in an automated fashion from nodes if you are experienci
 532        /// The Azure Batch service log files should be shared with Azure support to aid in debugging issues with the Ba
 533        /// </remarks>
 534        /// <returns>The result of uploading the batch service logs.</returns>
 535        public UploadBatchServiceLogsResult UploadComputeNodeBatchServiceLogs(
 536            string containerUrl,
 537            DateTime startTime,
 538            DateTime? endTime = null,
 539            IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 540        {
 0541            var asyncTask = this.UploadComputeNodeBatchServiceLogsAsync(
 0542                containerUrl,
 0543                startTime,
 0544                endTime,
 0545                additionalBehaviors);
 0546            return asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 547        }
 548
 549        #endregion ComputeNode
 550
 551        #region IRefreshable
 552
 553        /// <summary>
 554        /// Refreshes the current <see cref="ComputeNode"/>.
 555        /// </summary>
 556        /// <param name="detailLevel">The detail level for the refresh. If a detail level which omits the <see cref="Id"
 557        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 558        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynch
 559        /// <returns>A <see cref="Task"/> representing the asynchronous refresh operation.</returns>
 560        public async Task RefreshAsync(DetailLevel detailLevel = null, IEnumerable<BatchClientBehavior> additionalBehavi
 561        {
 562            // create the behavior managaer
 0563            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors, detailLevel);
 564
 0565            System.Threading.Tasks.Task<AzureOperationResponse<Models.ComputeNode, Models.ComputeNodeGetHeaders>> asyncT
 0566                this.parentBatchClient.ProtocolLayer.GetComputeNode(this.parentPoolId, this.Id, bhMgr, cancellationToken
 567
 0568            AzureOperationResponse<Models.ComputeNode, Models.ComputeNodeGetHeaders> response = await asyncTask.Configur
 569
 570            // get pool from response
 0571            Models.ComputeNode newProtocolComputeNode = response.Body;
 572
 0573            this.propertyContainer = new PropertyContainer(newProtocolComputeNode);
 0574        }
 575
 576        /// <summary>
 577        /// Refreshes the <see cref="ComputeNode"/>.
 578        /// </summary>
 579        /// <param name="detailLevel">The detail level for the refresh. If a detail level which omits the <see cref="Id"
 580        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are appli
 581        public void Refresh(DetailLevel detailLevel = null, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
 582        {
 0583            Task asyncTask = RefreshAsync(detailLevel, additionalBehaviors);
 0584            asyncTask.WaitAndUnaggregateException(this.CustomBehaviors, additionalBehaviors);
 0585        }
 586
 587#endregion
 588    }
 589
 590}

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\Generated\ComputeNode.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for license information.
 3//
 4// Code generated by Microsoft (R) AutoRest Code Generator.
 5// Changes may cause incorrect behavior and will be lost if the code is
 6// regenerated.
 7
 8//
 9// This file was autogenerated by a tool.
 10// Do not modify it.
 11//
 12
 13namespace Microsoft.Azure.Batch
 14{
 15    using Models = Microsoft.Azure.Batch.Protocol.Models;
 16    using System;
 17    using System.Collections.Generic;
 18    using System.Linq;
 19
 20    /// <summary>
 21    /// Summarizes the state of a compute node.
 22    /// </summary>
 23    public partial class ComputeNode : IInheritedBehaviors, IPropertyMetadata
 24    {
 25        private class PropertyContainer : PropertyCollection
 26        {
 27            public readonly PropertyAccessor<string> AffinityIdProperty;
 28            public readonly PropertyAccessor<DateTime?> AllocationTimeProperty;
 29            public readonly PropertyAccessor<IReadOnlyList<CertificateReference>> CertificateReferencesProperty;
 30            public readonly PropertyAccessor<ComputeNodeEndpointConfiguration> EndpointConfigurationProperty;
 31            public readonly PropertyAccessor<IReadOnlyList<ComputeNodeError>> ErrorsProperty;
 32            public readonly PropertyAccessor<string> IdProperty;
 33            public readonly PropertyAccessor<string> IPAddressProperty;
 34            public readonly PropertyAccessor<bool?> IsDedicatedProperty;
 35            public readonly PropertyAccessor<DateTime?> LastBootTimeProperty;
 36            public readonly PropertyAccessor<NodeAgentInformation> NodeAgentInformationProperty;
 37            public readonly PropertyAccessor<IReadOnlyList<TaskInformation>> RecentTasksProperty;
 38            public readonly PropertyAccessor<int?> RunningTasksCountProperty;
 39            public readonly PropertyAccessor<Common.SchedulingState?> SchedulingStateProperty;
 40            public readonly PropertyAccessor<StartTask> StartTaskProperty;
 41            public readonly PropertyAccessor<StartTaskInformation> StartTaskInformationProperty;
 42            public readonly PropertyAccessor<Common.ComputeNodeState?> StateProperty;
 43            public readonly PropertyAccessor<DateTime?> StateTransitionTimeProperty;
 44            public readonly PropertyAccessor<int?> TotalTasksRunProperty;
 45            public readonly PropertyAccessor<int?> TotalTasksSucceededProperty;
 46            public readonly PropertyAccessor<string> UrlProperty;
 47            public readonly PropertyAccessor<string> VirtualMachineSizeProperty;
 048            public PropertyContainer(Models.ComputeNode protocolObject) : base(BindingState.Bound)
 49            {
 050                this.AffinityIdProperty = this.CreatePropertyAccessor(
 051                    protocolObject.AffinityId,
 052                    nameof(AffinityId),
 053                    BindingAccess.Read);
 054                this.AllocationTimeProperty = this.CreatePropertyAccessor(
 055                    protocolObject.AllocationTime,
 056                    nameof(AllocationTime),
 057                    BindingAccess.Read);
 058                this.CertificateReferencesProperty = this.CreatePropertyAccessor(
 059                    CertificateReference.ConvertFromProtocolCollectionReadOnly(protocolObject.CertificateReferences),
 060                    nameof(CertificateReferences),
 061                    BindingAccess.Read);
 062                this.EndpointConfigurationProperty = this.CreatePropertyAccessor(
 063                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.EndpointConfiguration, o => new ComputeNo
 064                    nameof(EndpointConfiguration),
 065                    BindingAccess.Read);
 066                this.ErrorsProperty = this.CreatePropertyAccessor(
 067                    ComputeNodeError.ConvertFromProtocolCollectionReadOnly(protocolObject.Errors),
 068                    nameof(Errors),
 069                    BindingAccess.Read);
 070                this.IdProperty = this.CreatePropertyAccessor(
 071                    protocolObject.Id,
 072                    nameof(Id),
 073                    BindingAccess.Read);
 074                this.IPAddressProperty = this.CreatePropertyAccessor(
 075                    protocolObject.IpAddress,
 076                    nameof(IPAddress),
 077                    BindingAccess.Read);
 078                this.IsDedicatedProperty = this.CreatePropertyAccessor(
 079                    protocolObject.IsDedicated,
 080                    nameof(IsDedicated),
 081                    BindingAccess.Read);
 082                this.LastBootTimeProperty = this.CreatePropertyAccessor(
 083                    protocolObject.LastBootTime,
 084                    nameof(LastBootTime),
 085                    BindingAccess.Read);
 086                this.NodeAgentInformationProperty = this.CreatePropertyAccessor(
 087                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.NodeAgentInfo, o => new NodeAgentInformat
 088                    nameof(NodeAgentInformation),
 089                    BindingAccess.Read);
 090                this.RecentTasksProperty = this.CreatePropertyAccessor(
 091                    TaskInformation.ConvertFromProtocolCollectionReadOnly(protocolObject.RecentTasks),
 092                    nameof(RecentTasks),
 093                    BindingAccess.Read);
 094                this.RunningTasksCountProperty = this.CreatePropertyAccessor(
 095                    protocolObject.RunningTasksCount,
 096                    nameof(RunningTasksCount),
 097                    BindingAccess.Read);
 098                this.SchedulingStateProperty = this.CreatePropertyAccessor(
 099                    UtilitiesInternal.MapNullableEnum<Models.SchedulingState, Common.SchedulingState>(protocolObject.Sch
 0100                    nameof(SchedulingState),
 0101                    BindingAccess.Read);
 0102                this.StartTaskProperty = this.CreatePropertyAccessor(
 0103                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTask, o => new StartTask(o).Freeze()
 0104                    nameof(StartTask),
 0105                    BindingAccess.Read);
 0106                this.StartTaskInformationProperty = this.CreatePropertyAccessor(
 0107                    UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.StartTaskInfo, o => new StartTaskInformat
 0108                    nameof(StartTaskInformation),
 0109                    BindingAccess.Read);
 0110                this.StateProperty = this.CreatePropertyAccessor(
 0111                    UtilitiesInternal.MapNullableEnum<Models.ComputeNodeState, Common.ComputeNodeState>(protocolObject.S
 0112                    nameof(State),
 0113                    BindingAccess.Read);
 0114                this.StateTransitionTimeProperty = this.CreatePropertyAccessor(
 0115                    protocolObject.StateTransitionTime,
 0116                    nameof(StateTransitionTime),
 0117                    BindingAccess.Read);
 0118                this.TotalTasksRunProperty = this.CreatePropertyAccessor(
 0119                    protocolObject.TotalTasksRun,
 0120                    nameof(TotalTasksRun),
 0121                    BindingAccess.Read);
 0122                this.TotalTasksSucceededProperty = this.CreatePropertyAccessor(
 0123                    protocolObject.TotalTasksSucceeded,
 0124                    nameof(TotalTasksSucceeded),
 0125                    BindingAccess.Read);
 0126                this.UrlProperty = this.CreatePropertyAccessor(
 0127                    protocolObject.Url,
 0128                    nameof(Url),
 0129                    BindingAccess.Read);
 0130                this.VirtualMachineSizeProperty = this.CreatePropertyAccessor(
 0131                    protocolObject.VmSize,
 0132                    nameof(VirtualMachineSize),
 0133                    BindingAccess.Read);
 0134            }
 135        }
 136
 137        private PropertyContainer propertyContainer;
 138
 139        private readonly BatchClient parentBatchClient;
 140        private readonly string parentPoolId;
 141
 142        internal string ParentPoolId
 143        {
 144            get
 145            {
 0146                return this.parentPoolId;
 147            }
 148        }
 149
 150        #region Constructors
 151
 0152        internal ComputeNode(
 0153            BatchClient parentBatchClient,
 0154            string parentPoolId,
 0155            Models.ComputeNode protocolObject,
 0156            IEnumerable<BatchClientBehavior> baseBehaviors)
 157        {
 0158            this.parentPoolId = parentPoolId;
 0159            this.parentBatchClient = parentBatchClient;
 0160            InheritUtil.InheritClientBehaviorsAndSetPublicProperty(this, baseBehaviors);
 0161            this.propertyContainer = new PropertyContainer(protocolObject);
 0162        }
 163
 164        #endregion Constructors
 165
 166        #region IInheritedBehaviors
 167
 168        /// <summary>
 169        /// Gets or sets a list of behaviors that modify or customize requests to the Batch service
 170        /// made via this <see cref="ComputeNode"/>.
 171        /// </summary>
 172        /// <remarks>
 173        /// <para>These behaviors are inherited by child objects.</para>
 174        /// <para>Modifications are applied in the order of the collection. The last write wins.</para>
 175        /// </remarks>
 0176        public IList<BatchClientBehavior> CustomBehaviors { get; set; }
 177
 178        #endregion IInheritedBehaviors
 179
 180        #region ComputeNode
 181
 182        /// <summary>
 183        /// Gets an opaque string that contains information about the location of the compute node.
 184        /// </summary>
 185        public string AffinityId
 186        {
 0187            get { return this.propertyContainer.AffinityIdProperty.Value; }
 188        }
 189
 190        /// <summary>
 191        /// Gets the time at which this compute node was allocated to the pool.
 192        /// </summary>
 193        public DateTime? AllocationTime
 194        {
 0195            get { return this.propertyContainer.AllocationTimeProperty.Value; }
 196        }
 197
 198        /// <summary>
 199        /// Gets the list of certificates installed on this compute node.
 200        /// </summary>
 201        public IReadOnlyList<CertificateReference> CertificateReferences
 202        {
 0203            get { return this.propertyContainer.CertificateReferencesProperty.Value; }
 204        }
 205
 206        /// <summary>
 207        /// Gets the endpoint configuration for the compute node.
 208        /// </summary>
 209        public ComputeNodeEndpointConfiguration EndpointConfiguration
 210        {
 0211            get { return this.propertyContainer.EndpointConfigurationProperty.Value; }
 212        }
 213
 214        /// <summary>
 215        /// Gets the list of errors that are currently being encountered by the compute node.
 216        /// </summary>
 217        public IReadOnlyList<ComputeNodeError> Errors
 218        {
 0219            get { return this.propertyContainer.ErrorsProperty.Value; }
 220        }
 221
 222        /// <summary>
 223        /// Gets the id of compute node.
 224        /// </summary>
 225        public string Id
 226        {
 0227            get { return this.propertyContainer.IdProperty.Value; }
 228        }
 229
 230        /// <summary>
 231        /// Gets the IP address associated with the compute node.
 232        /// </summary>
 233        public string IPAddress
 234        {
 0235            get { return this.propertyContainer.IPAddressProperty.Value; }
 236        }
 237
 238        /// <summary>
 239        /// Gets whether this compute node is a dedicated node. If false, the node is a low-priority node.
 240        /// </summary>
 241        public bool? IsDedicated
 242        {
 0243            get { return this.propertyContainer.IsDedicatedProperty.Value; }
 244        }
 245
 246        /// <summary>
 247        /// Gets the time at which the compute node was started.
 248        /// </summary>
 249        public DateTime? LastBootTime
 250        {
 0251            get { return this.propertyContainer.LastBootTimeProperty.Value; }
 252        }
 253
 254        /// <summary>
 255        /// Gets information about the node agent version and the time the node upgraded to a new version.
 256        /// </summary>
 257        public NodeAgentInformation NodeAgentInformation
 258        {
 0259            get { return this.propertyContainer.NodeAgentInformationProperty.Value; }
 260        }
 261
 262        /// <summary>
 263        /// Gets the execution information for the most recent tasks that ran on this compute node. Note that this eleme
 264        /// is only returned if at least one task was run on this compute node since the time it was assigned to its cur
 265        /// pool.
 266        /// </summary>
 267        public IReadOnlyList<TaskInformation> RecentTasks
 268        {
 0269            get { return this.propertyContainer.RecentTasksProperty.Value; }
 270        }
 271
 272        /// <summary>
 273        /// Gets the total number of currently running tasks on the compute node. This includes Job Preparation, Job Rel
 274        /// and Job Manager tasks, but not the pool start task.
 275        /// </summary>
 276        public int? RunningTasksCount
 277        {
 0278            get { return this.propertyContainer.RunningTasksCountProperty.Value; }
 279        }
 280
 281        /// <summary>
 282        /// Gets whether the node is available for task scheduling.
 283        /// </summary>
 284        public Common.SchedulingState? SchedulingState
 285        {
 0286            get { return this.propertyContainer.SchedulingStateProperty.Value; }
 287        }
 288
 289        /// <summary>
 290        /// Gets the start task associated with all compute nodes in this pool.
 291        /// </summary>
 292        public StartTask StartTask
 293        {
 0294            get { return this.propertyContainer.StartTaskProperty.Value; }
 295        }
 296
 297        /// <summary>
 298        /// Gets the detailed runtime information of the start task, including current state, error details, exit code, 
 299        /// time, end time, etc.
 300        /// </summary>
 301        public StartTaskInformation StartTaskInformation
 302        {
 0303            get { return this.propertyContainer.StartTaskInformationProperty.Value; }
 304        }
 305
 306        /// <summary>
 307        /// Gets the current state of the compute node.
 308        /// </summary>
 309        public Common.ComputeNodeState? State
 310        {
 0311            get { return this.propertyContainer.StateProperty.Value; }
 312        }
 313
 314        /// <summary>
 315        /// Gets the time at which the compute node entered the current state.
 316        /// </summary>
 317        public DateTime? StateTransitionTime
 318        {
 0319            get { return this.propertyContainer.StateTransitionTimeProperty.Value; }
 320        }
 321
 322        /// <summary>
 323        /// Gets the number of tasks that have been run on this compute node from the time it was allocated to this pool
 324        /// This includes Job Preparation, Job Release, and Job Manager tasks, but not the pool start task.
 325        /// </summary>
 326        public int? TotalTasksRun
 327        {
 0328            get { return this.propertyContainer.TotalTasksRunProperty.Value; }
 329        }
 330
 331        /// <summary>
 332        /// Gets the total number of tasks which completed successfully (with exitCode 0) on the compute node. This incl
 333        /// Job Preparation, Job Release, and Job Manager tasks, but not the pool start task.
 334        /// </summary>
 335        public int? TotalTasksSucceeded
 336        {
 0337            get { return this.propertyContainer.TotalTasksSucceededProperty.Value; }
 338        }
 339
 340        /// <summary>
 341        /// Gets the URL of compute node.
 342        /// </summary>
 343        public string Url
 344        {
 0345            get { return this.propertyContainer.UrlProperty.Value; }
 346        }
 347
 348        /// <summary>
 349        /// Gets the size of the virtual machine hosting the compute node.
 350        /// </summary>
 351        public string VirtualMachineSize
 352        {
 0353            get { return this.propertyContainer.VirtualMachineSizeProperty.Value; }
 354        }
 355
 356        #endregion // ComputeNode
 357
 358        #region IPropertyMetadata
 359
 360        bool IModifiable.HasBeenModified
 361        {
 0362            get { return this.propertyContainer.HasBeenModified; }
 363        }
 364
 365        bool IReadOnly.IsReadOnly
 366        {
 0367            get { return this.propertyContainer.IsReadOnly; }
 0368            set { this.propertyContainer.IsReadOnly = value; }
 369        }
 370
 371        #endregion //IPropertyMetadata
 372
 373    }
 374}

Methods/Properties

CreateComputeNodeUser()
DeleteComputeNodeUserAsync(...)
.ctor(...)
DeleteComputeNodeUser(...)
GetRDPFileAsync(...)
GetRDPFile(...)
GetRDPFileAsync(...)
GetRDPFile(...)
GetRemoteLoginSettingsAsync(...)
get_ParentPoolId()
.ctor(...)
GetRemoteLoginSettings(...)
get_CustomBehaviors()
RemoveFromPoolAsync(...)
get_AffinityId()
get_AllocationTime()
get_CertificateReferences()
RemoveFromPool(...)
get_EndpointConfiguration()
get_Errors()
RebootAsync(...)
get_Id()
get_IPAddress()
Reboot(...)
get_IsDedicated()
get_LastBootTime()
ReimageAsync(...)
get_NodeAgentInformation()
Reimage(...)
get_RecentTasks()
get_RunningTasksCount()
GetNodeFileAsync(...)
get_SchedulingState()
get_StartTask()
GetNodeFile(...)
get_StartTaskInformation()
get_State()
get_StateTransitionTime()
CopyNodeFileContentToStreamAsync(...)
get_TotalTasksRun()
get_TotalTasksSucceeded()
get_Url()
CopyNodeFileContentToStream(...)
get_VirtualMachineSize()
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)
CopyNodeFileContentToStringAsync(...)
CopyNodeFileContentToString(...)
ListNodeFiles(...)
EnableSchedulingAsync(...)
EnableScheduling(...)
DisableSchedulingAsync(...)
DisableScheduling(...)
UploadComputeNodeBatchServiceLogsAsync(...)
UploadComputeNodeBatchServiceLogs(...)
RefreshAsync()
Refresh(...)
.ctor(...)
get_ParentPoolId()
.ctor(...)
get_CustomBehaviors()
get_AffinityId()
get_AllocationTime()
get_CertificateReferences()
get_EndpointConfiguration()
get_Errors()
get_Id()
get_IPAddress()
get_IsDedicated()
get_LastBootTime()
get_NodeAgentInformation()
get_RecentTasks()
get_RunningTasksCount()
get_SchedulingState()
get_StartTask()
get_StartTaskInformation()
get_State()
get_StateTransitionTime()
get_TotalTasksRun()
get_TotalTasksSucceeded()
get_Url()
get_VirtualMachineSize()
Microsoft.Azure.Batch.IModifiable.get_HasBeenModified()
Microsoft.Azure.Batch.IReadOnly.get_IsReadOnly()
Microsoft.Azure.Batch.IReadOnly.set_IsReadOnly(...)