ws_fs.ecm 15 KB

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