aspera-cli 4.18.0 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +23 -0
  4. data/CONTRIBUTING.md +5 -12
  5. data/README.md +152 -84
  6. data/examples/build_exec +85 -0
  7. data/examples/build_package.sh +28 -0
  8. data/lib/aspera/agent/alpha.rb +4 -4
  9. data/lib/aspera/agent/base.rb +2 -0
  10. data/lib/aspera/agent/connect.rb +3 -4
  11. data/lib/aspera/agent/direct.rb +108 -104
  12. data/lib/aspera/agent/httpgw.rb +1 -1
  13. data/lib/aspera/api/aoc.rb +2 -2
  14. data/lib/aspera/api/httpgw.rb +95 -57
  15. data/lib/aspera/api/node.rb +110 -77
  16. data/lib/aspera/ascp/installation.rb +47 -32
  17. data/lib/aspera/ascp/management.rb +4 -1
  18. data/lib/aspera/ascp/products.rb +2 -8
  19. data/lib/aspera/cli/extended_value.rb +27 -14
  20. data/lib/aspera/cli/formatter.rb +35 -28
  21. data/lib/aspera/cli/main.rb +11 -11
  22. data/lib/aspera/cli/manager.rb +109 -94
  23. data/lib/aspera/cli/plugin.rb +4 -7
  24. data/lib/aspera/cli/plugin_factory.rb +10 -1
  25. data/lib/aspera/cli/plugins/aoc.rb +15 -14
  26. data/lib/aspera/cli/plugins/config.rb +35 -29
  27. data/lib/aspera/cli/plugins/faspex.rb +5 -4
  28. data/lib/aspera/cli/plugins/faspex5.rb +16 -13
  29. data/lib/aspera/cli/plugins/node.rb +50 -41
  30. data/lib/aspera/cli/plugins/orchestrator.rb +3 -2
  31. data/lib/aspera/cli/plugins/preview.rb +1 -1
  32. data/lib/aspera/cli/plugins/server.rb +2 -2
  33. data/lib/aspera/cli/plugins/shares.rb +11 -7
  34. data/lib/aspera/cli/special_values.rb +13 -0
  35. data/lib/aspera/cli/sync_actions.rb +73 -32
  36. data/lib/aspera/cli/transfer_agent.rb +3 -2
  37. data/lib/aspera/cli/transfer_progress.rb +1 -1
  38. data/lib/aspera/cli/version.rb +1 -1
  39. data/lib/aspera/environment.rb +100 -7
  40. data/lib/aspera/faspex_gw.rb +1 -1
  41. data/lib/aspera/keychain/encrypted_hash.rb +2 -0
  42. data/lib/aspera/log.rb +1 -0
  43. data/lib/aspera/node_simulator.rb +1 -1
  44. data/lib/aspera/oauth/jwt.rb +1 -1
  45. data/lib/aspera/oauth/url_json.rb +2 -0
  46. data/lib/aspera/oauth/web.rb +7 -6
  47. data/lib/aspera/rest.rb +46 -15
  48. data/lib/aspera/secret_hider.rb +3 -2
  49. data/lib/aspera/ssh.rb +1 -1
  50. data/lib/aspera/transfer/faux_file.rb +7 -5
  51. data/lib/aspera/transfer/parameters.rb +27 -19
  52. data/lib/aspera/transfer/spec.rb +8 -10
  53. data/lib/aspera/transfer/sync.rb +52 -47
  54. data/lib/aspera/web_auth.rb +0 -1
  55. data/lib/aspera/web_server_simple.rb +24 -13
  56. data.tar.gz.sig +0 -0
  57. metadata +5 -4
  58. metadata.gz.sig +0 -0
  59. data/examples/rubyc +0 -24
  60. data/lib/aspera/open_application.rb +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71adcb69e4f2f4bb9db31713c2a5b7f251ddb052418d3a11e6061e55bf4979ce
4
- data.tar.gz: af9cc1ab42b8b6f89d2e561becdb07e05e6ca0d6c2275e0834848ab3f2496eb6
3
+ metadata.gz: 89df3ebc2bf7a146a16e59154a73efcfc2e11f7767aba28725f9443de04772b7
4
+ data.tar.gz: 33469a2bc4991b106ab3002927e823f280c016fc070a2bdcbb3edb286506041d
5
5
  SHA512:
6
- metadata.gz: b48fab716de4e3d3c3a4175c8a5a4139f02d0ff29f2a8e9c1e57b12f1fe6e0bbb1aed85eeb04a894087da6b360675695e0017a97be1ee210b1ff9b3b70beeeff
7
- data.tar.gz: e31d43642a703b5b2a9b3f65ce712ed848b174b7dc122e7be760ef51849d292accc104f90acc02e4bc9c6eaae579246f6a68239b204ebb514a6d6783d0a82cb1
6
+ metadata.gz: d57c69a340b866cfe5c3003c94ecb3ebc8c61aba7011ee4b8683da60d9615dd060fb94ac153e16eb98bd11f7dfa1deb117b1ca2ecd5bfe5d46e5a390ec290a01
7
+ data.tar.gz: fa364474177bc6d2f648474b1eed12b45733e84a5d4896d3075225ed1212aed27f64725ba38a400a3f9c5da2e7e2acf46d6a41164e5d92c1e2ce3a94498c5401
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changes (Release notes)
2
2
 
