Exemple #1
0
        /// <summary>
        /// Enables task scheduling on the specified compute node.
        /// </summary>
        /// <param name="parameters">The parameters specifying the compute node.</param>
        public void EnableComputeNodeScheduling(ComputeNodeOperationParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

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

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

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