aspera-cli 4.27.3 → 4.27.4

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 (79) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +83 -0
  4. data/CONTRIBUTING.md +5 -2
  5. data/bin/ascli +1 -0
  6. data/docs/README.md +224 -42
  7. data/lib/aspera/agent/base.rb +7 -2
  8. data/lib/aspera/agent/connect.rb +0 -4
  9. data/lib/aspera/agent/desktop.rb +0 -4
  10. data/lib/aspera/agent/direct.rb +49 -21
  11. data/lib/aspera/agent/node.rb +6 -5
  12. data/lib/aspera/agent/transferd.rb +2 -2
  13. data/lib/aspera/api/faspex.rb +2 -0
  14. data/lib/aspera/api/httpgw.rb +1 -2
  15. data/lib/aspera/api/node.rb +1 -1
  16. data/lib/aspera/ascp/installation.rb +1 -1
  17. data/lib/aspera/cli/async_transfer_store.rb +10 -9
  18. data/lib/aspera/cli/bootstrapper.rb +3 -1
  19. data/lib/aspera/cli/command_registry.rb +69 -7
  20. data/lib/aspera/cli/command_spec.rb +1 -1
  21. data/lib/aspera/cli/extended_value.rb +4 -3
  22. data/lib/aspera/cli/formatter.rb +10 -8
  23. data/lib/aspera/cli/http.rb +8 -20
  24. data/lib/aspera/cli/option_types.rb +3 -1
  25. data/lib/aspera/cli/option_value.rb +16 -19
  26. data/lib/aspera/cli/options.schema.yaml +86 -10
  27. data/lib/aspera/cli/parser.rb +30 -18
  28. data/lib/aspera/cli/plugins/aoc.rb +133 -156
  29. data/lib/aspera/cli/plugins/ats.rb +1 -7
  30. data/lib/aspera/cli/plugins/base.rb +40 -34
  31. data/lib/aspera/cli/plugins/config.rb +24 -11
  32. data/lib/aspera/cli/plugins/console.rb +1 -1
  33. data/lib/aspera/cli/plugins/faspex5.rb +30 -11
  34. data/lib/aspera/cli/plugins/faspio.rb +1 -1
  35. data/lib/aspera/cli/plugins/node.rb +26 -19
  36. data/lib/aspera/cli/plugins/orchestrator.rb +73 -44
  37. data/lib/aspera/cli/plugins/preview.rb +21 -19
  38. data/lib/aspera/cli/plugins/server.rb +3 -4
  39. data/lib/aspera/cli/plugins/shares.rb +21 -24
  40. data/lib/aspera/cli/preset_actions.rb +28 -18
  41. data/lib/aspera/cli/preset_manager.rb +34 -19
  42. data/lib/aspera/cli/prompt.rb +2 -1
  43. data/lib/aspera/cli/result.rb +33 -22
  44. data/lib/aspera/cli/runner.rb +1 -5
  45. data/lib/aspera/cli/sync_actions.rb +17 -16
  46. data/lib/aspera/cli/transfer_actions.rb +14 -3
  47. data/lib/aspera/cli/transfer_agent.rb +6 -4
  48. data/lib/aspera/cli/transfer_progress.rb +290 -55
  49. data/lib/aspera/cli/version.rb +1 -1
  50. data/lib/aspera/cli/wizard.rb +1 -1
  51. data/lib/aspera/coverage.rb +0 -1
  52. data/lib/aspera/environment.rb +29 -5
  53. data/lib/aspera/keychain/encrypted_hash.rb +1 -1
  54. data/lib/aspera/keychain/factory.rb +2 -1
  55. data/lib/aspera/log.rb +25 -2
  56. data/lib/aspera/node_emulator.rb +759 -0
  57. data/lib/aspera/oauth/base.rb +2 -1
  58. data/lib/aspera/oauth/factory.rb +6 -3
  59. data/lib/aspera/oauth/json_credentials.rb +34 -0
  60. data/lib/aspera/oauth/jwt.rb +3 -4
  61. data/lib/aspera/oauth.rb +1 -0
  62. data/lib/aspera/persistency_folder.rb +1 -3
  63. data/lib/aspera/preview/generator.rb +4 -1
  64. data/lib/aspera/preview/options.schema.yaml +119 -0
  65. data/lib/aspera/rest/aspera_errors.rb +12 -0
  66. data/lib/aspera/rest/client.rb +28 -19
  67. data/lib/aspera/rest/list.rb +14 -8
  68. data/lib/aspera/rest/parameters.rb +2 -2
  69. data/lib/aspera/schema/IBM Aspera Faspex API-5.0-enhanced.yaml +0 -20
  70. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1.yaml +1784 -0
  71. data/lib/aspera/schema/IBM Aspera on Cloud API-0.2.6-enhanced.yaml +1230 -137
  72. data/lib/aspera/schema/IBM_Aspera_Shares.yaml +14 -13
  73. data/lib/aspera/schema/reader.rb +12 -18
  74. data/lib/aspera/schema/registry.rb +6 -1
  75. data.tar.gz.sig +0 -0
  76. metadata +5 -3
  77. metadata.gz.sig +0 -0
  78. data/lib/aspera/node_simulator.rb +0 -345
  79. data/lib/aspera/preview/options.rb +0 -45
data/docs/README.md CHANGED
@@ -11,7 +11,7 @@ EDITING GUIDELINES (developers and AI):
11
11
  DO NOT EDIT: THIS FILE IS GENERATED, edit docs/README.erb.md.
12
12
  PANDOC_DEFAULTS_BEGIN
13
13
  metadata:
14
- subtitle: "ascli 4.27.3"
14
+ subtitle: "ascli 4.27.4"
15
15
  author: "Laurent Martin"
16
16
  PANDOC_DEFAULTS_END
17
17
  -->
@@ -145,7 +145,7 @@ This section walks you through your first interaction with `ascli` on Linux.
145
145
 
146
146
  ```shell
147
147
  mkdir -p $HOME/bin
148
- tar -C $HOME/bin -zxvf ascli-4.27.3-linux-x86_64.tgz
148
+ tar -C $HOME/bin -zxvf ascli-4.27.4-linux-x86_64.tgz
149
149
  export PATH=$PATH:$HOME/bin
150
150
  ```
151
151
 
