Inheritance: Microsoft.Azure.Commands.Batch.Models.ComputeNodeOperationParameters
 public override void ExecuteCmdlet()
 {
     RebootComputeNodeParameters parameters = new RebootComputeNodeParameters(this.BatchContext, this.PoolId,
         this.Id, this.ComputeNode, this.AdditionalBehaviors)
     {
         RebootOption = this.RebootOption
     };
     BatchClient.RebootComputeNode(parameters);
 }
 protected override void ProcessRecord()
 {
     RebootComputeNodeParameters parameters = new RebootComputeNodeParameters(this.BatchContext, this.PoolId,
         this.Id, this.ComputeNode, this.AdditionalBehaviors)
     {
         RebootOption = this.RebootOption
     };
     BatchClient.RebootComputeNode(parameters);
 }
        /// <summary>
        /// Reboots the specified compute node.
        /// </summary>
        /// <param name="parameters">The parameters specifying the compute node to reboot and the reboot option.</param>
        public void RebootComputeNode(RebootComputeNodeParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string computeNodeId = parameters.ComputeNode == null ? parameters.ComputeNodeId : parameters.ComputeNode.Id;
            WriteVerbose(string.Format(Resources.RebootComputeNode, computeNodeId));

            if (parameters.ComputeNode != null)
            {
                parameters.ComputeNode.omObject.Reboot(parameters.RebootOption, parameters.AdditionalBehaviors);
            }
            else
            {
                PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
                poolOperations.Reboot(parameters.PoolId, parameters.ComputeNodeId, parameters.RebootOption, parameters.AdditionalBehaviors);
            }
        }
示例#4
0
        /// <summary>
        /// Reboots the specified compute node.
        /// </summary>
        /// <param name="parameters">The parameters specifying the compute node to reboot and the reboot option.</param>
        public void RebootComputeNode(RebootComputeNodeParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string computeNodeId = parameters.ComputeNode == null ? parameters.ComputeNodeId : parameters.ComputeNode.Id;

            WriteVerbose(string.Format(Resources.RebootComputeNode, computeNodeId));

            if (parameters.ComputeNode != null)
            {
                parameters.ComputeNode.omObject.Reboot(parameters.RebootOption, parameters.AdditionalBehaviors);
            }
            else
            {
                PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
                poolOperations.Reboot(parameters.PoolId, parameters.ComputeNodeId, parameters.RebootOption, parameters.AdditionalBehaviors);
            }
        }