public override void ExecuteCmdlet()
        {
            ComputeNodeOperationParameters parameters = new ComputeNodeOperationParameters(this.BatchContext, this.PoolId, 
                this.Id, this.ComputeNode, this.AdditionalBehaviors);

            BatchClient.EnableComputeNodeScheduling(parameters);
        }
        public override void ExecuteCmdlet()
        {
            ComputeNodeOperationParameters parameters = new ComputeNodeOperationParameters(this.BatchContext, this.PoolId, this.ComputeNodeId, this.ComputeNode, this.AdditionalBehaviors);

            PSRemoteLoginSettings remoteLoginSettings = BatchClient.ListComputeNodeRemoteLoginSettings(parameters);
            WriteObject(remoteLoginSettings);
        }
Example #3
0
        /// <summary>
        /// Get the settings required for remote login to a compute node
        /// </summary>
        /// <returns>The remote login settings for this compute node.</returns>
        public PSRemoteLoginSettings ListComputeNodeRemoteLoginSettings(ComputeNodeOperationParameters parameters)
        {
            RemoteLoginSettings remoteLoginSettings;

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

            PSRemoteLoginSettings psRemoteLoginSettings = new PSRemoteLoginSettings(remoteLoginSettings);

            return(psRemoteLoginSettings);
        }
Example #4
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);
            }
        }
        /// <summary>
        /// Get the settings required for remote login to a compute node
        /// </summary>
        /// <returns>The remote login settings for this compute node.</returns>
        public PSRemoteLoginSettings ListComputeNodeRemoteLoginSettings(ComputeNodeOperationParameters parameters)
        {
            RemoteLoginSettings remoteLoginSettings;

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

            PSRemoteLoginSettings psRemoteLoginSettings = new PSRemoteLoginSettings(remoteLoginSettings);
            return psRemoteLoginSettings;
        }
        /// <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);
            }
        }