Inheritance: Microsoft.Azure.Commands.Batch.Models.ComputeNodeOperationParameters
コード例 #1
0
 public override void ExecuteCmdlet()
 {
     RebootComputeNodeParameters parameters = new RebootComputeNodeParameters(this.BatchContext, this.PoolId,
         this.Id, this.ComputeNode, this.AdditionalBehaviors)
     {
         RebootOption = this.RebootOption
     };
     BatchClient.RebootComputeNode(parameters);
 }
コード例 #2
0
 protected override void ProcessRecord()
 {
     RebootComputeNodeParameters parameters = new RebootComputeNodeParameters(this.BatchContext, this.PoolId,
         this.Id, this.ComputeNode, this.AdditionalBehaviors)
     {
         RebootOption = this.RebootOption
     };
     BatchClient.RebootComputeNode(parameters);
 }
コード例 #3
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);
            }
        }
コード例 #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);
            }
        }