/// <summary>
 /// Reinstalls the operating system on the specified compute node.
 /// </summary>
 /// <remarks>
 /// You can reinstall the operating system on a node only if it is in an idle
 /// or running state. This API can be invoked only on pools created with the
 /// cloud service configuration property.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the pool that contains the compute node.
 /// </param>
 /// <param name='nodeId'>
 /// The ID of the compute node that you want to restart.
 /// </param>
 /// <param name='nodeReimageOption'>
 /// When to reimage the compute node and what to do with currently running
 /// tasks. The default value is requeue. Possible values include: 'requeue',
 /// 'terminate', 'taskCompletion', 'retainedData'
 /// </param>
 /// <param name='computeNodeReimageOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ComputeNodeReimageHeaders> ReimageAsync(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeReimageOption?nodeReimageOption = default(ComputeNodeReimageOption?), ComputeNodeReimageOptions computeNodeReimageOptions = default(ComputeNodeReimageOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ReimageWithHttpMessagesAsync(poolId, nodeId, nodeReimageOption, computeNodeReimageOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Reinstalls the operating system on the specified compute node.
 /// </summary>
 /// <remarks>
 /// You can reinstall the operating system on a node only if it is in an idle
 /// or running state. This API can be invoked only on pools created with the
 /// cloud service configuration property.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The ID of the pool that contains the compute node.
 /// </param>
 /// <param name='nodeId'>
 /// The ID of the compute node that you want to restart.
 /// </param>
 /// <param name='nodeReimageOption'>
 /// When to reimage the compute node and what to do with currently running
 /// tasks. The default value is requeue. Possible values include: 'requeue',
 /// 'terminate', 'taskCompletion', 'retainedData'
 /// </param>
 /// <param name='computeNodeReimageOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static ComputeNodeReimageHeaders Reimage(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeReimageOption?nodeReimageOption = default(ComputeNodeReimageOption?), ComputeNodeReimageOptions computeNodeReimageOptions = default(ComputeNodeReimageOptions))
 {
     return(operations.ReimageAsync(poolId, nodeId, nodeReimageOption, computeNodeReimageOptions).GetAwaiter().GetResult());
 }
예제 #3
0
 public virtual Response Reimage(string poolId, string nodeId, NodeReimageParameter nodeReimageParameter, ComputeNodeReimageOptions computeNodeReimageOptions, CancellationToken cancellationToken = default)
 {
     return(RestClient.Reimage(poolId, nodeId, nodeReimageParameter, computeNodeReimageOptions, cancellationToken).GetRawResponse());
 }
 /// <summary>
 /// Reinstalls the operating system on the specified compute node.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='poolId'>
 /// The id of the pool that contains the compute node.
 /// </param>
 /// <param name='nodeId'>
 /// The id of the compute node that you want to restart.
 /// </param>
 /// <param name='nodeReimageOption'>
 /// When to reimage the compute node and what to do with currently running
 /// tasks. The default value is requeue. Possible values include: 'requeue',
 /// 'terminate', 'taskcompletion', 'retaineddata'
 /// </param>
 /// <param name='computeNodeReimageOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static ComputeNodeReimageHeaders Reimage(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeNodeReimageOption?nodeReimageOption = default(ComputeNodeReimageOption?), ComputeNodeReimageOptions computeNodeReimageOptions = default(ComputeNodeReimageOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IComputeNodeOperations)s).ReimageAsync(poolId, nodeId, nodeReimageOption, computeNodeReimageOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #5
0
 public virtual async Task <Response> ReimageAsync(string poolId, string nodeId, NodeReimageParameter nodeReimageParameter, ComputeNodeReimageOptions computeNodeReimageOptions, CancellationToken cancellationToken = default)
 {
     return((await RestClient.ReimageAsync(poolId, nodeId, nodeReimageParameter, computeNodeReimageOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse());
 }