@@ -159,7 +159,7 @@ ascli -v
159
159
  ```
160
160
 
161
161
  ```text
162
- 4.27.3
162
+ 4.27.4
163
163
  ```
164
164
 
165
165
  - Install the Aspera transfer runtime (tested version), as it is not included in the `ascli` package:
@@ -294,6 +294,9 @@ There are several ways to install `ascli`:
294
294
  - As a [single file executable](#single-file-executable)
295
295
 
296
296
  This method is simple, but only a limited number of platforms are supported.
297
+ - On Linux, as a [portable package](#linux-portable-package)
298
+
299
+ This method is simple on Linux: extract and run, without root access. It includes Ruby, gems and `ascp`.
297
300
  - On Windows, as a [portable package](#windows-portable-package)
298
301
 
299
302
  This method is the simplest on Windows: extract and run. It includes Ruby, gems and `ascp`.
@@ -316,20 +319,20 @@ This executable includes the Ruby runtime and gems, but not the transfer SDK.
316
319
  #### Installing the single file executable
317
320
 
318
321
  > [!NOTE]
319
- > Replace `<VERSION>` and `<PLATFORM>` with the values of the downloaded archive, for example: `linux-x86_64`.
320
- > The archive contains a single file: the executable `ascli`.
322
+ > Replace `<VERSION>` and `<PLATFORM>` with the values of the downloaded archive, for example: `linux-x86_64-glibc2.28-ocran`.
323
+ > The archive contains the executable `ascli` and its `README.ascli.md`.
321
324
  > Installation of `ascp` is still required separately.
322
325
  > See [Install `ascp`](#installing-ascp-through-transferd).
323
326
 
324
327
  ```shell
325
- tar zxvf ascli-<VERSION>-<PLATFORM>.tgz
328
+ tar zxvf aspera-cli-<VERSION>-<PLATFORM>.tgz
326
329
  ./ascli config transferd install
327
330
  ```
328
331
 
329
332
  #### Linux: Checking the GLIBC version
330
333
 
331
334
  > [!WARNING]
332
- > On Linux, the executable requires a minimum GLIBC version, specified in the executable name on the download site.
335
+ > On Linux, the executable requires a minimum GLIBC version, specified in the archive name on the download site (for example: `glibc2.28`).
333
336
  > If the minimum version is not met, then executables (`ascp`, `transferd`) will exit with error.
334
337
 
335
338
  On Linux, you can check your system's GLIBC version on this site: [repology.org](https://repology.org/project/glibc/versions), or check your GLIBC version with `ldd`:
@@ -357,9 +360,40 @@ objdump -p /bin/bash | sed -n 's/^.*GLIBC_//p' | sort -V | tail -n1
357
360
 
358
361
  The required GLIBC version for `ascp` can be found in the [Release Notes of HSTS](https://www.ibm.com/docs/en/ahts) or [on this page](https://eudemo.asperademo.com/download/sdk.html).
359
362
 
363
+ ### Linux: Portable package
364
+
365
+ A ready-to-use archive for Linux (x86_64) is available in the [Releases](https://github.com/IBM/aspera-cli/releases): `aspera-cli-<VERSION>-linux-x86_64-glibc2.28-portable.tgz`.
366
+
367
+ It contains the Ruby runtime with the shared libraries it needs, the aspera-cli gem with its dependencies, and the Aspera Transfer SDK (`ascp`).
368
+ No installation step, no root access, and no internet access are required.
369
+ The GLIBC of the system must be at least the version in the archive name, see [Checking the GLIBC version](#linux-checking-the-glibc-version).
370
+
371
+ 1. Extract the archive, for example in `~/.local/share`, and check that `ascli` runs:
372
+
373
+ ```shell
374
+ tar -xzf aspera-cli-<VERSION>-linux-x86_64-glibc2.28-portable.tgz -C ~/.local/share
375
+ ~/.local/share/aspera-cli-<VERSION>-linux-x86_64-glibc2.28-portable/ascli -v
376
+ ```
377
+
378
+ 2. Optionally, place a symbolic link to the launcher in a folder of the `PATH`.
379
+ Then, `ascli` can be used from any folder:
380
+
381
+ ```shell
382
+ ln -s ~/.local/share/aspera-cli-<VERSION>-linux-x86_64-glibc2.28-portable/ascli ~/.local/bin/ascli
383
+ ascli -v
384
+ ```
385
+
386
+ > [!NOTE]
387
+ > The launcher `ascli` uses the `ascp` located in folder `sdk` of the package, unless environment variable `ASCLI_SDK_FOLDER` is set.
388
+ > So, `ascli config transferd install` is not needed.
389
+
390
+ The configuration is stored in the [main folder](#main-configuration-and-persistency-folder), like for other installation methods.
391
+ To upgrade, extract the new version, and update the symbolic link.
392
+ To uninstall, delete the folder, and the symbolic link if it was created.
393
+
360
394
  ### Windows: Portable package
361
395
 
362
- A ready-to-use ZIP archive for Windows (x64) is available in the [Releases](https://github.com/IBM/aspera-cli/releases): `aspera-cli-<VERSION>-windows-amd64-portable.zip`.
396
+ A ready-to-use ZIP archive for Windows (x64) is available in the [Releases](https://github.com/IBM/aspera-cli/releases): `aspera-cli-<VERSION>-windows-x86_64-portable.zip`.
363
397
 
364
398
  It contains the Ruby runtime, the aspera-cli gem with its dependencies, and the Aspera Transfer SDK (`ascp`).
365
399
  No installation step, no administrator rights, and no internet access are required.
@@ -933,11 +967,11 @@ Alternatively, the necessary gems can be packaged into a `tar.gz` archive as fol
933
967
 
934
968
  ```shell
935
969
  mkdir temp_folder
936
- gem install aspera-cli:4.27.3 --no-document --install-dir temp_folder
970
+ gem install aspera-cli:4.27.4 --no-document --install-dir temp_folder
937
971
  find temp_folder
938
- mv temp_folder/cache aspera-cli-4.27.3-gems
972
+ mv temp_folder/cache aspera-cli-4.27.4-gems
939
973
  rm -fr temp_folder
