[4593] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
[5375] | 3 | using System.Net.Security;
|
---|
[4593] | 4 | using System.ServiceModel;
|
---|
| 5 | using HeuristicLab.Services.Hive.Common.DataTransfer;
|
---|
| 6 |
|
---|
| 7 | namespace HeuristicLab.Services.Hive.Common.ServiceContracts {
|
---|
[4629] | 8 |
|
---|
| 9 | [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
|
---|
[4593] | 10 | public interface IHiveService {
|
---|
| 11 |
|
---|
| 12 | #region Job Methods
|
---|
| 13 | [OperationContract]
|
---|
[5511] | 14 | Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds);
|
---|
[4598] | 15 |
|
---|
[4593] | 16 | [OperationContract]
|
---|
[4905] | 17 | Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
|
---|
[4598] | 18 |
|
---|
[6006] | 19 | [OperationContract]
|
---|
[4598] | 20 | Job GetJob(Guid jobId);
|
---|
| 21 |
|
---|
[6006] | 22 | [OperationContract]
|
---|
[4598] | 23 | IEnumerable<Job> GetJobs();
|
---|
| 24 |
|
---|
[6006] | 25 | [OperationContract]
|
---|
[4598] | 26 | IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
|
---|
| 27 |
|
---|
[6006] | 28 | [OperationContract]
|
---|
[4598] | 29 | IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
|
---|
| 30 |
|
---|
[6006] | 31 | [OperationContract]
|
---|
| 32 | IEnumerable<LightweightJob> GetLightweightExperimentJobs(Guid experimentId);
|
---|
| 33 |
|
---|
| 34 | [OperationContract]
|
---|
[4598] | 35 | JobData GetJobData(Guid jobId);
|
---|
| 36 |
|
---|
[4593] | 37 | [OperationContract]
|
---|
[5511] | 38 | void UpdateJob(Job jobDto);
|
---|
[5602] | 39 |
|
---|
[5511] | 40 | [OperationContract]
|
---|
| 41 | void UpdateJobData(Job jobDto, JobData jobDataDto);
|
---|
[4598] | 42 |
|
---|
[4593] | 43 | [OperationContract]
|
---|
[5106] | 44 | void DeleteJob(Guid jobId);
|
---|
| 45 |
|
---|
| 46 | [OperationContract]
|
---|
[4598] | 47 | void DeleteChildJobs(Guid parentJobId);
|
---|
[5636] | 48 |
|
---|
| 49 | [OperationContract]
|
---|
| 50 | Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
|
---|
[4598] | 51 | #endregion
|
---|
| 52 |
|
---|
| 53 | #region Job Control Methods
|
---|
[4593] | 54 | [OperationContract]
|
---|
[5053] | 55 | void StopJob(Guid jobId);
|
---|
[4598] | 56 |
|
---|
| 57 | [OperationContract]
|
---|
[5062] | 58 | void PauseJob(Guid jobId);
|
---|
[5779] | 59 |
|
---|
| 60 | [OperationContract]
|
---|
| 61 | void RestartJob(Guid jobId);
|
---|
[4593] | 62 | #endregion
|
---|
| 63 |
|
---|
| 64 | #region HiveExperiment Methods
|
---|
[4629] | 65 | [OperationContract]
|
---|
| 66 | HiveExperiment GetHiveExperiment(Guid id);
|
---|
| 67 |
|
---|
[4593] | 68 | /// <summary>
|
---|
| 69 | /// Returns all experiments for the current user
|
---|
| 70 | /// </summary>
|
---|
| 71 | [OperationContract]
|
---|
| 72 | IEnumerable<HiveExperiment> GetHiveExperiments();
|
---|
[4598] | 73 |
|
---|
[5602] | 74 | /// <summary>
|
---|
| 75 | /// Returns all experiments in the hive (only for admins)
|
---|
| 76 | /// </summary>
|
---|
| 77 | /// <returns></returns>
|
---|
[4593] | 78 | [OperationContract]
|
---|
[5602] | 79 | IEnumerable<HiveExperiment> GetAllHiveExperiments();
|
---|
| 80 |
|
---|
| 81 | [OperationContract]
|
---|
[4629] | 82 | Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
| 83 |
|
---|
| 84 | [OperationContract]
|
---|
[4598] | 85 | void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
|
---|
| 86 |
|
---|
[4593] | 87 | [OperationContract]
|
---|
| 88 | void DeleteHiveExperiment(Guid hiveExperimentId);
|
---|
| 89 | #endregion
|
---|
| 90 |
|
---|
| 91 | #region Login Methods
|
---|
[5053] | 92 | [OperationContract]
|
---|
[5405] | 93 | void Hello(Slave slave);
|
---|
[5053] | 94 |
|
---|
| 95 | [OperationContract]
|
---|
[5375] | 96 | void GoodBye(Guid slaveId);
|
---|
[4593] | 97 | #endregion
|
---|
| 98 |
|
---|
| 99 | #region Heartbeat Methods
|
---|
| 100 | [OperationContract]
|
---|
[5053] | 101 | List<MessageContainer> Heartbeat(Heartbeat heartbeat);
|
---|
[4593] | 102 | #endregion
|
---|
| 103 |
|
---|
| 104 | #region Plugin Methods
|
---|
| 105 | [OperationContract]
|
---|
[6000] | 106 | Plugin GetPlugin(Guid pluginId);
|
---|
| 107 | [OperationContract]
|
---|
| 108 | [FaultContract(typeof(PluginAlreadyExistsFault))]
|
---|
[4905] | 109 | Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
|
---|
[4593] | 110 | [OperationContract]
|
---|
[5053] | 111 | IEnumerable<Plugin> GetPlugins();
|
---|
[4593] | 112 | [OperationContract]
|
---|
[5053] | 113 | IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
|
---|
[4593] | 114 | #endregion
|
---|
[5375] | 115 |
|
---|
[4593] | 116 | #region Slave Methods
|
---|
| 117 | [OperationContract]
|
---|
[4649] | 118 | Guid AddSlave(Slave slave);
|
---|
| 119 |
|
---|
| 120 | [OperationContract]
|
---|
[4598] | 121 | Guid AddSlaveGroup(SlaveGroup slaveGroup);
|
---|
| 122 |
|
---|
[4593] | 123 | [OperationContract]
|
---|
[5106] | 124 | Slave GetSlave(Guid slaveId);
|
---|
| 125 |
|
---|
| 126 | [OperationContract]
|
---|
| 127 | SlaveGroup GetSlaveGroup(Guid slaveGroupId);
|
---|
| 128 |
|
---|
| 129 | [OperationContract]
|
---|
[4598] | 130 | IEnumerable<Slave> GetSlaves();
|
---|
[5106] | 131 |
|
---|
[4593] | 132 | [OperationContract]
|
---|
[4598] | 133 | IEnumerable<SlaveGroup> GetSlaveGroups();
|
---|
| 134 |
|
---|
[4593] | 135 | [OperationContract]
|
---|
[5106] | 136 | void UpdateSlave(Slave slave);
|
---|
[4598] | 137 |
|
---|
[4593] | 138 | [OperationContract]
|
---|
[5106] | 139 | void UpdateSlaveGroup(SlaveGroup slaveGroup);
|
---|
[4598] | 140 |
|
---|
[4593] | 141 | [OperationContract]
|
---|
[5106] | 142 | void DeleteSlave(Guid slaveId);
|
---|
| 143 |
|
---|
| 144 | [OperationContract]
|
---|
| 145 | void DeleteSlaveGroup(Guid slaveGroupId);
|
---|
| 146 |
|
---|
| 147 | [OperationContract]
|
---|
| 148 | void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
|
---|
| 149 |
|
---|
| 150 | [OperationContract]
|
---|
[4598] | 151 | void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
|
---|
[4629] | 152 |
|
---|
[5458] | 153 | [OperationContract]
|
---|
| 154 | Guid GetResourceId(string resourceName);
|
---|
| 155 |
|
---|
[5593] | 156 | [OperationContract]
|
---|
[5636] | 157 | void TriggerLifecycle(bool force);
|
---|
[4593] | 158 | #endregion
|
---|
[5101] | 159 |
|
---|
[5633] | 160 | #region Appointment Methods
|
---|
| 161 | [OperationContract]
|
---|
| 162 | Guid AddAppointment(Appointment appointment);
|
---|
| 163 |
|
---|
| 164 | [OperationContract]
|
---|
| 165 | void DeleteAppointment(Guid appointmentId);
|
---|
| 166 |
|
---|
| 167 | [OperationContract]
|
---|
| 168 | void UpdateAppointment(Appointment appointment);
|
---|
| 169 |
|
---|
| 170 | [OperationContract]
|
---|
| 171 | IEnumerable<Appointment> GetScheduleForResource(Guid resourceId);
|
---|
| 172 | #endregion
|
---|
[4593] | 173 | }
|
---|
| 174 | }
|
---|