ws_fs.ecm 16 KB

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