ws_fs.ecm 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. ESPStruct [nil_remove] DFUWorkunit
  14. {
  15. string ID;
  16. [min_ver("1.06")] string DFUServerName;
  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. [min_ver("1.04")] string SourceCsvSeparate;
  50. [min_ver("1.04")] string SourceCsvQuote;
  51. [min_ver("1.04")] string SourceCsvTerminate;
  52. [min_ver("1.05")] string SourceCsvEscape;
  53. string TimeStarted;
  54. string TimeStopped;
  55. string StateMessage;
  56. // Monitor
  57. string MonitorEventName;
  58. bool MonitorSub;
  59. int MonitorShotLimit;
  60. string SourceDiffKeyName;
  61. string DestDiffKeyName;
  62. [min_ver("1.03")] bool Archived(false);
  63. string encrypt;
  64. string decrypt;
  65. [min_ver("1.08")] bool failIfNoSourceFile(false);
  66. [min_ver("1.09")] bool recordStructurePresent(false);
  67. [min_ver("1.10")] bool quotedTerminator(true);
  68. };
  69. ESPStruct DFUException
  70. {
  71. int Code;
  72. string Message;
  73. };
  74. ESPStruct [nil_remove] DFUActionResult
  75. {
  76. string ID;
  77. string Action;
  78. string Result;
  79. };
  80. ESPrequest
  81. [
  82. ]
  83. DFUWUSearchRequest
  84. {
  85. };
  86. ESPresponse
  87. [
  88. exceptions_inline
  89. ]
  90. DFUWUSearchResponse
  91. {
  92. ESParray<string, ClusterName> ClusterNames;
  93. };
  94. ESPrequest GetDFUWorkunits
  95. {
  96. string Owner;
  97. string Cluster;
  98. string StateReq;
  99. [min_ver("1.03")] string Type;
  100. [min_ver("1.03")] string Jobname;
  101. int64 PageSize;
  102. int CurrentPage; //Not used
  103. [min_ver("1.01")] int64 PageStartFrom(-1);
  104. string Sortby;
  105. bool Descending(false);
  106. int64 CacheHint(-1);
  107. };
  108. ESPresponse [encode(0), exceptions_inline]
  109. GetDFUWorkunitsResponse
  110. {
  111. ESParray<ESPstruct DFUWorkunit> results;
  112. [min_ver("1.03")] string Type;
  113. string Owner;
  114. string Cluster;
  115. string StateReq;
  116. int64 PageSize;
  117. int64 PrevPage;
  118. int64 NextPage;
  119. [min_ver("1.01")] int64 LastPage(-1);
  120. int64 NumWUs;
  121. [min_ver("1.01")] int64 PageStartFrom(-1);
  122. [min_ver("1.01")] int64 PageEndAt;
  123. bool First(true);
  124. string Sortby;
  125. bool Descending(false);
  126. string BasicQuery;
  127. string Filters;
  128. [min_ver("1.07")] int64 CacheHint;
  129. };
  130. ESPrequest [exceptions_inline] ProgressRequest
  131. {
  132. string wuid;
  133. };
  134. ESPresponse [encode(0), exceptions_inline] ProgressResponse
  135. {
  136. string wuid;
  137. int PercentDone;
  138. int SecsLeft;
  139. int KbPerSecAve;
  140. int KbPerSec;
  141. int SlavesDone;
  142. string TimeTaken;
  143. string ProgressMessage;
  144. string SummaryMessage;
  145. string State;
  146. };
  147. ESPrequest GetDFUWorkunit
  148. {
  149. string wuid;
  150. };
  151. ESPresponse [exceptions_inline]
  152. GetDFUWorkunitResponse
  153. {
  154. ESPstruct DFUWorkunit result;
  155. int AutoRefresh(0);
  156. };
  157. ESPrequest CreateDFUWorkunit
  158. {
  159. };
  160. ESPresponse [exceptions_inline]
  161. CreateDFUWorkunitResponse
  162. {
  163. ESPstruct DFUWorkunit result;
  164. };
  165. ESPrequest UpdateDFUWorkunit
  166. {
  167. ESPstruct DFUWorkunit wu;
  168. string ClusterOrig;
  169. string JobNameOrig;
  170. bool isProtectedOrig;
  171. int StateOrig;
  172. };
  173. ESPresponse [exceptions_inline]
  174. UpdateDFUWorkunitResponse
  175. {
  176. };
  177. ESPrequest DeleteDFUWorkunit
  178. {
  179. string wuid;
  180. };
  181. ESPresponse [exceptions_inline]
  182. DeleteDFUWorkunitResponse
  183. {
  184. bool result;
  185. };
  186. ESPrequest DeleteDFUWorkunits
  187. {
  188. ESParray<string> wuids;
  189. };
  190. ESPresponse [exceptions_inline]
  191. DeleteDFUWorkunitsResponse
  192. {
  193. };
  194. ESPrequest DFUWorkunitsActionRequest
  195. {
  196. ESParray<string> wuids;
  197. string Type;
  198. };
  199. ESPresponse [exceptions_inline] DFUWorkunitsActionResponse
  200. {
  201. string FirstColumn("WUID");
  202. ESParray<ESPstruct DFUActionResult> DFUActionResults;
  203. };
  204. ESPrequest SubmitDFUWorkunit
  205. {
  206. string wuid;
  207. };
  208. ESPresponse [exceptions_inline]
  209. SubmitDFUWorkunitResponse
  210. {
  211. };
  212. ESPrequest AbortDFUWorkunit
  213. {
  214. string wuid;
  215. };
  216. ESPresponse [exceptions_inline]
  217. AbortDFUWorkunitResponse
  218. {
  219. };
  220. ESPrequest GetDFUExceptions
  221. {
  222. string wuid;
  223. };
  224. ESPresponse [exceptions_inline]
  225. GetDFUExceptionsResponse
  226. {
  227. ESParray<ESPstruct DFUException> result;
  228. };
  229. ESPrequest [nil_remove] SprayFixed
  230. {
  231. string sourceIP;
  232. string sourcePath;
  233. binary srcxml;
  234. [min_ver("1.09")] string sourceFormat;
  235. int sourceRecordSize;
  236. string destGroup;
  237. string destLogicalName;
  238. bool overwrite;
  239. bool replicate;
  240. int ReplicateOffset(1);
  241. int maxConnections;
  242. int throttle;
  243. int transferBufferSize;
  244. string prefix;
  245. bool nosplit(false);
  246. bool norecover(false);
  247. bool compress(false);
  248. bool push(false);
  249. bool pull(false);
  250. string encrypt;
  251. string decrypt;
  252. bool wrap(false);
  253. [min_ver("1.08")] bool failIfNoSourceFile(false);
  254. [min_ver("1.09")] bool recordStructurePresent(false);
  255. [min_ver("1.10")] bool quotedTerminator(true);
  256. };
  257. ESPresponse [exceptions_inline]
  258. SprayFixedResponse
  259. {
  260. string wuid;
  261. };
  262. ESPrequest [nil_remove] SprayVariable
  263. {
  264. string sourceIP;
  265. string sourcePath;
  266. binary srcxml;
  267. int sourceMaxRecordSize;
  268. int sourceFormat;
  269. bool NoSourceCsvSeparator(false);
  270. string sourceCsvSeparate;
  271. string sourceCsvTerminate;
  272. string sourceCsvQuote;
  273. string sourceCsvEscape;
  274. string sourceRowTag;
  275. string destGroup;
  276. string destLogicalName;
  277. bool overwrite;
  278. bool replicate;
  279. int ReplicateOffset(1);
  280. int maxConnections;
  281. int throttle;
  282. int transferBufferSize;
  283. string prefix;
  284. bool nosplit(false);
  285. bool norecover(false);
  286. bool compress(false);
  287. bool push(false);
  288. bool pull(false);
  289. string encrypt;
  290. string decrypt;
  291. [min_ver("1.08")] bool failIfNoSourceFile(false);
  292. [min_ver("1.09")] bool recordStructurePresent(false);
  293. [min_ver("1.10")] bool quotedTerminator(true);
  294. };
  295. ESPresponse [exceptions_inline]
  296. SprayResponse
  297. {
  298. string wuid;
  299. };
  300. ESPrequest [nil_remove] Replicate
  301. {
  302. string sourceLogicalName;
  303. int replicateOffset(1);
  304. string cluster;
  305. bool repeatLast(false);
  306. bool onlyRepeated(false);
  307. };
  308. ESPresponse [exceptions_inline]
  309. ReplicateResponse
  310. {
  311. string wuid;
  312. };
  313. ESPrequest Despray
  314. {
  315. string sourceLogicalName;
  316. string destIP;
  317. string destPath;
  318. binary dstxml;
  319. bool overwrite;
  320. int maxConnections;
  321. int throttle;
  322. int transferBufferSize;
  323. string splitprefix;
  324. bool norecover(false);
  325. bool wrap(false);
  326. bool multiCopy(false);
  327. [min_ver("1.02")] bool SingleConnection;
  328. bool compress(false);
  329. string encrypt;
  330. string decrypt;
  331. };
  332. ESPresponse [exceptions_inline]
  333. DesprayResponse
  334. {
  335. string wuid;
  336. };
  337. ESPrequest [nil_remove] Copy
  338. {
  339. string sourceLogicalName;
  340. string destGroup;
  341. string destGroupRoxie;
  342. string destLogicalName;
  343. string sourceDali;
  344. string srcusername;
  345. string srcpassword;
  346. bool overwrite;
  347. bool replicate;
  348. int ReplicateOffset(1);
  349. int maxConnections;
  350. int throttle;
  351. int transferBufferSize;
  352. bool nosplit;
  353. bool norecover(false);
  354. bool compress(false);
  355. bool Wrap(false);
  356. bool Multicopy(false);
  357. //bool Farmers(false);
  358. string SourceDiffKeyName;
  359. string DestDiffKeyName;
  360. bool superCopy(false);
  361. bool push(false);
  362. bool pull(false);
  363. bool ifnewer(false);
  364. string encrypt;
  365. string decrypt;
  366. };
  367. ESPresponse [exceptions_inline]
  368. CopyResponse
  369. {
  370. string result;
  371. };
  372. ESPrequest EchoDateTime
  373. {
  374. xsdDateTime dt;
  375. };
  376. ESPresponse EchoDateTimeResponse
  377. {
  378. xsdDateTime result;
  379. };
  380. ESPrequest Rename
  381. {
  382. string srcname;
  383. string dstname;
  384. bool overwrite;
  385. };
  386. ESPresponse [exceptions_inline]
  387. RenameResponse
  388. {
  389. string wuid;
  390. };
  391. ESPrequest DFUWUFileRequest
  392. {
  393. string Wuid;
  394. string Type;
  395. string PlainText;
  396. };
  397. ESPresponse [exceptions_inline] DFUWUFileResponse
  398. {
  399. [http_content("text/xml")] string file;
  400. };
  401. ESPrequest FileListRequest
  402. {
  403. string Netaddr;
  404. string Path;
  405. string Mask;
  406. string OS;
  407. bool DirectoryOnly(false);
  408. };
  409. ESPStruct PhysicalFileStruct
  410. {
  411. string name;
  412. bool isDir;
  413. int64 filesize;
  414. string modifiedtime;
  415. };
  416. ESPresponse [exceptions_inline] FileListResponse
  417. {
  418. string Netaddr;
  419. string Path;
  420. string Mask;
  421. int OS;
  422. bool DirectoryOnly(false);
  423. [min_ver("1.10")] string AcceptLanguage;
  424. ESParray<ESPStruct PhysicalFileStruct> files;
  425. };
  426. ESPrequest OpenSaveRequest
  427. {
  428. string Location;
  429. string Path;
  430. string Name;
  431. string Type;
  432. string DateTime;
  433. bool BinaryFile(false);
  434. };
  435. ESPresponse [exceptions_inline] OpenSaveResponse
  436. {
  437. string Location;
  438. string Path;
  439. string Name;
  440. string Type;
  441. string DateTime;
  442. bool Viewable(true);
  443. };
  444. ESPrequest DfuMonitorRequest
  445. {
  446. string EventName;
  447. string LogicalName;
  448. string Ip;
  449. string Filename;
  450. bool Sub;
  451. int ShotLimit;
  452. };
  453. ESPresponse [exceptions_inline] DfuMonitorResponse
  454. {
  455. string wuid;
  456. };
  457. ESPrequest ShowResultRequest
  458. {
  459. string Result;
  460. };
  461. ESPresponse [exceptions_inline] ShowResultResponse
  462. {
  463. string Result;
  464. };
  465. ESPStruct [nil_remove] DropZone
  466. {
  467. string Name;
  468. string NetAddress;
  469. string Path;
  470. string Computer;
  471. string Linux;
  472. };
  473. ESPrequest DropZoneFilesRequest
  474. {
  475. string NetAddress;
  476. string Path;
  477. string OS;
  478. string Subfolder;
  479. bool DirectoryOnly(false);
  480. };
  481. ESPresponse [exceptions_inline, nil_remove] DropZoneFilesResponse
  482. {
  483. string NetAddress;
  484. string Path;
  485. int OS;
  486. ESParray<ESPStruct DropZone> DropZones;
  487. ESParray<ESPStruct PhysicalFileStruct> Files;
  488. };
  489. ESPrequest DeleteDropZoneFilesRequest
  490. {
  491. string NetAddress;
  492. string Path;
  493. string OS;
  494. ESParray<string> Names;
  495. };
  496. ESPresponse [exceptions_inline, nil_remove] DeleteDropZoneFilesResponse
  497. {
  498. ESParray<ESPstruct DFUActionResult> DFUActionResults;
  499. };
  500. ESPresponse [exceptions_inline] UploadFilesResponse
  501. {
  502. ESParray<ESPstruct DFUActionResult> UploadFileResults;
  503. };
  504. ESPservice [
  505. version("1.10"), default_client_version("1.10"),
  506. exceptions_inline("./smc_xslt/exceptions.xslt")] FileSpray
  507. {
  508. ESPuses ESPstruct DFUWorkunit;
  509. ESPuses ESPstruct DFUException;
  510. ESPmethod EchoDateTime(EchoDateTime, EchoDateTimeResponse);
  511. ESPmethod [resp_xsl_default("/esp/xslt/showresult.xslt")] ShowResult(ShowResultRequest, ShowResultResponse);
  512. ESPmethod [resp_xsl_default("/esp/xslt/dfuwu_search.xslt")] DFUWUSearch(DFUWUSearchRequest, DFUWUSearchResponse);
  513. ESPmethod [resp_xsl_default("/esp/xslt/dfu_workunits.xslt")] GetDFUWorkunits(GetDFUWorkunits, GetDFUWorkunitsResponse);
  514. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] GetDFUWorkunit(GetDFUWorkunit, GetDFUWorkunitResponse);
  515. ESPmethod [resp_xsl_default("/esp/xslt/dfu_progress.xslt")] GetDFUProgress(ProgressRequest, ProgressResponse);
  516. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] CreateDFUWorkunit(CreateDFUWorkunit, CreateDFUWorkunitResponse);
  517. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] UpdateDFUWorkunit(UpdateDFUWorkunit, UpdateDFUWorkunitResponse);
  518. ESPmethod DeleteDFUWorkunit(DeleteDFUWorkunit, DeleteDFUWorkunitResponse);
  519. ESPmethod DeleteDFUWorkunits(DeleteDFUWorkunits, DeleteDFUWorkunitsResponse);
  520. ESPmethod [resp_xsl_default("/esp/xslt/dfuwuaction_results.xslt")] DFUWorkunitsAction(DFUWorkunitsActionRequest, DFUWorkunitsActionResponse);
  521. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] SubmitDFUWorkunit(SubmitDFUWorkunit, SubmitDFUWorkunitResponse);
  522. ESPmethod [resp_xsl_default("/esp/xslt/dfu_wuid.xslt")] AbortDFUWorkunit(AbortDFUWorkunit, AbortDFUWorkunitResponse);
  523. ESPmethod GetDFUExceptions(GetDFUExceptions, GetDFUExceptionsResponse);
  524. ESPmethod SprayFixed(SprayFixed, SprayFixedResponse);
  525. ESPmethod SprayVariable(SprayVariable, SprayResponse);
  526. ESPmethod Despray(Despray, DesprayResponse);
  527. ESPmethod Copy(Copy, CopyResponse);
  528. ESPmethod Rename(Rename, RenameResponse);
  529. ESPmethod Replicate(Replicate, ReplicateResponse);
  530. ESPmethod DFUWUFile(DFUWUFileRequest, DFUWUFileResponse);
  531. ESPmethod DfuMonitor(DfuMonitorRequest, DfuMonitorResponse);
  532. ESPmethod [resp_xsl_default("/esp/xslt/dfu_filelist.xslt")] FileList(FileListRequest, FileListResponse);
  533. ESPmethod [resp_xsl_default("/esp/xslt/opensave.xslt")] OpenSave(OpenSaveRequest, OpenSaveResponse);
  534. ESPmethod [resp_xsl_default("/esp/xslt/dropzonefile.xslt")] DropZoneFiles(DropZoneFilesRequest, DropZoneFilesResponse);
  535. ESPmethod [resp_xsl_default("/esp/xslt/dfuwuaction_results.xslt")] DeleteDropZoneFiles(DeleteDropZoneFilesRequest, DFUWorkunitsActionResponse);
  536. };
  537. SCMexportdef(FileSpray);
  538. SCMapi(FileSpray) IClientFileSpray *createFileSprayClient();