Ejemplo n.º 1
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);
        }
        /// <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;
        }