3
+ * 4.19.0
4
+ * New Features:
5
+ * `server`: add support for `async` (Aspera Sync) from Transfer SDK
6
+ * **global**: #156 support sending folders with httpgw
7
+ * **global**: new value for option `format`: `multi`
8
+ * Issues Fixed:
9
+ * `aoc`: #157 fix problem with `files browse` on a link
10
+ * `sync`: better documentation and handling of options.
11
+ * Breaking Changes:
12
+ * **global**: Default value for direct agent option `transfer_info.multi_incr_udp` is `true` on Windows, and now `false` on other platforms.
13
+ * **global**: Token based transfers now use the RSA key only. Direct agent option `transfer_info.client_ssh_key` allows changing this behavior.
14
+
15
+ * 4.18.1
16
+
17
+ * New Features:
18
+ * none
19
+ * Issues Fixed:
20
+ * **global**: #146 (@junkimu) Fix problem on Windows WRT terminal detection
21
+ * **global**: node gen4 (aoc) browsing through link now follows the link correctly
22
+ * `shares`: #147 Fix problem for `shares files mkdir`
23
+ * Breaking Changes:
24
+ * **global**: Removed option `id`, deprecated since 4.14.0
25
+
3
26
  * 4.18.0
4
27
 
5
28
  * New Features:
data/CONTRIBUTING.md CHANGED
@@ -228,7 +228,7 @@ Then procedure is as follows:
228
228
 
229
229
  ## Docker image build
230
230
 
231
- The Dockerfile template allows customizing the optional copy of gem file , versus install from rubygems,org as well as customizing the retrieval of the SDK.
231
+ The `Dockerfile.tmpl.erb` template allows customization of the optional copying of the `aspera-cli.gem` file, as opposed to installing from rubygems.org. It also supports customizing the retrieval of the SDK.
232
232
 
233
233
  ### Default image build
234
234
 
@@ -278,19 +278,11 @@ make docker_push_beta
278
278
 
279
279
  ## Single executable build
280
280
 
