ws_fs.ecm 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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. ESPStruct [nil_remove] DFUWorkunit
  15. {
  16. string ID;
  17. string ClusterName;
  18. string JobName;
  19. string Queue;
  20. string User;
  21. bool isProtected;
  22. int Command;
  23. [min_ver("1.03")] string CommandMessage;
  24. int PercentDone;
  25. int SecsLeft;
  26. string ProgressMessage;
  27. string SummaryMessage;
  28. int State;
  29. string SourceLogicalName;
  30. string SourceIP;
  31. string SourceFilePath;
  32. string SourceDali;
  33. int SourceRecordSize;
  34. int SourceFormat;
  35. string RowTag;
  36. int SourceNumParts;
  37. string SourceDirectory;
  38. string DestLogicalName;
  39. string DestGroupName;
  40. string DestDirectory;
  41. string DestIP;
  42. string DestFilePath;
  43. int DestFormat;
  44. int DestNumParts;
  45. int DestRecordSize;
  46. bool Replicate;
  47. bool Overwrite;
  48. bool Compress;
  49. string TimeStarted;
  50. string TimeStopped;
  51. string StateMessage;
  52. // Monitor
  53. string MonitorEventName;
  54. bool MonitorSub;
  55. int MonitorShotLimit;
  56. string SourceDiffKeyName;
  57. string DestDiffKeyName;
  58. [min_ver("1.03")] bool Archived(false);
  59. string encrypt;
  60. string decrypt;
  61. };
  62. ESPStruct DFUException
  63. {
  64. int Code;
  65. string Message;
  66. };
  67. ESPStruct [nil_remove] DFUActionResult
  68. {
  69. string ID;
  70. string Action;
  71. string Result;
  72. };
  73. ESPrequest
  74. [
  75. ]
  76. DFUWUSearchRequest
  77. {
  78. };
  79. ESPresponse
  80. [
  81. exceptions_inline
  82. ]
  83. DFUWUSearchResponse
  84. {
  85. ESParray<string, ClusterName> ClusterNames;
  86. };
  87. ESPrequest GetDFUWorkunits
  88. {
  89. string Owner;
  90. string Cluster;
  91. string StateReq;
  92. [min_ver("1.03")] string Type;
  93. [min_ver("1.03")] string Jobname;
  94. int64 PageSize;
  95. int CurrentPage; //Not used
  96. [min_ver("1.01")] int64 PageStartFrom(-1);
  97. string Sortby;
  98. bool Descending(false);
  99. };
  100. ESPresponse [encode(0), exceptions_inline]
  101. GetDFUWorkunitsResponse
  102. {
  103. ESParray<ESPstruct DFUWorkunit> results;
  104. [min_ver("1.03")] string Type;
  105. string Owner;
  106. string Cluster;
  107. string StateReq;
  108. int64 PageSize;
  109. int64 PrevPage;
  110. int64 NextPage;
  111. [min_ver("1.01")] int64 LastPage(-1);
  112. int64 NumWUs;
  113. [min_ver("1.01")] int64 PageStartFrom(-1);
  114. [min_ver("1.01")] int64 PageEndAt;
  115. bool First(true);
  116. string Sortby;
  117. bool Descending(false);
  118. string BasicQuery;
  119. string Filters;
  120. };
  121. ESPrequest [exceptions_inline] ProgressRequest
  122. {
  123. string wuid;
  124. };
  125. ESPresponse [encode(0), exceptions_inline] ProgressResponse
  126. {
  127. string wuid;
  128. int PercentDone;
  129. int SecsLeft;
  130. int KbPerSecAve;
  131. int KbPerSec;
  132. int SlavesDone;
  133. string TimeTaken;
  134. string ProgressMessage;
  135. string SummaryMessage;
  136. string State;
  137. };
  138. ESPrequest GetDFUWorkunit
  139. {
  140. string wuid;
  141. };
  142. ESPresponse [exceptions_inline]
  143. GetDFUWorkunitResponse
  144. {
  145. ESPstruct DFUWorkunit result;
  146. int AutoRefresh(0);
  147. };
  148. ESPrequest CreateDFUWorkunit
  149. {
  150. };
  151. ESPresponse [exceptions_inline]
  152. CreateDFUWorkunitResponse
  153. {
  154. ESPstruct DFUWorkunit result;
  155. };
  156. ESPrequest UpdateDFUWorkunit
  157. {
  158. ESPstruct DFUWorkunit wu;
  159. string ClusterOrig;
  160. string JobNameOrig;
  161. bool isProtectedOrig;
  162. int StateOrig;
  163. };
  164. ESPresponse [exceptions_inline]
  165. UpdateDFUWorkunitResponse
  166. {
  167. };
  168. ESPrequest DeleteDFUWorkunit
  169. {
  170. string wuid;
  171. };
  172. ESPresponse [exceptions_inline]
  173. DeleteDFUWorkunitResponse
  174. {
  175. bool result;
  176. };
  177. ESPrequest DeleteDFUWorkunits
  178. {
  179. ESParray<string> wuids;
  180. };
  181. ESPresponse [exceptions_inline]
  182. DeleteDFUWorkunitsResponse
  183. {
  184. };
  185. ESPrequest DFUWorkunitsActionRequest
  186. {
  187. ESParray<string> wuids;
  188. string Type;
  189. };
  190. ESPresponse [exceptions_inline] DFUWorkunitsActionResponse
  191. {
  192. string FirstColumn("WUID");
  193. ESParray<ESPstruct DFUActionResult> DFUActionResults;
  194. };
  195. ESPrequest SubmitDFUWorkunit
  196. {
  197. string wuid;
  198. };
  199. ESPresponse [exceptions_inline]
  200. SubmitDFUWorkunitResponse
  201. {
  202. };
  203. ESPrequest AbortDFUWorkunit
  204. {
  205. string wuid;
  206. };
  207. ESPresponse [exceptions_inline]
  208. AbortDFUWorkunitResponse
  209. {
  210. };
  211. ESPrequest GetDFUExceptions
  212. {
  213. string wuid;
  214. };
  215. ESPresponse [exceptions_inline]
  216. GetDFUExceptionsResponse
  217. {
  218. ESParray<ESPstruct DFUException> result;
  219. };
  220. ESPrequest [nil_remove] SprayFixed
  221. {
  222. string sourceIP;
  223. string sourcePath;
  224. binary srcxml;
  225. int sourceRecordSize;
  226. string destGroup;
  227. string destLogicalName;
  228. bool overwrite;
  229. bool replicate;
  230. int ReplicateOffset(1);
  231. int maxConnections;
  232. int throttle;
  233. int transferBufferSize;
  234. string prefix;
  235. bool nosplit(false);
  236. bool norecover(false);
  237. bool compress(false);
  238. bool push(false);
  239. bool pull(false);
  240. string encrypt;
  241. string decrypt;
  242. bool wrap(false);
  243. };
  244. ESPresponse [exceptions_inline]
  245. SprayFixedResponse
  246. {
  247. string wuid;
  248. };
  249. ESPrequest [nil_remove] SprayVariable
  250. {
  251. string sourceIP;
  252. string sourcePath;
  253. binary srcxml;
  254. int sourceMaxRecordSize;
  255. int sourceFormat;
  256. string sourceCsvSeparate;
  257. string sourceCsvTerminate;
  258. string sourceCsvQuote;
  259. string sourceRowTag;
  260. string destGroup;
  261. string destLogicalName;
  262. bool overwrite;
  263. bool replicate;
  264. int ReplicateOffset(1);
  265. int maxConnections;
  266. int throttle;
  267. int transferBufferSize;
  268. string prefix;
  269. bool nosplit(false);
  270. bool norecover(false);
  271. bool compress(false);
  272. bool push(false);
  273. bool pull(false);
  274. string encrypt;
  275. string decrypt;
  276. };
  277. ESPresponse [exceptions_inline]
  278. SprayResponse
  279. {
  280. string wuid;
  281. };
  282. ESPrequest [nil_remove] Replicate
  283. {
  284. string sourceLogicalName;
  285. int replicateOffset(1);
  286. string cluster;
  287. bool repeatLast(false);
  288. bool onlyRepeated(false);
  289. };
  290. ESPresponse [exceptions_inline]
  291. ReplicateResponse
  292. {
  293. string wuid;
  294. };
  295. ESPrequest Despray
  296. {
  297. string sourceLogicalName;
  298. string destIP;
  299. string destPath;
  300. binary dstxml;
  301. bool overwrite;
  302. int maxConnections;
  303. int throttle;
  304. int transferBufferSize;
  305. string splitprefix;
  306. bool norecover(false);
  307. bool wrap(false);
  308. bool multiCopy(false);
  309. [min_ver("1.02")] bool SingleConnection;
  310. bool compress(false);
  311. string encrypt;
  312. string decrypt;
  313. };
  314. ESPresponse [exceptions_inline]
  315. DesprayResponse
  316. {
  317. string wuid;
  318. };
  319. ESPrequest [nil_remove] Copy
  320. {
  321. string sourceLogicalName;
  322. string destGroup;
  323. string destGroupRoxie;
  324. string destLogicalName;
  325. string sourceDali;
  326. string srcusername;
  327. string srcpassword;
  328. bool overwrite;
  329. bool replicate;
  330. int ReplicateOffset(1);
  331. int maxConnections;
  332. int throttle;
  333. int transferBufferSize;
  334. bool nosplit;
  335. bool norecover(false);
  336. bool compress(false);
  337. bool Wrap(false);
  338. bool Multicopy(false);
  339. //bool Farmers(false);
  340. string SourceDiffKeyName;
  341. string DestDiffKeyName;
  342. bool superCopy(false);
  343. bool push(false);
  344. bool pull(false);
  345. bool ifnewer(false);
  346. string encrypt;
  347. string decrypt;
  348. };
  349. ESPresponse [exceptions_inline]
  350. CopyResponse
  351. {
  352. string result;
  353. };
  354. ESPrequest EchoDateTime
  355. {
  356. xsdDateTime dt;
  357. };
  358. ESPresponse EchoDateTimeResponse
  359. {
  360. xsdDateTime result;
  361. };
  362. ESPrequest Rename
  363. {
  364. string srcname;
  365. string dstname;
  366. bool overwrite;
  367. };
  368. ESPresponse [exceptions_inline]
  369. RenameResponse
  370. {
  371. string wuid;
  372. };
  373. ESPrequest DFUWUFileRequest
  374. {
  375. string Wuid;
  376. string Type;
  377. string PlainText;
  378. };
  379. ESPresponse [exceptions_inline] DFUWUFileResponse
  380. {
  381. [http_content("text/xml")] string file;
  382. };
  383. ESPrequest FileListRequest
  384. {
  385. string Netaddr;
  386. string Path;
  387. string Mask;
  388. string OS;
  389. bool DirectoryOnly(false);
  390. };
  391. ESPStruct PhysicalFileStruct
  392. {
  393. string name;
  394. bool isDir;
  395. int64 filesize;
  396. string modifiedtime;
  397. };
  398. ESPresponse [exceptions_inline] FileListResponse
  399. {
  400. string Netaddr;
  401. string Path;
  402. string Mask;
  403. int OS;
  404. bool DirectoryOnly(false);
  405. ESParray<ESPStruct PhysicalFileStruct> files;
  406. };
  407. ESPrequest OpenSaveRequest
  408. {
  409. string Location;
  410. string Path;
  411. string Name;
  412. string Type;
  413. string DateTime;
  414. bool BinaryFile(false);
  415. };
  416. ESPresponse [exceptions_inline] OpenSaveResponse
  417. {
  418. string Location;
  419. string Path;
  420. string Name;
  421. string Type;
  422. string DateTime;
  423. bool Viewable(true);
  424. };
  425. ESPrequest DfuMonitorRequest
  426. {
  427. string EventName;
  428. string LogicalName;
  429. string Ip;
  430. string Filename;
  431. bool Sub;
  432. int ShotLimit;
  433. };
  434. ESPresponse [exceptions_inline] DfuMonitorResponse
  435. {
  436. string wuid;
  437. };
  438. ESPrequest ShowResultRequest
  439. {
  440. string Result;
  441. };
  442. ESPresponse [exceptions_inline] ShowResultResponse
  443. {
  444. string Result;
  445. };
  446. ESPStruct [nil_remove] DropZone
  447. {
  448. string Name;
  449. string NetAddress;
  450. string Path;
  451. string Computer;
  452. string Linux;
  453. };
  454. ESPrequest DropZoneFilesRequest
  455. {
  456. string NetAddress;
  457. string Path;
  458. string OS;
  459. string Subfolder;
  460. bool DirectoryOnly(false);
  461. };
  462. ESPresponse [exceptions_inline, nil_remove] DropZoneFilesResponse
  463. {
  464. string NetAddress;
  465. string Path;
  466. int OS;
  467. ESParray<ESPStruct DropZone> DropZones;
  468. ESParray<ESPStruct PhysicalFileStruct> Files;
  469. };
  470. ESPrequest DeleteDropZoneFilesRequest
  471. {
  472. string NetAddress;
  473. string Path;
  474. string OS;
  475. ESParray<string> Names;
  476. };
  477. ESPresponse [exceptions_inline, nil_remove] DeleteDropZoneFilesResponse
  478. {
  479. ESParray<ESPstruct DFUActionResult> DFUActionResults;
  480. };
  481. ESPservice [
  482. version("1.03"), default_client_version("1.03"),
  483. exceptions_inline("./smc_xslt/exceptions.xslt")] FileSpray
  484. {
  485. ESPuses ESPstruct DFUWorkunit;
  486. ESPuses ESPstruct DFUException;
  487. ESPmethod EchoDateTime(EchoDateTime, EchoDateTimeResponse);
  488. ESPmethod [resp_xsl_default("/esp/xslt/showresult.xslt")] ShowResult(ShowResultRequest, ShowResultResponse);
  489. ESPmethod [resp_xsl_default("/esp/xslt/dfuwu_search.xslt")] DFUWUSearch(DFUWUSearchRequest, DFUWUSearchResponse);
  490. ESPmethod [resp_xsl_default("/esp/xslt/dfu_workunits.xslt")] GetDFUWorkunits(GetDFUWorkunits, GetDFUWorkunitsResponse);
  491. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] GetDFUWorkunit(GetDFUWorkunit, GetDFUWorkunitResponse);
  492. ESPmethod [resp_xsl_default("/esp/xslt/dfu_progress.xslt")] GetDFUProgress(ProgressRequest, ProgressResponse);
  493. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] CreateDFUWorkunit(CreateDFUWorkunit, CreateDFUWorkunitResponse);
  494. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] UpdateDFUWorkunit(UpdateDFUWorkunit, UpdateDFUWorkunitResponse);
  495. ESPmethod DeleteDFUWorkunit(DeleteDFUWorkunit, DeleteDFUWorkunitResponse);
  496. ESPmethod DeleteDFUWorkunits(DeleteDFUWorkunits, DeleteDFUWorkunitsResponse);
  497. ESPmethod [resp_xsl_default("/esp/xslt/dfuwuaction_results.xslt")] DFUWorkunitsAction(DFUWorkunitsActionRequest, DFUWorkunitsActionResponse);
  498. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] SubmitDFUWorkunit(SubmitDFUWorkunit, SubmitDFUWorkunitResponse);
  499. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] AbortDFUWorkunit(AbortDFUWorkunit, AbortDFUWorkunitResponse);
  500. ESPmethod GetDFUExceptions(GetDFUExceptions, GetDFUExceptionsResponse);
  501. ESPmethod SprayFixed(SprayFixed, SprayFixedResponse);
  502. ESPmethod SprayVariable(SprayVariable, SprayResponse);
  503. ESPmethod Despray(Despray, DesprayResponse);
  504. ESPmethod Copy(Copy, CopyResponse);
  505. ESPmethod Rename(Rename, RenameResponse);
  506. ESPmethod Replicate(Replicate, ReplicateResponse);
  507. ESPmethod DFUWUFile(DFUWUFileRequest, DFUWUFileResponse);
  508. ESPmethod DfuMonitor(DfuMonitorRequest, DfuMonitorResponse);
  509. ESPmethod [resp_xsl_default("/esp/xslt/dfu_filelist.xslt")] FileList(FileListRequest, FileListResponse);
  510. ESPmethod [resp_xsl_default("/esp/xslt/opensave.xslt")] OpenSave(OpenSaveRequest, OpenSaveResponse);
  511. ESPmethod [resp_xsl_default("/esp/xslt/dropzonefile.xslt")] DropZoneFiles(DropZoneFilesRequest, DropZoneFilesResponse);
  512. ESPmethod [resp_xsl_default("/esp/xslt/dfuwuaction_results.xslt")] DeleteDropZoneFiles(DeleteDropZoneFilesRequest, DFUWorkunitsActionResponse);
  513. };
  514. SCMexportdef(FileSpray);
  515. SCMapi(FileSpray) IClientFileSpray *createFileSprayClient();