ws_smc.ecm 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /*##############################################################################
  2. Copyright (C) 2011 HPCC Systems.
  3. All rights reserved. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ############################################################################## */
  14. ////////////////////////////////////////////////////////////
  15. #include "ws_topology.hpp"
  16. EspInclude(ws_topology);
  17. #include "ws_workunits.hpp"
  18. EspInclude(ws_workunits);
  19. ESPStruct ActiveWorkunit
  20. {
  21. string Wuid;
  22. string State;
  23. int StateID; //remove it later
  24. string Owner;
  25. string Jobname;
  26. string Server;
  27. strint Instance;
  28. string Priority;
  29. [min_ver("1.01")] string Extra;
  30. [min_ver("1.02")] string GraphName;
  31. [min_ver("1.02")] string Duration;
  32. [min_ver("1.02")] string GID;
  33. [min_ver("1.03")] string QueueName;
  34. [min_ver("1.04")] int MemoryBlocked;
  35. [min_ver("1.09")] bool IsPausing(false);
  36. [min_ver("1.10")] string Warning;
  37. };
  38. ESPStruct ThorCluster
  39. {
  40. string ClusterName;
  41. [min_ver("1.03")] string QueueName;
  42. string QueueStatus;
  43. int DoCommand;
  44. [min_ver("1.05")] int QueueAvailable;
  45. [min_ver("1.05")] int JobsRunning;
  46. [min_ver("1.05")] int JobsInQueue;
  47. [min_ver("1.07")] int QueueStatus2;
  48. [min_ver("1.09")] string ThorLCR;
  49. };
  50. ESPStruct RoxieCluster
  51. {
  52. string ClusterName;
  53. string QueueName;
  54. string QueueStatus;
  55. int DoCommand;
  56. int JobsRunning;
  57. int JobsInQueue;
  58. int QueueStatus2;
  59. };
  60. ESPStruct HoleCluster
  61. {
  62. string ClusterName;
  63. string DataModel;
  64. };
  65. ESPStruct DFUJob
  66. {
  67. string TimeStarted;
  68. int Done;
  69. int Total;
  70. string Command;
  71. };
  72. ESPrequest [nil_remove] ActivityRequest
  73. {
  74. string ChatURL;
  75. string BannerContent;
  76. string BannerColor;
  77. string BannerSize;
  78. [min_ver("1.08")] string BannerScroll;
  79. int BannerAction(0);
  80. bool EnableChatURL;
  81. bool FromSubmitBtn(false);
  82. };
  83. ESPresponse [exceptions_inline] ActivityResponse
  84. {
  85. string Build;
  86. ESParray<ESPstruct ThorCluster> ThorClusters;
  87. [min_ver("1.07")] ESParray<ESPstruct RoxieCluster> RoxieClusters;
  88. ESParray<ESPstruct HoleCluster> HoleClusters;
  89. ESParray<ESPstruct DFUJob> DFUJobs;
  90. ESParray<ESPstruct ActiveWorkunit> Running;
  91. [min_ver("1.06")] int UserPermission(-1);
  92. [min_ver("1.06")] string BannerContent;
  93. [min_ver("1.06")] string BannerColor;
  94. [min_ver("1.06")] string BannerSize;
  95. [min_ver("1.08")] string BannerScroll;
  96. [min_ver("1.06")] string ChatURL;
  97. [min_ver("1.06")] int ShowBanner(0);
  98. [min_ver("1.06")] int ShowChatURL(0);
  99. };
  100. ESPrequest SMCIndexRequest
  101. {
  102. };
  103. ESPresponse [exceptions_inline] SMCIndexResponse
  104. {
  105. };
  106. ESPStruct Capability
  107. {
  108. string name;
  109. string description;
  110. };
  111. ESPStruct Permission
  112. {
  113. string Feature;
  114. ESParray<ESPstruct Capability> Capabilities;
  115. };
  116. ESPrequest SMCPermissionsRequest
  117. {
  118. };
  119. ESPresponse [] SMCPermissionsResponse
  120. {
  121. ESParray<ESPstruct Permission> Permissions;
  122. };
  123. ESPrequest SMCQueueRequest
  124. {
  125. int ClusterType;
  126. string Cluster;
  127. };
  128. ESPresponse [exceptions_inline] SMCQueueResponse
  129. {
  130. };
  131. ESPrequest SMCJobRequest
  132. {
  133. int ClusterType;
  134. string Cluster;
  135. string Wuid;
  136. };
  137. ESPresponse [exceptions_inline] SMCJobResponse
  138. {
  139. };
  140. ESPrequest SMCPriorityRequest
  141. {
  142. int ClusterType;
  143. string Cluster;
  144. string Wuid;
  145. string Priority;
  146. };
  147. ESPresponse [exceptions_inline] SMCPriorityResponse
  148. {
  149. };
  150. ESPrequest GetThorQueueAvailabilityRequest
  151. {
  152. };
  153. ESPresponse [exceptions_inline] GetThorQueueAvailabilityResponse
  154. {
  155. ESParray<ESPstruct ThorCluster> ThorClusters;
  156. };
  157. ESPrequest [nil_remove] SetBannerRequest
  158. {
  159. string ChatURL;
  160. string BannerContent;
  161. string BannerColor;
  162. string BannerSize;
  163. string BannerScroll;
  164. int BannerAction;
  165. bool EnableChatURL;
  166. bool FromSubmitBtn(false);
  167. };
  168. ESPresponse [exceptions_inline] SetBannerResponse
  169. {
  170. };
  171. ESPrequest NotInCommunityEditionRequest
  172. {
  173. string EEPortal;
  174. };
  175. ESPresponse [exceptions_inline] NotInCommunityEditionResponse
  176. {
  177. };
  178. ESPStruct HPCCResource
  179. {
  180. string Name;
  181. string Description;
  182. string FileName;
  183. string Version;
  184. };
  185. ESPStruct HPCCResourceRepository
  186. {
  187. string Name;
  188. string Path;
  189. ESParray<ESPstruct HPCCResource> HPCCResources;
  190. };
  191. ESPrequest
  192. [
  193. ]
  194. BrowseResourcesRequest
  195. {
  196. };
  197. ESPresponse
  198. [
  199. exceptions_inline, nil_remove
  200. ]
  201. BrowseResourcesResponse
  202. {
  203. string PortalURL;
  204. string NetAddress;
  205. int OS;
  206. ESParray<ESPstruct HPCCResourceRepository> HPCCResourceRepositories;
  207. };
  208. //ESPservice [noforms, version("1.04"), default_client_version("1.04"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsSMC
  209. ESPservice [noforms, version("1.10"), default_client_version("1.10"), exceptions_inline("./smc_xslt/exceptions.xslt"), use_method_name] WsSMC
  210. {
  211. ESPuses ESPStruct Capability;
  212. ESPuses ESPStruct Permission;
  213. ESPuses ESPStruct ThorCluster;
  214. ESPuses ESPStruct HoleCluster;
  215. ESPuses ESPStruct ActiveWorkunit;
  216. ESPuses ESPStruct DFUJob;
  217. ESPmethod Index(SMCIndexRequest, SMCIndexResponse);
  218. ESPmethod [resp_xsl_default("/esp/xslt/index.xslt")] Activity(ActivityRequest, ActivityResponse);
  219. ESPmethod ClearQueue(SMCQueueRequest, SMCQueueResponse);
  220. ESPmethod PauseQueue(SMCQueueRequest, SMCQueueResponse);
  221. ESPmethod ResumeQueue(SMCQueueRequest, SMCQueueResponse);
  222. ESPmethod StopQueue(SMCQueueRequest, SMCQueueResponse);
  223. ESPmethod RemoveJob(SMCJobRequest, SMCJobResponse);
  224. ESPmethod MoveJobFront(SMCJobRequest, SMCJobResponse);
  225. ESPmethod MoveJobBack(SMCJobRequest, SMCJobResponse);
  226. ESPmethod MoveJobUp(SMCJobRequest, SMCJobResponse);
  227. ESPmethod MoveJobDown(SMCJobRequest, SMCJobResponse);
  228. ESPmethod SetJobPriority(SMCPriorityRequest, SMCPriorityResponse);
  229. ESPmethod GetThorQueueAvailability(GetThorQueueAvailabilityRequest, GetThorQueueAvailabilityResponse);
  230. ESPmethod SetBanner(SetBannerRequest, SetBannerResponse);
  231. ESPmethod NotInCommunityEdition(NotInCommunityEditionRequest, NotInCommunityEditionResponse);
  232. ESPmethod [resp_xsl_default("/esp/xslt/hpccresourcelist.xslt")] BrowseResources(BrowseResourcesRequest, BrowseResourcesResponse);
  233. };
  234. SCMexportdef(WSSMC);
  235. SCMapi(WSSMC) IClientWsSMC *createWsSMCClient();