281
- It is possible to build `ascli` as a single native executable using `rubyc` (gem `ruby-packer`).
281
+ Initially, `rubyc` (gem [`ruby-packer`](https://github.com/pmq20/ruby-packer) and [here](https://github.com/you54f/ruby-packer)) was used to build a single executable.
282
282
 
283
- ```bash
284
- make single
285
- ```
286
-
287
- This is based on tool `rubyc` (gem `ruby-packer`): either place the executable in folder `tmp`, or the architecture-specific version will be automatically downloaded.
283
+ https://www.tebako.org/
288
284
 
289
- > **Note:** Perl `Findbin` is needed, install on Linux with:
290
-
291
- ```bash
292
- sudo dnf install -y perl perl-FindBin perl-IPC-Cmd
293
- ```
285
+ A modern version of this is now used: [`tebako`](https://github.com/tamatebako/tebako) for which a container is provided.
294
286
 
295
287
  ## Long Term Implementation and delivery improvements
296
288
 
@@ -299,3 +291,4 @@ sudo dnf install -y perl perl-FindBin perl-IPC-Cmd
299
291
  - <https://github.com/oauth-xx/oauth2>
300
292
  - use gem Thor <http://whatisthor.com/> (or other standard Ruby CLI manager)
301
293
  - Package a single-file executable for various architectures with <https://github.com/pmq20/ruby-packer> (`rubyc`)
294
+ - look at <https://github.com/phusion/traveling-ruby>
data/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## Introduction
12
12
 
13
- Version : 4.18.0
13
+ Version : 4.19.0
14
14
 
15
15
  Laurent/2016-2024
16
16
 
@@ -92,7 +92,7 @@ Once the gem is installed, `ascli` shall be accessible:
92
92
 
93
93
  ```console
94
94
  $ ascli --version
95
- 4.18.0
95
+ 4.19.0
96
96
  ```
97
97
 
98
98
  ### First use
@@ -300,52 +300,6 @@ Download the Ruby installer executable from <https://rubyinstaller.org/downloads
300
300
  rubyinstaller-devkit-3.2.2-1-x64.exe /silent /currentuser /noicons /dir=C:\aspera-cli
301
301
  ```
302
302
 
303
- Installation without network:
304
-
305
- It is essentially the same procedure, but instead of retrieving files from internet, copy the files from a machine with internet access, and then install from those archives:
306
-
307
- - Download the `exe` Ruby installer from <https://rubyinstaller.org/downloads/>
308
-
309
- ```bash
310
- v=$(curl -s https://rubyinstaller.org/downloads/|sed -nEe 's|.*(https://.*/releases/download/.*exe).*|\1|p'|head -n 1)
311
- curl -o ${v##*/} $v
312
- ```
313
-
314
- - Create an archive with necessary gems: <https://help.rubygems.org/kb/rubygems/installing-gems-with-no-network>
315
-
316
- ```bat
317
- gem install aspera-cli -N -i my_gems
318
- ```
319
-
320
- Zip the files `*.gem` from folder `repo/my_gems`
321
-
322
- - Download the SDK from: <https://ibm.biz/aspera_sdk>
323
-
324
- Create a Zip with all those files, and transfer to the target system.
325
-
326
- Then, on the target system:
327
-
328
- - Unzip the archive
329
- - Execute the installer:
330
-
331
- ```bat
332
- rubyinstaller-devkit-3.2.2-1-x64.exe /silent /currentuser /noicons /dir=C:\aspera-cli
333
- ```
334
-
335
- - Install the gems:
336
-
337
- ```bat
338
- gem install --force --local *.gem
339
- ```
340
-
341
- - Install the SDK
342
-
343
- ```bash
344
- ascli config ascp install --sdk-url=file:///sdk.zip
345
- ```
346
-
347
- > **Note:** An example of installation script is provided: [docs/install.bat](docs/install.bat)
348
-
349
303
  #### macOS: `brew`
350
304
 
351
305
  **macOS** come with Ruby.
@@ -410,6 +364,26 @@ One can remove all installed gems, for example to start fresh:
410
364
  gem uninstall -axI $(ls $(gem env gemdir)/gems/|sed -e 's/-[^-]*$//'|sort -u)
411
365
  ```
412
366
 
367
+ #### Linux as simple user
368
+
369
+ If you don't have root access, you can install Ruby in your home directory using `rbenv` see [rbenv-installer](https://github.com/rbenv/rbenv-installer#rbenv-installer):
370
+
371
+ ```bash
372
+ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
373
+ ```
374
+
375
+ Then open a new terminal, or "source" the shell initialization script:
376
+
377
+ ```bash
378
+ source ~/.bashrc
379
+ ```
380
+
381
+ Then install Ruby:
382
+
383
+ ```bash
384
+ rbenv install 3.2.2
385
+ ```
386
+
413
387
  #### Other Unixes (AIX)
414
388
 
415
389
  Ruby is sometimes made available as an installable package through third party providers.
@@ -544,7 +518,7 @@ ascli config ascp install
544
518
  If a local SDK installation is preferred instead of fetching from internet: one can specify the location of the SDK file:
545
519
 
546
520
  ```bash
547
- curl -Lso sdk.zip https://ibm.biz/aspera_sdk
521
+ curl -Lso sdk.zip https://ibm.biz/aspera_transfer_sdk
548
522
  ```
549
523
 
550
524
  ```bash
@@ -574,6 +548,18 @@ Refer to section: [Transfer Agents](#transfer-clients-agents)
574
548
 
575
549
  > **Note:** No pre-packaged version is provided yet.
576
550
 
551
+ #### Gem files and dependencies
552
+
553
+ The sample script: [examples/build_package.sh](examples/build_package.sh) can be used to download all necessary gems and dependencies in a tar gz.
554
+
555
+ ```console
556
+ $ ./build_package.sh aspera-cli 4.18.0
557
+
558
+ Archive: aspera-cli-4.18.0-gems.tgz
559
+ ```
560
+
561
+ #### Unix-like
562
+
577
563
  A method to build one is provided here:
578
564
 
579
565
  The procedure:
@@ -595,7 +581,7 @@ ascli --show-config --fields=sdk_url
595
581
  - Download the SDK archive from that URL
596
582
 
597
583
  ```bash
598
- curl -Lso sdk.zip https://ibm.biz/aspera_sdk
584
+ curl -Lso sdk.zip https://ibm.biz/aspera_transfer_sdk
599
585
  ```
600
586
 
601
587
  - Transfer those 2 files to the target system
@@ -618,12 +604,48 @@ ascli config ascp install --sdk-url=file:///sdk.zip
618
604
  source ~/.rvm/scripts/rvm
619
605
  ```
620
606
 
621
- > **Note:** Alternatively, to download all necessary gems in folder `my_gems`, execute:
607
+ #### Windows
608
+
609
+ Installation without network:
610
+
611
+ It is essentially the same procedure as installation for Windows with internet, but instead of retrieving files from internet, copy the files from a machine with internet access, and then install from those archives:
612
+
613
+ - Download the `exe` Ruby installer from <https://rubyinstaller.org/downloads/>
614
+
615
+ ```bash
616
+ v=$(curl -s https://rubyinstaller.org/downloads/|sed -nEe 's|.*(https://.*/releases/download/.*exe).*|\1|p'|head -n 1)
617
+ curl -o ${v##*/} $v
618
+ ```
619
+
620
+ - Create an archive with necessary gems like in previous section
621
+
622
+ - Download the SDK from: <https://ibm.biz/aspera_transfer_sdk>
623
+
624
+ - Create a Zip with all those files, and transfer to the target system.
625
+
626
+ Then, on the target system:
627
+
628
+ - Unzip the archive
629
+ - Execute the installer:
630
+
631
+ ```bat
632
+ rubyinstaller-devkit-3.2.2-1-x64.exe /silent /currentuser /noicons /dir=C:\aspera-cli
633
+ ```
634
+
635
+ - Install the gems: Extract the gem archive, and then:
636
+
637
+ ```bat
638
+ gem install --force --local *.gem
639
+ ```
640
+
641
+ - Install the SDK
622
642
 
623
643
  ```bash
624
- gem install aspera-cli -N -i my_gems
644
+ ascli config ascp install --sdk-url=file:///sdk.zip
625
645
  ```
626
646
 
647
+ > **Note:** An example of installation script is provided: [docs/install.bat](docs/install.bat)
648
+
627
649
  ### Container
628
650
 
629
651
  The container image is: [`docker.io/martinlaurent/ascli`](https://hub.docker.com/r/docker.io/martinlaurent/ascli).
@@ -684,7 +706,7 @@ ascli -v
684
706
  ```
685
707
 
686
708
  ```text
687
- 4.18.0
709
+ 4.19.0
688
710
  ```
689
711
 
690
712
  In order to keep persistency of configuration on the host, you should specify your user's configuration folder as a volume for the container.
@@ -1475,6 +1497,7 @@ If transposition of single object is not desired, use option: `transpose_single`
1475
1497
  The style of output can be set using the `format` option, supporting:
1476
1498
 
1477
1499
  - `table` : Text table (default)
1500
+ - `multi` : List of elements are displayed as a list of tables
1478
1501
  - `text` : Value as String
1479
1502
  - `ruby` : Ruby code
1480
1503
  - `json` : JSON code
@@ -1902,7 +1925,8 @@ ascp use /usr/bin/ascp
1902
1925
  check_update
1903
1926
  coffee
1904
1927
  coffee --ui=text
1905
- coffee --ui=text --query=@json:'{"text":"true"}'
1928
+ coffee --ui=text --image=@json:'{"text":true,"double":false}'
1929
+ coffee --ui=text --image=@json:'{"text":true}'
1906
1930
  detect https://faspex4.example.com/path
1907
1931
  detect https://faspex5.example.com/path
1908
1932
  detect https://node.example.com/path
@@ -1937,8 +1961,8 @@ genkey my_key 4096
1937
1961
  image https://eudemo.asperademo.com/wallpaper.jpg
1938
1962
  initdemo
1939
1963
  open
1940
- plugin create my_command
1941
- plugin list
1964
+ plugins create my_command
1965
+ plugins list
1942
1966
  preset delete conf_name
1943
1967
  preset initialize conf_name @json:'{"p1":"v1","p2":"v2"}'
1944
1968
  preset list
@@ -2723,19 +2747,21 @@ Refer to section [FASP](#fasp-configuration).
2723
2747
 
2724
2748
  The `transfer_info` option accepts the following optional parameters to control multi-session, Web Socket Session, Resume policy and add any argument to `ascp`:
2725
2749
 
2726
- | Name | Type | Description |
2727
- |------------------------|-------|-------------|
2728
- | `wss` | Bool | Web Socket Session<br/>Enable use of web socket session in case it is available<br/>Default: true |
2729
- | `ascp_args` | Array | Array of strings with native `ascp` arguments.<br/>Default: [] |
2730
- | `spawn_timeout_sec` | Float | Multi session<br/>Verification time that `ascp` is running<br/>Default: 3 |
2731
- | `spawn_delay_sec` | Float | Multi session<br/>Delay between startup of sessions<br/>Default: 2 |
2732
- | `multi_incr_udp` | Bool | Multi Session<br/>Increment UDP port on multi-session<br/>If true, each session will have a different UDP port starting at `fasp_port` (or default 33001)<br/>Else, each session will use `fasp_port` (or `ascp` default)<br/>Default: true |
2733
- | `trusted_certs` | Array | List of repositories for trusted certificates. |
2734
- | `resume` | Hash | Resume parameters. See below |
2735
- | `resume.iter_max` | int | Max number of retry on error<br/>Default: 7 |
2736
- | `resume.sleep_initial` | int | First Sleep before retry<br/>Default: 2 |
2737
- | `resume.sleep_factor` | int | Multiplier of sleep period between attempts<br/>Default: 2 |
2738
- | `resume.sleep_max` | int | Default: 60 |
2750
+ | Name | Type | Description |
2751
+ |------------------------|---------|-------------|
2752
+ | `wss` | Bool | Web Socket Session<br/>Enable use of web socket session in case it is available<br/>Default: true |
2753
+ | `quiet` | Bool | If `true`, then `ascp` progress bar is not shown.<br/>Default: `false` |
2754
+ | `trusted_certs` | Array | List of repositories for trusted certificates. |
2755
+ | `client_ssh_key` | String | SSH Keys to use for token-based transfers. One of: `dsa_rsa`, `rsa`, `per_client`. Default: `rsa` |
2756
+ | `ascp_args` | Array | Array of strings with native `ascp` arguments.<br/>Default: `[]` |
2757
+ | `spawn_timeout_sec` | Float | Multi session<br/>Verification time that `ascp` is running<br/>Default: `3` |
2758
+ | `spawn_delay_sec` | Float | Multi session<br/>Delay between startup of sessions<br/>Default: `2` |
2759
+ | `multi_incr_udp` | Bool | Multi Session<br/>Increment UDP port on multi-session<br/>If `true`, each session will have a different UDP port starting at `fasp_port` (or default 33001)<br/>Else, each session will use `fasp_port` (or `ascp` default)<br/>Default: `true` on Windows, else `false` |
2760
+ | `resume` | Hash | Resume parameters. See below |
2761
+ | `resume.iter_max` | Integer | Max number of retry on error<br/>Default: `7` |
2762
+ | `resume.sleep_initial` | Integer | First Sleep before retry<br/>Default: `2` |
2763
+ | `resume.sleep_factor` | Integer | Multiplier of sleep period between attempts<br/>Default: `2` |
2764
+ | `resume.sleep_max` | Integer | Default: `60` |
2739
2765
 
2740
2766
  In case of transfer interruption, the agent will **resume** a transfer up to `iter_max` time.
2741
2767
  Sleep between iterations is given by the following formula where `iter_index` is the current iteration index, starting at 0:
@@ -2745,7 +2771,7 @@ max( sleep_max , sleep_initial * sleep_factor ^ iter_index )
2745
2771
  ```
2746
2772
 
2747
2773
  By default, Ruby's root CA store is used to validate any HTTPS endpoint used by `ascp` (e.g. WSS).
2748
- In order to use a custom certificate store, use the `trusted_certs` option.
2774
+ In order to use a custom certificate store, use the `trusted_certs` option of direct agent's option `transfer_info`.
2749
2775
  To use `ascp`'s default, use option: `--transfer-info=@json:'{"trusted_certs":null}'`.
2750
2776
 
2751
2777
  Some transfer errors are considered **retry-able** (e.g. timeout) and some other not (e.g. wrong password).
@@ -3032,7 +3058,7 @@ Columns:
3032
3058
  | fasp_port | int | Y | Y | Y | Y | Y | Specifies fasp (UDP) port.<br/>(-O {int}) |
3033
3059
  | fasp_url | string | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | Only used in Faspex.<br/>(&lt;ignored&gt;) |
3034
3060
  | file_checksum | string | Y | Y | &nbsp; | &nbsp; | &nbsp; | Enable checksum reporting for transferred files by specifying the hash to use.<br/>Allowed values: sha-512, sha-384, sha-256, sha1, md5, none<br/>(&lt;ignored&gt;) |
3035
- | http_fallback | bool<br/>string | Y | Y | Y | Y | Y | When true(1), attempts to perform an HTTP transfer if a FASP transfer cannot be performed.<br/>(-y (conversion){bool}|{string}) |
3061
+ | http_fallback | bool<br/>string | Y | Y | Y | Y | Y | When true(1), attempts to perform an HTTP transfer if a FASP transfer cannot be performed.<br/>(-y (conversion){bool}\|{string}) |
3036
3062
  | http_fallback_port | int | Y | &nbsp; | &nbsp; | &nbsp; | &nbsp; | Specifies http port when no cipher is used<br/>(-t {int}) |
3037
3063
  | https_fallback_port | int | Y | Y | Y | Y | Y | Specifies https port when cipher is used<br/>(-t {int}) |
3038
3064
  | keepalive | bool | Y | &nbsp; | &nbsp; | &nbsp; | &nbsp; | The session is running in persistent session mode.<br/>(--keepalive) |
@@ -3539,7 +3565,7 @@ ascli server upload "faux:///mydir?file=testfile&count=1m&size=0&inc=2&seq=seque
3539
3565
  ```text
3540
3566
  ascli -h
3541
3567
  NAME
3542
- ascli -- a command line tool for Aspera Applications (v4.18.0)
3568
+ ascli -- a command line tool for Aspera Applications (v4.19.0)
3543
3569
 
3544
3570
  SYNOPSIS
3545
3571
  ascli COMMANDS [OPTIONS] [ARGS]
@@ -3570,7 +3596,8 @@ ARGS
3570
3596
  OPTIONS: global
3571
3597
  --interactive=ENUM Use interactive input of missing params: [no], yes
3572
3598
  --ask-options=ENUM Ask even optional options: [no], yes
3573
- --format=ENUM Output format: text, nagios, ruby, json, jsonpp, yaml, [table], csv, image
3599
+ --struct-parser=ENUM Default parser when expected value is a struct: json, ruby
3600
+ --format=ENUM Output format: text, nagios, ruby, json, jsonpp, yaml, [table], multi, csv, image
3574
3601
  --output=VALUE Destination for results (String)
3575
3602
  --display=ENUM Output only some information: [info], data, error
3576
3603
  --fields=VALUE Comma separated list of: fields, or ALL, or DEF (String, Array, Regexp, Proc)
@@ -3594,7 +3621,7 @@ OPTIONS: global
3594
3621
  --pid-file=VALUE Write process identifier to file, delete on exit (String)
3595
3622
 
3596
3623
  COMMAND: config
3597
- SUBCOMMANDS: ascp check_update coffee detect documentation echo email_test file flush_tokens folder gem genkey image initdemo open plugins preset proxy_check pubkey remote_certificate smtp_settings throw vault wizard
3624
+ SUBCOMMANDS: ascp check_update coffee detect documentation echo email_test file flush_tokens folder gem genkey image initdemo open platform plugins preset proxy_check pubkey remote_certificate smtp_settings throw vault wizard
3598
3625
  OPTIONS:
3599
3626
  --home=VALUE Home folder for tool (String)
3600
3627
  --config-file=VALUE Path to YAML file with preset configuration
@@ -3604,7 +3631,6 @@ OPTIONS:
3604
3631
  --query=VALUE Additional filter for for some commands (list/delete) (Hash)
3605
3632
  --value=VALUE Value for create, update, list filter (Hash) (deprecated: (4.14) Use positional value for create/modify or option: query for list/delete)
3606
3633
  --property=VALUE Name of property to set (modify operation)
3607
- --id=VALUE Resource identifier (deprecated: (4.14) Use positional identifier after verb (modify,delete,show))
3608
3634
  --bulk=ENUM Bulk operation (only some): [no], yes
3609
3635
  --bfail=ENUM Bulk operation error handling: no, [yes]
3610
3636
  -N, --no-default Do not load default configuration for plugin
@@ -5019,6 +5045,9 @@ files browse /
5019
5045
  files browse / --url=my_private_link
5020
5046
  files browse / --url=my_public_link_folder_no_pass
5021
5047
  files browse / --url=my_public_link_folder_pass --password=my_public_link_password
5048
+ files browse my_remote_file
5049
+ files browse my_remote_folder
5050
+ files browse my_remote_folder/
5022
5051
  files delete /testsrc
5023
5052
  files download --transfer=alpha testdst/test_file.bin
5024
5053
  files download --transfer=connect testdst/test_file.bin
@@ -5036,8 +5065,11 @@ files show /
5036
5065
  files show testdst/test_file.bin
5037
5066
  files sync admin status --sync-info=@json:'{"name":"my_aoc_sync2","reset":true,"direction":"pull","local":{"path":"/data/local_sync"},"remote":{"path":"/testdst"}}'
5038
5067
  files sync admin status --sync-info=@json:'{"sessions":[{"name":"my_aoc_sync1","direction":"pull","local_dir":"/data/local_sync","remote_dir":"/testdst","reset":true}]}'
5068
+ files sync start --sync-info=@json:'{"name":"my_aoc_sync1","reset":true,"direction":"pull","local":{"path":"/data/local_sync"},"remote":{"path":"/testdst"}}'
5039
5069
  files sync start --sync-info=@json:'{"name":"my_aoc_sync2","reset":true,"direction":"pull","local":{"path":"/data/local_sync"},"remote":{"path":"/testdst"}}'
5040
5070
  files sync start --sync-info=@json:'{"sessions":[{"name":"my_aoc_sync1","direction":"pull","local_dir":"/data/local_sync","remote_dir":"/testdst","reset":true}]}'
5071
+ files sync start pull /testdst /data/local_sync --sync-info=@json:'{"reset":true,"quiet":false}'
5072
+ files sync start pull /testdst /data/local_sync --sync-info=@json:'{"sessions":[{"reset":true}]}'
5041
5073
  files thumbnail my_test_folder/video_file.mpg
5042
5074
  files thumbnail my_test_folder/video_file.mpg --query=@json:'{"text":true,"double":true}'
5043
5075
  files transfer push /testsrc --to-folder=/testdst test_file.bin
@@ -5389,7 +5421,7 @@ Example:
5389
5421
  - `ascli node browse /` : list files with **gen3/node user** API
5390
5422
  - `ascli node access_key do self browse /` : list files with **gen4/access key** API
5391
5423
 
5392
- ## Browse
5424
+ #### Browse
5393
5425
 
5394
5426
  Native API parameters can be placed in option `query`.
5395
5427
 
@@ -5805,8 +5837,8 @@ ssync summary %name:my_node_sync
5805
5837
  stream list
5806
5838
  sync admin status --sync-info=@json:'{"name":"my_node_sync2","reset":true,"direction":"pull","local":{"path":"/data/local_sync"},"remote":{"path":"/aspera-test-dir-tiny"}}'
5807
5839
  sync admin status --sync-info=@json:'{"sessions":[{"name":"my_node_sync1","direction":"pull","local_dir":"/data/local_sync","remote_dir":"/aspera-test-dir-tiny","reset":true}]}'
5840
+ sync start --sync-info=@json:'{"name":"my_node_sync1","reset":true,"quiet":false,"direction":"pull","local":{"path":"/data/local_sync"},"remote":{"path":"/aspera-test-dir-tiny"}}'
5808
5841
  sync start --sync-info=@json:'{"name":"my_node_sync2","reset":true,"direction":"pull","local":{"path":"/data/local_sync"},"remote":{"path":"/aspera-test-dir-tiny"}}'
5809
- sync start --sync-info=@json:'{"sessions":[{"name":"my_node_sync1","direction":"pull","local_dir":"/data/local_sync","remote_dir":"/aspera-test-dir-tiny","reset":true}]}'
5810
5842
  transfer list --query=@json:'{"active_only":true}'
5811
5843
  transfer sessions
5812
5844
  transport
@@ -6337,6 +6369,14 @@ Then, the postprocessing script executed will be `script1.sh`.
6337
6369
 
6338
6370
  Environment variables at set to the values provided by the web hook which are the same as Faspex 4 postprocessing.
6339
6371
 
6372
+ ### Faspex 5: Missing commands
6373
+
6374
+ If a command is missing, then it is still possible to execute command by calling directly the API on the command line using `curl`:
6375
+
6376
+ ```bash
6377
+ curl -H "Authorization: $(ascli ascli bearer)" https://faspex5.example.com/aspera/faspex/api/v5/api_endpoint_here
6378
+ ```
6379
+
6340
6380
  ## Plugin: `faspex`: IBM Aspera Faspex v4
6341
6381
 
6342
6382
  > **Note:** For full details on Faspex API, refer to: [Reference on Developer Site](https://developer.ibm.com/apis/catalog/?search=faspex)
@@ -6573,9 +6613,11 @@ admin user ldap add the_name
6573
6613
  admin user local list
6574
6614
  admin user saml import @json:'{"id":"the_id","name_id":"the_name"}'
6575
6615
  files browse /
6616
+ files delete my_share1/new_folder
6576
6617
  files delete my_share1/test_file.bin
6577
6618
  files download --to-folder=. my_share1/test_file.bin
6578
6619
  files download --to-folder=. my_share1/test_file.bin --transfer=httpgw --transfer-info=@json:'{"url":"https://tst.example.com/path@"}'
6620
+ files mkdir my_share1/new_folder
6579
6621
  files upload --to-folder=https://shares.share1 'faux:///testfile?1m' --transfer=httpgw --transfer-info=@json:'{"url":"my_example.com/path@","synchronous":true,"api_version":"v1","upload_chunk_size":100000}'
6580
6622
  files upload --to-folder=my_share1 test_file.bin
6581
6623
  files upload --to-folder=my_share1 test_file.bin --transfer=httpgw --transfer-info=@json:'{"url":"https://tst.example.com/path@"}'
@@ -6749,6 +6791,8 @@ health
6749
6791
  > **Note:** Add `ascli faspio` in front of the commands:
6750
6792
 
6751
6793
  ```bash
6794
+ bridges create @json:'{"name":"test1","local":{"protocol":"tcp","tls_enabled":false,"port":"3000","bind_address":"127.0.0.1"},"forward":{"protocol":"fasp","tls_enabled":false,"port":"3994","bind_address":"127.0.0.1","host":["10.0.0.1"]}}'
6795
+ bridges delete --bulk=yes @json:@stdin:
6752
6796
  bridges list
6753
6797
  health
6754
6798
  ```
@@ -7087,28 +7131,52 @@ An interface for the `async` utility is provided in the following plugins:
7087
7131
  - `aoc files sync` (uses node)
7088
7132
  - `shares files sync` (uses node)
7089
7133
 
7090
- The main advantage over the `async` command line when using `server` is the possibility to use a configuration file, using standard options of `ascli`.
7134
+ One advantage over the `async` command line is the possibility to use a configuration file, using standard options of `ascli`.
7135
+ Moreover `ascli` supports sync with application requiring token-based authorization.
7091
7136
 
7092
- In this case, some of the `sync` parameters are filled by the related plugin using transfer spec parameters (e.g. including token).
7137
+ Some of the `sync` parameters are filled by the related plugin using transfer spec parameters (e.g. including token).
7093
7138
 
7094
- > **Note:** All `sync` commands require an `async` enabled license and availability of the `async` executable (and `asyncadmin`).
7139
+ > **Note:** All `sync` commands require an `async` enabled license and availability of the `async` executable (and `asyncadmin`). The Transfer SDK 1.3 includes this.
7095
7140
 
7096
- Two JSON syntax are supported for option `sync_info`.
7141
+ `sync` supports 0 or 3 arguments:
7097
7142
 
7098
- ### `async` JSON: API format
7143
+ - direction
7144
+ - local folder
7145
+ - remote folder
7146
+
7147
+ Additional options can be provided with option `sync_info`, for which two syntax are possible, as follows.
7148
+
7149
+ ### `async` API and conf format
7099
7150
 
7100
7151
  It is the same payload as specified on the option `--conf` of `async` or in node API `/asyncs`.
7101
7152
  This is the preferred syntax and allows a single session definition.
7102
- But there is no progress output nor error messages.
7153
+
7154
+ > **Note:** No progress, nor error messages is provided on terminal.
7103
7155
 
7104
7156
  Documentation on Async node API can be found on [IBM Developer Portal](https://developer.ibm.com/apis/catalog?search=%22aspera%20sync%20api%22).
7105
7157
 
7106
- ### `async` JSON: Options mapping
7158
+ If 3 arguments are provided they are mapped to:
7159
+
7160
+ - `direction`
7161
+ - `local.path`
7162
+ - `remote.path`
7163
+
7164
+ ### `async` options mapping
7107
7165
 
7108
7166
  `ascli` defines a JSON equivalent to regular `async`options.
7109
7167
  It is based on a JSON representation of `async` command line options.
7110
7168
  It allows definition of multiple sync sessions in a single command, although usually only one sync session is defined.
7111
7169
 
7170
+ This is the mode selection if there is either keys `sessions` or `instance` in option `sync_info`.
7171
+
7172
+ > **Note:** Progress and error messages are provided on terminal like regular command line invocation of `async`.
7173
+
7174
+ If 3 arguments are provided, they are applied to the first (and only) session and mapped to:
7175
+
7176
+ - `direction`
7177
+ - `local_dir`
7178
+ - `remote_dir`
7179
+
7112
7180
  ## Hot folder
7113
7181
 
7114
7182
  ### Requirements
@@ -0,0 +1,85 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ if test $# -ne 2; then
6
+ echo "Usage: $0 <CLI_TARGET_EXECUTABLE> <CLI_ENTRY_SCRIPT>" 1>&2
7
+ exit 1
8
+ fi
9
+
10
+ CLI_TARGET_EXECUTABLE=$1
11
+ CLI_ENTRY_SCRIPT=$(realpath $2)
12
+ CLI_EXEC_NAME=$(basename $CLI_TARGET_EXECUTABLE)
13
+ CLI_ROOT=$(dirname $(dirname $CLI_ENTRY_SCRIPT))
14
+
15
+ echo "Project folder: $CLI_ROOT"
16
+ echo "Executable: $CLI_TARGET_EXECUTABLE"
17
+ echo "Exec Name: $CLI_EXEC_NAME"
18
+ echo "Entry: $CLI_ENTRY_SCRIPT"
19
+
20
+ # tebako press --root=$(TB_WORK_DIR) --entry-point=ascli --output=$(TB_WORK_DIR)/$(CLI_TARGET_EXECUTABLE) --Ruby=3.2.4
21
+
22
+ if true;then
23
+ tebako_command=tebako
24
+ tebako_args="--root=$CLI_ROOT --entry-point=ascli --output=$CLI_TARGET_EXECUTABLE --Ruby=3.3.3"
25
+ case $(uname -s) in
26
+ Darwin)
27
+ brew update
28
+ brew install gnu-sed bash pkg-config bison flex binutils libffi gdbm zlib \
29
+ ncurses double-conversion boost jemalloc glog libevent libsodium lz4 xz \
30
+ libyaml openssl@3
31
+ # brew install m4
32
+ # boost fmt
33
+ #export PATH=$(dirname $(brew ls m4|grep '/m4$'|head -n 1)):$PATH
34
+ #export PATH=$(dirname $(brew ls binutils|grep '/ar$'|head -n 1)):$PATH
35
+ #tebako_bin=$CLI_ROOT/tmp/tbkbin
36
+ tebako_root=$CLI_ROOT/../tebako-tmp
37
+ #export PATH=$tebako_bin:$PATH
38
+ mkdir -p $tebako_root
39
+ #mkdir -p $tebako_bin
40
+ # need ar from apple
41
+ #rm -f $tebako_bin/ar
42
+ #ln -s /usr/bin/ar $tebako_bin
43
+ export PATH=$(echo $PATH|tr : \\n|grep -v /binutils/|tr \\n :)
44
+ #tebako setup --Ruby=3.3.4 --prefix=$tebako_root
45
+ tebako press --Ruby=3.3.4 --prefix=$tebako_root --root=$CLI_ROOT/examples/tebako --entry-point=ascli --output=$CLI_TARGET_EXECUTABLE
46
+ #tebako press --Ruby=3.3.4 --prefix=$tebako_root --root=$CLI_ROOT --entry-point=$CLI_ENTRY_SCRIPT --output=$CLI_TARGET_EXECUTABLE
47
+ exit 0
48
+ ;;
49
+ Linux)
50
+ work_dir=/mnt/w
51
+ tebako press --root=$work_dir --entry-point=ascli --output=$work_dir/ascli.exe --Ruby=3.3.3
52
+ tebako_prefix="podman run -it --rm -v $PWD:$work_dir ghcr.io/tamatebako/tebako-ubuntu-20.04:0.8.6"
53
+ tebako_opts=--patchelf
54
+ ;;
55
+ *)
56
+ echo "This OS is not supported." >&2
57
+ exit 1
58
+ ;;
59
+ esac
60
+ command $tebako_command $tebako_args
61
+ else
62
+ # https://github.com/you54f/ruby-packer
63
+ # https://github.com/YOU54F/ruby-packer/releases
64
+ set -e
65
+ FOLDER="$(dirname $0)/../tmp"
66
+ RUBYC="$FOLDER/rubyc"
67
+ if test ! -e "$RUBYC"; then
68
+ mkdir -p "$FOLDER"
69
+ case $(uname -sm|tr ' ' -) in
70
+ Darwin-arm64)
71
+ curl -L https://github.com/YOU54F/ruby-packer/releases/download/rel-20230812/rubyc-Darwin-arm64.tar.gz | tar -xz -C "$FOLDER"
72
+ mv "$FOLDER/rubyc-Darwin-arm64" "$RUBYC"
73
+ ;;
74
+ Linux-x86_64)
75
+ curl -L https://github.com/YOU54F/ruby-packer/releases/download/rel-20230812/rubyc-Linux-x86_64.tar.gz | tar -xz -C "$FOLDER"
76
+ mv "$FOLDER/rubyc-Linux-x86_64" "$RUBYC"
77
+ ;;
78
+ *)
79
+ echo "This architecture is not supported." >&2
80
+ exit 1
81
+ ;;
82
+ esac
83
+ fi
84
+ exec "$RUBYC" -o "$CLI_TARGET_EXECUTABLE" "$CLI_ENTRY_SCRIPT"
85
+ fi
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+ # Usage: ./build_package.sh <gem_name> <gem_version>
3
+ # Example: ./build_package.sh aspera-cli 4.18.0
4
+ set -e
5
+ if [ "$#" -ne 2 ]; then
6
+ echo "Usage: $0 <gem_name> <gem_version>"
7
+ exit 1
8
+ fi
9
+ gem_name=$1
10
+ gem_version=$2
11
+ # on macOS, GNU tar is gtar
12
+ GNU_TAR=tar
13
+ if [ "$(uname)" == "Darwin" ]; then
14
+ GNU_TAR=gtar
15
+ fi
16
+ # temp folder to install gems
17
+ tmp_dir_install=.tmp_install
18
+ # clean, if there were left overs
19
+ rm -fr $tmp_dir_install
20
+ # retrieve list of necessary gems
21
+ echo "Getting gems $gem_name $gem_version"
22
+ # install gems in a temporary folder
23
+ gem install $gem_name:$gem_version --no-document --install-dir $tmp_dir_install
24
+ archive=$gem_name-$gem_version-gems.tgz
25
+ # .gem files are located in cache folder
26
+ $GNU_TAR -zcf $archive --directory=$tmp_dir_install/cache/. .
27
+ rm -fr $tmp_dir_install
28
+ echo "Archive: $archive"