940
- tar zcvf aspera-cli-4.27.3-gems.tgz aspera-cli-4.27.3-gems
974
+ tar zcvf aspera-cli-4.27.4-gems.tgz aspera-cli-4.27.4-gems
941
975
  ```
942
976
 
943
977
  #### Unix-like: Alternative installation using `rvm`
@@ -1073,7 +1107,7 @@ ascli -v
1073
1107
  ```
1074
1108
 
1075
1109
  ```text
1076
- 4.27.3
1110
+ 4.27.4
1077
1111
  ```
1078
1112
 
1079
1113
  To persist the configuration on the host, specify your user's configuration folder as a volume for the container.
@@ -1267,6 +1301,7 @@ ascli config echo '@ruby:[OpenSSL::X509::DEFAULT_CERT_DIR,OpenSSL::X509::DEFAULT
1267
1301
 
1268
1302
  Certificates are checked against the [Ruby default certificate store](https://ruby-doc.org/stdlib-3.0.3/libdoc/openssl/rdoc/OpenSSL/X509/Store.html) `OpenSSL::X509::DEFAULT_CERT_FILE` and `OpenSSL::X509::DEFAULT_CERT_DIR`, which are typically the ones of `openssl` on Unix-like systems (Linux, macOS, and so on).
1269
1303
  Ruby's default values can be overridden using env vars: `SSL_CERT_FILE` and `SSL_CERT_DIR`.
1304
+ If neither these env vars are set nor the default locations exist (for example, a single executable built on another Linux distribution), `ascli` sets `SSL_CERT_FILE` to the first system CA bundle found: `/etc/ssl/certs/ca-certificates.crt`, `/etc/pki/tls/certs/ca-bundle.crt`, `/etc/ssl/ca-bundle.pem`, `/etc/ssl/cert.pem`.
1270
1305
 
1271
1306
  To get certificate validation, the CA certificate bundle must be up-to-date.
1272
1307
  Check this repository on how to update the system's CA certificate bundle: [https://github.com/millermatt/osca](https://github.com/millermatt/osca).
@@ -1740,6 +1775,8 @@ Depending on action, the output will contain:
1740
1775
  | `status` | A message. |
1741
1776
  | `other_struct` | A complex structure that cannot be displayed as an array. |
1742
1777
 
1778
+ With a structured format (`json`, `jsonpp`, `yaml`, `ruby`), the output is always valid in this format: a status is a string, an empty list is `[]`, and no result is `null`.
1779
+
1743
1780
  #### Enhanced display of special values
1744
1781
 
1745
1782
  Special values are highlighted as follows in `format=table`:
@@ -3908,6 +3945,8 @@ For `direct` and `httpgw`, the transfer runs as a Ruby thread inside the `ascli`
3908
3945
  The `job_id` is persisted on disk but the live thread state is only available as long as the same process is running.
3909
3946
  If the process is restarted, `config transfer status` returns `unknown` for those jobs.
3910
3947
 
3948
+ Parameters of the agent are persisted, except secrets (e.g. `password` of agent `node`): `config transfer status` takes them from the current `transfer` option, if it is for the same agent (e.g. same option on command line, or in a preset).
3949
+
3911
3950
  > [!NOTE]
3912
3951
  > **`asynchronous` and MCP** - When `ascli` is used as an MCP server, an AI assistant calling
3913
3952
  > a transfer command may time out or cancel the request and retry, causing duplicate transfers.
@@ -3934,7 +3973,7 @@ The `transfer` option accepts the following optional parameters to control multi
3934
3973
  | `file_list` | `Bool` | If `true`, source paths are written to a temp file passed to `ascp` via `--file-list` or `--file-pair-list`.<br/>If `false`, source paths are placed directly on the `ascp` command line.<br/>Default: `true`. |
3935
3974
  | `monitor` | `Bool` | Enable use of the `ascp` management port for transfer monitoring.<br/>Default: `true`. |
3936
3975
  | `multi_incr_udp` | `Bool` | Multi session - Increment UDP port for each session.<br/>If `true`, each session uses a different UDP port starting at `fasp_port` (default: 33001).<br/>If `false`, all sessions use the same `fasp_port` (or `ascp` default).<br/>Default: `true` on Windows, `false` on other platforms. |
3937
- | `quiet` | `Bool` | Suppress the `ascp` progress bar display.<br/>Default: `true`. |
3976
+ | `quiet` | `Bool` | Suppress the `ascp` progress bar display.<br/>If `false`, the progress bar of option `progress_bar` is not displayed, unless that option is set.<br/>Default: `true`. |
3938
3977
  | `resume.iter_max` | `Integer` | Maximum number of retry attempts on error.<br/>Default: `7`. |
3939
3978
  | `resume.sleep_factor` | `Integer` | Multiplier applied to sleep duration between consecutive retry attempts.<br/>Default: `2`. |
3940
3979
  | `resume.sleep_initial` | `Integer` | Initial sleep duration (in seconds) before first retry.<br/>Default: `2`. |
@@ -3952,18 +3991,18 @@ Sleep between iterations is given by the following formula where `iter_index` is
3952
3991
  min( sleep_max, sleep_initial * sleep_factor ^ iter_index )
3953
3992
  ```
3954
3993
 
3955
- To display the native progress bar of `ascp`, use:
3994
+ By default, the progress bar of `ascli` is displayed (see [Transfer progress bar](#transfer-progress-bar)): it aggregates all sessions of a multi-session transfer.
3995
+
3996
+ To display the native progress bar of `ascp` instead, set parameter `quiet` to `false`:
3956
3997
 
3957
3998
  ```shell
3958
- --progress-bar=no --transfer.quiet=false
3999
+ --transfer.quiet=false
3959
4000
  ```
3960
4001
 
3961
- To skip usage of management port (which disables custom progress bar), set option `monitor` to `false`.
3962
- In that case, use the native progress bar:
4002
+ In that case, the progress bar of `ascli` is not displayed, unless option `progress_bar` is set.
4003
+ For multi-session transfers, each `ascp` process displays its own progress bar.
3963
4004
 
3964
- ```shell
3965
- --transfer.monitor=false --transfer.quiet=false
3966
- ```
4005
+ To skip usage of management port (which disables the progress bar of `ascli`), set option `monitor` to `false`.
3967
4006
 
3968
4007
  By default, Ruby's root CA store is used to validate any HTTPS endpoint used by `ascp` (for example, WSS).
3969
4008
  To use a custom certificate store, use the `trusted_certs` option of direct agent's option `transfer`.
@@ -4727,10 +4766,20 @@ Example: parameter to download a Faspex package and decrypt on the fly
4727
4766
 
4728
4767
  ### Transfer progress bar
4729
4768
 
4730
- File transfer operations are monitored, and a progress bar is displayed on the terminal if option `progress_bar` (`Bool`) is set to `yes` (default if the output is a terminal).
4769
+ File transfer operations are monitored, and a progress bar is displayed on the standard error if option `progress_bar` (`Bool`) is set to `yes` (default if the standard error is a terminal).
4770
+ So, the progress bar is displayed even if the output of the command is redirected to a file.
4731
4771
 
4732
4772
  The same progress bar is used for any type of transfer: using `ascp`, server to server, using HTTPS, and so on.
4733
4773
 
4774
+ It shows the elapsed time, the percentage, the rate in megabits per second (`Mbps`, 1,000,000 bits per second, averaged over the last 5 seconds) and the estimated remaining time.
4775
+ As long as the total size is not known (for example, when the job size is not pre-calculated), the transferred size is shown instead of the percentage.
4776
+ For multi-session transfers, sessions are aggregated, and the number of running sessions is shown in brackets.
4777
+ Files already at destination (resumed transfer) count in the progress, but not in the rate.
4778
+ If the transfer fails, the progress bar stops at the reached progress, and shows `failed`.
4779
+ Log lines are displayed above the progress bar.
4780
+
4781
+ Agent `direct` can display the native progress bar of `ascp` instead (see [`direct`](#agent-direct)).
4782
+
4734
4783
  ### Scheduler
4735
4784
 
4736
4785
  `ascli` does not include a built-in scheduler.
@@ -5150,13 +5199,13 @@ Key query parameters:
5150
5199
  Place only the bare filename(s) in the file list, and pass the `file:` URI as the source prefix so that the query parameters apply uniformly to every entry:
5151
5200
 
5152
5201
  ```shell
5153
- ascli server upload growing --to-folder=/Upload --ts.source_root='file:///?grow=120' --progress-bar=no --transfer.quiet=false
5202
+ ascli server upload growing --to-folder=/Upload --ts.source_root='file:///?grow=120' --transfer.quiet=false
5154
5203
  ```
5155
5204
 
5156
5205
  - **URI directly on the command line with `file_list=false`**
5157
5206
 
5158
5207
  ```shell
5159
- ascli server upload 'file:///./growing?grow=120' --to-folder=/Upload --transfer.file_list=false --transfer.quiet=false --progress-bar=no
5208
+ ascli server upload 'file:///./growing?grow=120' --to-folder=/Upload --transfer.file_list=false --transfer.quiet=false
5160
5209
  ```
5161
5210
 
5162
5211
  ### Usage
@@ -5164,7 +5213,7 @@ Key query parameters:
5164
5213
  ```text
5165
5214
  ascli -h
5166
5215
  NAME
5167
- ascli -- a command line tool for Aspera Applications (v4.27.3)
5216
+ ascli -- a command line tool for Aspera Applications (v4.27.4)
5168
5217
 
5169
5218
  SYNOPSIS
5170
5219
  ascli [GLOBAL_OPTIONS] <command> [OPTIONS] [ARGS]
@@ -5243,9 +5292,6 @@ OPTIONS: global
5243
5292
  --cache-tokens=yes|no Save and reuse OAuth tokens
5244
5293
  --expand-mounts=yes|no Commands: list commands of sub-trees provided by another plugin
5245
5294
  -N, --no-default Do not load default configuration for plugin
5246
- --query=HASH Additional filter for for some commands (list/delete)
5247
- --bulk=yes|no Bulk operation (only some)
5248
- --bfail=yes|no Bulk operation error handling
5249
5295
  --override=yes|no Wizard: override existing value
5250
5296
  --default=yes|no Wizard: set as default configuration for specified plugin (also: update)
5251
5297
  --key-path=VALUE Wizard: path to private key for JWT
@@ -5255,6 +5301,9 @@ OPTIONS: global
5255
5301
  --cert-stores=LIST HTTP/S: List of folder with trusted certificates
5256
5302
  --http-options=HASH HTTP/S connection parameters for REST calls (not `ascp` WSS)
5257
5303
  --http-proxy=VALUE HTTP/S: URL for proxy with optional credentials
5304
+ --query=HASH Additional filter for for some commands (list/delete)
5305
+ --bulk=yes|no Bulk operation (only some)
5306
+ --bfail=yes|no Bulk operation error handling
5258
5307
  --ts=HASH Override transfer spec values
5259
5308
  --to-folder=VALUE Destination folder for transferred files
5260
5309
  --sources=VALUE How list of transferred files is provided (@args,@ts,Array)
@@ -7370,6 +7419,8 @@ admin subscription usage
7370
7419
  admin subscription usage MONTH
7371
7420
  admin user list
7372
7421
  admin user modify %name:my_user_email @: deactivated=false
7422
+ admin user notifications %name:my_user_email show
7423
+ admin user preferences %name:my_user_email show
7373
7424
  admin workspace dropbox %name:my_other_workspace list
7374
7425
  admin workspace list
7375
7426
  admin workspace shared_folder %name:my_other_workspace list
@@ -7386,9 +7437,9 @@ bearer_token --out.level=data
7386
7437
  files bearer /
7387
7438
  files bearer_token_node / --cache-tokens=no
7388
7439
  files browse /
7389
- files browse / --url=my_private_link
7440
+ files browse / --url=my_private_link_shared_folder
7390
7441
  files browse / --url=my_public_link_folder_no_pass
7391
- files browse / --url=my_public_link_folder_pass --password=my_public_link_password
7442
+ files browse / --url=my_public_link_folder_with_pass --password=my_public_link_folder_password
7392
7443
  files browse my_remote_file
7393
7444
  files browse my_remote_folder
7394
7445
  files browse my_remote_folder/
@@ -7440,6 +7491,11 @@ packages send @: 'name=package title' END test_file.bin --url=my_public_link_sen
7440
7491
  packages send @: 'name=package title' recipients.0=my_username 'note=some notes' END test_file.bin
7441
7492
  packages send @json:'{"name":"package title","recipients":["my_email_external"]}' --new-user-option.package_contact=true test_file.bin
7442
7493
  packages shared_inboxes list
7494
+ packages shared_inboxes short_link public %name:my_shared_inbox_name create --fields=id
7495
+ packages shared_inboxes short_link public %name:my_shared_inbox_name delete <aoc_shared_inbox_short_link_create>
7496
+ packages shared_inboxes short_link public %name:my_shared_inbox_name list
7497
+ packages shared_inboxes short_link public %name:my_shared_inbox_name modify <aoc_shared_inbox_short_link_create> @: password=my_public_link_folder_password
7498
+ packages shared_inboxes short_link public %name:my_shared_inbox_name show <aoc_shared_inbox_short_link_create>
7443
7499
  packages shared_inboxes show %name:my_shared_inbox_name
7444
7500
  packages show '%name:package title'
7445
7501
  remind --username=my_user_email --url=https://aoc.example.com/path
@@ -7665,10 +7721,11 @@ upload 'faux:///test.bin?1k' --to-folder=my_upload_folder
7665
7721
  upload --sources=@ts --transfer.ascp_args=@list:,--file-list,file_list.txt --to-folder=my_inside_folder
7666
7722
  upload --sources=@ts --transfer.ascp_args=@list:,--file-pair-list,file_pair_list.txt
7667
7723
  upload --sources=@ts --ts=@json:'{"paths":[{"source":"test_file.bin","destination":"my_inside_folder/other_name_4"}]}' --transfer.agent=transferd
7668
- upload --src-type=pair --sources=@json:'["test_file.bin","my_inside_folder/other_name_3"]' --transfer.quiet=false --progress=no
7724
+ upload --src-type=pair --sources=@json:'["test_file.bin","my_inside_folder/other_name_3"]' --transfer.quiet=false
7669
7725
  upload --src-type=pair test_file.bin my_inside_folder/other_name_2 --notify-to=my_email_external '--transfer.ascp_args=@list: -l 100m'
7670
7726
  upload --src-type=pair test_file.bin my_upload_folder/other_name_5 --ts=@json:'{"cipher":"aes-192-gcm","content_protection":"encrypt","content_protection_password":"my_secret_here","cookie":"biscuit","create_dir":true,"delete_before_transfer":false,"delete_source":false,"exclude_newer_than":"-1","exclude_older_than":"-10000","fasp_port":33001,"http_fallback":false,"multi_session":0,"overwrite":"diff+older","precalculate_job_size":true,"preserve_access_time":true,"preserve_creation_time":true,"rate_policy":"fair","resume_policy":"sparse_csum"}'
7671
7727
  upload --to-folder=my_upload_folder/target_hot --lock-port=50101 --transfer.ascp_args=@list:,--remove-after-transfer,--remove-empty-directories,--exclude-newer-than=-8,--src-base,hot_folder hot_folder
7728
+ upload /test_file.bin --to-folder=my_upload_folder --transfer.agent=node --transfer.url=http://localhost:12348 --transfer.username=sim --transfer.password=sim
7672
7729
  upload test_file.bin --to-folder=my_inside_folder --ts=@json:'{"multi_session":3,"multi_session_threshold":1,"resume_policy":"none","target_rate_kbps":100000}' --transfer=@json:'{"spawn_delay_sec":2.5,"multi_incr_udp":false}' --progress-bar=yes
7673
7730
  ```
7674
7731
 
@@ -8230,6 +8287,8 @@ ascli node -N --url=https://... --password="Bearer $(cat bearer.txt)" --root-id=
8230
8287
  > Add `ascli node` in front of the following commands:
8231
8288
 
8232
8289
  ```shell
8290
+ --url=http://localhost:12348 --username=sim --password=sim browse / --fields=path --format=csv --select=@json:'{"basename":"test_file.bin"}'
8291
+ --url=http://localhost:12348 --username=sim --password=sim transfer list --fields=status
8233
8292
  --url=https://tst.example.com/path --password='Bearer <nd_bearer_token>' --root-id=<id> access_key do self browse /
8234
8293
  access_key create @json:'{"id":"my_username","secret":"my_password_here","storage":{"type":"local","path":"/"}}'
8235
8294
  access_key delete my_username
@@ -8274,6 +8333,7 @@ central session list
8274
8333
  delete @list:,my_upload_folder/a_folder,my_upload_folder/tdlink,my_upload_folder/a_file
8275
8334
  delete my_upload_folder/test_file.bin
8276
8335
  download my_upload_folder/test_file.bin --to-folder=.
8336
+ emulator @json:'{"url":"http://localhost:12348","username":"sim","password":"sim","docroot":"/data"}'
8277
8337
  health
8278
8338
  info --fpac='function FindProxyForURL(url,host){return "DIRECT"}'
8279
8339
  license
@@ -8356,6 +8416,79 @@ In Instana, create a custom Dashboard to visualize the OTel data:
8356
8416
  - Data Source: Infrastructure and Platforms
8357
8417
  - Metric: search `transfer`
8358
8418
 
8419
+ ### Node emulator
8420
+
8421
+ > [!NOTE]
8422
+ > This is not a feature for production.
8423
+ > It's provided for testing only.
8424
+
8425
+ The command `emulator` starts a local web server that answers a subset of the Node API, and executes transfers with the Transfer Daemon (`transferd`).
8426
+ It allows testing, without HSTS, the [Node API agent](#agent-node-api) (`--transfer.agent=node`) and the `node` commands `info`, `browse`, `transfer list|show|modify|cancel`.
8427
+
8428
+ The Transfer Daemon and the gem `grpc` must be installed (see [Agent: Transfer Daemon](#agent-transfer-daemon)).
8429
+ The emulator starts its own `transferd`, and stops it on exit.
8430
+
8431
+ It takes an optional `Hash` argument with the following parameters:
8432
+
8433
+ | Field | Type | Description |
8434
+ |---------------|---------|----------------------------------------------------------------------------------|
8435
+ | `cert` | `String` | Path to the TLS certificate file. Accepted formats: PEM (`.pem`) or PKCS12 (`.p12` / `.pfx`).<br/>Example: `/path/to/cert.pem`. |
8436
+ | `chain` | `String` | Path to the PEM certificate chain file (appended as extra chain certificates).<br/>Example: `/path/to/chain.pem`. |
8437
+ | `docroot` | `String` | Local folder of the node files. Paths of `/files/browse` and local paths of transfers (sources of `send`, destination of `receive`) are relative to it, and confined in it. Defaults to the current working directory.<br/>Example: `/data/aspera`. |
8438
+ | `key` | `String` | Path to the PEM private key file, or the PKCS12 passphrase when `cert` is a `.p12`/`.pfx` file.<br/>Example: `/path/to/key.pem`. |
8439
+ | `password` | `String` | Password expected from clients in HTTP Basic authentication, for the above `username`.<br/>Example: `my_password`. |
8440
+ | `retention_sec` | `Integer` | Time in seconds a transfer stays in the list of transfers after it ended (completed, failed or canceled, and no more retried).<br/>Default: `86400`. |
8441
+ | `url` | `String` | Address and port the emulator listens on. Use `https://` with `cert`/`key` for TLS.<br/>Default: `http://localhost:8080`. |
8442
+ | `username` | `String` | Username expected from clients in HTTP Basic authentication. Set together with `password`. When not set, requests are accepted without authentication.<br/>Example: `node_user`. |
8443
+
8444
+ For details on `url` and HTTPS, see [Web service](#web-service).
8445
+
8446
+ Like on a real node, the files of the emulator are in its `docroot`: paths of `browse`, and local paths of transfers, are relative to it.
8447
+ Local paths are the sources of an upload (`send`), and the destination of a download (`receive`).
8448
+ Paths leading out of the `docroot` are rejected.
8449
+
8450
+ Start the emulator, it runs until interrupted:
8451
+
8452
+ ```shell
8453
+ ascli node emulator @json:'{"url":"http://localhost:12348","username":"sim","password":"sim","docroot":"/data"}'
8454
+ ```
8455
+
8456
+ Then, in another terminal, use it as a node, for example, to list the files in `/data`:
8457
+
8458
+ ```shell
8459
+ ascli node --url=http://localhost:12348 --username=sim --password=sim browse /
8460
+ ```
8461
+
8462
+ Or as the transfer agent, for example, to upload the file `/data/my_file.dat` to a transfer server:
8463
+
8464
+ ```shell
8465
+ ascli server upload /my_file.dat --transfer.agent=node --transfer.url=http://localhost:12348 --transfer.username=sim --transfer.password=sim
8466
+ ```
8467
+
8468
+ The transfer is executed by `transferd`, and its status is available on the emulator:
8469
+
8470
+ ```shell
8471
+ ascli node --url=http://localhost:12348 --username=sim --password=sim transfer list
8472
+ ```
8473
+
8474
+ Supported endpoints:
8475
+
8476
+ | Verb | Path | Action |
8477
+ |----------|-----------------------|---------------------------------------------------------------------------------------------------|
8478
+ | `GET` | `/info` | Node information, version and license from `transferd`. |
8479
+ | `GET` | `/ops/transfers` | List transfers. Query parameters: `active_only`, `direction`, `count`. |
8480
+ | `POST` | `/ops/transfers` | Start a transfer with `transferd`. |
8481
+ | `GET` | `/ops/transfers/{id}` | Transfer information, with sessions and files. |
8482
+ | `PUT` | `/ops/transfers/{id}` | Modify `target_rate_kbps`, `min_rate_kbps` or `rate_policy`, or cancel with `status`: `canceled`. |
8483
+ | `CANCEL` | `/ops/transfers/{id}` | Cancel a transfer. |
8484
+ | `POST` | `/files/browse` | List a folder of the `docroot`. |
8485
+
8486
+ Limitations:
8487
+
8488
+ - Only transfers started through the emulator are known. They are kept in memory, and lost when the emulator stops. Ended transfers are removed from the list after `retention_sec` (default: one day).
8489
+ - Only Basic authentication is supported: when `username` and `password` are set, bearer tokens and access keys are rejected. When they are not set, all requests are accepted.
8490
+ - Not supported: `files/upload_setup` and `files/download_setup` (so, `node upload|download` on the emulator), `ops/transfers/bandwidth`, pause and resume of transfers, query parameters `iteration_token` and `tag`.
8491
+
8359
8492
  ## Plugin: `faspex5`: IBM Aspera Faspex v5
8360
8493
 
8361
8494
  Faspex 5 is IBM Aspera's newer self-managed application.
@@ -8598,6 +8731,7 @@ gateway @: url=https://localhost:12346/aspera/faspex
8598
8731
  health --url=https://f5.example.com/path
8599
8732
  invitation list
8600
8733
  invitations create @: email_address=aspera.user1+u@gmail.com
8734
+ packages browse --url=my_public_link_recv_fr_user /
8601
8735
  packages browse <id> --query.recursive=true
8602
8736
  packages delete <id>
8603
8737
  packages list --box=ALL
@@ -8607,11 +8741,14 @@ packages list --box=outbox --fields=DEF,sender.email,recipients.0.recipient_type
8607
8741
  packages list --query=@json:'{"mailbox":"inbox","status":"completed"}'
8608
8742
  packages receive --box=my_shared_box_name <id> --to-folder=.
8609
8743
  packages receive --box=my_workgroup --group-type=workgroups <id> --to-folder=.
8744
+ packages receive --url=my_public_link_recv_fr_user --to-folder=.
8745
+ packages receive --url=my_public_link_recv_fr_user ALL --to-folder=.
8610
8746
  packages receive <id> --to-folder=. --ts.content_protection_password=my_secret_here
8747
+ packages receive <id> <f5_pack_first_file> --to-folder=. --ts.content_protection_password=my_secret_here
8611
8748
  packages receive ALL --once-only=yes --to-folder=. --query.max=5
8612
8749
  packages receive INIT --once-only=yes
8613
- packages send --url=my_public_link_send_f5_user @json:'{"title":"test title"}' test_file.bin
8614
8750
  packages send --url=my_public_link_send_shared_box @json:'{"title":"test title"}' test_file.bin
8751
+ packages send --url=my_public_link_send_to_user @json:'{"title":"test title"}' test_file.bin
8615
8752
  packages send @: 'title=for shared inbox' recipients.0=my_shared_box_name metadata.Options=Opt1 'metadata.TextInput=example text' END test_file.bin
8616
8753
  packages send @: 'title=test title' recipients.0.name=my_username END test_file.bin --ts.content_protection_password=my_secret_here
8617
8754
  packages send @json:'{"title":"test title","recipients":["my_workgroup"]}' test_file.bin
@@ -9114,19 +9251,24 @@ Example: Create a Node: Attributes are like API:
9114
9251
  | `timeout` | | `30s` |
9115
9252
  | `open_timeout` | | `10s` |
9116
9253
 
9117
- Example: Create a share and list user permissions on it.
9254
+ Example: Create a share, grant access to a user and list user permissions on it.
9118
9255
 
9119
9256
  ```shell
9120
9257
  ascli shares admin share create @json:'{"node_id":1,"name":"test1","directory":"test1","create_directory":true}'
9121
9258
 
9122
- share_id=$(ascli shares admin share list --select=@json:'{"name":"test1"}' --fields=id --out.level=data)
9259
+ user_id=$(ascli shares admin user all show %username:john@example.com --fields=id --out.level=data)
9123
9260
 
9124
- ascli shares admin share user_permissions $share_id list
9261
+ ascli shares admin share user_permissions %name:test1 create @json:'{"user_id":'$user_id',"browse_permission":true,"download_permission":true,"upload_permission":true}'
9262
+
9263
+ ascli shares admin share user_permissions %name:test1 list
9125
9264
  ```
9126
9265
 
9266
+ Share permissions (`user_permissions`, `group_permissions`) are identified by the user or group identifier: e.g. `show %username:john@example.com`.
9267
+ Permissions not specified on creation take their default value.
9268
+ Available permissions: `browse_permission`, `download_permission`, `upload_permission`, `mkdir_permission`, `delete_permission`, `rename_permission`, `content_availability_permission`, `manage_permission`.
9269
+
9127
9270
  > [!NOTE]
9128
- > The Shares API provides read-only access to share permissions (`user_permissions`, `group_permissions`): only `list` and `show` are available.
9129
- > Permissions are granted in the Shares web UI.
9271
+ > Permissions of a user or group on all shares (`user all share_permissions`, `group all share_permissions`) are read-only: only `list` and `show` are available.
9130
9272
 
9131
9273
  ### Tested commands for `shares`
9132
9274
 
@@ -9138,6 +9280,7 @@ admin group all list
9138
9280
  admin node list
9139
9281
  admin share list --fields=DEF,-status,status_message
9140
9282
  admin share user_permissions %name:my_share list
9283
+ admin share user_permissions %name:my_share modify %username:my_username @json:'{"browse_permission":true}'
9141
9284
  admin transfer_settings modify @: min_connect_version=3.6.1
9142
9285
  admin transfer_settings show --format=json
9143
9286
  admin user all app_authorizations %username:my_username modify @: app_login=true
@@ -9195,6 +9338,18 @@ transfer smart sub my_smart_id @: source.paths.0=my_smart_file source_type=user_
9195
9338
 
9196
9339
  ## Plugin: `orchestrator`: IBM Aspera Orchestrator
9197
9340
 
9341
+ ### Authentication
9342
+
9343
+ The Orchestrator plugin supports different credentials and authentication styles configured via `--auth_style`:
9344
+
9345
+ - **Username / Password** (`--username` and `--password`):
9346
+ - `--auth_style=token` (default): Exchanges credentials for a JWT Bearer token via `/api/login`.
9347
+ - `--auth_style=basic`: Standard HTTP Basic Authentication.
9348
+ - `--auth_style=query`: Passes credentials in URL query parameters (`?login=...&password=...`).
9349
+ - **API Key** (`--apikey`):
9350
+ - `--auth_style=token` (default): Exchanges the API key for a JWT Bearer token via `/api/login`.
9351
+ - `--auth_style=query`: Passes the API key in URL query parameter (`?apikey=...`).
9352
+
9198
9353
  ### Start a workflow
9199
9354
 
9200
9355
  Command `workflows start` creates a work order:
@@ -9231,16 +9386,19 @@ ascli orchestrator workflows start 1234 @json:'{"Param":"world !"}' @json:'{"ste
9231
9386
  > Add `ascli orchestrator` in front of the following commands:
9232
9387
 
9233
9388
  ```shell
9389
+ --auth_style=query workflow list
9390
+ --auth_style=token workflow list
9234
9391
  health
9235
9392
  info
9236
9393
  monitors
9237
- plugins
9394
+ plugins list
9238
9395
  processes
9239
9396
  workflow details my_workflow_id
9240
9397
  workflow export my_workflow_id
9241
9398
  workflow inputs my_workflow_id
9242
9399
  workflow list
9243
9400
  workflow outputs my_workflow_id
9401
+ workflow start my_sleep_workflow_id --fields=work_order.id
9244
9402
  workflow start my_workflow_id @: 'Param=world !'
9245
9403
  workflow start my_workflow_id @: 'Param=world !' END @: step=ResultStep variable=Complete_status_message
9246
9404
  workflow status ALL
@@ -9251,8 +9409,9 @@ workorder cancel <id>
9251
9409
  workorder output <id>
9252
9410
  workorder reset <id>
9253
9411
  workorder status <id>
9254
- workstep cancel 1
9255
- workstep status 1
9412
+ workorder status <orch_wf_start_sleep> --fields=status_details
9413
+ workstep cancel <id>
9414
+ workstep status <id>
9256
9415
  ```
9257
9416
 
9258
9417
  ## Plugin: `cos`: IBM Cloud Object Storage
@@ -9630,9 +9789,32 @@ This shall list the contents of the storage root of the access key.
9630
9789
 
9631
9790
  ### Options for generated files
9632
9791
 
9633
- When generating preview files, some options are provided by default.
9634
- Some values for the options can be modified on command line.
9635
- For video preview, the whole set of options can be overridden with option `reencode_ffmpeg`: it is a `Hash` with two keys: `in` and `out`, each is an `Array` of strings with the native options to `ffmpeg`.
9792
+ When generating preview files, the following options can be modified on command line (or in a preset):
9793
+
9794
+ | Field | Type | Description |
9795
+ |---------------------|---------|----------------------------------------------------------------------------------|
9796
+ | `blend_fps` | `Integer` | MP4 video preview (`blend`): frames per second.<br/>Default: `15`. |
9797
+ | `blend_keyframes` | `Integer` | MP4 video preview (`blend`): number of key frames.<br/>Default: `30`. |
9798
+ | `blend_pauseframes` | `Integer` | MP4 video preview (`blend`): number of pause frames (repetitions of each key frame).<br/>Default: `3`. |
9799
+ | `blend_transframes` | `Integer` | MP4 video preview (`blend`): number of transition frames between key frames.<br/>Default: `5`. |
9800
+ | `clips_count` | `Integer` | MP4 video preview (`clips`): number of clips.<br/>Default: `5`. |
9801
+ | `clips_length` | `Integer` | Video: length (in seconds) of each clip of MP4 video preview (`clips`), and of `animated` PNG thumbnail.<br/>Default: `5`. |
9802
+ | `max_size` | `Integer` | Maximum size (in bytes) of a preview file: a warning is logged if exceeded.<br/>Default: `16777216`. |
9803
+ | `office_conversion` | `String` | PNG thumbnail of office document: conversion tool.<br/>Allowed values: `soffice`, `unoconv`.<br/>Default: `soffice`. |
9804
+ | `reencode_ffmpeg.in` | `Array` | Input options. |
9805
+ | `reencode_ffmpeg.out` | `Array` | Output options. |
9806
+ | `reencode_ffmpeg` | `Hash` | MP4 video preview (`reencode`): `ffmpeg` options replacing the default ones.<br/>Default: `{}`. |
9807
+ | `thumb_img_size` | `Integer` | PNG thumbnail of image, PDF, office document or text: size (in pixels).<br/>Default: `800`. |
9808
+ | `thumb_text_font` | `String` | PNG thumbnail of text: font name, as listed by `magick identify -list font`.<br/>Default: `Courier`. |
9809
+ | `thumb_vid_fraction` | `Number` | PNG thumbnail of video (`fixed`): position of the snapshot, as a fraction of the video duration.<br/>Default: `0.1`. |
9810
+ | `thumb_vid_scale` | `String` | PNG thumbnail of video: frame size, as `ffmpeg` scale filter argument.<br/>Default: `-1:min(ih,100)`. |
9811
+ | `video_codec` | `String` | MP4 video preview (`reencode`): `ffmpeg` video codec, e.g. `libx264`, `h264_videotoolbox`, `h264_nvenc`. Default: first available H.264 encoder. |
9812
+ | `video_conversion` | `String` | MP4 video preview: generation method. `reencode`: re-encode the beginning of the video, `blend`: key frames with transitions, `clips`: concatenation of short clips.<br/>Allowed values: `reencode`, `blend`, `clips`.<br/>Default: `reencode`. |
9813
+ | `video_png_conv` | `String` | PNG thumbnail of video: generation method. `fixed`: single frame, `animated`: animated PNG.<br/>Allowed values: `fixed`, `animated`.<br/>Default: `fixed`. |
9814
+ | `video_scale` | `String` | MP4 video preview: frame size, as `ffmpeg` scale filter argument.<br/>Default: `min(iw,360):-2`. |
9815
+ | `video_start_sec` | `Integer` | Video: start offset (in seconds) of MP4 video preview and of `animated` PNG thumbnail.<br/>Default: `10`. |
9816
+
9817
+ For video preview with method `reencode`, the whole set of `ffmpeg` options can be overridden with option `reencode_ffmpeg`: it is a `Hash` with two keys: `in` and `out`, each is an `Array` with the native options to `ffmpeg`.
9636
9818
 
9637
9819
  ### Execution
9638
9820
 
@@ -23,14 +23,19 @@ module Aspera
23
23
  end
24
24
 
25
25
  # Wait for all sessions to terminate and return a typed Transfer::Result.
26
+ # Notifies the end of transfer to the progress bar (agents do not).
26
27
  # @return [Transfer::Result::Success, Transfer::Result::Error]
27
28
  def wait_for_completion
29
+ success = false
28
30
  statuses = wait_for_transfers_completion
29
- @progress&.reset
30
31
  Aspera.assert_type(statuses, Array)
31
32
  Aspera.assert(statuses.none? { |i| !i.eql?(:success) && !i.is_a?(StandardError) }) { "bad statuses content: #{statuses}" }
32
33
  errors = statuses.reject { |i| i.eql?(:success) }
33
- return errors.empty? ? Transfer::Result.success : Transfer::Result.error(errors.first)
34
+ success = errors.empty?
35
+ return success ? Transfer::Result.success : Transfer::Result.error(errors.first)
36
+ ensure
37
+ # Also when the agent raises an exception
38
+ notify_progress(:end, info: success)
34
39
  end
35
40
 
36
41
  # Return the job_id of the last transfer submitted by this agent.
@@ -160,19 +160,15 @@ module Aspera
160
160
  end
161
161
  when 'completed'
162
162
  notify_progress(:session_end, session_id: @transfer_id)
163
- notify_progress(:end)
164
163
  break
165
164
  when 'failed'
166
165
  notify_progress(:session_end, session_id: @transfer_id)
167
- notify_progress(:end)
168
166
  raise Transfer::Error, transfer['error_desc']
169
167
  when 'cancelled'
170
168
  notify_progress(:session_end, session_id: @transfer_id)
171
- notify_progress(:end)
172
169
  raise Transfer::Error, 'Transfer cancelled by user'
173
170
  else
174
171
  notify_progress(:session_end, session_id: @transfer_id)
175
- notify_progress(:end)
176
172
  raise Transfer::Error, "unknown status: #{transfer['status']}: #{transfer['error_desc']}"
177
173
  end
178
174
  end
@@ -121,19 +121,15 @@ module Aspera
121
121
  end
122
122
  when 'completed'
123
123
  notify_progress(:session_end, session_id: @transfer_id)
124
- notify_progress(:end)
125
124
  break
126
125
  when 'failed'
127
126
  notify_progress(:session_end, session_id: @transfer_id)
128
- notify_progress(:end)
129
127
  raise Transfer::Error, transfer['error_desc']
130
128
  when 'cancelled'
131
129
  notify_progress(:session_end, session_id: @transfer_id)
132
- notify_progress(:end)
133
130
  raise Transfer::Error, 'Transfer cancelled by user'
134
131
  else
135
132
  notify_progress(:session_end, session_id: @transfer_id)
136
- notify_progress(:end)
137
133
  raise Transfer::Error, "unknown status: #{transfer['status']}: #{transfer['error_desc']}"
138
134
  end
139
135
  sleep(1)