ISchedulerAdapter.cs 1.67 KB
Newer Older
Vaclav Svaton's avatar
Vaclav Svaton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
using HaaSMiddleware.DomainObjects.ClusterInformation;
using HaaSMiddleware.DomainObjects.JobManagement;
using HaaSMiddleware.DomainObjects.JobManagement.JobInformation;
using System.Collections.Generic;

namespace HaaSMiddleware.HpcConnectionFramework {
	public interface ISchedulerAdapter {
		SubmittedJobInfo SubmitJob(object scheduler, JobSpecification jobSpecification, ClusterAuthenticationCredentials credentials);

		void CancelJob(object scheduler, int scheduledJobId, string message);

		SubmittedJobInfo GetActualJobInfo(object scheduler, int scheduledJobId);

		SubmittedJobInfo[] GetActualJobsInfo(object scheduler, int[] scheduledJobIds);

		ClusterNodeUsage GetCurrentClusterNodeUsage(object scheduler, ClusterNodeType nodeType);

        List<string> GetAllocatedNodes(object scheduler, SubmittedJobInfo jobInfo);

		void AllowDirectFileTransferAccessForUserToJob(object scheduler, string publicKey, SubmittedJobInfo jobInfo);

		void RemoveDirectFileTransferAccessForUserToJob(object scheduler, string publicKey, SubmittedJobInfo jobInfo);

		void CreateJobDirectory(object scheduler, SubmittedJobInfo jobInfo);

        void DeleteJobDirectory(object scheduler, SubmittedJobInfo jobInfo);

        void CopyJobDataToTemp(object scheduler, SubmittedJobInfo jobInfo, string hash, string path);

        void CopyJobDataFromTemp(object scheduler, SubmittedJobInfo jobInfo, string hash);

        void CreateSshTunnel(long jobId, string localHost, int localPort, string loginHost, string nodeHost, int nodePort, ClusterAuthenticationCredentials credentials);
        
        void RemoveSshTunnel(long jobId, string nodeHost);

        bool SshTunnelExist(long jobId, string nodeHost);
    }
}