aspera-cli 4.27.2 → 4.27.3
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +50 -0
- data/bin/ascli +2 -1
- data/docs/README.md +804 -746
- data/lib/aspera/agent/connect.rb +6 -4
- data/lib/aspera/agent/desktop.rb +2 -2
- data/lib/aspera/agent/direct.rb +3 -1
- data/lib/aspera/agent/node.rb +3 -3
- data/lib/aspera/api/alee.rb +1 -1
- data/lib/aspera/api/aoc.rb +14 -12
- data/lib/aspera/api/ats.rb +1 -1
- data/lib/aspera/api/cos_node.rb +2 -2
- data/lib/aspera/api/faspex.rb +9 -7
- data/lib/aspera/api/httpgw.rb +37 -33
- data/lib/aspera/api/node.rb +38 -33
- data/lib/aspera/ascmd.rb +3 -1
- data/lib/aspera/ascp/installation.rb +62 -27
- data/lib/aspera/ascp/management.rb +1 -0
- data/lib/aspera/assert.rb +4 -0
- data/lib/aspera/cli/ascp_actions.rb +20 -41
- data/lib/aspera/cli/async_transfer_store.rb +2 -2
- data/lib/aspera/cli/bootstrapper.rb +11 -15
- data/lib/aspera/cli/command_line.rb +252 -0
- data/lib/aspera/cli/command_registry.rb +149 -33
- data/lib/aspera/cli/command_spec.rb +103 -14
- data/lib/aspera/cli/completion/ascli.bash +12 -0
- data/lib/aspera/cli/completion/ascli.fish +16 -0
- data/lib/aspera/cli/completion/ascli.zsh +19 -0
- data/lib/aspera/cli/context.rb +3 -0
- data/lib/aspera/cli/deprecation.rb +37 -0
- data/lib/aspera/cli/extended_value.rb +2 -0
- data/lib/aspera/cli/formatter.rb +87 -75
- data/lib/aspera/cli/gem_checker.rb +1 -1
- data/lib/aspera/cli/hints.rb +7 -6
- data/lib/aspera/cli/http.rb +21 -21
- data/lib/aspera/cli/info.rb +3 -0
- data/lib/aspera/cli/mcp_tool.rb +47 -83
- data/lib/aspera/cli/option_declarator.rb +33 -42
- data/lib/aspera/cli/option_registry.rb +69 -0
- data/lib/aspera/cli/option_types.rb +103 -0
- data/lib/aspera/cli/option_value.rb +281 -0
- data/lib/aspera/cli/options.schema.yaml +38 -5
- data/lib/aspera/cli/parser.rb +307 -848
- data/lib/aspera/cli/plugins/alee.rb +7 -4
- data/lib/aspera/cli/plugins/aoc.rb +430 -380
- data/lib/aspera/cli/plugins/ats.rb +58 -73
- data/lib/aspera/cli/plugins/base.rb +190 -240
- data/lib/aspera/cli/plugins/basic_auth.rb +2 -10
- data/lib/aspera/cli/plugins/config.rb +244 -178
- data/lib/aspera/cli/plugins/console.rb +102 -38
- data/lib/aspera/cli/plugins/cos.rb +6 -23
- data/lib/aspera/cli/plugins/factory.rb +3 -0
- data/lib/aspera/cli/plugins/faspex5.rb +176 -173
- data/lib/aspera/cli/plugins/faspio.rb +5 -10
- data/lib/aspera/cli/plugins/httpgw.rb +8 -11
- data/lib/aspera/cli/plugins/mcp.rb +20 -55
- data/lib/aspera/cli/plugins/node.rb +277 -311
- data/lib/aspera/cli/plugins/orchestrator.rb +90 -77
- data/lib/aspera/cli/plugins/preview.rb +79 -90
- data/lib/aspera/cli/plugins/server.rb +76 -50
- data/lib/aspera/cli/plugins/shares.rb +68 -116
- data/lib/aspera/cli/preset_actions.rb +17 -10
- data/lib/aspera/cli/preset_manager.rb +12 -2
- data/lib/aspera/cli/prompt.rb +35 -0
- data/lib/aspera/cli/result.rb +13 -18
- data/lib/aspera/cli/runner.rb +31 -54
- data/lib/aspera/cli/special_values.rb +5 -0
- data/lib/aspera/cli/sync_actions.rb +41 -37
- data/lib/aspera/cli/terminal_formatter.rb +9 -3
- data/lib/aspera/cli/transfer_actions.rb +0 -6
- data/lib/aspera/cli/transfer_agent.rb +29 -35
- data/lib/aspera/cli/vault_manager.rb +0 -17
- data/lib/aspera/cli/version.rb +1 -1
- data/lib/aspera/cli/wizard.rb +4 -2
- data/lib/aspera/coverage.rb +1 -0
- data/lib/aspera/environment.rb +6 -0
- data/lib/aspera/faspex_gw.rb +2 -1
- data/lib/aspera/faspex_postproc.rb +1 -0
- data/lib/aspera/graphql.rb +5 -5
- data/lib/aspera/json_rpc/client.rb +5 -5
- data/lib/aspera/keychain/encrypted_hash.rb +1 -1
- data/lib/aspera/keychain/one_password_api.rb +1 -1
- data/lib/aspera/link_header.rb +2 -2
- data/lib/aspera/log.rb +22 -25
- data/lib/aspera/markdown.rb +2 -0
- data/lib/aspera/mime.rb +25 -0
- data/lib/aspera/node_simulator.rb +1 -0
- data/lib/aspera/oauth/base.rb +35 -25
- data/lib/aspera/oauth/factory.rb +1 -0
- data/lib/aspera/oauth/generic.rb +1 -1
- data/lib/aspera/oauth/jwt.rb +1 -1
- data/lib/aspera/oauth/web.rb +9 -8
- data/lib/aspera/preview/file_types.rb +4 -4
- data/lib/aspera/preview/generator.rb +7 -0
- data/lib/aspera/preview/options.rb +4 -4
- data/lib/aspera/preview/terminal.rb +4 -3
- data/lib/aspera/preview/utils.rb +9 -6
- data/lib/aspera/products/connect.rb +1 -1
- data/lib/aspera/rainbow.rb +7 -0
- data/lib/aspera/rest/aspera_errors.rb +60 -0
- data/lib/aspera/rest/call_error.rb +27 -0
- data/lib/aspera/rest/client.rb +514 -0
- data/lib/aspera/rest/error_analyzer.rb +113 -0
- data/lib/aspera/rest/list.rb +143 -0
- data/lib/aspera/rest/parameters.rb +55 -0
- data/lib/aspera/rest/util.rb +176 -0
- data/lib/aspera/rest.rb +7 -621
- data/lib/aspera/schema/IBM Aspera Console-enhanced.yaml +1125 -0
- data/lib/aspera/schema/IBM Aspera on Cloud Automation API-1.0.5-enhanced.yaml +2395 -0
- data/lib/aspera/schema/documentation.rb +13 -3
- data/lib/aspera/schema/registry.rb +18 -1
- data/lib/aspera/schema/validator.rb +92 -0
- data/lib/aspera/secret_hider.rb +36 -25
- data/lib/aspera/string_ext.rb +15 -0
- data/lib/aspera/temp_file_manager.rb +6 -5
- data/lib/aspera/transfer/parameters.rb +2 -0
- data/lib/aspera/transfer/spec.rb +1 -0
- data/lib/aspera/uri_reader.rb +11 -11
- data/lib/aspera/web_auth/index.html +147 -0
- data/lib/aspera/web_auth/server.rb +81 -0
- data.tar.gz.sig +0 -0
- metadata +39 -7
- metadata.gz.sig +0 -0
- data/lib/aspera/colors.rb +0 -79
- data/lib/aspera/rest_call_error.rb +0 -25
- data/lib/aspera/rest_error_analyzer.rb +0 -111
- data/lib/aspera/rest_errors_aspera.rb +0 -58
- data/lib/aspera/rest_list.rb +0 -136
- data/lib/aspera/web_auth.rb +0 -211
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.
|
|
14
|
+
subtitle: "ascli 4.27.3"
|
|
15
15
|
author: "Laurent Martin"
|
|
16
16
|
PANDOC_DEFAULTS_END
|
|
17
17
|
-->
|
|
@@ -62,10 +62,11 @@ This manual is organized into the following sections:
|
|
|
62
62
|
|
|
63
63
|
1. **Quick Start** - Getting started with basic operations
|
|
64
64
|
1. **Installation** - Setup procedures for various platforms
|
|
65
|
-
1. **Command Line Interface** - Syntax, options, and usage patterns
|
|
66
|
-
1. **
|
|
67
|
-
1. **
|
|
68
|
-
1. **
|
|
65
|
+
1. **Command Line Interface** - Syntax, options, configuration, transfers, and usage patterns
|
|
66
|
+
1. **Plugin sections** (one per product: AoC, ATS, HSTS, Faspex 5, and so on) - Product-specific operations and examples
|
|
67
|
+
1. **Operational Utilities** - Sync, hot folders, health checks, email notifications
|
|
68
|
+
1. **Common problems** - Common issues and solutions
|
|
69
|
+
1. **About** - History and references
|
|
69
70
|
|
|
70
71
|
### When to use and when not to use
|
|
71
72
|
|
|
@@ -81,7 +82,7 @@ Internally, `ascli` integrates several components:
|
|
|
81
82
|
- A configuration file (`config.yaml`) for persistent settings
|
|
82
83
|
- Advanced command-line options (see [Extended Value](#extended-value-syntax))
|
|
83
84
|
- REST API calls, including OAuth (like `curl`)
|
|
84
|
-
- Aspera
|
|
85
|
+
- Aspera's `ascp` for high-speed file transfers
|
|
85
86
|
|
|
86
87
|
For programmatic integration with languages such as C/C++, Go, Python, NodeJS, and others, it is recommended to use the [Aspera APIs](https://ibm.biz/aspera_api) directly.
|
|
87
88
|
These include:
|
|
@@ -120,9 +121,9 @@ Using [Windows PowerShell or cmd](#shell-parsing-for-windows) is also possible.
|
|
|
120
121
|
|
|
121
122
|
Command line examples listed in sections titled **Tested commands for `_plugin_name_`** are verified during version validation.
|
|
122
123
|
|
|
123
|
-
Command line arguments formatted as `<NAME>` in examples represent user-provided values, not
|
|
124
|
+
Command line arguments formatted as `<NAME>` in examples represent user-provided values, not literal values.
|
|
124
125
|
|
|
125
|
-
`ascli` is an API **Client** toward the remote Aspera application **Server** (Faspex, HSTS, and so on)
|
|
126
|
+
`ascli` is an API **Client** toward the remote Aspera application **Server** (Faspex, HSTS, and so on).
|
|
126
127
|
|
|
127
128
|
Some commands will start an Aspera transfer (for example, `upload`).
|
|
128
129
|
The transfer is not implemented directly in `ascli`; rather, `ascli` uses one of the external Aspera Transfer Clients called **[Transfer Agents](#transfer-clients-agents)**.
|
|
@@ -130,8 +131,7 @@ The transfer is not implemented directly in `ascli`; rather, `ascli` uses one of
|
|
|
130
131
|
> [!NOTE]
|
|
131
132
|
> A **[Transfer Agent](#transfer-clients-agents)** is a client for the remote Transfer Server (HSTS/HSTE).
|
|
132
133
|
> It can be local, or remote.
|
|
133
|
-
> For example a remote Aspera Transfer Server may be used as a transfer agent
|
|
134
|
-
> that is, using the option `--transfer=node`
|
|
134
|
+
> For example, a remote Aspera Transfer Server may be used as a transfer agent through its Node API, using option `--transfer=node`.
|
|
135
135
|
|
|
136
136
|
## Quick Start
|
|
137
137
|
|
|
@@ -145,8 +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 zxvf ascli
|
|
149
|
-
mv ascli.4.27.2.linux-x86_64 $HOME/bin/ascli
|
|
148
|
+
tar -C $HOME/bin -zxvf ascli-4.27.3-linux-x86_64.tgz
|
|
150
149
|
export PATH=$PATH:$HOME/bin
|
|
151
150
|
```
|
|
152
151
|
|
|
@@ -160,7 +159,7 @@ ascli -v
|
|
|
160
159
|
```
|
|
161
160
|
|
|
162
161
|
```text
|
|
163
|
-
4.27.
|
|
162
|
+
4.27.3
|
|
164
163
|
```
|
|
165
164
|
|
|
166
165
|
- Install the Aspera transfer runtime (tested version), as it is not included in the `ascli` package:
|
|
@@ -211,7 +210,7 @@ Time: 00:00:02 ====================================== 100% 100 Mbps Time: 00:00:
|
|
|
211
210
|
complete
|
|
212
211
|
```
|
|
213
212
|
|
|
214
|
-
### Option B -
|
|
213
|
+
### Option B - Test with Your Own HSTS
|
|
215
214
|
|
|
216
215
|
To use `ascli` with a server of your own, it is recommended to save its connection details as an [Option Preset](#option-preset).
|
|
217
216
|
This avoids repeating credentials on every command.
|
|
@@ -220,12 +219,12 @@ The steps below create a preset, set it as the default for the server plugin, br
|
|
|
220
219
|
- Create a preset with your server's connection details:
|
|
221
220
|
|
|
222
221
|
```shell
|
|
223
|
-
ascli config preset update <SERVER_PRESET_NAME> --url=ssh://
|
|
222
|
+
ascli config preset update <SERVER_PRESET_NAME> --url=ssh://hsts.example.com:33001 --username=<USERNAME> --password=<PASSWORD>
|
|
224
223
|
```
|
|
225
224
|
|
|
226
225
|
```text
|
|
226
|
+
INFO Saving config file: /home/john/.aspera/ascli/config.yaml
|
|
227
227
|
Updated: <SERVER_PRESET_NAME>
|
|
228
|
-
Saving config file.
|
|
229
228
|
```
|
|
230
229
|
|
|
231
230
|
- Set the preset as the default for the server plugin:
|
|
@@ -235,8 +234,8 @@ ascli config preset set default server <SERVER_PRESET_NAME>
|
|
|
235
234
|
```
|
|
236
235
|
|
|
237
236
|
```text
|
|
238
|
-
Updated: default: server <- <SERVER_PRESET_NAME>
|
|
239
|
-
Saving config file.
|
|
237
|
+
INFO Updated: default: server <- <SERVER_PRESET_NAME>
|
|
238
|
+
INFO Saving config file: /home/john/.aspera/ascli/config.yaml
|
|
240
239
|
```
|
|
241
240
|
|
|
242
241
|
- Once your preset is set, follow the same browse and download steps as in [Option A](#option-a---test-with-the-aspera-demo-server).
|
|
@@ -266,7 +265,7 @@ Recommended Workflow:
|
|
|
266
265
|
Example Prompt:
|
|
267
266
|
|
|
268
267
|
```text
|
|
269
|
-
|
|
268
|
+
Use only the attached ascli manual (it matches the version I use).
|
|
270
269
|
Generate a command to send a package via Aspera on Cloud using the Bash shell.
|
|
271
270
|
Set a custom title and note.
|
|
272
271
|
Define specific recipients.
|
|
@@ -279,7 +278,7 @@ By providing the documentation as a direct reference, you reduce "hallucinations
|
|
|
279
278
|
|
|
280
279
|
- Learn the CLI: Read [Command Line Interface](#command-line-interface) to understand configuration, options, and commands.
|
|
281
280
|
|
|
282
|
-
- Explore plugins: Jump to the section for the relevant product
|
|
281
|
+
- Explore plugins: Jump to the section for the relevant product, for example: [Aspera on Cloud](#plugin-aoc-ibm-aspera-on-cloud), [HSTS](#plugin-server-ibm-aspera-high-speed-transfer-server-ssh), [Faspex 5](#plugin-faspex5-ibm-aspera-faspex-v5).
|
|
283
282
|
|
|
284
283
|
## Installation
|
|
285
284
|
|
|
@@ -295,6 +294,10 @@ There are several ways to install `ascli`:
|
|
|
295
294
|
- As a [single file executable](#single-file-executable)
|
|
296
295
|
|
|
297
296
|
This method is simple, but only a limited number of platforms are supported.
|
|
297
|
+
- On Windows, as a [portable package](#windows-portable-package)
|
|
298
|
+
|
|
299
|
+
This method is the simplest on Windows: extract and run. It includes Ruby, gems and `ascp`.
|
|
300
|
+
- On Windows, with the [Chocolatey package](#windows-chocolatey-package) (installs Ruby and the gem).
|
|
298
301
|
- As a [container](#container) (`docker`, `podman`, `singularity`).
|
|
299
302
|
|
|
300
303
|
The following sections describe the various installation methods.
|
|
@@ -313,21 +316,20 @@ This executable includes the Ruby runtime and gems, but not the transfer SDK.
|
|
|
313
316
|
#### Installing the single file executable
|
|
314
317
|
|
|
315
318
|
> [!NOTE]
|
|
316
|
-
> Replace
|
|
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`.
|
|
317
321
|
> Installation of `ascp` is still required separately.
|
|
318
322
|
> See [Install `ascp`](#installing-ascp-through-transferd).
|
|
319
323
|
|
|
320
324
|
```shell
|
|
321
325
|
tar zxvf ascli-<VERSION>-<PLATFORM>.tgz
|
|
322
|
-
mv ascli-<VERSION>-<PLATFORM> ascli
|
|
323
|
-
chmod a+x ascli
|
|
324
326
|
./ascli config transferd install
|
|
325
327
|
```
|
|
326
328
|
|
|
327
329
|
#### Linux: Checking the GLIBC version
|
|
328
330
|
|
|
329
331
|
> [!WARNING]
|
|
330
|
-
> On Linux, the executable requires a minimum GLIBC version, specified in the executable name on download site.
|
|
332
|
+
> On Linux, the executable requires a minimum GLIBC version, specified in the executable name on the download site.
|
|
331
333
|
> If the minimum version is not met, then executables (`ascp`, `transferd`) will exit with error.
|
|
332
334
|
|
|
333
335
|
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`:
|
|
@@ -353,11 +355,42 @@ objdump -p /bin/bash | sed -n 's/^.*GLIBC_//p' | sort -V | tail -n1
|
|
|
353
355
|
> [!NOTE]
|
|
354
356
|
> If `objdump` is not available, then use `strings` or `grep -z 'GLIBC_'|tr \\0 \\n`
|
|
355
357
|
|
|
356
|
-
The required GLIBC version for `ascp` can be found in the [Release Notes of HSTS](https://www.ibm.com/docs/en/ahts) or [
|
|
358
|
+
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
|
+
|
|
360
|
+
### Windows: Portable package
|
|
361
|
+
|
|
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`.
|
|
363
|
+
|
|
364
|
+
It contains the Ruby runtime, the aspera-cli gem with its dependencies, and the Aspera Transfer SDK (`ascp`).
|
|
365
|
+
No installation step, no administrator rights, and no internet access are required.
|
|
366
|
+
|
|
367
|
+
1. Download the ZIP archive, then right-click on it and select **Extract All...**.
|
|
368
|
+
Preferably, extract in a folder writable by the user, for example: `%LOCALAPPDATA%\Programs`.
|
|
369
|
+
|
|
370
|
+
2. In a terminal, in the extracted folder, check that `ascli` runs:
|
|
371
|
+
|
|
372
|
+
```batchfile
|
|
373
|
+
.\ascli.cmd -v
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
3. Optionally, double-click on `add_to_path.cmd` to add the folder to the user's `PATH`.
|
|
377
|
+
Then, in a new terminal, `ascli` can be used from any folder:
|
|
378
|
+
|
|
379
|
+
```batchfile
|
|
380
|
+
ascli -v
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
> [!NOTE]
|
|
384
|
+
> The launcher `ascli.cmd` uses the `ascp` located in folder `sdk` of the package, unless environment variable `ASCLI_SDK_FOLDER` is set.
|
|
385
|
+
> So, `ascli config transferd install` is not needed.
|
|
386
|
+
|
|
387
|
+
The configuration is stored in the [main folder](#main-configuration-and-persistency-folder), like for other installation methods.
|
|
388
|
+
To upgrade, extract the new version, and update the `PATH` if the folder name changed.
|
|
389
|
+
To uninstall, delete the folder, and remove it from the `PATH` if it was added.
|
|
357
390
|
|
|
358
|
-
|
|
391
|
+
### Windows: Chocolatey package
|
|
359
392
|
|
|
360
|
-
`ascli` can be
|
|
393
|
+
If you use [Chocolatey](https://chocolatey.org/), `ascli` can be installed with the `aspera-cli` package: it installs Ruby (if not already present) and the `aspera-cli` gem.
|
|
361
394
|
|
|
362
395
|
In a PowerShell as Administrator:
|
|
363
396
|
|
|
@@ -365,6 +398,8 @@ In a PowerShell as Administrator:
|
|
|
365
398
|
choco install aspera-cli -y
|
|
366
399
|
```
|
|
367
400
|
|
|
401
|
+
Then, install the Aspera Transfer Daemon, see [Installing `ascp` through `transferd`](#installing-ascp-through-transferd).
|
|
402
|
+
|
|
368
403
|
### Ruby
|
|
369
404
|
|
|
370
405
|
A Ruby interpreter is required to run `ascli`.
|
|
@@ -376,7 +411,7 @@ Required Ruby version is version: >= 3.1.
|
|
|
376
411
|
|
|
377
412
|
**Ruby can be installed using any of the following methods**: `rpm`, `yum`, `dnf`, `rvm`, `rbenv`, `brew`, Windows installer, ...
|
|
378
413
|
|
|
379
|
-
**
|
|
414
|
+
**First**, refer to the official Ruby documentation:
|
|
380
415
|
|
|
381
416
|
- [Official Ruby Installation Guide](https://www.ruby-lang.org/en/documentation/installation/)
|
|
382
417
|
- [Official Ruby Download](https://www.ruby-lang.org/en/downloads/)
|
|
@@ -398,7 +433,7 @@ Manual installation:
|
|
|
398
433
|
|
|
399
434
|
Automated installation (with internet access):
|
|
400
435
|
|
|
401
|
-
The Ruby installer supports silent installation
|
|
436
|
+
The Ruby installer supports silent installation. To see the options, execute it with `/help`, or refer to the [Ruby Installer FAQ](https://github.com/oneclick/rubyinstaller2/wiki/FAQ).
|
|
402
437
|
|
|
403
438
|
Download the Ruby installer executable from <https://rubyinstaller.org/downloads/> and then install:
|
|
404
439
|
|
|
@@ -437,14 +472,14 @@ This installs a recent Ruby version suitable for `ascli`.
|
|
|
437
472
|
After installation, Homebrew's Ruby is not on the `PATH` by default (this is shown at the end of the `brew install ruby` output and by `brew info ruby`).
|
|
438
473
|
Add it to your shell configuration file:
|
|
439
474
|
|
|
440
|
-
- **zsh** (default shell on macOS
|
|
475
|
+
- **zsh** (default shell on macOS; run this once in a terminal):
|
|
441
476
|
|
|
442
477
|
```shell
|
|
443
478
|
echo 'PATH="$(brew --prefix ruby)/bin:$($(brew --prefix ruby)/bin/gem env gemdir)/bin:$PATH"' >> ~/.zprofile
|
|
444
479
|
source ~/.zprofile
|
|
445
480
|
```
|
|
446
481
|
|
|
447
|
-
- **bash
|
|
482
|
+
- **bash**: replace `~/.zprofile` with `~/.bash_profile` in the commands above.
|
|
448
483
|
|
|
449
484
|
#### Linux: Package
|
|
450
485
|
|
|
@@ -595,7 +630,7 @@ For example for AIX, one can look at:
|
|
|
595
630
|
|
|
596
631
|
If your Unix does not provide a pre-built Ruby, you can get it using one of those [methods](https://www.ruby-lang.org/en/documentation/installation/).
|
|
597
632
|
|
|
598
|
-
For instance to build from source and install in `/opt/ruby
|
|
633
|
+
For instance, to build from source and install in `/opt/ruby`:
|
|
599
634
|
|
|
600
635
|
```shell
|
|
601
636
|
wget https://cache.ruby-lang.org/pub/ruby/x.y/ruby-x.y.z.tar.gz
|
|
@@ -620,7 +655,7 @@ make install
|
|
|
620
655
|
`ascli` can also run with the [JRuby](https://www.jruby.org/) interpreter.
|
|
621
656
|
All that is needed is a JVM (Java Virtual Machine) on your system (`java`).
|
|
622
657
|
The JRuby package comes pre-compiled and does not require compilation of native extensions.
|
|
623
|
-
Use a version of JRuby compatible with Ruby version supported by `ascli`.
|
|
658
|
+
Use a version of JRuby compatible with a Ruby version supported by `ascli`.
|
|
624
659
|
See [the Wikipedia page](https://en.wikipedia.org/wiki/JRuby) to match JRuby and Ruby versions.
|
|
625
660
|
Choose the latest version from:
|
|
626
661
|
|
|
@@ -651,7 +686,7 @@ JRUBY_OPTS=--dev ascli -v
|
|
|
651
686
|
#### Installing optional gems
|
|
652
687
|
|
|
653
688
|
Some additional gems are required for either development or specific runtime features.
|
|
654
|
-
For JRuby, some
|
|
689
|
+
For JRuby, some of them have a replacement gem, and others are not available.
|
|
655
690
|
Those are not installed as part of dependencies because they involve compilation of native code but concern less-used features.
|
|
656
691
|
|
|
657
692
|
See [Gemfile](../Gemfile):
|
|
@@ -752,7 +787,7 @@ gem install -P MediumSecurity aspera-cli
|
|
|
752
787
|
|
|
753
788
|
#### Installing a beta release of the gem
|
|
754
789
|
|
|
755
|
-
|
|
790
|
+
A beta version of the gem can be found here: <https://ibm.biz/aspera-cli-beta>
|
|
756
791
|
|
|
757
792
|
On Linux/macOS, install in a terminal:
|
|
758
793
|
|
|
@@ -761,7 +796,7 @@ curl -sLo aspera-cli-beta.gem https://ibm.biz/aspera-cli-beta
|
|
|
761
796
|
gem install aspera-cli-beta.gem
|
|
762
797
|
```
|
|
763
798
|
|
|
764
|
-
On Windows, download the
|
|
799
|
+
On Windows, download the file `aspera-cli-beta.gem` from the link, then install it with `gem install aspera-cli-beta.gem`.
|
|
765
800
|
|
|
766
801
|
### FASP Protocol: `ascp`
|
|
767
802
|
|
|
@@ -802,7 +837,7 @@ The installation of the transfer binaries follows those steps:
|
|
|
802
837
|
| `locations_url` | `https://ibm.biz/sdk_location` | URL to get download URLs of Aspera Transfer Daemon from IBM official repository. |
|
|
803
838
|
| `sdk_folder` | `$HOME/.aspera/sdk` | Folder where the SDK archive is extracted. |
|
|
804
839
|
|
|
805
|
-
|
|
840
|
+
Transfer Daemon versions available from `locations_url` can be listed with: `ascli config transferd list`
|
|
806
841
|
|
|
807
842
|
To install a specific version, for example, 1.1.3:
|
|
808
843
|
|
|
@@ -822,7 +857,7 @@ To download it, pipe to `config download`:
|
|
|
822
857
|
ascli config transferd list --select.platform=osx-arm64 --select.version=1.1.3 --fields=url | ascli config download @stdin:
|
|
823
858
|
```
|
|
824
859
|
|
|
825
|
-
|
|
860
|
+
To install from a local file (air-gapped installation) instead of fetching from the internet, specify the location of the SDK file with option `sdk_url`:
|
|
826
861
|
|
|
827
862
|
```shell
|
|
828
863
|
ascli config transferd install --sdk-url=file:///macos-arm64-1.1.3-c6c7a2a.zip
|
|
@@ -850,12 +885,12 @@ If the embedded method is not used, the following packages are also suitable:
|
|
|
850
885
|
For instance, Aspera Connect Client can be installed by visiting the page:
|
|
851
886
|
[https://www.ibm.com/aspera/connect/](https://www.ibm.com/aspera/connect/).
|
|
852
887
|
|
|
853
|
-
`ascli`
|
|
888
|
+
`ascli` detects most Aspera transfer products in standard locations and use the first one found by default.
|
|
854
889
|
See [FASP](#fasp-configuration) for details on how to select a client or set path to the FASP protocol.
|
|
855
890
|
|
|
856
891
|
Several methods are provided to start a transfer.
|
|
857
892
|
Use of a local client ([`direct`](#agent-direct) transfer agent) is one of them, but other methods are available.
|
|
858
|
-
See [Transfer Agents](#transfer-clients-agents)
|
|
893
|
+
See [Transfer Agents](#transfer-clients-agents).
|
|
859
894
|
|
|
860
895
|
### Installing in an air-gapped environment
|
|
861
896
|
|
|
@@ -898,11 +933,11 @@ Alternatively, the necessary gems can be packaged into a `tar.gz` archive as fol
|
|
|
898
933
|
|
|
899
934
|
```shell
|
|
900
935
|
mkdir temp_folder
|
|
901
|
-
gem install aspera-cli:4.27.
|
|
936
|
+
gem install aspera-cli:4.27.3 --no-document --install-dir temp_folder
|
|
902
937
|
find temp_folder
|
|
903
|
-
mv temp_folder/cache aspera-cli-4.27.
|
|
938
|
+
mv temp_folder/cache aspera-cli-4.27.3-gems
|
|
904
939
|
rm -fr temp_folder
|
|
905
|
-
tar zcvf aspera-cli-4.27.
|
|
940
|
+
tar zcvf aspera-cli-4.27.3-gems.tgz aspera-cli-4.27.3-gems
|
|
906
941
|
```
|
|
907
942
|
|
|
908
943
|
#### Unix-like: Alternative installation using `rvm`
|
|
@@ -938,6 +973,9 @@ The following procedure applies when using RVM for the Ruby installation:
|
|
|
938
973
|
|
|
939
974
|
#### Windows: Installing in an air-gapped environment
|
|
940
975
|
|
|
976
|
+
> [!TIP]
|
|
977
|
+
> The simplest method is to use the [portable package](#windows-portable-package), which requires no internet access on the target system.
|
|
978
|
+
|
|
941
979
|
The procedure is similar to the internet-connected Windows installation. Copy the required files from a system with internet access, then install them on the target system.
|
|
942
980
|
|
|
943
981
|
1. Download the Ruby installer from <https://rubyinstaller.org/downloads/>:
|
|
@@ -999,7 +1037,7 @@ podman run --rm --tty --interactive --entrypoint bash docker.io/martinlaurent/as
|
|
|
999
1037
|
Then, execute individual `ascli` commands such as:
|
|
1000
1038
|
|
|
1001
1039
|
```shell
|
|
1002
|
-
ascli config
|
|
1040
|
+
ascli config initdemo
|
|
1003
1041
|
ascli config preset overview
|
|
1004
1042
|
ascli config ascp info
|
|
1005
1043
|
ascli server ls /
|
|
@@ -1007,10 +1045,9 @@ ascli server ls /
|
|
|
1007
1045
|
|
|
1008
1046
|
That is simple, but there are limitations:
|
|
1009
1047
|
|
|
1010
|
-
- Everything happens in the container
|
|
1011
|
-
- Any generated
|
|
1012
|
-
|
|
1013
|
-
- No possibility to upload files located on the host system
|
|
1048
|
+
- Everything happens in the container.
|
|
1049
|
+
- Any file generated in the container, including configuration files and downloaded files, is lost when the container (shell) exits.
|
|
1050
|
+
- Files located on the host system cannot be uploaded.
|
|
1014
1051
|
|
|
1015
1052
|
#### Container: Details
|
|
1016
1053
|
|
|
@@ -1036,10 +1073,10 @@ ascli -v
|
|
|
1036
1073
|
```
|
|
1037
1074
|
|
|
1038
1075
|
```text
|
|
1039
|
-
4.27.
|
|
1076
|
+
4.27.3
|
|
1040
1077
|
```
|
|
1041
1078
|
|
|
1042
|
-
To
|
|
1079
|
+
To persist the configuration on the host, specify your user's configuration folder as a volume for the container.
|
|
1043
1080
|
To enable write access, a possibility is to run as `root` in the container (and set the default configuration folder to `/home/cliuser/.aspera/ascli`).
|
|
1044
1081
|
Add options:
|
|
1045
1082
|
|
|
@@ -1061,9 +1098,9 @@ As shown in the quick start, if you prefer to keep a running container with a sh
|
|
|
1061
1098
|
> [!WARNING]
|
|
1062
1099
|
> `ascli` is run inside the container, so transfers are also executed inside the container and do not have access to host storage by default.
|
|
1063
1100
|
|
|
1064
|
-
You may also
|
|
1065
|
-
For example, files transferred with `ascli` through folder `/xferfiles` (right
|
|
1066
|
-
In this case you also need to specify the shared transfer folder as a volume:
|
|
1101
|
+
You may also want files downloaded in the container to be available on the host.
|
|
1102
|
+
For example, files transferred with `ascli` through folder `/xferfiles` (right-hand side) would be available on the host in `$HOME/xferdir`.
|
|
1103
|
+
In this case, you also need to specify the shared transfer folder as a volume:
|
|
1067
1104
|
|
|
1068
1105
|
```shell
|
|
1069
1106
|
--volume $HOME/xferdir:/xferfiles
|
|
@@ -1085,12 +1122,7 @@ asclish
|
|
|
1085
1122
|
|
|
1086
1123
|
#### Container: Sample start script
|
|
1087
1124
|
|
|
1088
|
-
A convenience sample script is also provided: download the script [`dascli`](../container/dascli) from [the
|
|
1089
|
-
|
|
1090
|
-
> [!NOTE]
|
|
1091
|
-
> If you have installed `ascli`, the script `dascli` can also be found like this:
|
|
1092
|
-
>
|
|
1093
|
-
> `cp $(ascli config gem path)/../container/dascli ascli`
|
|
1125
|
+
A convenience sample script is also provided: download the script [`dascli`](../build/container/dascli) from [the GitHub repository](https://raw.githubusercontent.com/IBM/aspera-cli/main/build/container/dascli).
|
|
1094
1126
|
|
|
1095
1127
|
Some environment variables can be set for this script to adapt its behavior:
|
|
1096
1128
|
|
|
@@ -1101,34 +1133,33 @@ Some environment variables can be set for this script to adapt its behavior:
|
|
|
1101
1133
|
| `image` | Container image name | `docker.io/martinlaurent/ascli` | n/a |
|
|
1102
1134
|
| `version` | Container image version | Latest | `4.8.0.pre` |
|
|
1103
1135
|
|
|
1104
|
-
The wrapping script maps the folder `$ASCLI_HOME` on host to `/home/cliuser/.aspera/ascli` in the container.
|
|
1105
|
-
|
|
1106
|
-
This allows having persistent configuration on the host.
|
|
1136
|
+
The wrapping script maps the folder `$ASCLI_HOME` on the host to `/home/cliuser/.aspera/ascli` in the container (the configuration folder expected in the container).
|
|
1137
|
+
This keeps the configuration persistent on the host.
|
|
1107
1138
|
|
|
1108
1139
|
To add local storage as a volume, you can use the env var `docker_args`:
|
|
1109
1140
|
|
|
1110
1141
|
Example of use:
|
|
1111
1142
|
|
|
1112
1143
|
```shell
|
|
1113
|
-
curl -o ascli https://raw.githubusercontent.com/IBM/aspera-cli/main/container/dascli
|
|
1144
|
+
curl -o ascli https://raw.githubusercontent.com/IBM/aspera-cli/main/build/container/dascli
|
|
1114
1145
|
chmod a+x ascli
|
|
1115
1146
|
export xferdir=$HOME/xferdir
|
|
1116
1147
|
mkdir -p $xferdir
|
|
1117
1148
|
chmod -R 777 $xferdir
|
|
1118
1149
|
export docker_args="--volume $xferdir:/xferfiles"
|
|
1119
1150
|
|
|
1120
|
-
./ascli config
|
|
1151
|
+
./ascli config initdemo
|
|
1121
1152
|
|
|
1122
1153
|
echo 'Local file to transfer' > $xferdir/samplefile.txt
|
|
1123
1154
|
./ascli server upload /xferfiles/samplefile.txt --to-folder=/Upload
|
|
1124
1155
|
```
|
|
1125
1156
|
|
|
1126
1157
|
> [!NOTE]
|
|
1127
|
-
> The local file
|
|
1158
|
+
> The local file path is the one seen from the container (`/xferfiles/samplefile.txt`), where `/xferfiles` is mapped to the host folder `$HOME/xferdir`.
|
|
1128
1159
|
|
|
1129
1160
|
> [!WARNING]
|
|
1130
1161
|
> Do not use too many volumes, as the legacy `aufs` driver limits their number.
|
|
1131
|
-
>
|
|
1162
|
+
> Prefer the `overlay2` driver.
|
|
1132
1163
|
|
|
1133
1164
|
#### Container: Installing in an air-gapped environment
|
|
1134
1165
|
|
|
@@ -1139,7 +1170,7 @@ podman pull docker.io/martinlaurent/ascli
|
|
|
1139
1170
|
podman save docker.io/martinlaurent/ascli|gzip>ascli_image_latest.tar.gz
|
|
1140
1171
|
```
|
|
1141
1172
|
|
|
1142
|
-
- Then, on air-gapped system:
|
|
1173
|
+
- Then, on the air-gapped system:
|
|
1143
1174
|
|
|
1144
1175
|
```shell
|
|
1145
1176
|
podman load -i ascli_image_latest.tar.gz
|
|
@@ -1148,8 +1179,8 @@ podman load -i ascli_image_latest.tar.gz
|
|
|
1148
1179
|
#### Container: `aspera.conf`
|
|
1149
1180
|
|
|
1150
1181
|
`ascp`'s configuration file `aspera.conf` is located in the container at: `/ibm_aspera/aspera.conf` (see Dockerfile).
|
|
1151
|
-
As the container is immutable,
|
|
1152
|
-
|
|
1182
|
+
As the container is immutable, modifying this file is not recommended.
|
|
1183
|
+
To change the configuration, tell `ascp` to use another file using `ascp` option `-f`, for example, by locating it on the host folder `$HOME/.aspera/ascli` mapped to the container folder `/home/cliuser/.aspera/ascli`:
|
|
1153
1184
|
|
|
1154
1185
|
```shell
|
|
1155
1186
|
echo '<CONF/>' > $HOME/.aspera/ascli/aspera.conf
|
|
@@ -1163,7 +1194,7 @@ Then, tell `ascp` to use that other configuration file:
|
|
|
1163
1194
|
|
|
1164
1195
|
#### Container: Singularity
|
|
1165
1196
|
|
|
1166
|
-
Singularity is another
|
|
1197
|
+
Singularity is another container runtime.
|
|
1167
1198
|
|
|
1168
1199
|
On Linux install:
|
|
1169
1200
|
|
|
@@ -1199,7 +1230,7 @@ To display the version of **OpenSSL** used in `ascli`:
|
|
|
1199
1230
|
ascli config echo @ruby:OpenSSL::OPENSSL_VERSION --format=text
|
|
1200
1231
|
```
|
|
1201
1232
|
|
|
1202
|
-
|
|
1233
|
+
To use another SSL library or version, execute:
|
|
1203
1234
|
|
|
1204
1235
|
```shell
|
|
1205
1236
|
gem install openssl -- --with-openssl-dir=[openssl library folder]
|
|
@@ -1228,26 +1259,19 @@ gem install openssl -- --with-openssl-dir=$(openssl version -e|sed -n 's|ENGINES
|
|
|
1228
1259
|
SSL certificates are validated using a certificate store.
|
|
1229
1260
|
By default, it is the one of the system's `openssl` library.
|
|
1230
1261
|
|
|
1231
|
-
To display trusted certificate store locations:
|
|
1262
|
+
To display the default trusted certificate store locations:
|
|
1232
1263
|
|
|
1233
1264
|
```shell
|
|
1234
|
-
ascli
|
|
1265
|
+
ascli config echo '@ruby:[OpenSSL::X509::DEFAULT_CERT_DIR,OpenSSL::X509::DEFAULT_CERT_FILE]'
|
|
1235
1266
|
```
|
|
1236
1267
|
|
|
1237
1268
|
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).
|
|
1238
1269
|
Ruby's default values can be overridden using env vars: `SSL_CERT_FILE` and `SSL_CERT_DIR`.
|
|
1239
1270
|
|
|
1240
|
-
One can display those default values:
|
|
1241
|
-
|
|
1242
|
-
```shell
|
|
1243
|
-
ascli config echo @ruby:OpenSSL::X509::DEFAULT_CERT_DIR --format=text
|
|
1244
|
-
ascli config echo @ruby:OpenSSL::X509::DEFAULT_CERT_FILE --format=text
|
|
1245
|
-
```
|
|
1246
|
-
|
|
1247
1271
|
To get certificate validation, the CA certificate bundle must be up-to-date.
|
|
1248
1272
|
Check this repository on how to update the system's CA certificate bundle: [https://github.com/millermatt/osca](https://github.com/millermatt/osca).
|
|
1249
1273
|
|
|
1250
|
-
For example on RHEL/Rocky Linux:
|
|
1274
|
+
For example, on RHEL/Rocky Linux:
|
|
1251
1275
|
|
|
1252
1276
|
```shell
|
|
1253
1277
|
dnf install -y ca-certificates
|
|
@@ -1255,7 +1279,7 @@ update-ca-trust extract
|
|
|
1255
1279
|
```
|
|
1256
1280
|
|
|
1257
1281
|
The SSL CA certificate bundle can be specified using the `cert_stores` option, which accepts a list of files or directories.
|
|
1258
|
-
By default, Ruby
|
|
1282
|
+
By default, Ruby's system certificate store is used.
|
|
1259
1283
|
|
|
1260
1284
|
When `cert_stores` is provided:
|
|
1261
1285
|
|
|
@@ -1267,7 +1291,7 @@ When `cert_stores` is provided:
|
|
|
1267
1291
|
> [!NOTE]
|
|
1268
1292
|
> JRuby uses its own implementation and CA bundles.
|
|
1269
1293
|
|
|
1270
|
-
For example, on Linux to force the use the system's certificate store:
|
|
1294
|
+
For example, on Linux, to force the use of the system's certificate store:
|
|
1271
1295
|
|
|
1272
1296
|
```shell
|
|
1273
1297
|
--cert-stores=$(openssl version -d|cut -f2 -d'"')/cert.pem
|
|
@@ -1275,7 +1299,7 @@ For example, on Linux to force the use the system's certificate store:
|
|
|
1275
1299
|
|
|
1276
1300
|
`ascp` also needs to validate certificates when using **WSS** for transfer TCP part (instead of **SSH**).
|
|
1277
1301
|
|
|
1278
|
-
By default
|
|
1302
|
+
By default, `ascp` uses a hard-coded root location `OPENSSLDIR`.
|
|
1279
1303
|
Original `ascp`'s hard-coded locations can be found using:
|
|
1280
1304
|
|
|
1281
1305
|
```shell
|
|
@@ -1284,22 +1308,20 @@ ascli config ascp info --fields=openssldir
|
|
|
1284
1308
|
|
|
1285
1309
|
For example, on macOS: `/Library/Aspera/ssl`.
|
|
1286
1310
|
Then trusted certificates are taken from `[OPENSSLDIR]/cert.pem` and files in `[OPENSSLDIR]/certs`.
|
|
1287
|
-
`ascli` overrides the default hard
|
|
1311
|
+
`ascli` overrides the default hard-coded location used by `ascp` for WSS and uses the same locations as specified in `cert_stores` (using the `-i` option of `ascp`).
|
|
1288
1312
|
|
|
1289
|
-
To update trusted root certificates for `ascli
|
|
1290
|
-
Display the trusted certificate store locations used by `ascli`.
|
|
1291
|
-
Typically done by updating the system's root certificate store.
|
|
1313
|
+
To update trusted root certificates for `ascli`, update the system's root certificate store (see the locations displayed above).
|
|
1292
1314
|
|
|
1293
1315
|
An up-to-date version of the certificate bundle can also be retrieved with:
|
|
1294
1316
|
|
|
1295
1317
|
```shell
|
|
1296
|
-
ascli config echo @uri:https://curl.
|
|
1318
|
+
ascli config echo @uri:https://curl.se/ca/cacert.pem --format=text
|
|
1297
1319
|
```
|
|
1298
1320
|
|
|
1299
1321
|
To download that certificate store:
|
|
1300
1322
|
|
|
1301
1323
|
```shell
|
|
1302
|
-
ascli config echo @uri:https://curl.
|
|
1324
|
+
ascli config echo @uri:https://curl.se/ca/cacert.pem --format=text --out.file=/tmp/cacert.pem
|
|
1303
1325
|
```
|
|
1304
1326
|
|
|
1305
1327
|
Then, use this store by setting the option `cert_stores` (or env var `SSL_CERT_FILE`).
|
|
@@ -1356,7 +1378,7 @@ ascli -h
|
|
|
1356
1378
|
See [Usage](#usage).
|
|
1357
1379
|
|
|
1358
1380
|
> [!NOTE]
|
|
1359
|
-
> `ascli`
|
|
1381
|
+
> Not all features of `ascli` are documented here: explore commands on the command line, using `-h`.
|
|
1360
1382
|
|
|
1361
1383
|
### Command Line Arguments
|
|
1362
1384
|
|
|
@@ -1364,7 +1386,7 @@ Command line arguments are the units of command line typically separated by spac
|
|
|
1364
1386
|
|
|
1365
1387
|
`ascli` handles the following types of command line arguments:
|
|
1366
1388
|
|
|
1367
|
-
- [**Options**](#options): absolute position is not important, but order is
|
|
1389
|
+
- [**Options**](#options): absolute position is not important, but relative order is, as a given option may be provided several times
|
|
1368
1390
|
- [**Plugins**](#plugins) for example, `config`, on first position
|
|
1369
1391
|
- [**Resource Types**](#resource-types) for example, `users`
|
|
1370
1392
|
- [**Verbs**](#verbs) for example, `create`, to act on those resources or plugins.
|
|
@@ -1375,6 +1397,7 @@ Command line arguments that are not options are referred to as **Positional Argu
|
|
|
1375
1397
|
|
|
1376
1398
|
For example:
|
|
1377
1399
|
|
|
1400
|
+
|
|
1378
1401
|
```shell
|
|
1379
1402
|
ascli plugin command verb --option-name=VAL1 VAL2
|
|
1380
1403
|
```
|
|
@@ -1431,9 +1454,9 @@ A resource type can also be a grouping of other resource types, for example `adm
|
|
|
1431
1454
|
Standard resource **Verbs** are: `create`, `show`, `list`, `modify`, `delete`.
|
|
1432
1455
|
Some entities also support additional verbs.
|
|
1433
1456
|
When such additional commands relate to a resource also accessible in another context, they are placed under the `do` command.
|
|
1434
|
-
|
|
1457
|
+
Such subcommands appear after the resource identifier, for example, in `ascli aoc admin node do <NODE_ID> browse /`, `browse` is a subcommand of `node`.
|
|
1435
1458
|
|
|
1436
|
-
Typically, the `create` verb takes
|
|
1459
|
+
Typically, the `create` verb takes resource creation data as a parameter.
|
|
1437
1460
|
`show`, `modify` and `delete` take an identifier, unless manipulating a singleton.
|
|
1438
1461
|
`list` typically uses the `query`, `select` options.
|
|
1439
1462
|
`list` and `show` typically use the `fields` option.
|
|
@@ -1442,7 +1465,7 @@ Typically, the `create` verb takes a resource creation data as a parameter.
|
|
|
1442
1465
|
|
|
1443
1466
|
Identifiers uniquely identify a resource.
|
|
1444
1467
|
They are typically located immediately after a verb like `show`, `modify` or `delete`, itself placed after the resource type, for example: `user show foobar`.
|
|
1445
|
-
Some resources
|
|
1468
|
+
Some resources can also be selected by a unique field other than the native identifier (typically: `id`), using the [**percent selector**](#percent-selector).
|
|
1446
1469
|
|
|
1447
1470
|
##### Percent selector
|
|
1448
1471
|
|
|
@@ -1474,7 +1497,7 @@ ascli aoc admin user show %name:john
|
|
|
1474
1497
|
|
|
1475
1498
|
If a **Command Parameter** begins with `-`, then either use the `@val:` syntax (see [Extended Value](#extended-value-syntax)), or use the `--` separator (see below).
|
|
1476
1499
|
|
|
1477
|
-
A few **Command Parameters** are optional
|
|
1500
|
+
A few **Command Parameters** are optional: they are always located at the end of the command line.
|
|
1478
1501
|
|
|
1479
1502
|
#### Enumerations
|
|
1480
1503
|
|
|
@@ -1490,9 +1513,10 @@ The following are enumerations:
|
|
|
1490
1513
|
|
|
1491
1514
|
Examples:
|
|
1492
1515
|
|
|
1493
|
-
|
|
1494
|
-
-
|
|
1495
|
-
- Option
|
|
1516
|
+
|
|
1517
|
+
- Positional: `ascli config pre ov --for=c` is the same as `ascli config preset overview --format=csv`
|
|
1518
|
+
- Option name: `--log-l=debug` is the same as `--log-level=debug`
|
|
1519
|
+
- Option value: `--format=c` is the same as `--format=csv`
|
|
1496
1520
|
|
|
1497
1521
|
> [!NOTE]
|
|
1498
1522
|
> While prefix matching works for option names, using full names is recommended for clarity.
|
|
@@ -1518,15 +1542,18 @@ A [dot-path](#dot-path-notation) is a `String` where segments are separated by `
|
|
|
1518
1542
|
- A **string segment** designates a key in a `Hash` (associative array).
|
|
1519
1543
|
- An **integer segment** designates an index in an `Array`.
|
|
1520
1544
|
|
|
1521
|
-
For example, the path `a.b.0` means: key `a
|
|
1545
|
+
For example, the path `a.b.0` means: key `a`, then key `b`, then the first element of an array.
|
|
1522
1546
|
|
|
1523
1547
|
When a **value** is assigned to the path (**write** with `=`), it is automatically converted to the simplest matching type: `Boolean`, `Integer`, `Float`, or `String`.
|
|
1548
|
+
Values `true` and `yes` are converted to `Boolean` `true`, and values `false` and `no` to `false`.
|
|
1549
|
+
For an option expecting a list of values that includes `yes` or `no` (e.g. `--out.table.pivot=no`), the `Boolean` is converted back to that value.
|
|
1524
1550
|
|
|
1525
1551
|
> [!NOTE]
|
|
1526
1552
|
> A value of `1` will be automatically converted to an `Integer`.
|
|
1527
1553
|
> When a specific type is required for the value, the [Extended Value](#extended-value-syntax) syntax modifiers `@json:` or `@ruby:` can be used.
|
|
1528
1554
|
> For example: `--opt.x=1` generates `{"x": 1}`.
|
|
1529
1555
|
> To get a `String`: `--opt.x=@json:\"1\"` or `--opt.x=@ruby:%q{1}`.
|
|
1556
|
+
> Likewise, to get the `String` `yes`: `--opt.x=@json:\"yes\"`.
|
|
1530
1557
|
|
|
1531
1558
|
Example: [dot-path](#dot-path-notation) to JSON output
|
|
1532
1559
|
|
|
@@ -1596,7 +1623,7 @@ ascli aoc packages send @: name="<TITLE>" recipients.0=user@example.com END file
|
|
|
1596
1623
|
> [!NOTE]
|
|
1597
1624
|
> `@:` can also be used as an option value (for example, `--query=@: a=b`).
|
|
1598
1625
|
> In that case, only positional arguments **after the option's position** in the original command line are consumed, so sub-commands before the option are not affected.
|
|
1599
|
-
> Use `END` as usual to stop collection when further positional arguments must follow: `ascli aoc
|
|
1626
|
+
> Use `END` as usual to stop collection when further positional arguments must follow: `ascli aoc tier_restrictions --query=@: a=b END other_arg`.
|
|
1600
1627
|
|
|
1601
1628
|
#### Options
|
|
1602
1629
|
|
|
@@ -1606,7 +1633,7 @@ Command-line options, such as `--log-level=debug`, follow these conventions:
|
|
|
1606
1633
|
All options begin with `--`.
|
|
1607
1634
|
- **Naming**:
|
|
1608
1635
|
Option names on command line use lowercase letters and hyphens (`-`) as word separators.
|
|
1609
|
-
Option
|
|
1636
|
+
Option names in the configuration file use underscores (`_`) as word separators.
|
|
1610
1637
|
Example: `--log-level=debug` is `log_level` in config file.
|
|
1611
1638
|
- **Values**:
|
|
1612
1639
|
An option's value is assigned using `=` (for example, `--log-level=debug`).
|
|
@@ -1647,8 +1674,8 @@ Example:
|
|
|
1647
1674
|
ascli config echo -- --sample
|
|
1648
1675
|
```
|
|
1649
1676
|
|
|
1650
|
-
```
|
|
1651
|
-
|
|
1677
|
+
```text
|
|
1678
|
+
--sample
|
|
1652
1679
|
```
|
|
1653
1680
|
|
|
1654
1681
|
> [!NOTE]
|
|
@@ -1668,7 +1695,7 @@ The value for **any** options can come from the following locations (in this ord
|
|
|
1668
1695
|
- Environment variable
|
|
1669
1696
|
- Command line
|
|
1670
1697
|
|
|
1671
|
-
Environment
|
|
1698
|
+
Environment variables starting with prefix ASCLI_ are taken as option values, for example, `ASCLI_OPTION_NAME` is for `--option-name`.
|
|
1672
1699
|
|
|
1673
1700
|
Option `show_config` dry runs the configuration, and then returns currently set values for options.
|
|
1674
1701
|
|
|
@@ -1682,7 +1709,7 @@ A command line argument is typically designed as option if:
|
|
|
1682
1709
|
|
|
1683
1710
|
### Interactive Input
|
|
1684
1711
|
|
|
1685
|
-
Some options and **Command Parameters** are mandatory and
|
|
1712
|
+
Some options and **Command Parameters** are mandatory and others are optional.
|
|
1686
1713
|
By default, `ascli` prompts for missing mandatory options or **Command Parameters** during interactive execution.
|
|
1687
1714
|
|
|
1688
1715
|
The behavior can be controlled with:
|
|
@@ -1698,7 +1725,7 @@ The behavior can be controlled with:
|
|
|
1698
1725
|
Command execution will result in output (terminal, stdout/stderr).
|
|
1699
1726
|
The information displayed depends on the action.
|
|
1700
1727
|
|
|
1701
|
-
To redirect results to a file, use option
|
|
1728
|
+
To redirect results to a file, use option `--out.file`.
|
|
1702
1729
|
|
|
1703
1730
|
#### Types of output data
|
|
1704
1731
|
|
|
@@ -1706,8 +1733,8 @@ Depending on action, the output will contain:
|
|
|
1706
1733
|
|
|
1707
1734
|
| Result Type | Description |
|
|
1708
1735
|
|-----------------|-----------------------------------------------------------------------------------|
|
|
1709
|
-
| `single_object` | Displayed as a
|
|
1710
|
-
| `object_list` | Displayed as a
|
|
1736
|
+
| `single_object` | Displayed as a two-dimensional table: one line per field, first column is field name, and second is field value. Nested hashes are collapsed. |
|
|
1737
|
+
| `object_list` | Displayed as a two-dimensional table: one line per item, one column per field. |
|
|
1711
1738
|
| `value_list` | A table with one column. |
|
|
1712
1739
|
| `empty` | nothing |
|
|
1713
1740
|
| `status` | A message. |
|
|
@@ -1757,7 +1784,7 @@ The style of output can be set using the `format` option:
|
|
|
1757
1784
|
| `image` | URL or data for a [picture/video](#image-and-video-thumbnails) |
|
|
1758
1785
|
| `nagios` | Suitable for Nagios |
|
|
1759
1786
|
|
|
1760
|
-
By default,
|
|
1787
|
+
By default, results of type `single_object` and `object_list` are displayed using format `table`.
|
|
1761
1788
|
|
|
1762
1789
|
#### Option: `--out.table`
|
|
1763
1790
|
|
|
@@ -1768,16 +1795,16 @@ For `format=table`, options are the ones described in gem [`terminal-table`](htt
|
|
|
1768
1795
|
For example, to display a table with thick Unicode borders:
|
|
1769
1796
|
|
|
1770
1797
|
```shell
|
|
1771
|
-
ascli config preset
|
|
1798
|
+
ascli config preset overview --out.table=@ruby:'{border: :unicode_thick_edge}'
|
|
1772
1799
|
```
|
|
1773
1800
|
|
|
1774
1801
|
> [!NOTE]
|
|
1775
1802
|
> Other border styles exist, not limited to: `:unicode`, `:unicode_round`.
|
|
1776
1803
|
|
|
1777
|
-
By default, if the terminal
|
|
1804
|
+
By default, if the terminal supports Unicode (see [`--out.utf8`](#terminal-rendering-colors-and-utf-8)), then `border=unicode_round` is used.
|
|
1778
1805
|
|
|
1779
1806
|
A special parameter is defined: `str_lst_sep` (`String`), default is `\n`.
|
|
1780
|
-
It defines how
|
|
1807
|
+
It defines how lists of strings are displayed.
|
|
1781
1808
|
Alternatively, set to `,`.
|
|
1782
1809
|
|
|
1783
1810
|
For `format=csv`, options are described in gem [`csv`](https://ruby.github.io/csv/CSV.html#class-CSV-label-Options+for+Generating).
|
|
@@ -1802,7 +1829,7 @@ If value is `yes` (default), then objects are "flattened" using [dot-path](#dot-
|
|
|
1802
1829
|
- `Array` of `Hash` with only `name` keys are displayed as comma separated list of values
|
|
1803
1830
|
- `Array` of `Hash` with only `name` and `value` keys are displayed like a `Hash` with value of `name` as key.
|
|
1804
1831
|
|
|
1805
|
-
Example:
|
|
1832
|
+
Example: The result of the command is a single object:
|
|
1806
1833
|
|
|
1807
1834
|
```shell
|
|
1808
1835
|
ascli config echo @json:'{"A":"a","B":[{"name":"B1","value":"b1"},{"name":"B2","value":"b2"}],"C":[{"C1":"c1"},{"C2":"c2"}],"D":{"D1":"d1","D2":"d2"}}'
|
|
@@ -1838,7 +1865,8 @@ For the same command, adding option `--out.flat=no`:
|
|
|
1838
1865
|
#### Option: `--out.table.pivot`
|
|
1839
1866
|
|
|
1840
1867
|
This option controls how result fields are displayed as columns or lines, when option `format` is set to `table`.
|
|
1841
|
-
|
|
1868
|
+
Values are `false` (default), `true` or `single`.
|
|
1869
|
+
On command line, `no` and `yes` can be used as well (converted to `Boolean`, see [dot-path](#dot-path-notation)), but a structured value (e.g. `--out=@json:'{"table":{"pivot":true}}'`) expects a `Boolean`.
|
|
1842
1870
|
There are two types of results that are affected by this option:
|
|
1843
1871
|
|
|
1844
1872
|
| Result | Description |
|
|
@@ -1855,7 +1883,7 @@ An item (object) is displayed in one of those 2 ways:
|
|
|
1855
1883
|
|
|
1856
1884
|
The display of result is as follows:
|
|
1857
1885
|
|
|
1858
|
-
| Result | `
|
|
1886
|
+
| Result | `false` | `true` | `single` |
|
|
1859
1887
|
|-----------------|------------|-------------|-------------------------------------|
|
|
1860
1888
|
| `single_object` | Simple | Simple | Simple |
|
|
1861
1889
|
| `object_list` | Transposed | Simple<br/>(Multiple objects) | Simple if 1 object.<br/>transposed if 2+ objects. |
|
|
@@ -1938,7 +1966,7 @@ Display with `yes` (multiple Simple):
|
|
|
1938
1966
|
|
|
1939
1967
|
#### Option: `--out.level`: Verbosity of output
|
|
1940
1968
|
|
|
1941
|
-
Output messages are categorized
|
|
1969
|
+
Output messages are categorized into three types:
|
|
1942
1970
|
|
|
1943
1971
|
- `info` output contains additional information, such as the number of elements in a table
|
|
1944
1972
|
- `data` output contains the actual output of the command (object, or list of objects)
|
|
@@ -1947,15 +1975,33 @@ Output messages are categorized in 3 types:
|
|
|
1947
1975
|
The option `--out.level` controls the level of output:
|
|
1948
1976
|
|
|
1949
1977
|
- `info` displays all messages: `info`, `data`, and `error`
|
|
1950
|
-
- `data`
|
|
1951
|
-
- `error`
|
|
1978
|
+
- `data` displays `data` and `error` messages
|
|
1979
|
+
- `error` displays only error messages
|
|
1952
1980
|
|
|
1953
1981
|
#### Option: `--out.secrets`: Hide or show secrets in results
|
|
1954
1982
|
|
|
1955
1983
|
- If value is `no` (default), then secrets are redacted from command results.
|
|
1956
|
-
- If value is `yes`, then secrets shown in clear in results.
|
|
1984
|
+
- If value is `yes`, then secrets are shown in clear in results.
|
|
1957
1985
|
- If `--out.level` is `data`, secrets are included to allow piping results.
|
|
1958
1986
|
|
|
1987
|
+
#### Terminal rendering: Colors and UTF-8
|
|
1988
|
+
|
|
1989
|
+
By default, `ascli` detects the capabilities of the terminal:
|
|
1990
|
+
|
|
1991
|
+
| Option | Effect when `yes` | Auto-detection (default) |
|
|
1992
|
+
|----------------|---------------------------------------------------------------|--------------------------------------------------------------------------------|
|
|
1993
|
+
| `--out.colors` | ANSI colors and styles in results, messages and logs | `yes` if both `stdout` and `stderr` are terminals and `TERM` is not `dumb`, or if `CLICOLOR_FORCE=1` |
|
|
1994
|
+
| `--out.utf8` | Unicode characters: table borders, check marks | `yes` if `stdout` is a terminal and the locale is UTF-8 |
|
|
1995
|
+
|
|
1996
|
+
Set either option to `yes` or `no` to override detection, for example to keep colors when piping to `less -R`, or to get plain ASCII output in a terminal:
|
|
1997
|
+
|
|
1998
|
+
```shell
|
|
1999
|
+
ascli config preset overview --out.colors=no --out.utf8=no
|
|
2000
|
+
```
|
|
2001
|
+
|
|
2002
|
+
> [!NOTE]
|
|
2003
|
+
> Logs issued before the option is processed (e.g. at startup) use the detected value.
|
|
2004
|
+
|
|
1959
2005
|
#### Option: `fields`: Selection of output object fields
|
|
1960
2006
|
|
|
1961
2007
|
Depending on the command, results may include by default all fields, or only some selected fields.
|
|
@@ -2050,13 +2096,13 @@ The following decoders are supported:
|
|
|
2050
2096
|
|----------|----------|----------|------------------------------------------------------------------------------------------|
|
|
2051
2097
|
| `base64` | `String` | `String` | Decode a base64 encoded string. |
|
|
2052
2098
|
| `csvt` | `String` | `Array` | Decode a titled CSV value. |
|
|
2053
|
-
| `env` | `String` | `String` | Read from
|
|
2054
|
-
| `file` | `String` | `String` | Read value from specified file (prefix `~/` is replaced with the user's home folder).
|
|
2099
|
+
| `env` | `String` | `String` | Read from the named environment variable. For example, `--password=@env:MYPASSVAR` |
|
|
2100
|
+
| `file` | `String` | `String` | Read value from specified file (prefix `~/` is replaced with the user's home folder). For example, `--key=@file:~/.ssh/mykey` |
|
|
2055
2101
|
| `json` | `String` | Any | Decode JSON values. Convenient to provide complex structures. |
|
|
2056
2102
|
| `lines` | `String` | `Array` | Split a string in multiple lines and return an `Array`. |
|
|
2057
2103
|
| `list` | `String` | `Array` | Split a string in multiple items taking first character as separator and return an `Array`. |
|
|
2058
2104
|
| `none` | None | Nil | A `null` value. |
|
|
2059
|
-
| `path` | `String` | `String` | Performs path expansion on specified path (prefix `~/` is replaced with the user's home folder).
|
|
2105
|
+
| `path` | `String` | `String` | Performs path expansion on specified path (prefix `~/` is replaced with the user's home folder). For example, `--config-file=@path:~/sample_config.yml` |
|
|
2060
2106
|
| `preset` | `String` | `Hash` | Get value from configuration file using [dot-path](#dot-path-notation) notation. |
|
|
2061
2107
|
| `extend` | `String` | `String` | Evaluates embedded [Extended Value](#extended-value-syntax) syntax in string. |
|
|
2062
2108
|
| `re` | `String` | `Regexp` | Ruby Regular Expression (short for `@ruby:/.../`) |
|
|
@@ -2064,8 +2110,8 @@ The following decoders are supported:
|
|
|
2064
2110
|
| `s` | Any | `String` | Converts argument to `String`. |
|
|
2065
2111
|
| `secret` | `String` | `String` | Ask password interactively (hides input). Argument is the prompt. |
|
|
2066
2112
|
| `stdin` | `String` | `String` | Read from stdin in text mode. Argument: `<empty>`, `bin` or `chomp`. |
|
|
2067
|
-
| `uri` | `String` | `String` | Read value from specified URL. Supported schemes: `http:`, `https:`, `data:`, `file:`.
|
|
2068
|
-
| `val` | `String` | `String` | Prevent decoders on the right
|
|
2113
|
+
| `uri` | `String` | `String` | Read value from specified URL. Supported schemes: `http:`, `https:`, `data:`, `file:`. For example, `--fpac=@uri:http://serv/f.pac` or `--key=@uri:file:/path/to/key.pem` |
|
|
2114
|
+
| `val` | `String` | `String` | Prevent decoding by the decoders on the right. For example, `--key=@val:@file:foo` sets the option `key` to value `@file:foo`. |
|
|
2069
2115
|
| `yaml` | `String` | Any | Decode YAML. |
|
|
2070
2116
|
| `zlib` | `String` | `String` | Decompress data using zlib. |
|
|
2071
2117
|
| `<empty>`| None | Any | The **dot-path** modifier: argument `@:` collects the following positional arguments as `key.subkey=value` assignments and builds a `Hash` or `Array` using [dot-path](#dot-path-notation) notation. Shell-friendly alternative to `@json:` for structured values.<br/>See [Positional Arguments with Dot-path](#positional-arguments-with-dot-path) for full syntax. Use `END` to stop collection when further positional arguments must follow. |
|
|
@@ -2184,7 +2230,7 @@ Example: read a CSV file and create an `Array` of `Hash` for bulk provisioning:
|
|
|
2184
2230
|
cat test.csv
|
|
2185
2231
|
```
|
|
2186
2232
|
|
|
2187
|
-
```
|
|
2233
|
+
```text
|
|
2188
2234
|
name,email
|
|
2189
2235
|
lolo,laurent@example.com
|
|
2190
2236
|
toto,titi@tutu.tata
|
|
@@ -2248,8 +2294,8 @@ ascli aoc packages send
|
|
|
2248
2294
|
```
|
|
2249
2295
|
|
|
2250
2296
|
```text
|
|
2251
|
-
ERRR Missing argument:
|
|
2252
|
-
HINT
|
|
2297
|
+
ERRR Missing: Missing argument: package (Hash)
|
|
2298
|
+
HINT:Give `help` as argument to retrieve the schema of the missing argument.
|
|
2253
2299
|
```
|
|
2254
2300
|
|
|
2255
2301
|
Following the hint and passing `help` as the argument displays the schema:
|
|
@@ -2259,22 +2305,22 @@ ascli aoc packages send help
|
|
|
2259
2305
|
```
|
|
2260
2306
|
|
|
2261
2307
|
```text
|
|
2262
|
-
INFO Schema: argument:
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2308
|
+
INFO Schema: argument: package (Hash)
|
|
2309
|
+
╭───────────────────────┬────────┬──────────┬────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
2310
|
+
│ name │ type │ required │ description │
|
|
2311
|
+
╞═══════════════════════╪════════╪══════════╪════════════════════════════════════════════════════════════════════════════════════════════╡
|
|
2312
|
+
│ bcc_recipients │ array │ false │ <empty string> │
|
|
2313
|
+
│ bcc_recipients[].id │ string │ true │ The ID of the recipient. │
|
|
2314
|
+
│ bcc_recipients[].type │ enum │ false │ The entity type of the recipient. │
|
|
2315
|
+
│ │ │ │ Allowed: user, group │
|
|
2316
|
+
│ name │ string │ true │ Package name. Required for POST. Optional for PUT. │
|
|
2317
|
+
│ note │ string │ false │ The sender's message to recipients to include with the package. Maximum characters: 65535. │
|
|
2318
|
+
│ recipients │ array │ false │ <empty string> │
|
|
2319
|
+
│ recipients[].id │ string │ true │ The ID of the recipient. │
|
|
2320
|
+
│ recipients[].type │ enum │ false │ The entity type of the recipient. │
|
|
2321
|
+
│ │ │ │ Allowed: user, group │
|
|
2276
2322
|
...
|
|
2277
|
-
|
|
2323
|
+
╰───────────────────────┴────────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
2278
2324
|
```
|
|
2279
2325
|
|
|
2280
2326
|
The same applies to options: display the schema of the transfer-spec option `ts`:
|
|
@@ -2285,23 +2331,36 @@ ascli --ts=help
|
|
|
2285
2331
|
|
|
2286
2332
|
```text
|
|
2287
2333
|
INFO Schema: option: ts
|
|
2288
|
-
|
|
2289
|
-
│ name
|
|
2290
|
-
|
|
2291
|
-
│ apply_local_docroot
|
|
2292
|
-
│
|
|
2293
|
-
│
|
|
2294
|
-
│
|
|
2295
|
-
│ cipher │ string │ In transit encryption algorithms. │
|
|
2296
|
-
│ │ │ Allowed values: none, aes-128, aes-192, aes-256, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-gcm, aes-192-gcm, │
|
|
2297
|
-
│ │ │ aes-256-gcm. │
|
|
2298
|
-
│ │ │ Default: none. │
|
|
2334
|
+
╭─────────────────────┬─────────┬──────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
2335
|
+
│ name │ type │ required │ description │
|
|
2336
|
+
╞═════════════════════╪═════════╪══════════╪════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
|
|
2337
|
+
│ apply_local_docroot │ boolean │ false │ Apply local docroot to source paths. │
|
|
2338
|
+
│ cipher │ enum │ false │ In transit encryption algorithms. │
|
|
2339
|
+
│ │ │ │ Allowed: none, aes-128, aes-192, aes-256, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-gcm, aes-192-gcm, aes-256-gcm │
|
|
2340
|
+
│ authentication │ string │ false │ Set to `token` for SSH bypass keys, else password asked if not provided. │
|
|
2299
2341
|
...
|
|
2300
|
-
|
|
2342
|
+
╰─────────────────────┴─────────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
2301
2343
|
```
|
|
2302
2344
|
|
|
2303
2345
|
This works for any `Hash` option or positional parameter that has a defined schema.
|
|
2304
2346
|
|
|
2347
|
+
#### Schema Validation
|
|
2348
|
+
|
|
2349
|
+
The value of an option or **Command Parameter** with a schema defined by `ascli` (e.g. options `ts`, `transfer`, `out`, `http_options`, argument of `orchestrator workflows start`) is validated against it before the action.
|
|
2350
|
+
An invalid value is rejected with the path of the invalid element and the reason:
|
|
2351
|
+
|
|
2352
|
+
```shell
|
|
2353
|
+
ascli config echo 1 --ts=@json:'{"direction":"sideways"}'
|
|
2354
|
+
```
|
|
2355
|
+
|
|
2356
|
+
```text
|
|
2357
|
+
ERRR Argument: Option ts: value at `/direction` is not one of: ["send", "receive"] (use --ts=help for schema)
|
|
2358
|
+
Use option -h to get help.
|
|
2359
|
+
```
|
|
2360
|
+
|
|
2361
|
+
Option values are merged from several sources (presets, command line), so mandatory fields are not checked for options.
|
|
2362
|
+
Request bodies of product APIs (e.g. `create` and `modify` commands) are not validated by `ascli`: the API validates them.
|
|
2363
|
+
|
|
2305
2364
|
#### Testing Extended Value
|
|
2306
2365
|
|
|
2307
2366
|
Two complementary commands help verify that a value is parsed as expected:
|
|
@@ -2334,9 +2393,9 @@ Example: the shell parses three arguments (`1`, `2`, `3`), but `config echo` onl
|
|
|
2334
2393
|
ascli config echo 1 2 3
|
|
2335
2394
|
```
|
|
2336
2395
|
|
|
2337
|
-
```
|
|
2338
|
-
|
|
2339
|
-
|
|
2396
|
+
```text
|
|
2397
|
+
1
|
|
2398
|
+
ERRR Argument: unprocessed values: ["2", "3"]
|
|
2340
2399
|
```
|
|
2341
2400
|
|
|
2342
2401
|
**Checking an option value with `--show-config`**:
|
|
@@ -2344,18 +2403,19 @@ ERROR: Argument: unprocessed values: ["2", "3"]
|
|
|
2344
2403
|
Adding `--show-config` to any command line performs a dry run and displays the resolved value of all options that would be used, without executing the command.
|
|
2345
2404
|
|
|
2346
2405
|
To display a specific option, add `--fields=<option_name>`.
|
|
2347
|
-
Add `--flat=no` when the option holds a structured value (`Hash`, `Array`) to display it as-is rather than flattened into dot-path keys:
|
|
2406
|
+
Add `--out.flat=no` when the option holds a structured value (`Hash`, `Array`) to display it as-is rather than flattened into dot-path keys:
|
|
2407
|
+
|
|
2348
2408
|
|
|
2349
2409
|
```shell
|
|
2350
|
-
ascli --opt=@json:'{"a":1,"b":"two"}' some_plugin --show-config --fields=opt --flat=no
|
|
2351
|
-
ascli --opt.a=1 --opt.b=two some_plugin --show-config --fields=opt --flat=no
|
|
2410
|
+
ascli --opt=@json:'{"a":1,"b":"two"}' some_plugin --show-config --fields=opt --out.flat=no
|
|
2411
|
+
ascli --opt.a=1 --opt.b=two some_plugin --show-config --fields=opt --out.flat=no
|
|
2352
2412
|
```
|
|
2353
2413
|
|
|
2354
2414
|
Both lines above display the same resolved value for option `opt`.
|
|
2355
2415
|
|
|
2356
2416
|
In the following examples (using a POSIX shell, such as `bash`), several equivalent commands are provided.
|
|
2357
2417
|
For all examples, most special character handling is not specific to `ascli`:
|
|
2358
|
-
It depends on the underlying syntax: shell, JSON, and so on
|
|
2418
|
+
It depends on the underlying syntax: shell, JSON, and so on.
|
|
2359
2419
|
Depending on the case, a different `format` option is used to display the actual value.
|
|
2360
2420
|
|
|
2361
2421
|
For example, in the simple string `Hello World`, the space character is special for the shell, so it must be escaped so that a single value is represented.
|
|
@@ -2379,13 +2439,13 @@ Hello World
|
|
|
2379
2439
|
The default value is `[User's home folder]/.aspera/ascli`.
|
|
2380
2440
|
|
|
2381
2441
|
> [!NOTE]
|
|
2382
|
-
> The `[User's home folder]` is determined using Ruby
|
|
2442
|
+
> The `[User's home folder]` is determined using Ruby's `Dir.home` method.
|
|
2383
2443
|
> Primary source: The HOME environment variable.
|
|
2384
2444
|
> On Windows: Ruby also checks `%HOMEDRIVE%%HOMEPATH%` and `%USERPROFILE%` (via `rb_w32_home_dir`).
|
|
2385
2445
|
> Additionally, `ascli` sets the `%HOME%` environment variable to the value of `%USERPROFILE%` if it exists and is valid.
|
|
2386
2446
|
> Therefore, on Windows, `%USERPROFILE%` is preferred because it is generally more reliable than `%HOMEDRIVE%%HOMEPATH%`.
|
|
2387
2447
|
|
|
2388
|
-
The configuration folder can be displayed using
|
|
2448
|
+
The configuration folder can be displayed using:
|
|
2389
2449
|
|
|
2390
2450
|
```shell
|
|
2391
2451
|
ascli config folder
|
|
@@ -2396,7 +2456,7 @@ ascli config folder
|
|
|
2396
2456
|
```
|
|
2397
2457
|
|
|
2398
2458
|
> [!NOTE]
|
|
2399
|
-
> This is equivalent to
|
|
2459
|
+
> This is equivalent to displaying the value of the `home` option.
|
|
2400
2460
|
|
|
2401
2461
|
```shell
|
|
2402
2462
|
ascli --show-config --fields=home
|
|
@@ -2412,7 +2472,7 @@ ascli config folder
|
|
|
2412
2472
|
C:\Users\Kenji\.aspera\ascli
|
|
2413
2473
|
```
|
|
2414
2474
|
|
|
2415
|
-
When OAuth is used (AoC,
|
|
2475
|
+
When OAuth is used (AoC, Faspex 5), `ascli` keeps a cache of generated bearer tokens in folder `persist_store` located in the configuration folder by default.
|
|
2416
2476
|
Option `cache_tokens` (**yes**/no) allows controlling if OAuth tokens are cached on file system, or generated for each request.
|
|
2417
2477
|
The command `config tokens flush` clears that cache.
|
|
2418
2478
|
Tokens are kept on disk for a maximum of 30 minutes (`TOKEN_CACHE_EXPIRY_SEC`) and garbage collected after that.
|
|
@@ -2422,7 +2482,7 @@ When a token has expired, then a new token is generated, either using a `refresh
|
|
|
2422
2482
|
|
|
2423
2483
|
On the first execution of `ascli`, an empty configuration file is created in the configuration folder (`ascli config folder`).
|
|
2424
2484
|
There is no mandatory information required in this file.
|
|
2425
|
-
|
|
2485
|
+
Its use is optional, as any option can be provided on the command line.
|
|
2426
2486
|
|
|
2427
2487
|
Although the file is a standard `YAML` file, `ascli` provides commands to read and modify it using the `config` command.
|
|
2428
2488
|
|
|
@@ -2468,7 +2528,7 @@ Two [Option Presets](#option-preset) are reserved:
|
|
|
2468
2528
|
It is used to check compatibility.
|
|
2469
2529
|
- `default` is reserved to define the default [Option Preset](#option-preset) name used for known plugins.
|
|
2470
2530
|
|
|
2471
|
-
The user may create as many [Option
|
|
2531
|
+
The user may create as many [Option Presets](#option-preset) as needed.
|
|
2472
2532
|
For instance, a particular [Option Preset](#option-preset) can be created for a particular application instance and contain URL and credentials.
|
|
2473
2533
|
|
|
2474
2534
|
Values in the configuration also follow the [Extended Value](#extended-value-syntax) syntax.
|
|
@@ -2489,7 +2549,7 @@ This creates the [Option Preset](#option-preset):
|
|
|
2489
2549
|
private_key: "@file:/Users/laurent/.aspera/ascli/<PKEY_NAME>"
|
|
2490
2550
|
```
|
|
2491
2551
|
|
|
2492
|
-
So, the key file
|
|
2552
|
+
So, the key file is read only at execution time and is not embedded in the configuration file.
|
|
2493
2553
|
|
|
2494
2554
|
> [!NOTE]
|
|
2495
2555
|
> The main use of the configuration file is to store collections of options.
|
|
@@ -2527,7 +2587,7 @@ ascli config preset update demo_server --url=ssh://demo.asperasoft.com:33001 --u
|
|
|
2527
2587
|
This creates an [Option Preset](#option-preset) `demo_server` with all provided options.
|
|
2528
2588
|
|
|
2529
2589
|
> [!NOTE]
|
|
2530
|
-
> `update` takes **ALL** options provided
|
|
2590
|
+
> `update` takes **ALL** options provided on the command line (starting with `--` with a value).
|
|
2531
2591
|
|
|
2532
2592
|
The command `set` allows setting individual options in an [Option Preset](#option-preset):
|
|
2533
2593
|
|
|
@@ -2549,7 +2609,7 @@ ascli config preset set GLOBAL out.table.pivot single
|
|
|
2549
2609
|
ascli config preset set GLOBAL out.level data
|
|
2550
2610
|
```
|
|
2551
2611
|
|
|
2552
|
-
The parameter value is **automatically coerced** to its natural type: integers, floats and booleans (`true`/`false`) are stored as native YAML types rather than strings.
|
|
2612
|
+
The parameter value is **automatically coerced** to its natural type: integers, floats and booleans (`true`/`yes`/`false`/`no`) are stored as native YAML types rather than strings.
|
|
2553
2613
|
|
|
2554
2614
|
To **delete** a key from a preset, pass `@none:` as the value (evaluates to `nil`):
|
|
2555
2615
|
|
|
@@ -2560,10 +2620,10 @@ ascli config preset set GLOBAL out.table.pivot @none:
|
|
|
2560
2620
|
A full terminal based overview of the configuration can be displayed using:
|
|
2561
2621
|
|
|
2562
2622
|
```shell
|
|
2563
|
-
ascli config preset
|
|
2623
|
+
ascli config preset overview
|
|
2564
2624
|
```
|
|
2565
2625
|
|
|
2566
|
-
|
|
2626
|
+
The list of [Option Presets](#option-preset) can be displayed using:
|
|
2567
2627
|
|
|
2568
2628
|
```shell
|
|
2569
2629
|
ascli config preset list
|
|
@@ -2593,14 +2653,6 @@ ascli config open
|
|
|
2593
2653
|
> [!NOTE]
|
|
2594
2654
|
> This starts the editor specified by env var `EDITOR` if defined.
|
|
2595
2655
|
|
|
2596
|
-
The former format for commands is still supported:
|
|
2597
|
-
|
|
2598
|
-
```shell
|
|
2599
|
-
ascli config preset set|delete|show|initialize|update <NAME>
|
|
2600
|
-
ascli config preset over
|
|
2601
|
-
ascli config preset list
|
|
2602
|
-
```
|
|
2603
|
-
|
|
2604
2656
|
It is possible to load an [Option Preset](#option-preset) from within another [Option Preset](#option-preset) using the `preset` option.
|
|
2605
2657
|
For example if `pcommon` is a preset with common options, and `pspecific` is a preset with specific options, then `pspecific` can load `pcommon` using:
|
|
2606
2658
|
|
|
@@ -2617,7 +2669,7 @@ This is the version of `ascli` which created the file.
|
|
|
2617
2669
|
|
|
2618
2670
|
#### Special Option Preset: `default`
|
|
2619
2671
|
|
|
2620
|
-
This preset name is reserved and contains
|
|
2672
|
+
This preset name is reserved and contains a `Hash`, where the key is the name of a plugin, and the value is the name of another preset.
|
|
2621
2673
|
Usually, [Option presets](#option-preset) are used to contain pre-defined options and values, but this preset contains names of presets to be used by default for plugins.
|
|
2622
2674
|
|
|
2623
2675
|
When a plugin is invoked, the preset associated with the name of the plugin is loaded, unless the option `--no-default` (or `-N`) is used.
|
|
@@ -2662,8 +2714,8 @@ The default value is `_<>:"/\|?*`, corresponding to replacement character `_` an
|
|
|
2662
2714
|
Some temporary files may be needed during runtime.
|
|
2663
2715
|
The temporary folder may be specified with option: `temp_folder`.
|
|
2664
2716
|
Temporary files are deleted at the end of execution unless option: `clean_temp` is set to `no`.
|
|
2665
|
-
By default
|
|
2666
|
-
A special value of `@env`
|
|
2717
|
+
By default (`@sys`), the temporary folder is the system's temporary folder for the current user (Ruby `Etc.systmpdir`).
|
|
2718
|
+
A special value of `@env` sets the folder to Ruby `Dir.tmpdir`, which uses the usual environment variables (for example, `TMPDIR`).
|
|
2667
2719
|
|
|
2668
2720
|
### Plugin: `config`: Configuration
|
|
2669
2721
|
|
|
@@ -2675,7 +2727,7 @@ Plugin `config` provides general commands for `ascli`:
|
|
|
2675
2727
|
- `ascp`
|
|
2676
2728
|
- `transferd`
|
|
2677
2729
|
|
|
2678
|
-
The default preset for `config` is read for any plugin invocation
|
|
2730
|
+
The default preset for `config` is read for any plugin invocation: this allows setting global options, such as `--log-level` or `--interactive`.
|
|
2679
2731
|
When `ascli` starts, it looks for the `default` Option Preset and checks the value for `config`.
|
|
2680
2732
|
If set, it loads the options independently of the plugin used.
|
|
2681
2733
|
|
|
@@ -2737,6 +2789,9 @@ coffee --ui=text
|
|
|
2737
2789
|
coffee --ui=text --out.img.text=true
|
|
2738
2790
|
coffee --ui=text --out.img=@json:'{"text":true,"double":false}'
|
|
2739
2791
|
commands
|
|
2792
|
+
commands aoc --expand-mounts=yes
|
|
2793
|
+
commands aoc files
|
|
2794
|
+
commands server
|
|
2740
2795
|
detect app.example.com
|
|
2741
2796
|
detect https://f5.example.com/path
|
|
2742
2797
|
detect https://f5.example.com/path faspex5
|
|
@@ -2757,6 +2812,7 @@ echo @csvt:@stdin:
|
|
|
2757
2812
|
echo @env:USER
|
|
2758
2813
|
echo @json:'[{"user":{"id":1,"name":"foo"},"project":"bar"}]' --out.table.pivot=single
|
|
2759
2814
|
echo @json:'[{"user":{"id":1,"name":"foo"},"project":"bar"}]' --out.table.pivot=yes
|
|
2815
|
+
echo @json:'{"empty":"","bool":true}' --out.colors=yes --out.utf8=yes
|
|
2760
2816
|
echo @lines:@stdin:
|
|
2761
2817
|
echo @list:,1,2,3
|
|
2762
2818
|
echo @secret:
|
|
@@ -2786,6 +2842,7 @@ initdemo
|
|
|
2786
2842
|
open
|
|
2787
2843
|
options aoc
|
|
2788
2844
|
options server
|
|
2845
|
+
options server --select=@json:'{"option":"--display"}' --fields=replacement
|
|
2789
2846
|
plugins create my_command .
|
|
2790
2847
|
plugins list
|
|
2791
2848
|
preset delete conf_name
|
|
@@ -2836,15 +2893,14 @@ wizard my_org aoc mypreset --key-path=my_private_key --username=my_user_email
|
|
|
2836
2893
|
|
|
2837
2894
|
#### Evaluation order of options
|
|
2838
2895
|
|
|
2839
|
-
Some options are global,
|
|
2840
|
-
(the plugin is the first level command).
|
|
2896
|
+
Some options are global, others are available only for some plugins (the plugin is the first-level command).
|
|
2841
2897
|
|
|
2842
2898
|
Options are loaded using this algorithm:
|
|
2843
2899
|
|
|
2844
2900
|
- If option `--no-default` (or `-N`) is specified, then no default value is loaded for the plugin
|
|
2845
2901
|
- Else it looks for the name of the plugin as key in section `default`, the value is the name of the default [Option Preset](#option-preset) for it, and loads it.
|
|
2846
2902
|
- If option `--preset=<NAME>` is specified (or `-P<NAME>`), this reads the [Option Preset](#option-preset) specified from the configuration file by name.
|
|
2847
|
-
- If option `--preset=<EXTENDED_VALUE_HASH
|
|
2903
|
+
- If option `--preset=<EXTENDED_VALUE_HASH>` is specified, it is used as option values (`Hash` of option/value pairs).
|
|
2848
2904
|
- Environment variables are evaluated.
|
|
2849
2905
|
- Command line options are evaluated.
|
|
2850
2906
|
|
|
@@ -2853,7 +2909,7 @@ Options are evaluated in the order of command line.
|
|
|
2853
2909
|
To avoid loading the default [Option Preset](#option-preset) for a plugin, use: `-N`
|
|
2854
2910
|
|
|
2855
2911
|
On command line, words in option names are separated by a dash (`-`).
|
|
2856
|
-
In configuration file, separator is an underscore.
|
|
2912
|
+
In the configuration file, the separator is an underscore.
|
|
2857
2913
|
For example, `--xxx-yyy` on command line gives `xxx_yyy` in configuration file.
|
|
2858
2914
|
|
|
2859
2915
|
The main plugin name is `config`, so it is possible to define a default [Option Preset](#option-preset) for the main plugin with:
|
|
@@ -2887,66 +2943,50 @@ ascli -N --preset=@json:'{"url":"_url_here_","password":"<PASSWORD>","username":
|
|
|
2887
2943
|
#### Shell Completion
|
|
2888
2944
|
|
|
2889
2945
|
`ascli` supports shell tab-completion for **Bash**, **Zsh**, and **Fish**.
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
All scripts call `ascli config completion bash [words...]` internally to query available sub-commands at any depth.
|
|
2893
|
-
|
|
2894
|
-
##### Bash
|
|
2946
|
+
The command `ascli config completion <shell>` displays the completion script for the given shell.
|
|
2895
2947
|
|
|
2896
|
-
To
|
|
2948
|
+
To activate completion, add the line for your shell to its startup file:
|
|
2897
2949
|
|
|
2898
2950
|
```bash
|
|
2899
|
-
|
|
2951
|
+
# Bash, in ~/.bashrc
|
|
2952
|
+
eval "$(ascli config completion bash)"
|
|
2900
2953
|
```
|
|
2901
2954
|
|
|
2902
|
-
Or copy it to the system completion directory:
|
|
2903
|
-
|
|
2904
|
-
```bash
|
|
2905
|
-
cp $(gem contents aspera-cli | grep bash_autocomplete) /etc/bash_completion.d/ascli
|
|
2906
|
-
```
|
|
2907
|
-
|
|
2908
|
-
##### Zsh
|
|
2909
|
-
|
|
2910
|
-
Place the script somewhere on your `$fpath` and rebuild the completion cache:
|
|
2911
|
-
|
|
2912
2955
|
```zsh
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
# fpath=(~/.zsh/completions $fpath)
|
|
2916
|
-
# autoload -Uz compinit && compinit
|
|
2917
|
-
exec zsh
|
|
2956
|
+
# Zsh, in ~/.zshrc, after compinit
|
|
2957
|
+
eval "$(ascli config completion zsh)"
|
|
2918
2958
|
```
|
|
2919
2959
|
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
ascli <Tab> # lists all plugins: aoc, server, node, ...
|
|
2924
|
-
ascli server <Tab> # lists server sub-commands: upload, download, ls, ...
|
|
2925
|
-
ascli aoc admin <Tab> # lists aoc admin sub-commands: user, node, ...
|
|
2960
|
+
```fish
|
|
2961
|
+
# Fish, in ~/.config/fish/config.fish
|
|
2962
|
+
ascli config completion fish | source
|
|
2926
2963
|
```
|
|
2927
2964
|
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
Copy the completion script to Fish's completions directory:
|
|
2965
|
+
The startup file then executes `ascli` each time a shell starts.
|
|
2966
|
+
Alternatively, save the script once in the completion folder of the shell (and save it again after an upgrade of `ascli`):
|
|
2931
2967
|
|
|
2932
|
-
```
|
|
2933
|
-
|
|
2968
|
+
```bash
|
|
2969
|
+
# Bash, with package bash-completion
|
|
2970
|
+
ascli config completion bash > ~/.local/share/bash-completion/completions/ascli
|
|
2971
|
+
# Zsh (the folder must be in $fpath before compinit)
|
|
2972
|
+
ascli config completion zsh > ~/.zsh/completions/_ascli
|
|
2973
|
+
# Fish
|
|
2974
|
+
ascli config completion fish > ~/.config/fish/completions/ascli.fish
|
|
2934
2975
|
```
|
|
2935
2976
|
|
|
2936
|
-
No further configuration is needed - Fish loads files from `~/.config/fish/completions/` automatically.
|
|
2937
|
-
|
|
2938
2977
|
Once active, press `Tab` to complete commands at any depth:
|
|
2939
2978
|
|
|
2940
|
-
```
|
|
2979
|
+
```bash
|
|
2941
2980
|
ascli <Tab> # lists all plugins: aoc, server, node, ...
|
|
2942
2981
|
ascli server <Tab> # lists server sub-commands: upload, download, ls, ...
|
|
2943
2982
|
ascli aoc admin <Tab> # lists aoc admin sub-commands: user, node, ...
|
|
2944
2983
|
```
|
|
2945
2984
|
|
|
2946
|
-
|
|
2985
|
+
The scripts call `ascli config completion words [<word>...]`, which lists the words that can follow the given ones.
|
|
2986
|
+
It can also be used directly to inspect available commands:
|
|
2947
2987
|
|
|
2948
2988
|
```bash
|
|
2949
|
-
ascli config completion
|
|
2989
|
+
ascli config completion words aoc admin
|
|
2950
2990
|
```
|
|
2951
2991
|
|
|
2952
2992
|
#### Wizard
|
|
@@ -2969,8 +3009,8 @@ Options are also available for the wizard:
|
|
|
2969
3009
|
| `override` | yes/[no] | Override existing default preset name for the plugin, if it exists. |
|
|
2970
3010
|
| `key_path` | path | Path to private key for JWT. |
|
|
2971
3011
|
|
|
2972
|
-
Other plugin-specific options can be provided to the wizard, such as `--username
|
|
2973
|
-
They
|
|
3012
|
+
Other plugin-specific options can be provided to the wizard, such as `--username`.
|
|
3013
|
+
They are added to the [Option Preset](#option-preset) created by the wizard.
|
|
2974
3014
|
|
|
2975
3015
|
The simplest invocation is:
|
|
2976
3016
|
|
|
@@ -2978,17 +3018,17 @@ The simplest invocation is:
|
|
|
2978
3018
|
ascli config wizard
|
|
2979
3019
|
```
|
|
2980
3020
|
|
|
2981
|
-
If the application requires a private key, the user can
|
|
3021
|
+
If the application requires a private key, the user can provide the path to it with option `key_path`, or let the wizard generate one.
|
|
2982
3022
|
The user is told where to place the associated public key PEM in the application.
|
|
2983
3023
|
|
|
2984
3024
|
#### Example of configuration for a plugin
|
|
2985
3025
|
|
|
2986
3026
|
For Faspex 5, Shares, Node (including ATS, Aspera Transfer Service), Console,
|
|
2987
3027
|
only username/password and URL are required (either on command line, or from configuration file).
|
|
2988
|
-
Those can be
|
|
3028
|
+
Those can be provided on the command line:
|
|
2989
3029
|
|
|
2990
3030
|
```shell
|
|
2991
|
-
ascli shares
|
|
3031
|
+
ascli shares files browse / --url=https://10.25.0.6 --username=john --password=<PASSWORD>
|
|
2992
3032
|
```
|
|
2993
3033
|
|
|
2994
3034
|
This can also be provisioned in a configuration file:
|
|
@@ -3004,7 +3044,7 @@ ascli config preset set shares06 password <PASSWORD>
|
|
|
3004
3044
|
This can also be done with one single command:
|
|
3005
3045
|
|
|
3006
3046
|
```shell
|
|
3007
|
-
ascli config preset
|
|
3047
|
+
ascli config preset initialize shares06 @json:'{"url":"https://10.25.0.6","username":"john","password":"<PASSWORD>"}'
|
|
3008
3048
|
```
|
|
3009
3049
|
|
|
3010
3050
|
Or:
|
|
@@ -3019,22 +3059,22 @@ ascli config preset update shares06 --url=https://10.25.0.6 --username=john --pa
|
|
|
3019
3059
|
ascli config preset set default shares shares06
|
|
3020
3060
|
```
|
|
3021
3061
|
|
|
3022
|
-
- Display the content of configuration file in table format
|
|
3062
|
+
- Display the content of the configuration file in table format
|
|
3023
3063
|
|
|
3024
3064
|
```shell
|
|
3025
3065
|
ascli config preset overview
|
|
3026
3066
|
```
|
|
3027
3067
|
|
|
3028
|
-
- Execute a command on the **Shares
|
|
3068
|
+
- Execute a command on the **Shares** application using default options
|
|
3029
3069
|
|
|
3030
3070
|
```shell
|
|
3031
|
-
ascli shares
|
|
3071
|
+
ascli shares files browse /
|
|
3032
3072
|
```
|
|
3033
3073
|
|
|
3034
3074
|
### Secret Vault
|
|
3035
3075
|
|
|
3036
3076
|
Secrets, for example, passwords, keys, are needed when connecting to applications.
|
|
3037
|
-
Those secrets are usually provided as command options
|
|
3077
|
+
Those secrets are usually provided as command options: on the command line, in env vars, in files, and so on.
|
|
3038
3078
|
|
|
3039
3079
|
For security reasons, those secrets shall not be exposed in clear, either:
|
|
3040
3080
|
|
|
@@ -3105,7 +3145,7 @@ vault server -dev -dev-root-token-id=dev-only-token
|
|
|
3105
3145
|
| `vault` | `String` | Name or ID of the 1Password vault to use with the CLI (used when `source` is `cli`). Uses the default vault if omitted. |
|
|
3106
3146
|
|
|
3107
3147
|
```shell
|
|
3108
|
-
--vault=@json:'{"type":"vault","url":"http://127.0.0.1:8200"}' --
|
|
3148
|
+
--vault=@json:'{"type":"vault","url":"http://127.0.0.1:8200"}' --vault-password=dev-only-token
|
|
3109
3149
|
```
|
|
3110
3150
|
|
|
3111
3151
|
#### Vault: System keychain
|
|
@@ -3159,7 +3199,7 @@ docker run -d --name op-connect \
|
|
|
3159
3199
|
|
|
3160
3200
|
```shell
|
|
3161
3201
|
--vault=@json:'{"type":"1password","source":"api","url":"http://localhost:8080","vault_id":"<VAULT_ID>"}' \
|
|
3162
|
-
--
|
|
3202
|
+
--vault-password=<CONNECT_TOKEN>
|
|
3163
3203
|
```
|
|
3164
3204
|
|
|
3165
3205
|
> [!TIP]
|
|
@@ -3175,7 +3215,7 @@ docker run -d --name op-connect \
|
|
|
3175
3215
|
<https://developer.1password.com/docs/cli/>
|
|
3176
3216
|
|
|
3177
3217
|
Requires the `op` CLI to be installed and signed in.
|
|
3178
|
-
No server to deploy
|
|
3218
|
+
No server to deploy: authentication is handled by the 1Password desktop app (biometric unlock) or by `op signin`.
|
|
3179
3219
|
|
|
3180
3220
|
```shell
|
|
3181
3221
|
--vault=@json:'{"type":"1password","source":"cli"}'
|
|
@@ -3191,11 +3231,14 @@ No server to deploy — authentication is handled by the 1Password desktop app (
|
|
|
3191
3231
|
|
|
3192
3232
|
Secrets can be manipulated using the `config vault` command:
|
|
3193
3233
|
|
|
3194
|
-
- `
|
|
3195
|
-
- `
|
|
3196
|
-
- `list`
|
|
3197
|
-
- `
|
|
3198
|
-
- `
|
|
3234
|
+
- `info` : Show vault information
|
|
3235
|
+
- `ids` : List secret labels in the vault
|
|
3236
|
+
- `list` : List all secrets with full details
|
|
3237
|
+
- `show` : Show a secret by label (or id)
|
|
3238
|
+
- `create` : Add a new secret to the vault
|
|
3239
|
+
- `delete` : Delete a secret by label (or id)
|
|
3240
|
+
- `password` : Change the vault password
|
|
3241
|
+
- `import` : Import secrets from a JSON array (supports `--bulk`)
|
|
3199
3242
|
|
|
3200
3243
|
To add a new password entry in the vault for label `<NAME>`:
|
|
3201
3244
|
|
|
@@ -3205,22 +3248,22 @@ ascli config vault create @: label=<NAME> password=@secret:password description=
|
|
|
3205
3248
|
|
|
3206
3249
|
#### Vault: Migration between vaults
|
|
3207
3250
|
|
|
3208
|
-
To migrate all secrets from one vault backend to another (for example, from the encrypted file vault to 1Password), use `vault
|
|
3251
|
+
To migrate all secrets from one vault backend to another (for example, from the encrypted file vault to 1Password), use `vault list` piped into `vault import`.
|
|
3209
3252
|
|
|
3210
3253
|
> [!NOTE]
|
|
3211
|
-
> Use `
|
|
3254
|
+
> Use `list` (not `ids`) as the source: `ids` returns only labels, while `list` returns the full secret details needed for import.
|
|
3212
3255
|
|
|
3213
3256
|
```shell
|
|
3214
|
-
ascli config vault
|
|
3257
|
+
ascli config vault list --format=json --out.level=data \
|
|
3215
3258
|
--vault=@json:'{"type":"file","name":"<SOURCE_VAULT_FILE>"}' \
|
|
3216
|
-
--
|
|
3217
|
-
ascli config vault import @json:@stdin: --bulk \
|
|
3259
|
+
--vault-password=<SOURCE_PASSWORD> | \
|
|
3260
|
+
ascli config vault import @json:@stdin: --bulk=yes \
|
|
3218
3261
|
--vault=@json:'{"type":"1password","url":"<CONNECT_URL>","vault_id":"<VAULT_ID>"}' \
|
|
3219
|
-
--
|
|
3262
|
+
--vault-password=<CONNECT_TOKEN>
|
|
3220
3263
|
```
|
|
3221
3264
|
|
|
3222
3265
|
> [!TIP]
|
|
3223
|
-
> Use `--out.level=data` on the `
|
|
3266
|
+
> Use `--out.level=data` on the `list` command so that only the raw JSON array is written to stdout, with no table headers or status lines.
|
|
3224
3267
|
|
|
3225
3268
|
The `import` command accepts a JSON array where each element is a vault secret object (same schema as `create`).
|
|
3226
3269
|
`--bulk` makes each entry reported individually in the result table; omit it to get a single-line summary.
|
|
@@ -3272,12 +3315,12 @@ To disable this behavior for a single command, pass `--vault=@none:`.
|
|
|
3272
3315
|
Some Aspera applications allow the user to be authenticated using [Public Key Cryptography](https://en.wikipedia.org/wiki/Public-key_cryptography):
|
|
3273
3316
|
|
|
3274
3317
|
- For SSH: Server
|
|
3275
|
-
- For OAuth JWT: AoC,
|
|
3318
|
+
- For OAuth JWT: AoC, Faspex 5, faspio Gateway
|
|
3276
3319
|
|
|
3277
|
-
It consists
|
|
3320
|
+
It consists of using a pair of associated keys: a private key and a public key.
|
|
3278
3321
|
The same pair can be used for multiple applications.
|
|
3279
3322
|
The file containing the private key (key pair) can optionally be protected by a passphrase.
|
|
3280
|
-
If the key is protected by a passphrase, then
|
|
3323
|
+
If the key is protected by a passphrase, then the passphrase is prompted when the key is used.
|
|
3281
3324
|
Some plugins support option `passphrase`.
|
|
3282
3325
|
|
|
3283
3326
|
By default, `ascli` does not support `ed25519` type, nor OpenSSH encoded keys.
|
|
@@ -3331,7 +3374,7 @@ ssh-keygen -t rsa -b 4096 -m PEM -N '' -f ${KEY_PAIR_PATH}
|
|
|
3331
3374
|
|
|
3332
3375
|
#### `openssl`
|
|
3333
3376
|
|
|
3334
|
-
To generate a key pair with a passphrase the following can be used on any system:
|
|
3377
|
+
To generate a key pair with a passphrase, the following can be used on any system:
|
|
3335
3378
|
|
|
3336
3379
|
```shell
|
|
3337
3380
|
openssl genrsa -passout pass:_passphrase_here_ -out ${KEY_PAIR_PATH} 4096
|
|
@@ -3348,7 +3391,7 @@ openssl rsa -passin pass:_passphrase_here_ -in ${KEY_PAIR_PATH} -out ${KEY_PAIR_
|
|
|
3348
3391
|
mv ${KEY_PAIR_PATH}.no_des ${KEY_PAIR_PATH}
|
|
3349
3392
|
```
|
|
3350
3393
|
|
|
3351
|
-
To change (or add) the passphrase for a key
|
|
3394
|
+
To change (or add) the passphrase for a key:
|
|
3352
3395
|
|
|
3353
3396
|
```shell
|
|
3354
3397
|
openssl rsa -des3 -in ${KEY_PAIR_PATH} -out ${KEY_PAIR_PATH}.with_des
|
|
@@ -3366,13 +3409,13 @@ For example: <https://cryptotools.net/rsagen>
|
|
|
3366
3409
|
### Web service
|
|
3367
3410
|
|
|
3368
3411
|
Some plugins start a local web server.
|
|
3369
|
-
This server can serve HTTP or HTTPS (with certificate)
|
|
3412
|
+
This server can serve HTTP or HTTPS (with certificate).
|
|
3370
3413
|
|
|
3371
3414
|
The following parameters are supported:
|
|
3372
3415
|
|
|
3373
3416
|
| Parameter | Type | Default | Description |
|
|
3374
3417
|
|-------------------|----------|-------------------------|------------------------------------------------------------------|
|
|
3375
|
-
| `url` | `String` | `http://localhost:8080` | Base URL on which requests are
|
|
3418
|
+
| `url` | `String` | `http://localhost:8080` | Base URL on which requests are received; a path can be included. | <!-- markdownlint-disable-line -->
|
|
3376
3419
|
| `cert` | `String` | - | (HTTPS) Path to certificate file (with ext. `.pfx` or `.p12` for `PKCS12`). |
|
|
3377
3420
|
| `key` | `String` | - | (HTTPS) Path to private key file (PEM), or passphrase for `PKCS12`. |
|
|
3378
3421
|
| `chain` | `String` | - | (HTTPS) Path to certificate chain (PEM only). |
|
|
@@ -3381,7 +3424,7 @@ Parameter `url` (base URL) defines:
|
|
|
3381
3424
|
|
|
3382
3425
|
- If `http` or `https` is used
|
|
3383
3426
|
- The local port number (default 443 for HTTPS, 80 for HTTP)
|
|
3384
|
-
- The **base path**, that is, the path under which requests are received
|
|
3427
|
+
- The **base path**, that is, the path under which requests are received (useful for routing when a reverse proxy is used).
|
|
3385
3428
|
|
|
3386
3429
|
### Image and video thumbnails
|
|
3387
3430
|
|
|
@@ -3394,7 +3437,7 @@ This feature can be used:
|
|
|
3394
3437
|
- `coffee` and `image` commands of `config` plugin.
|
|
3395
3438
|
- Any displayed value which is a URL to image can be displayed with option `format` set to `image`
|
|
3396
3439
|
|
|
3397
|
-
The following options can be specified in
|
|
3440
|
+
The following options can be specified in option `--out.img`:
|
|
3398
3441
|
|
|
3399
3442
|
| Field | Type | Description |
|
|
3400
3443
|
|------------|---------|----------------------------------------------------------------------------------|
|
|
@@ -3428,12 +3471,12 @@ ascli config image @stdin:bin < A-team.jpg
|
|
|
3428
3471
|
Some actions may require the use of a graphical tool:
|
|
3429
3472
|
|
|
3430
3473
|
- A browser for Aspera on Cloud authentication (web auth method)
|
|
3431
|
-
- A text editor for configuration file
|
|
3474
|
+
- A text editor for editing the configuration file
|
|
3432
3475
|
|
|
3433
|
-
By default, `ascli` assumes that a graphical environment is available on Windows
|
|
3434
|
-
It is also possible to force the graphical mode with option `ui
|
|
3476
|
+
By default, `ascli` assumes that a graphical environment is available on Windows; on other systems, it relies on the presence of the `DISPLAY` environment variable.
|
|
3477
|
+
It is also possible to force the graphical mode with option `ui`:
|
|
3435
3478
|
|
|
3436
|
-
- `--ui=graphical` forces a graphical environment
|
|
3479
|
+
- `--ui=graphical` forces a graphical environment: a browser is opened for URLs, or a text editor for files.
|
|
3437
3480
|
- `--ui=text` forces a text environment, the URL or file path to open is displayed on terminal.
|
|
3438
3481
|
|
|
3439
3482
|
### Logging, Debugging
|
|
@@ -3476,19 +3519,19 @@ The default formatter is:
|
|
|
3476
3519
|
- Display debugging log on `stdout`:
|
|
3477
3520
|
|
|
3478
3521
|
```shell
|
|
3479
|
-
ascli config
|
|
3522
|
+
ascli config preset overview --log-level=debug --logger=stdout
|
|
3480
3523
|
```
|
|
3481
3524
|
|
|
3482
3525
|
Or equivalently using dot-path notation:
|
|
3483
3526
|
|
|
3484
3527
|
```shell
|
|
3485
|
-
ascli config
|
|
3528
|
+
ascli config preset overview --log.level=debug --log.type=stdout
|
|
3486
3529
|
```
|
|
3487
3530
|
|
|
3488
3531
|
- Log errors to `syslog`:
|
|
3489
3532
|
|
|
3490
3533
|
```shell
|
|
3491
|
-
ascli config
|
|
3534
|
+
ascli config preset overview --log-level=error --logger=syslog
|
|
3492
3535
|
```
|
|
3493
3536
|
|
|
3494
3537
|
Or using the composite option in a preset:
|
|
@@ -3514,7 +3557,7 @@ It will display the exact content of HTTP requests and responses.
|
|
|
3514
3557
|
### HTTP socket parameters
|
|
3515
3558
|
|
|
3516
3559
|
To ignore SSL certificate for **any** address/port, use option: `insecure`, that is, `--insecure=yes`.
|
|
3517
|
-
To ignore SSL certificate for a list of specific address/port, use option `ignore_certificate`, set to an `Array` of
|
|
3560
|
+
To ignore SSL certificate for a list of specific address/port, use option `ignore_certificate`, set to an `Array` of URLs for which the certificate is ignored (only the address and port are matched), for example, `--ignore-certificate=@list:,https://127.0.0.1:9092`
|
|
3518
3561
|
|
|
3519
3562
|
> [!NOTE]
|
|
3520
3563
|
> Ignoring certificate also applies to `ascp` WSS.
|
|
@@ -3571,7 +3614,7 @@ Example:
|
|
|
3571
3614
|
|
|
3572
3615
|
### Proxy
|
|
3573
3616
|
|
|
3574
|
-
There are several types of network connections, each of them
|
|
3617
|
+
There are several types of network connections, each of them uses a different mechanism to define a (forward) **proxy**:
|
|
3575
3618
|
|
|
3576
3619
|
- REST calls (APIs) and HTTP Gateway
|
|
3577
3620
|
- `ascp` WSS and Legacy Aspera HTTP/S Fallback
|
|
@@ -3625,7 +3668,7 @@ ascli config proxy_check --fpac='function FindProxyForURL(url, host) {return "PR
|
|
|
3625
3668
|
```
|
|
3626
3669
|
|
|
3627
3670
|
```text
|
|
3628
|
-
|
|
3671
|
+
proxy://proxy.example.com:3128
|
|
3629
3672
|
```
|
|
3630
3673
|
|
|
3631
3674
|
```shell
|
|
@@ -3633,7 +3676,7 @@ ascli config proxy_check --fpac=@file:./proxy.pac http://www.example.com
|
|
|
3633
3676
|
```
|
|
3634
3677
|
|
|
3635
3678
|
```text
|
|
3636
|
-
|
|
3679
|
+
proxy://proxy.example.com:8080
|
|
3637
3680
|
```
|
|
3638
3681
|
|
|
3639
3682
|
```shell
|
|
@@ -3641,7 +3684,7 @@ ascli config proxy_check --fpac=@uri:http://server/proxy.pac http://www.example.
|
|
|
3641
3684
|
```
|
|
3642
3685
|
|
|
3643
3686
|
```text
|
|
3644
|
-
|
|
3687
|
+
proxy://proxy.example.com:8080
|
|
3645
3688
|
```
|
|
3646
3689
|
|
|
3647
3690
|
If the proxy found with the PAC requires credentials, then use option `proxy_credentials` with username and password provided as an `Array`:
|
|
@@ -3687,18 +3730,20 @@ By default, `ascli` uses the `ascp` binary found in **well known locations**, th
|
|
|
3687
3730
|
The `config` plugin allows finding and specifying the location of `ascp`.
|
|
3688
3731
|
It provides the following commands for `ascp` sub-command:
|
|
3689
3732
|
|
|
3690
|
-
- `show` :
|
|
3691
|
-
- `
|
|
3692
|
-
- `
|
|
3693
|
-
- `
|
|
3733
|
+
- `show` : Show the path of `ascp` used
|
|
3734
|
+
- `info` : Show information on `ascp` and its environment
|
|
3735
|
+
- `install` : Install the Transfer SDK (same as `config transferd install`)
|
|
3736
|
+
- `spec` : List transfer spec parameters supported by `ascp`
|
|
3737
|
+
- `schema` : Show the JSON schema of the transfer spec
|
|
3738
|
+
- `errors` : List known `ascp` errors and whether they are retry-able
|
|
3739
|
+
- `products list` : List Aspera transfer products available locally
|
|
3694
3740
|
|
|
3695
3741
|
#### Selection of `ascp` location for [`direct`](#agent-direct) agent
|
|
3696
3742
|
|
|
3697
3743
|
Option: `sdk_folder` is used to specify the location of `ascp`.
|
|
3698
|
-
|
|
3699
|
-
By default, `ascli` uses any found local product with `ascp`, including Transfer Daemon (SDK).
|
|
3744
|
+
By default, `ascli` uses `ascp` from the Transfer SDK installed in its configuration folder (see `config ascp install`).
|
|
3700
3745
|
|
|
3701
|
-
To override and use an alternate `ascp` path use option `sdk_folder` (`--sdk-folder=`)
|
|
3746
|
+
To override and use an alternate `ascp` path, use option `sdk_folder` (`--sdk-folder=`).
|
|
3702
3747
|
|
|
3703
3748
|
For a permanent change, set a global default.
|
|
3704
3749
|
For example, `<INSTALL_DIR>` could be `~/my_install_dir` on Linux, or `C:\Users\admin\.aspera\ascli\sdk` on Windows.
|
|
@@ -3710,9 +3755,8 @@ ascli config preset set GLOBAL sdk_folder <INSTALL_DIR>
|
|
|
3710
3755
|
```
|
|
3711
3756
|
|
|
3712
3757
|
```text
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
Saved to default global preset global_common_defaults
|
|
3758
|
+
INFO Updated: global_common_defaults: sdk_folder <- <INSTALL_DIR>
|
|
3759
|
+
INFO Saving config file: /home/john/.aspera/ascli/config.yaml
|
|
3716
3760
|
```
|
|
3717
3761
|
|
|
3718
3762
|
If the path has spaces, read section: [Shell and Command line parsing](#command-line-parsing-special-characters).
|
|
@@ -3720,6 +3764,7 @@ If the path has spaces, read section: [Shell and Command line parsing](#command-
|
|
|
3720
3764
|
A special value `product:<PRODUCT_NAME>` can be used for option `sdk_folder`.
|
|
3721
3765
|
It specifies to use `ascp` from the given product name.
|
|
3722
3766
|
A special value for product name is `FIRST`, which means: use the first product found in the internal list.
|
|
3767
|
+
In that case, other files (SSH keys, `aspera.conf`, `transferd`) are still taken from the default SDK folder.
|
|
3723
3768
|
|
|
3724
3769
|
Locally installed Aspera products can be listed with:
|
|
3725
3770
|
|
|
@@ -3742,9 +3787,12 @@ To permanently use the `ascp` of a product:
|
|
|
3742
3787
|
|
|
3743
3788
|
```shell
|
|
3744
3789
|
ascli config preset set GLOBAL sdk_folder 'product:IBM Aspera Connect'
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3790
|
+
```
|
|
3791
|
+
|
|
3792
|
+
```text
|
|
3793
|
+
INFO Updated: default: config <- global_common_defaults
|
|
3794
|
+
INFO Updated: global_common_defaults: sdk_folder <- product:IBM Aspera Connect
|
|
3795
|
+
INFO Saving config file: /home/john/.aspera/ascli/config.yaml
|
|
3748
3796
|
```
|
|
3749
3797
|
|
|
3750
3798
|
To show the path of currently used `ascp`:
|
|
@@ -3853,8 +3901,8 @@ All transfer agents support asynchronous mode:
|
|
|
3853
3901
|
| `node` | REST `ops/transfers/{id}` | Yes |
|
|
3854
3902
|
| `connect` | REST `transfers/info/{id}` (auto-discovered URL) | Yes |
|
|
3855
3903
|
| `transferd` | gRPC `monitor_transfers` | Yes |
|
|
3856
|
-
| `direct` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No
|
|
3857
|
-
| `httpgw` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No
|
|
3904
|
+
| `direct` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No: returns `unknown` after restart |
|
|
3905
|
+
| `httpgw` | In-process thread state (re-queryable while process lives, e.g. MCP mode) | No: returns `unknown` after restart |
|
|
3858
3906
|
|
|
3859
3907
|
For `direct` and `httpgw`, the transfer runs as a Ruby thread inside the `ascli` process.
|
|
3860
3908
|
The `job_id` is persisted on disk but the live thread state is only available as long as the same process is running.
|
|
@@ -3897,11 +3945,11 @@ The `transfer` option accepts the following optional parameters to control multi
|
|
|
3897
3945
|
| `trusted_certs` | `Array[String]` | List of trusted certificate repositories. |
|
|
3898
3946
|
| `wss` | `Bool` | Enable Web Socket Session when available.<br/>Default: `true`. |
|
|
3899
3947
|
|
|
3900
|
-
In case of transfer interruption, the agent will **resume** a transfer up to `iter_max`
|
|
3948
|
+
In case of transfer interruption, the agent will **resume** a transfer up to `iter_max` times.
|
|
3901
3949
|
Sleep between iterations is given by the following formula where `iter_index` is the current iteration index, starting at 0:
|
|
3902
3950
|
|
|
3903
|
-
```
|
|
3904
|
-
|
|
3951
|
+
```text
|
|
3952
|
+
min( sleep_max, sleep_initial * sleep_factor ^ iter_index )
|
|
3905
3953
|
```
|
|
3906
3954
|
|
|
3907
3955
|
To display the native progress bar of `ascp`, use:
|
|
@@ -3911,7 +3959,7 @@ To display the native progress bar of `ascp`, use:
|
|
|
3911
3959
|
```
|
|
3912
3960
|
|
|
3913
3961
|
To skip usage of management port (which disables custom progress bar), set option `monitor` to `false`.
|
|
3914
|
-
In that, use the native progress bar:
|
|
3962
|
+
In that case, use the native progress bar:
|
|
3915
3963
|
|
|
3916
3964
|
```shell
|
|
3917
3965
|
--transfer.monitor=false --transfer.quiet=false
|
|
@@ -3925,7 +3973,7 @@ To use `ascp`'s default, use option:
|
|
|
3925
3973
|
--transfer.trusted_certs=@none:
|
|
3926
3974
|
```
|
|
3927
3975
|
|
|
3928
|
-
Some transfer errors are considered **retry-able** (for example, timeout) and
|
|
3976
|
+
Some transfer errors are considered **retry-able** (for example, timeout) and others are not (for example, wrong password).
|
|
3929
3977
|
The list of known protocol errors and retry level can be listed:
|
|
3930
3978
|
|
|
3931
3979
|
```shell
|
|
@@ -3939,7 +3987,7 @@ ascli ... --transfer.wss=true --transfer.resume.iter_max=20
|
|
|
3939
3987
|
ascli ... --transfer.spawn_delay_sec=2.5 --transfer.multi_incr_udp=false
|
|
3940
3988
|
```
|
|
3941
3989
|
|
|
3942
|
-
|
|
3990
|
+
Parameter `ascp_args` can also be used to activate logging using option `-L` of `ascp`.
|
|
3943
3991
|
For example, to activate debug level 2 for `ascp` (`DD`), and display those logs on the terminal (`-`):
|
|
3944
3992
|
|
|
3945
3993
|
```shell
|
|
@@ -3954,26 +4002,24 @@ To store `ascp` logs in file `aspera-scp-transfer.log` in a folder, use `--trans
|
|
|
3954
4002
|
> When transfer agent [`direct`](#agent-direct) is used, the list of files to transfer is provided to `ascp` using either `--file-list` or `--file-pair-list` and a temp file list, unless `--file-list` or `--file-pair-list` is already provided via `transfer` parameter `ascp_args`.
|
|
3955
4003
|
> To place source paths directly on the `ascp` command line instead of using a temp file, set `file_list` to `false` in `transfer`: `--transfer.file_list=false`.
|
|
3956
4004
|
|
|
3957
|
-
In addition to standard methods described in section [File List](#list-of-files-for-transfers), it is possible to specify the list of
|
|
3958
|
-
|
|
3959
|
-
- Using option `transfer` parameter `ascp_args`
|
|
4005
|
+
In addition to standard methods described in section [File List](#list-of-files-for-transfers), it is also possible to specify the list of files using `transfer` parameter `ascp_args`:
|
|
3960
4006
|
|
|
3961
4007
|
```shell
|
|
3962
4008
|
--sources=@ts --transfer=@json:'{"ascp_args":["--file-list","myfilelist"]}'
|
|
3963
4009
|
```
|
|
3964
4010
|
|
|
3965
4011
|
> [!NOTE]
|
|
3966
|
-
> File lists
|
|
4012
|
+
> File lists are shown here; similar options exist for file pair lists.
|
|
3967
4013
|
|
|
3968
4014
|
> [!NOTE]
|
|
3969
|
-
>
|
|
4015
|
+
> This method avoids the creation of a copy of the file list: if the standard options `--sources=@lines:@file:... --src-type=...` are used, then the file list is read and parsed, and a new file list is created in a temporary folder.
|
|
3970
4016
|
|
|
3971
4017
|
> [!NOTE]
|
|
3972
|
-
>
|
|
4018
|
+
> This method has limitations: it applies **only** to the [`direct`](#agent-direct) transfer agent (that is, local `ascp`) and not to Aspera on Cloud.
|
|
3973
4019
|
|
|
3974
4020
|
##### Agent: Direct: Management messages
|
|
3975
4021
|
|
|
3976
|
-
By default, `ascli` gets
|
|
4022
|
+
By default, `ascli` gets notifications from `ascp` on its management port.
|
|
3977
4023
|
This can be disabled with parameter: `monitor=false` of `transfer`.
|
|
3978
4024
|
|
|
3979
4025
|
It is also possible to send messages to `ascp` using this management port.
|
|
@@ -3996,19 +4042,19 @@ ps -axo pid,command|grep ascli|grep -v grep|cut -f1 -d' '
|
|
|
3996
4042
|
Example to change the target rate:
|
|
3997
4043
|
|
|
3998
4044
|
```shell
|
|
3999
|
-
echo '{"type":"RATE","
|
|
4045
|
+
echo '{"type":"RATE","rate":300000}' > ~/.aspera/ascli/send_67470
|
|
4000
4046
|
```
|
|
4001
4047
|
|
|
4002
4048
|
When `ascli` detects this file, it uses it during a transfer and then deletes it.
|
|
4003
4049
|
|
|
4004
4050
|
> [!NOTE]
|
|
4005
4051
|
> The JSON's keys use **snake case**, that is, lower case with `_` as word separator.
|
|
4006
|
-
> The list of message `type` can be found in `aspera/ascp/management.rb
|
|
4007
|
-
> The list of parameters (capitalized
|
|
4052
|
+
> The list of message `type` values can be found in `aspera/ascp/management.rb`: `OPERATIONS`.
|
|
4053
|
+
> The list of parameters is `PARAMETERS` (native names are capitalized, keys in the JSON file are in snake case).
|
|
4008
4054
|
|
|
4009
4055
|
##### Agent: Direct: `aspera.conf`: Virtual Links
|
|
4010
4056
|
|
|
4011
|
-
This agent supports a local configuration file
|
|
4057
|
+
This agent supports a local configuration file, `aspera.conf`, where Virtual links can be configured.
|
|
4012
4058
|
|
|
4013
4059
|
On a server (HSTS), the following commands can be used to set a global virtual link:
|
|
4014
4060
|
|
|
@@ -4019,7 +4065,7 @@ asconfigurator -x 'set_node_data;transfer_in_bandwidth_aggregate_trunk_id,1'
|
|
|
4019
4065
|
asconfigurator -x 'set_node_data;transfer_out_bandwidth_aggregate_trunk_id,2'
|
|
4020
4066
|
```
|
|
4021
4067
|
|
|
4022
|
-
|
|
4068
|
+
This command is not available on clients: instead, edit the file `aspera.conf` (its location is shown by `ascli config ascp info --fields=aspera_conf`) and modify the sections `default` and `trunks` like this for a global 100 Mbps virtual link (capacity is in kbps):
|
|
4023
4069
|
|
|
4024
4070
|
```xml
|
|
4025
4071
|
<?xml version='1.0' encoding='UTF-8'?>
|
|
@@ -4048,14 +4094,14 @@ But this command is not available on clients, so edit the file `aspera.conf`, yo
|
|
|
4048
4094
|
<name>in</name>
|
|
4049
4095
|
<on>true</on>
|
|
4050
4096
|
<capacity>
|
|
4051
|
-
<schedule format="ranges">
|
|
4097
|
+
<schedule format="ranges">100000</schedule>
|
|
4052
4098
|
</capacity>
|
|
4053
4099
|
</trunk>
|
|
4054
4100
|
<trunk>
|
|
4055
4101
|
<id>2</id>
|
|
4056
4102
|
<name>out</name>
|
|
4057
4103
|
<capacity>
|
|
4058
|
-
<schedule format="ranges">
|
|
4104
|
+
<schedule format="ranges">100000</schedule>
|
|
4059
4105
|
</capacity>
|
|
4060
4106
|
<on>true</on>
|
|
4061
4107
|
</trunk>
|
|
@@ -4084,7 +4130,7 @@ For example, to replace illegal character `|` with an underscore `_`:
|
|
|
4084
4130
|
ascli config ascp info --fields=aspera_conf
|
|
4085
4131
|
```
|
|
4086
4132
|
|
|
4087
|
-
Typically, it is located at `$HOME/sdk/aspera.conf`
|
|
4133
|
+
Typically, it is located at `$HOME/.aspera/sdk/aspera.conf`
|
|
4088
4134
|
|
|
4089
4135
|
1. Edit this file, and add the following line inside the XML section `CONF.default.file_system`:
|
|
4090
4136
|
|
|
@@ -4107,9 +4153,7 @@ The result should look like this:
|
|
|
4107
4153
|
</CONF>
|
|
4108
4154
|
```
|
|
4109
4155
|
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
The parameter works as follows:
|
|
4156
|
+
According to the [documentation](https://www.ibm.com/docs/en/ahts/4.4.x?topic=reference-user-group-default-configurations), the parameter works as follows:
|
|
4113
4157
|
|
|
4114
4158
|
- The first character in the value is the replacement character.
|
|
4115
4159
|
- All other characters listed after it are the **illegal** ones to be replaced.
|
|
@@ -4130,8 +4174,8 @@ In this example:
|
|
|
4130
4174
|
|
|
4131
4175
|
So, for example:
|
|
4132
4176
|
|
|
4133
|
-
- `report|final?.txt`
|
|
4134
|
-
- `data*backup"2025".csv`
|
|
4177
|
+
- `report|final?.txt` becomes `report_final_.txt`
|
|
4178
|
+
- `data*backup"2025".csv` becomes `data_backup_2025_.csv`
|
|
4135
4179
|
|
|
4136
4180
|
#### Agent: Connect Client
|
|
4137
4181
|
|
|
@@ -4160,13 +4204,13 @@ Parameters provided in option `transfer` are:
|
|
|
4160
4204
|
Like any other option, `transfer` can get its value from a pre-configured [Option Preset](#option-preset):
|
|
4161
4205
|
|
|
4162
4206
|
```shell
|
|
4163
|
-
--transfer=@preset:_name_here_
|
|
4207
|
+
--transfer=@preset:_name_here_ --transfer.agent=node
|
|
4164
4208
|
```
|
|
4165
4209
|
|
|
4166
4210
|
It can also directly use the [Extended Value](#extended-value-syntax) syntax:
|
|
4167
4211
|
|
|
4168
4212
|
```shell
|
|
4169
|
-
--transfer=@json:'{"url":"https://...","username":"_user_here_","password":"<PASSWORD>"}'
|
|
4213
|
+
--transfer=@json:'{"agent":"node","url":"https://...","username":"_user_here_","password":"<PASSWORD>"}'
|
|
4170
4214
|
```
|
|
4171
4215
|
|
|
4172
4216
|
If `transfer` is not specified and a default node has been configured (name in `node` for section `default`) then this node is used by default.
|
|
@@ -4192,7 +4236,7 @@ Parameters provided in option `transfer` are:
|
|
|
4192
4236
|
Example:
|
|
4193
4237
|
|
|
4194
4238
|
```shell
|
|
4195
|
-
ascli faspex5 packages
|
|
4239
|
+
ascli faspex5 packages receive 323 --transfer=httpgw --transfer.url=https://asperagw.example.com:9443/aspera/http-gwy
|
|
4196
4240
|
```
|
|
4197
4241
|
|
|
4198
4242
|
> [!NOTE]
|
|
@@ -4220,7 +4264,7 @@ Options for `transfer` are:
|
|
|
4220
4264
|
For example, to use an external, already running `transferd`, use option:
|
|
4221
4265
|
|
|
4222
4266
|
```shell
|
|
4223
|
-
--transfer=@json:'{"url":":55002","start":false,"stop":false}'
|
|
4267
|
+
--transfer=@json:'{"agent":"transferd","url":":55002","start":false,"stop":false}'
|
|
4224
4268
|
```
|
|
4225
4269
|
|
|
4226
4270
|
The gem `grpc` is not part of default dependencies, as it requires compilation of a native part.
|
|
@@ -4266,7 +4310,7 @@ All parameters necessary for this transfer are described in a [**transfer-spec**
|
|
|
4266
4310
|
`ascli` builds the [**transfer-spec**](#transfer-specification) internally as a `Hash`.
|
|
4267
4311
|
It is not necessary to provide additional parameters on the command line for a transfer.
|
|
4268
4312
|
|
|
4269
|
-
It is possible to modify or add any of the supported [**transfer-spec**](#transfer-specification)
|
|
4313
|
+
It is possible to modify or add any of the supported [**transfer-spec**](#transfer-specification) parameters using the `ts` option.
|
|
4270
4314
|
The `ts` option accepts a `Hash` [Extended Value](#extended-value-syntax) containing one or several [**transfer-spec**](#transfer-specification) parameters.
|
|
4271
4315
|
Multiple `ts` options on command line are cumulative, and the `Hash` value is deeply merged.
|
|
4272
4316
|
To remove a (deep) key from transfer spec, set the value to `null`.
|
|
@@ -4293,10 +4337,10 @@ Or an equivalent (using dotted expression):
|
|
|
4293
4337
|
|
|
4294
4338
|
This is especially useful for `ascp` command line parameters not supported in the transfer spec.
|
|
4295
4339
|
|
|
4296
|
-
The use of a [**transfer-spec**](#transfer-specification) instead of `ascp` command line arguments has the
|
|
4340
|
+
The use of a [**transfer-spec**](#transfer-specification) instead of `ascp` command line arguments has the following advantages:
|
|
4297
4341
|
|
|
4298
|
-
-
|
|
4299
|
-
-
|
|
4342
|
+
- It is common to all [Transfer Agents](#transfer-clients-agents)
|
|
4343
|
+
- It does not depend on command line limitations (special characters, and so on)
|
|
4300
4344
|
|
|
4301
4345
|
#### Transfer Parameters
|
|
4302
4346
|
|
|
@@ -4328,7 +4372,7 @@ An optional parameter can be specified to display the schema for a specific tran
|
|
|
4328
4372
|
ascli config ascp schema transferd --format=jsonpp
|
|
4329
4373
|
```
|
|
4330
4374
|
|
|
4331
|
-
`ascp` argument or environment variable
|
|
4375
|
+
The description gives the corresponding `ascp` argument or environment variable.
|
|
4332
4376
|
|
|
4333
4377
|
#### Transfer Specification Reference
|
|
4334
4378
|
|
|
@@ -4463,7 +4507,6 @@ The `sources` and `src_type` options provide convenient ways to populate the tra
|
|
|
4463
4507
|
Possible values for option `sources` are:
|
|
4464
4508
|
|
|
4465
4509
|
- `@args` : (default) the list of files (or file pair) is directly provided on the command line (after commands): unused arguments (not starting with `-`) are considered as source files.
|
|
4466
|
-
By default, the list of files to transfer is specified on the command line.
|
|
4467
4510
|
|
|
4468
4511
|
> [!IMPORTANT]
|
|
4469
4512
|
> When using `@:` to build a command parameter and `--sources=@args` (default),
|
|
@@ -4473,7 +4516,7 @@ By default, the list of files to transfer is specified on the command line.
|
|
|
4473
4516
|
**Example**:
|
|
4474
4517
|
|
|
4475
4518
|
```shell
|
|
4476
|
-
ascli server upload ~/
|
|
4519
|
+
ascli server upload ~/mysample.file secondfile
|
|
4477
4520
|
```
|
|
4478
4521
|
|
|
4479
4522
|
This is the same as (with default values):
|
|
@@ -4500,7 +4543,7 @@ By default, the list of files to transfer is specified on the command line.
|
|
|
4500
4543
|
|
|
4501
4544
|
Use the file list: one path per line:
|
|
4502
4545
|
|
|
4503
|
-
```
|
|
4546
|
+
```shell
|
|
4504
4547
|
--sources=@lines:@file:myfilelist.txt
|
|
4505
4548
|
```
|
|
4506
4549
|
|
|
@@ -4549,7 +4592,7 @@ ascli server upload --src-type=pair ~/Documents/Samples/200KB.1 /Upload/sample1
|
|
|
4549
4592
|
|
|
4550
4593
|
#### Source directory structure on destination
|
|
4551
4594
|
|
|
4552
|
-
This section is not specific to `ascli
|
|
4595
|
+
This section is not specific to `ascli`: it describes `ascp` behavior.
|
|
4553
4596
|
|
|
4554
4597
|
The transfer destination is normally expected to designate a destination folder.
|
|
4555
4598
|
|
|
@@ -4560,11 +4603,11 @@ But there is one exception: The destination specifies the new item name when the
|
|
|
4560
4603
|
- Destination is not an existing folder
|
|
4561
4604
|
- The `dirname` of destination is an existing folder
|
|
4562
4605
|
|
|
4563
|
-
For this reason it is recommended to set `create_dir` to `true` for consistent behavior between single and multiple
|
|
4606
|
+
For this reason, it is recommended to set `create_dir` to `true` for consistent behavior between single and multiple item transfers; this is the default in `ascli`.
|
|
4564
4607
|
|
|
4565
4608
|
If a simple source file list is provided (no `destination` in `paths`, that is, no `file_pair_list` provided), the destination folder is used as destination folder for each source file, and source file folder names are not preserved.
|
|
4566
4609
|
|
|
4567
|
-
The inner structure of source items that are
|
|
4610
|
+
The inner structure of source items that are folders is preserved on destination.
|
|
4568
4611
|
|
|
4569
4612
|
A leading `/` on destination is ignored (relative to docroot) unless docroot is not set (relative to home).
|
|
4570
4613
|
|
|
@@ -4598,11 +4641,11 @@ Advanced Example: Send files `./file1` and `./folder2/files2` to server (for exa
|
|
|
4598
4641
|
then destination will be: `/Upload/file1 /Upload/files2`
|
|
4599
4642
|
|
|
4600
4643
|
- One possibility is to specify a file pair list: `--src-type=pair file1 file1 folder2/files2 folder2/files2`
|
|
4601
|
-
- Another possibility is to specify a source base: `--
|
|
4644
|
+
- Another possibility is to specify a source base (transfer spec parameter `src_base`): `--ts.src_base=$PWD $PWD/file1 $PWD/folder2/files2`
|
|
4602
4645
|
|
|
4603
4646
|
The `.` path cannot be used as a source base.
|
|
4604
4647
|
|
|
4605
|
-
- Similarly, create a temporary soft link (Linux): `ln -s . tmp_base` and use `--
|
|
4648
|
+
- Similarly, create a temporary soft link (Linux): `ln -s . tmp_base` and use `--ts.src_base=tmp_base tmp_base/file1 tmp_base/folder2/files2`
|
|
4606
4649
|
- One can also similarly use `--sources=@ts` and specify the list of files in the `paths` field of transfer spec with both `source` and `destination` for each file.
|
|
4607
4650
|
|
|
4608
4651
|
#### Multi-session transfer
|
|
@@ -4632,7 +4675,7 @@ When multi-session is used, one separate UDP port is used per session (refer to
|
|
|
4632
4675
|
|
|
4633
4676
|
#### Content protection
|
|
4634
4677
|
|
|
4635
|
-
Content protection (Client-Side Encryption at
|
|
4678
|
+
Content protection (Client-Side Encryption at Rest, CSEAR) ensures that files remain encrypted while stored on the server.
|
|
4636
4679
|
With CSEAR, the client encrypts files during upload and decrypts files during download, using a passphrase known only to the users sharing the files.
|
|
4637
4680
|
|
|
4638
4681
|
- Upload: Files are encrypted on the client side before being sent to the server.
|
|
@@ -4640,7 +4683,7 @@ With CSEAR, the client encrypts files during upload and decrypts files during do
|
|
|
4640
4683
|
|
|
4641
4684
|
At all times, files remain encrypted on the server; encryption and decryption occur exclusively on the client side.
|
|
4642
4685
|
|
|
4643
|
-
Activating CSEAR consists
|
|
4686
|
+
Activating CSEAR consists of setting transfer spec parameters:
|
|
4644
4687
|
|
|
4645
4688
|
- `content_protection` : activate encryption (`encrypt` for upload) or decryption (`decrypt` for download)
|
|
4646
4689
|
- `content_protection_password` : the passphrase to be used.
|
|
@@ -4686,7 +4729,7 @@ Example: parameter to download a Faspex package and decrypt on the fly
|
|
|
4686
4729
|
|
|
4687
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).
|
|
4688
4731
|
|
|
4689
|
-
The same progress bar is used for any type of transfer
|
|
4732
|
+
The same progress bar is used for any type of transfer: using `ascp`, server to server, using HTTPS, and so on.
|
|
4690
4733
|
|
|
4691
4734
|
### Scheduler
|
|
4692
4735
|
|
|
@@ -4695,9 +4738,9 @@ Automated execution should therefore rely on operating system facilities.
|
|
|
4695
4738
|
|
|
4696
4739
|
Two common execution modes are supported:
|
|
4697
4740
|
|
|
4698
|
-
- Scheduled execution
|
|
4741
|
+
- Scheduled execution: run `ascli` commands periodically.
|
|
4699
4742
|
|
|
4700
|
-
- Daemon/service mode
|
|
4743
|
+
- Daemon/service mode: run `ascli` continuously as a server.
|
|
4701
4744
|
|
|
4702
4745
|
#### Creating a wrapping script
|
|
4703
4746
|
|
|
@@ -4734,9 +4777,9 @@ Windows provides the [Task Scheduler](https://docs.microsoft.com/en-us/windows/w
|
|
|
4734
4777
|
|
|
4735
4778
|
Tasks can be configured using:
|
|
4736
4779
|
|
|
4737
|
-
- [`schtasks.exe`](https://learn.microsoft.com/
|
|
4780
|
+
- [`schtasks.exe`](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-create)
|
|
4738
4781
|
|
|
4739
|
-
- PowerShell
|
|
4782
|
+
- PowerShell module [`ScheduledTasks`](https://learn.microsoft.com/en-us/powershell/module/scheduledtasks)
|
|
4740
4783
|
|
|
4741
4784
|
- `taskschd.msc` (UI)
|
|
4742
4785
|
|
|
@@ -4745,7 +4788,7 @@ By default, Windows Task Scheduler prevents overlapping executions.
|
|
|
4745
4788
|
#### Linux: `systemd` Timer
|
|
4746
4789
|
|
|
4747
4790
|
Most modern Linux distributions use `systemd` which provides scheduling via [`timer`](https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html) units.
|
|
4748
|
-
Define a name for the
|
|
4791
|
+
Define a name for the job, for example: `ascli_job` as `<NAME>` below.
|
|
4749
4792
|
|
|
4750
4793
|
1. Create the service
|
|
4751
4794
|
|
|
@@ -4811,7 +4854,7 @@ Example of `crontab` for user `xfer`.
|
|
|
4811
4854
|
```shell
|
|
4812
4855
|
crontab<<EOF
|
|
4813
4856
|
0 * * * * /home/xfer/bin/ascli_tool preview scan --logger=syslog --out.level=error
|
|
4814
|
-
2-59 * * * * /home/xfer/bin/ascli_tool preview
|
|
4857
|
+
2-59 * * * * /home/xfer/bin/ascli_tool preview trevents --logger=syslog --out.level=error
|
|
4815
4858
|
EOF
|
|
4816
4859
|
```
|
|
4817
4860
|
|
|
@@ -4823,7 +4866,7 @@ Linux also provides `anacron` for daily or hourly jobs that must run even if the
|
|
|
4823
4866
|
#### Running as system service (Daemon mode)
|
|
4824
4867
|
|
|
4825
4868
|
Some commands run continuously (for example, listening on a network port).
|
|
4826
|
-
In this case it is recommended to run `ascli` as a system service.
|
|
4869
|
+
In this case, it is recommended to run `ascli` as a system service.
|
|
4827
4870
|
|
|
4828
4871
|
On Linux this is typically done using [`systemd`](https://systemd.io/).
|
|
4829
4872
|
|
|
@@ -4900,7 +4943,7 @@ ascli config echo @ruby:'sleep 30' --lock-port=12345
|
|
|
4900
4943
|
|
|
4901
4944
|
- The second instance will exit immediately with:
|
|
4902
4945
|
|
|
4903
|
-
```
|
|
4946
|
+
```text
|
|
4904
4947
|
WARN -- : Another instance is already running (Address already in use - bind(2) for "127.0.0.1" port 12345).
|
|
4905
4948
|
```
|
|
4906
4949
|
|
|
@@ -4975,7 +5018,7 @@ To activate a PVCL library, place the corresponding shared library in the same f
|
|
|
4975
5018
|
Example:
|
|
4976
5019
|
|
|
4977
5020
|
```shell
|
|
4978
|
-
cp /opt/aspera/lib/pvcl/libpvcl_cloud.so $(ascli
|
|
5021
|
+
cp /opt/aspera/lib/pvcl/libpvcl_cloud.so $(ascli config ascp info --fields=root)
|
|
4979
5022
|
```
|
|
4980
5023
|
|
|
4981
5024
|
Then check available modules as shown previously (`ascp info`).
|
|
@@ -5003,7 +5046,7 @@ Where:
|
|
|
5003
5046
|
> Characters `?` and `&` are shell special characters (wildcard and background), so `faux` file specification on command line should be protected (using quotes or `\`).
|
|
5004
5047
|
> If not, the shell may give error: `no matches found` or equivalent.
|
|
5005
5048
|
|
|
5006
|
-
For all sizes, a suffix can be added (case-insensitive) to the size: k, m, g, t, p, e (values are
|
|
5049
|
+
For all sizes, a suffix can be added (case-insensitive) to the size: k, m, g, t, p, e (values are powers of 2, for example, 1M is 2<sup>20</sup>, that is, 1 mebibyte, not megabyte).
|
|
5007
5050
|
The maximum allowed value is 8\*2<sup>60</sup>.
|
|
5008
5051
|
Extremely large `faux` file sizes (petabyte range and above) will likely fail due to lack of destination storage unless destination is `faux://`.
|
|
5009
5052
|
|
|
@@ -5048,7 +5091,7 @@ Filenames generated are of the form: `<FILE>_<00000 ... count>_<FILESIZE>`
|
|
|
5048
5091
|
|
|
5049
5092
|
Examples:
|
|
5050
5093
|
|
|
5051
|
-
- Upload 20
|
|
5094
|
+
- Upload 20 gibibytes of generated data to file `myfile` in directory `/Upload`
|
|
5052
5095
|
|
|
5053
5096
|
```shell
|
|
5054
5097
|
ascli server upload faux:///myfile\?20g --to-folder=/Upload
|
|
@@ -5091,11 +5134,11 @@ See [HSTS `ascp` command reference](https://www.ibm.com/docs/en/ahts/4.4.x?topic
|
|
|
5091
5134
|
|
|
5092
5135
|
Key query parameters:
|
|
5093
5136
|
|
|
5094
|
-
| Parameter | Description
|
|
5095
|
-
|
|
5096
|
-
| `grow` | **(Required)** Wait time in seconds after last file change before the transfer is declared complete
|
|
5097
|
-
| `wait_start` | How the wait time is measured
|
|
5098
|
-
| `confirm_stop` | Set to `true` to let an external program signal completion by setting
|
|
5137
|
+
| Parameter | Description |
|
|
5138
|
+
|----------------|----------------------------------------------------------------------|
|
|
5139
|
+
| `grow` | **(Required)** Wait time in seconds after last file change before the transfer is declared complete.<br/>Default wait time is 10 s if set to a non-numeric string. |
|
|
5140
|
+
| `wait_start` | How the wait time is measured:<br/>- `mtime` (default) file modification time<br/>- `null_read` first zero-byte read. |
|
|
5141
|
+
| `confirm_stop` | Set to `true` to let an external program signal completion by setting:<br/>`mtime < current_time - wait_time`.<br/>Ignored when `wait_start=null_read`. |
|
|
5099
5142
|
|
|
5100
5143
|
> [!NOTE]
|
|
5101
5144
|
> `ascp` requires that all sources in a single transfer session share the same PVCL URI scheme.
|
|
@@ -5107,13 +5150,13 @@ Key query parameters:
|
|
|
5107
5150
|
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:
|
|
5108
5151
|
|
|
5109
5152
|
```shell
|
|
5110
|
-
ascli server upload growing --to-folder=/Upload --ts.source_root='file:///?grow=120' --progress=no --transfer.quiet=false
|
|
5153
|
+
ascli server upload growing --to-folder=/Upload --ts.source_root='file:///?grow=120' --progress-bar=no --transfer.quiet=false
|
|
5111
5154
|
```
|
|
5112
5155
|
|
|
5113
5156
|
- **URI directly on the command line with `file_list=false`**
|
|
5114
5157
|
|
|
5115
5158
|
```shell
|
|
5116
|
-
ascli server upload 'file:///./growing?grow=120' --to-folder=/Upload --transfer.file_list=false --transfer.quiet=false --progress=no
|
|
5159
|
+
ascli server upload 'file:///./growing?grow=120' --to-folder=/Upload --transfer.file_list=false --transfer.quiet=false --progress-bar=no
|
|
5117
5160
|
```
|
|
5118
5161
|
|
|
5119
5162
|
### Usage
|
|
@@ -5121,7 +5164,7 @@ Key query parameters:
|
|
|
5121
5164
|
```text
|
|
5122
5165
|
ascli -h
|
|
5123
5166
|
NAME
|
|
5124
|
-
ascli -- a command line tool for Aspera Applications (v4.27.
|
|
5167
|
+
ascli -- a command line tool for Aspera Applications (v4.27.3)
|
|
5125
5168
|
|
|
5126
5169
|
SYNOPSIS
|
|
5127
5170
|
ascli [GLOBAL_OPTIONS] <command> [OPTIONS] [ARGS]
|
|
@@ -5152,17 +5195,17 @@ ARGS
|
|
|
5152
5195
|
OPTIONS: global
|
|
5153
5196
|
--interactive=yes|no Use interactive input of missing params
|
|
5154
5197
|
--ask-options=yes|no Ask even optional options
|
|
5155
|
-
--out=HASH Output rendering options (dot-notation: format, level, file, fields, select, table[.pivot], flat, secrets, img)
|
|
5156
|
-
--display=info|data|error Output only some information (deprecated: use --out.level)
|
|
5198
|
+
--out=HASH Output rendering options (dot-notation: format, level, file, fields, select, table[.pivot], flat, secrets, colors, utf8, img)
|
|
5199
|
+
--display=info|data|error Output only some information (deprecated after 4.27.0: use --out.level)
|
|
5157
5200
|
--format=ENUM Output format (also: --out.format)
|
|
5158
|
-
--output=VALUE Destination for results (deprecated: use --out.file)
|
|
5201
|
+
--output=VALUE Destination for results (deprecated after 4.27.0: use --out.file)
|
|
5159
5202
|
--fields=LIST Comma separated list of: fields, or ALL, or DEF (also: --out.fields)
|
|
5160
5203
|
--select=HASH Select only some items in lists: column, value (also: --out.select)
|
|
5161
|
-
--table-style=HASH (Table) Display style (deprecated: use --out.table)
|
|
5162
|
-
--flat-hash=yes|no (Table) Display deep values as additional keys (deprecated: use --out.flat)
|
|
5163
|
-
--multi-single=no|yes|single (Table) Control how object list is displayed as single table, or multiple objects (deprecated: use --out.table.pivot)
|
|
5164
|
-
--show-secrets=yes|no Show secrets on command output (deprecated: use --out.secrets)
|
|
5165
|
-
--image=HASH Options for displaying images and thumbnails in the terminal (deprecated: use --out.img)
|
|
5204
|
+
--table-style=HASH (Table) Display style (deprecated after 4.27.0: use --out.table)
|
|
5205
|
+
--flat-hash=yes|no (Table) Display deep values as additional keys (deprecated after 4.27.0: use --out.flat)
|
|
5206
|
+
--multi-single=no|yes|single (Table) Control how object list is displayed as single table, or multiple objects (deprecated after 4.27.0: use --out.table.pivot)
|
|
5207
|
+
--show-secrets=yes|no Show secrets on command output (deprecated after 4.27.0: use --out.secrets)
|
|
5208
|
+
--image=HASH Options for displaying images and thumbnails in the terminal (deprecated after 4.27.0: use --out.img)
|
|
5166
5209
|
-h, --help Show this message
|
|
5167
5210
|
--show-config Display parameters used for the provided action
|
|
5168
5211
|
-v, --version Display version
|
|
@@ -5198,10 +5241,11 @@ OPTIONS: global
|
|
|
5198
5241
|
--notify-to=VALUE Email: Recipient for notification of transfers
|
|
5199
5242
|
--notify-template=VALUE Email: ERB template for notification of transfers
|
|
5200
5243
|
--cache-tokens=yes|no Save and reuse OAuth tokens
|
|
5244
|
+
--expand-mounts=yes|no Commands: list commands of sub-trees provided by another plugin
|
|
5245
|
+
-N, --no-default Do not load default configuration for plugin
|
|
5201
5246
|
--query=HASH Additional filter for for some commands (list/delete)
|
|
5202
5247
|
--bulk=yes|no Bulk operation (only some)
|
|
5203
5248
|
--bfail=yes|no Bulk operation error handling
|
|
5204
|
-
-N, --no-default Do not load default configuration for plugin
|
|
5205
5249
|
--override=yes|no Wizard: override existing value
|
|
5206
5250
|
--default=yes|no Wizard: set as default configuration for specified plugin (also: update)
|
|
5207
5251
|
--key-path=VALUE Wizard: path to private key for JWT
|
|
@@ -5216,7 +5260,7 @@ OPTIONS: global
|
|
|
5216
5260
|
--sources=VALUE How list of transferred files is provided (@args,@ts,Array)
|
|
5217
5261
|
--src-type=list|pair Type of file list
|
|
5218
5262
|
--transfer=HASH Transfer agent type, or agent parameters with optional agent key
|
|
5219
|
-
--transfer-info=HASH Parameters for transfer agent (deprecated: use --transfer instead)
|
|
5263
|
+
--transfer-info=HASH Parameters for transfer agent (deprecated after 4.26.2: use --transfer instead)
|
|
5220
5264
|
|
|
5221
5265
|
PLUGINS
|
|
5222
5266
|
alee Aspera License Entitlement Engine
|
|
@@ -5241,12 +5285,12 @@ PLUGINS
|
|
|
5241
5285
|
|
|
5242
5286
|
Bulk creation and deletion of resources are possible using option `bulk` (`yes`,`no`(default)).
|
|
5243
5287
|
In that case, the operation expects an `Array` of `Hash` instead of a simple `Hash` using the [Extended Value](#extended-value-syntax) syntax.
|
|
5244
|
-
This option is available only for some resources: if you need it
|
|
5288
|
+
This option is available only for some resources: if you need it, try and see if the entities you create or delete support this option.
|
|
5245
5289
|
|
|
5246
5290
|
### Option: `query`
|
|
5247
5291
|
|
|
5248
5292
|
The `query` option can generally be used to add URL parameters to commands that list resources.
|
|
5249
|
-
It takes
|
|
5293
|
+
It takes a `Hash`, corresponding to key/value pairs that appear in the query part of the request.
|
|
5250
5294
|
|
|
5251
5295
|
For example: `--query=@json:'{"p1":"v1","p2":"v2"}'` leads to query: `?p1=v1&p2=v2`.
|
|
5252
5296
|
|
|
@@ -5270,17 +5314,17 @@ Each plugin usually represents commands sent to a specific application.
|
|
|
5270
5314
|
Available plugins can be found using command:
|
|
5271
5315
|
|
|
5272
5316
|
```shell
|
|
5273
|
-
ascli config
|
|
5317
|
+
ascli config plugins list
|
|
5274
5318
|
```
|
|
5275
5319
|
|
|
5276
5320
|
```text
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5321
|
+
╭────────┬────────┬────────┬─────────────────────────────────────────────────╮
|
|
5322
|
+
│ plugin │ detect │ wizard │ path │
|
|
5323
|
+
╞════════╪════════╪════════╪═════════════════════════════════════════════════╡
|
|
5324
|
+
│ shares │ ✓ │ ✓ │ .../aspera-cli/lib/aspera/cli/plugins/shares.rb │
|
|
5325
|
+
│ node │ ✓ │ ✓ │ .../aspera-cli/lib/aspera/cli/plugins/node.rb │
|
|
5282
5326
|
...
|
|
5283
|
-
|
|
5327
|
+
╰────────┴────────┴────────┴─────────────────────────────────────────────────╯
|
|
5284
5328
|
```
|
|
5285
5329
|
|
|
5286
5330
|
Most plugins will take the URL option: `url` to identify their location.
|
|
@@ -5289,7 +5333,7 @@ REST APIs of Aspera legacy applications (Aspera Node, Shares, Console, Orchestra
|
|
|
5289
5333
|
|
|
5290
5334
|
Aspera on Cloud and Faspex 5 rely on OAuth.
|
|
5291
5335
|
|
|
5292
|
-
By default, plugins are looked
|
|
5336
|
+
By default, plugins are looked up in folders specified by (multi-value) option `plugin_folder`:
|
|
5293
5337
|
|
|
5294
5338
|
```shell
|
|
5295
5339
|
ascli --show-config --fields=plugin_folder
|
|
@@ -5298,13 +5342,14 @@ ascli --show-config --fields=plugin_folder
|
|
|
5298
5342
|
You can create the skeleton of a new plugin like this:
|
|
5299
5343
|
|
|
5300
5344
|
```shell
|
|
5301
|
-
ascli config
|
|
5345
|
+
ascli config plugins create foo .
|
|
5302
5346
|
```
|
|
5303
5347
|
|
|
5304
5348
|
```text
|
|
5305
5349
|
Created ./foo.rb
|
|
5306
5350
|
```
|
|
5307
5351
|
|
|
5352
|
+
|
|
5308
5353
|
```shell
|
|
5309
5354
|
ascli --plugin-folder=. foo
|
|
5310
5355
|
```
|
|
@@ -5323,7 +5368,7 @@ A Transfer Agent is used by setting the option `transfer` (for example, `--trans
|
|
|
5323
5368
|
|
|
5324
5369
|
`ascli` is typically executed in a shell, either interactively or in a script.
|
|
5325
5370
|
`ascli` receives its arguments on the command line.
|
|
5326
|
-
The way arguments are parsed and provided to `ascli`
|
|
5371
|
+
The way arguments are parsed and provided to `ascli` depends on the operating system and shell.
|
|
5327
5372
|
|
|
5328
5373
|
#### Shell parsing for Unix-like systems: Linux, macOS, AIX
|
|
5329
5374
|
|
|
@@ -5332,10 +5377,10 @@ It is fully documented in the shell's documentation.
|
|
|
5332
5377
|
|
|
5333
5378
|
On Unix-like environments, this is typically a POSIX-like shell (`bash`, `zsh`, `ksh`, `sh`).
|
|
5334
5379
|
A c-shell (`csh`, `tcsh`) or other shell can also be used.
|
|
5335
|
-
In this environment the shell parses the command line, possibly replacing variables, and so on
|
|
5380
|
+
In this environment, the shell parses the command line, possibly replacing variables, and so on.
|
|
5336
5381
|
See [bash shell operation](https://www.gnu.org/software/bash/manual/bash.html#Shell-Operation).
|
|
5337
5382
|
The shell builds the list of arguments and then `fork`/`exec` Ruby with that list.
|
|
5338
|
-
Ruby receives
|
|
5383
|
+
Ruby receives the list of command line arguments from the shell and gives it to `ascli`.
|
|
5339
5384
|
Special character handling (quotes, spaces, env vars, ...) is handled by the shell for any command executed.
|
|
5340
5385
|
|
|
5341
5386
|
#### Shell parsing for Windows
|
|
@@ -5377,10 +5422,10 @@ It's up to the program to split arguments:
|
|
|
5377
5422
|
|
|
5378
5423
|
`ascli` is a Ruby program, so Ruby parses the command line (received with `GetCommandLineW`) into arguments and provides them to the Ruby code (`$0` and `ARGV`).
|
|
5379
5424
|
Ruby vaguely follows the Microsoft C/C++ parameter parsing rules.
|
|
5380
|
-
(See `w32_cmdvector` in Ruby source [`win32.c`](https://github.com/ruby/ruby/blob/master/win32/win32.c#L1766))
|
|
5425
|
+
(See `w32_cmdvector` in Ruby source [`win32.c`](https://github.com/ruby/ruby/blob/master/win32/win32.c#L1766)): <!--cspell:disable-line-->
|
|
5381
5426
|
|
|
5382
5427
|
- Space characters: split arguments (space, tab, newline)
|
|
5383
|
-
- Backslash: `\`
|
|
5428
|
+
- Backslash: `\` escapes a single special character
|
|
5384
5429
|
- Globbing characters: `*?[]{}` for file globbing
|
|
5385
5430
|
- Double quotes: `"`
|
|
5386
5431
|
- Single quotes: `'`
|
|
@@ -5408,7 +5453,7 @@ The following examples give the same result on Windows using `cmd.exe`:
|
|
|
5408
5453
|
```
|
|
5409
5454
|
|
|
5410
5455
|
`cmd.exe` handles some special characters: `^"<>|%&`.
|
|
5411
|
-
It handles I/O redirection (`<>|`), shell variables (`%`), multiple commands (`&`)
|
|
5456
|
+
It handles I/O redirection (`<>|`), shell variables (`%`), and multiple commands (`&`).
|
|
5412
5457
|
Eventually, all those special characters are removed from the command line unless escaped with `^` or `"`.
|
|
5413
5458
|
`"` are kept and given to the program.
|
|
5414
5459
|
|
|
@@ -5417,17 +5462,17 @@ Eventually, all those special characters are removed from the command line unles
|
|
|
5417
5462
|
For PowerShell, the behavior depends on the version (5.1, 7.3+).
|
|
5418
5463
|
|
|
5419
5464
|
A difficulty is that PowerShell parses the command line for its own use and manages special characters, but then it passes the command line to the program (Ruby) as a single string, possibly without the special characters.
|
|
5420
|
-
If not using PowerShell features (for example,
|
|
5465
|
+
If not using PowerShell features (for example, variables), one can use the "stop-parsing" token `--%`.
|
|
5421
5466
|
|
|
5422
5467
|
Details can be found here:
|
|
5423
5468
|
|
|
5424
5469
|
- [Passing arguments with quotes](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing#passing-arguments-that-contain-quote-characters)
|
|
5425
5470
|
|
|
5426
|
-
- [
|
|
5471
|
+
- [Quoting rules](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules)
|
|
5427
5472
|
|
|
5428
5473
|
##### PowerShell 5
|
|
5429
5474
|
|
|
5430
|
-
- Check your
|
|
5475
|
+
- Check your PowerShell version:
|
|
5431
5476
|
|
|
5432
5477
|
```powershell
|
|
5433
5478
|
$psversiontable.psversion.Major
|
|
@@ -5509,19 +5554,19 @@ ascli config echo "@json:$(@{ k = $var; x = $true } | ConvertTo-Json -Compress)"
|
|
|
5509
5554
|
|
|
5510
5555
|
#### Extended Value (JSON, Ruby, ...)
|
|
5511
5556
|
|
|
5512
|
-
Some values provided to `ascli` (options, **Command Parameters**) are expected to be [Extended
|
|
5557
|
+
Some values provided to `ascli` (options, **Command Parameters**) are expected to be [Extended Values](#extended-value-syntax), that is, not a simple `String`, but a composite structure (`Hash`, `Array`).
|
|
5513
5558
|
|
|
5514
5559
|
For small structures with a few keys, the [dot-path](#dot-path-notation) `key.subkey=value` notation (using `@:` to collect positional arguments, or `--opt.key=value` directly for options) is often the most convenient: it requires no quoting and reads naturally on the command line.
|
|
5515
5560
|
For larger or more complex structures (deep nesting, arrays of hashes, values copied from API documentation), the `@json:` modifier is typically a better fit.
|
|
5516
|
-
`@json:` expects a [JSON](https://www.json.org/) value; note that `"` is used to enclose a `String` in JSON, which may be difficult to specify in shells
|
|
5561
|
+
`@json:` expects a [JSON](https://www.json.org/) value; note that `"` is used to enclose a `String` in JSON, which may be difficult to specify in shells: enclose the whole argument in single quotes to avoid this.
|
|
5517
5562
|
|
|
5518
5563
|
Any option or **Command Parameter** expecting a `Hash` value accepts the special value `help` to display its schema.
|
|
5519
5564
|
See [Schema Discovery with `help`](#schema-discovery-with-help).
|
|
5520
5565
|
|
|
5521
5566
|
#### Using a shell variable, parsed by shell, in an Extended Value
|
|
5522
5567
|
|
|
5523
|
-
To be evaluated by shell, the shell variable must not be in single quotes.
|
|
5524
|
-
|
|
5568
|
+
To be evaluated by the shell, the shell variable must not be in single quotes.
|
|
5569
|
+
Enclose the variable in double quotes so that it results in a single argument for `ascli` even if its value contains spaces: `bash` splits the result of an unquoted variable expansion into several words (`zsh` does not, by default).
|
|
5525
5570
|
|
|
5526
5571
|
> [!NOTE]
|
|
5527
5572
|
> We use a simple shell variable in this example.
|
|
@@ -5529,8 +5574,8 @@ Even if the variable contains spaces it results only in one argument for `ascli`
|
|
|
5529
5574
|
|
|
5530
5575
|
```shell
|
|
5531
5576
|
MYVAR="Hello World"
|
|
5532
|
-
ascli config echo @json:'{"title":"'$MYVAR'"}' --format=json
|
|
5533
|
-
ascli config echo @json:{\"title\":\"$MYVAR\"} --format=json
|
|
5577
|
+
ascli config echo @json:'{"title":"'"$MYVAR"'"}' --format=json
|
|
5578
|
+
ascli config echo "@json:{\"title\":\"$MYVAR\"}" --format=json
|
|
5534
5579
|
```
|
|
5535
5580
|
|
|
5536
5581
|
```json
|
|
@@ -5612,7 +5657,7 @@ ascli config echo @ruby:"{'title'=>gets.chomp}" --format=json
|
|
|
5612
5657
|
|
|
5613
5658
|
#### Command line arguments from a file
|
|
5614
5659
|
|
|
5615
|
-
If you need to provide a list of command line
|
|
5660
|
+
If you need to provide a list of command line arguments from lines that are in a file, on Linux you can use the `xargs` command:
|
|
5616
5661
|
|
|
5617
5662
|
```shell
|
|
5618
5663
|
xargs -a lines.txt -d \\n ascli config echo
|
|
@@ -5626,7 +5671,7 @@ ascli config echo [line1] [line2] [line3] ...
|
|
|
5626
5671
|
|
|
5627
5672
|
If there are spaces in the lines, those are not taken as separator, as we provide option `-d \\n` to `xargs`.
|
|
5628
5673
|
|
|
5629
|
-
#### Extended value using special characters read from
|
|
5674
|
+
#### Extended value using special characters read from environment variables or files
|
|
5630
5675
|
|
|
5631
5676
|
Using a text editor or shell: create a file `title.txt` (and env var) that contains exactly the text required: `Test " ' & \` :
|
|
5632
5677
|
|
|
@@ -5792,7 +5837,7 @@ The first step is to declare `ascli` in Aspera on Cloud using the admin interfac
|
|
|
5792
5837
|
|
|
5793
5838
|
To register with web-based authentication (auth=web):
|
|
5794
5839
|
|
|
5795
|
-
- Open a web browser, log to your instance: for example, `https://<ORG_NAME>.ibmaspera.com/`
|
|
5840
|
+
- Open a web browser, log in to your instance: for example, `https://<ORG_NAME>.ibmaspera.com/`
|
|
5796
5841
|
(use your actual AoC instance URL)
|
|
5797
5842
|
- Go to (Apps) → Admin → Organization → Integrations
|
|
5798
5843
|
- Click **Create New**
|
|
@@ -5807,7 +5852,7 @@ To register with web-based authentication (auth=web):
|
|
|
5807
5852
|
> For web based authentication, `ascli` listens on a local port (for example, specified by the `redirect_uri` parameter, in this example: `12345`), and the browser will provide the OAuth code there.
|
|
5808
5853
|
> For `ascli`, HTTP is required, and `12345` is the default port.
|
|
5809
5854
|
|
|
5810
|
-
Once the client is registered, a **Client ID** and **Secret** are created
|
|
5855
|
+
Once the client is registered, a **Client ID** and **Secret** are created; these values are used in the next step.
|
|
5811
5856
|
|
|
5812
5857
|
#### Configuration for Aspera on Cloud
|
|
5813
5858
|
|
|
@@ -5828,7 +5873,7 @@ updated: <AOC_ORG>
|
|
|
5828
5873
|
|
|
5829
5874
|
(This can also be done in one line using the command `config preset update <AOC_ORG> --url=...`)
|
|
5830
5875
|
|
|
5831
|
-
Define this [Option Preset](#option-preset) as default configuration for the `
|
|
5876
|
+
Define this [Option Preset](#option-preset) as default configuration for the `aoc` plugin:
|
|
5832
5877
|
|
|
5833
5878
|
```shell
|
|
5834
5879
|
ascli config preset set default aoc <AOC_ORG>
|
|
@@ -5840,7 +5885,7 @@ ascli config preset set default aoc <AOC_ORG>
|
|
|
5840
5885
|
|
|
5841
5886
|
#### Authentication with private key
|
|
5842
5887
|
|
|
5843
|
-
For
|
|
5888
|
+
For browser-less, private key-based authentication, use the following steps.
|
|
5844
5889
|
|
|
5845
5890
|
To use JSON Web Token (JWT) for Aspera on Cloud API client authentication,
|
|
5846
5891
|
a [private/public key pair](#private-key) must be used.
|
|
@@ -5848,11 +5893,11 @@ a [private/public key pair](#private-key) must be used.
|
|
|
5848
5893
|
##### API Client JWT activation
|
|
5849
5894
|
|
|
5850
5895
|
If you are not using the built-in client_id and secret, JWT needs to be authorized in Aspera on Cloud.
|
|
5851
|
-
This can be done in two
|
|
5896
|
+
This can be done in two ways:
|
|
5852
5897
|
|
|
5853
5898
|
- Graphically
|
|
5854
5899
|
|
|
5855
|
-
- Open a web browser, log to your instance: `https://<ORG_NAME>.ibmaspera.com/`
|
|
5900
|
+
- Open a web browser, log in to your instance: `https://<ORG_NAME>.ibmaspera.com/`
|
|
5856
5901
|
(Use your actual AoC instance URL)
|
|
5857
5902
|
- Go to Apps → Admin → Organization → Integrations
|
|
5858
5903
|
- Click the previously created application
|
|
@@ -5889,13 +5934,13 @@ modified
|
|
|
5889
5934
|
#### User key registration
|
|
5890
5935
|
|
|
5891
5936
|
The public key must be assigned to your user.
|
|
5892
|
-
This can be done in two
|
|
5937
|
+
This can be done in two ways as follows.
|
|
5893
5938
|
|
|
5894
5939
|
##### Graphically
|
|
5895
5940
|
|
|
5896
5941
|
Open the previously generated public key located here: `$HOME/.aspera/ascli/<PKEY_NAME>.pub`
|
|
5897
5942
|
|
|
5898
|
-
- Open a web browser, log to your instance: `https://<ORG_NAME>.ibmaspera.com/`
|
|
5943
|
+
- Open a web browser, log in to your instance: `https://<ORG_NAME>.ibmaspera.com/`
|
|
5899
5944
|
(Use your actual AoC instance URL)
|
|
5900
5945
|
- Click the user icon (top right)
|
|
5901
5946
|
- Select **Account Settings**
|
|
@@ -5927,7 +5972,7 @@ modified
|
|
|
5927
5972
|
```
|
|
5928
5973
|
|
|
5929
5974
|
> [!TIP]
|
|
5930
|
-
> The `
|
|
5975
|
+
> The `ascli aoc user profile show` command can be used to verify modifications.
|
|
5931
5976
|
|
|
5932
5977
|
#### [Option Preset](#option-preset) modification for JWT
|
|
5933
5978
|
|
|
@@ -5968,7 +6013,7 @@ Alternatively:
|
|
|
5968
6013
|
For a simpler use, configure a preset with the `url` option, and optionally `username`.
|
|
5969
6014
|
(If the username is not provided, then the subject from the token is used, else both must match.)
|
|
5970
6015
|
|
|
5971
|
-
Use the cookie string
|
|
6016
|
+
Use the cookie string as the value of option `password`; an environment variable is convenient, as the value is temporary anyway:
|
|
5972
6017
|
|
|
5973
6018
|
```shell
|
|
5974
6019
|
export ASCLI_PASSWORD="...; aoc.token=...; aoc.refresh=...; ..."
|
|
@@ -5980,7 +6025,7 @@ ascli aoc user profile show --auth=boot
|
|
|
5980
6025
|
> The cookie string contains `aoc.token` (bearer JWT, mandatory) and `aoc.refresh` (refresh token, optional).
|
|
5981
6026
|
> Only those two are used.
|
|
5982
6027
|
> On first use, the tokens are cached locally.
|
|
5983
|
-
> Subsequent calls reuse the cache and refresh automatically:
|
|
6028
|
+
> Subsequent calls reuse the cache and refresh automatically: the `password` option is used only to get the `username` unless the option `username` is already provided.
|
|
5984
6029
|
|
|
5985
6030
|
#### Public and private links
|
|
5986
6031
|
|
|
@@ -5993,14 +6038,14 @@ Private links require the user to authenticate.
|
|
|
5993
6038
|
So, provide the same options as for regular authentication, and provide the private link using option `url`.
|
|
5994
6039
|
|
|
5995
6040
|
A user may not be part of any workspace, but still have access to shared folders (using private links).
|
|
5996
|
-
In that case, it is possible to list those shared
|
|
6041
|
+
In that case, it is possible to list those shared folders by using a value for option `workspace` equal to `@none:` or `@json:null` or `@ruby:nil`.
|
|
5997
6042
|
|
|
5998
6043
|
#### AoC: First Use
|
|
5999
6044
|
|
|
6000
6045
|
Once client has been registered and [Option Preset](#option-preset) created: `ascli` can be used:
|
|
6001
6046
|
|
|
6002
6047
|
```shell
|
|
6003
|
-
ascli aoc files
|
|
6048
|
+
ascli aoc files browse /
|
|
6004
6049
|
```
|
|
6005
6050
|
|
|
6006
6051
|
```text
|
|
@@ -6010,7 +6055,7 @@ empty
|
|
|
6010
6055
|
|
|
6011
6056
|
### Calling AoC APIs from command line
|
|
6012
6057
|
|
|
6013
|
-
The command `ascli aoc
|
|
6058
|
+
The command `ascli aoc bearer_token` can be used to generate an OAuth token suitable to call any AoC API.
|
|
6014
6059
|
This can be useful when a command is not yet available.
|
|
6015
6060
|
|
|
6016
6061
|
Example:
|
|
@@ -6026,14 +6071,14 @@ ascli aoc files bearer_token_node /
|
|
|
6026
6071
|
```
|
|
6027
6072
|
|
|
6028
6073
|
```shell
|
|
6029
|
-
ascli aoc admin node bearer_token <NODE_ID>
|
|
6074
|
+
ascli aoc admin node bearer_token <NODE_ID>
|
|
6030
6075
|
```
|
|
6031
6076
|
|
|
6032
6077
|
### Administration
|
|
6033
6078
|
|
|
6034
|
-
The `admin` command allows several administrative tasks (and
|
|
6079
|
+
The `admin` command allows several administrative tasks (and requires admin privilege).
|
|
6035
6080
|
|
|
6036
|
-
It allows actions (create, update, delete) on **resources**: users, groups, nodes,
|
|
6081
|
+
It allows actions (create, update, delete) on **resources**: users, groups, nodes, workspaces, and so on, with the `admin <RESOURCE_TYPE>` commands.
|
|
6037
6082
|
|
|
6038
6083
|
#### Listing resources
|
|
6039
6084
|
|
|
@@ -6061,8 +6106,8 @@ The following parameters are supported:
|
|
|
6061
6106
|
> [!NOTE]
|
|
6062
6107
|
> Both `max` and `pmax` are processed internally in `ascli`, not included in actual API call and limit the number of successive pages requested to API.
|
|
6063
6108
|
> `ascli` will return all values using paging if not provided.
|
|
6064
|
-
> `page` and `per_page` are normally added by `ascli` to build successive API calls to get all values if there are more than 1000
|
|
6065
|
-
(AoC allows a maximum page size of 1000).
|
|
6109
|
+
> `page` and `per_page` are normally added by `ascli` to build successive API calls to get all values if there are more than 1000
|
|
6110
|
+
> (AoC allows a maximum page size of 1000).
|
|
6066
6111
|
> Other parameters depend on the type of resource (refer to AoC API) and are directly sent as parameters to the `GET` request on API.
|
|
6067
6112
|
|
|
6068
6113
|
> [!TIP]
|
|
@@ -6080,7 +6125,7 @@ Examples:
|
|
|
6080
6125
|
ascli aoc admin user list --query.q=laurent
|
|
6081
6126
|
```
|
|
6082
6127
|
|
|
6083
|
-
- List users who logged
|
|
6128
|
+
- List users who logged in before a date:
|
|
6084
6129
|
|
|
6085
6130
|
```shell
|
|
6086
6131
|
ascli aoc admin user list --query.q='last_login_at:<2018-05-28'
|
|
@@ -6098,17 +6143,15 @@ Resources are identified by a unique `id` and a unique `name` (case-insensitive)
|
|
|
6098
6143
|
|
|
6099
6144
|
To execute an action on a specific resource, select it using one of those methods:
|
|
6100
6145
|
|
|
6101
|
-
- **recommended**: give ID directly on command line **after the action**: `aoc admin node show 123`
|
|
6102
|
-
- Give name
|
|
6103
|
-
- Provide option `id` : `aoc admin node show 123`
|
|
6104
|
-
- Provide option `name` : `aoc admin node show %name:abc`
|
|
6146
|
+
- **recommended**: give the ID directly on the command line **after the action**: `aoc admin node show 123`
|
|
6147
|
+
- Give another unique field, such as the name, using the [percent selector](#percent-selector) **after the action**: `aoc admin node show %name:abc`
|
|
6105
6148
|
|
|
6106
6149
|
#### Creating a resource
|
|
6107
6150
|
|
|
6108
6151
|
New resources (users, groups, workspaces, and so on) can be created using a command like:
|
|
6109
6152
|
|
|
6110
6153
|
```shell
|
|
6111
|
-
ascli aoc admin
|
|
6154
|
+
ascli aoc admin <RESOURCE_TYPE> create @json:'{<...parameters...>}'
|
|
6112
6155
|
```
|
|
6113
6156
|
|
|
6114
6157
|
Some API endpoints are described in [IBM API Hub](https://developer.ibm.com/apis/catalog?search=%22aspera%20on%20cloud%20api%22).
|
|
@@ -6124,7 +6167,7 @@ ascli aoc admin group show 12345 --format=json
|
|
|
6124
6167
|
{"created_at":"2018-07-24T21:46:39.000Z","description":null,"id":"12345","manager":false,"name":"A8Demo WS1","owner":false,"queued_operation_count":0,"running_operation_count":0,"stopped_operation_count":0,"updated_at":"2018-07-24T21:46:39.000Z","saml_group":false,"saml_group_dn":null,"system_group":true,"system_group_type":"workspace_members"}
|
|
6125
6168
|
```
|
|
6126
6169
|
|
|
6127
|
-
Remove the parameters that are
|
|
6170
|
+
Remove the parameters that are set by the system (`id`, `created_at`, `updated_at`), and optional ones.
|
|
6128
6171
|
|
|
6129
6172
|
And then craft your command:
|
|
6130
6173
|
|
|
@@ -6132,16 +6175,16 @@ And then craft your command:
|
|
|
6132
6175
|
ascli aoc admin group create @json:'{"wrong":"param"}'
|
|
6133
6176
|
```
|
|
6134
6177
|
|
|
6135
|
-
If the command returns an error, example:
|
|
6178
|
+
If the command returns an error, for example:
|
|
6136
6179
|
|
|
6137
6180
|
```text
|
|
6138
|
-
|
|
6181
|
+
ERRR Rest: found unpermitted parameter: :wrong
|
|
6139
6182
|
code: unpermitted_parameters
|
|
6140
6183
|
request_id: 2a487dbc-bc5c-41ab-86c8-3b9972dfd4c4
|
|
6141
6184
|
api.ibmaspera.com 422 Unprocessable Entity
|
|
6142
6185
|
```
|
|
6143
6186
|
|
|
6144
|
-
|
|
6187
|
+
Remove the offending parameters and try again.
|
|
6145
6188
|
|
|
6146
6189
|
> [!NOTE]
|
|
6147
6190
|
> Some properties that are shown in the web UI, such as membership, are not listed directly in the resource, but instead another resource is created to link a user and its group: `group_membership`
|
|
@@ -6150,10 +6193,10 @@ Well, remove the offending parameters and try again.
|
|
|
6150
6193
|
|
|
6151
6194
|
To access some administrative actions on **nodes** (in fact, access keys), the associated secret may be required.
|
|
6152
6195
|
The secret is provided using the `secret` option.
|
|
6153
|
-
For example in a command like:
|
|
6196
|
+
For example, in a command like:
|
|
6154
6197
|
|
|
6155
6198
|
```shell
|
|
6156
|
-
ascli aoc admin node <NODE_ID> v3 info
|
|
6199
|
+
ascli aoc admin node do <NODE_ID> v3 info
|
|
6157
6200
|
```
|
|
6158
6201
|
|
|
6159
6202
|
It is also possible to store secrets in the [secret vault](#secret-vault) and then automatically find the related secret using the [config finder](#configuration-finder).
|
|
@@ -6166,8 +6209,8 @@ The activity app can be queried with:
|
|
|
6166
6209
|
ascli aoc admin analytics transfers
|
|
6167
6210
|
```
|
|
6168
6211
|
|
|
6169
|
-
It
|
|
6170
|
-
A template is defined using option `notify_template
|
|
6212
|
+
It supports filters and can send notifications using option `notify_to`.
|
|
6213
|
+
A template is defined using option `notify_template`:
|
|
6171
6214
|
|
|
6172
6215
|
`mytemplate.erb`:
|
|
6173
6216
|
|
|
@@ -6195,13 +6238,13 @@ ascli aoc admin analytics transfers --once-only=yes --lock-port=12345 --query=@j
|
|
|
6195
6238
|
|
|
6196
6239
|
Options:
|
|
6197
6240
|
|
|
6198
|
-
- `once_only
|
|
6199
|
-
- `query
|
|
6200
|
-
- `
|
|
6241
|
+
- `once_only`: keep track of the last date it was called, so that the next call gets only new events
|
|
6242
|
+
- `query`: filter (on API call)
|
|
6243
|
+
- `notify_to`, `notify_template`: send an email as specified by the template; the template can be placed in a file with the `@file:` modifier.
|
|
6201
6244
|
|
|
6202
6245
|
> [!NOTE]
|
|
6203
6246
|
> This must not be executed in less than 5 minutes because the analytics interface accepts only a period of time between 5 minutes and 6 months.
|
|
6204
|
-
The period is `[date of previous execution]..[now]`.
|
|
6247
|
+
> The period is `[date of previous execution]..[now]`.
|
|
6205
6248
|
|
|
6206
6249
|
#### Using ATS
|
|
6207
6250
|
|
|
@@ -6212,35 +6255,35 @@ See the section **Examples** of [ATS](#plugin-ats-ibm-aspera-transfer-service) a
|
|
|
6212
6255
|
Aspera on Cloud Shared folders are implemented through a special type of file: `link`.
|
|
6213
6256
|
A `link` is the equivalent of a symbolic link on a file system: it points to another folder (not file).
|
|
6214
6257
|
|
|
6215
|
-
Listing a link (
|
|
6258
|
+
Listing a link (as the last element of the path) shows information on the link itself, not the content of the folder it points to.
|
|
6216
6259
|
To list the target folder content, add a `/` at the end of the path.
|
|
6217
6260
|
|
|
6218
6261
|
Example:
|
|
6219
6262
|
|
|
6220
6263
|
```shell
|
|
6221
|
-
ascli aoc files
|
|
6264
|
+
ascli aoc files browse the_link
|
|
6222
6265
|
```
|
|
6223
6266
|
|
|
6224
6267
|
```text
|
|
6225
6268
|
Current Workspace: Default (default)
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6269
|
+
╭──────────┬──────┬────────────────┬──────┬──────────────────────┬──────────────╮
|
|
6270
|
+
│ name │ type │ recursive_size │ size │ modified_time │ access_level │
|
|
6271
|
+
╞══════════╪══════╪════════════════╪══════╪══════════════════════╪══════════════╡
|
|
6272
|
+
│ the_link │ link │ │ │ 2021-04-28T09:17:14Z │ edit │
|
|
6273
|
+
╰──────────┴──────┴────────────────┴──────┴──────────────────────┴──────────────╯
|
|
6231
6274
|
```
|
|
6232
6275
|
|
|
6233
6276
|
```shell
|
|
6234
|
-
ascli aoc files
|
|
6277
|
+
ascli aoc files browse the_link/
|
|
6235
6278
|
```
|
|
6236
6279
|
|
|
6237
6280
|
```text
|
|
6238
6281
|
Current Workspace: Default (default)
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6282
|
+
╭─────────────┬──────┬────────────────┬──────┬──────────────────────┬──────────────╮
|
|
6283
|
+
│ name │ type │ recursive_size │ size │ modified_time │ access_level │
|
|
6284
|
+
╞═════════════╪══════╪════════════════╪══════╪══════════════════════╪══════════════╡
|
|
6285
|
+
│ file_inside │ file │ │ │ 2021-04-26T09:00:00Z │ edit │
|
|
6286
|
+
╰─────────────┴──────┴────────────────┴──────┴──────────────────────┴──────────────╯
|
|
6244
6287
|
```
|
|
6245
6288
|
|
|
6246
6289
|
#### Example: Bulk creation of users
|
|
@@ -6250,12 +6293,12 @@ ascli aoc admin user create --bulk=yes @json:'[{"email":"dummyuser1@example.com"
|
|
|
6250
6293
|
```
|
|
6251
6294
|
|
|
6252
6295
|
```text
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6296
|
+
╭───────┬─────────╮
|
|
6297
|
+
│ id │ status │
|
|
6298
|
+
╞═══════╪═════════╡
|
|
6299
|
+
│ 98398 │ created │
|
|
6300
|
+
│ 98399 │ created │
|
|
6301
|
+
╰───────┴─────────╯
|
|
6259
6302
|
```
|
|
6260
6303
|
|
|
6261
6304
|
#### Example: Find with filter and delete
|
|
@@ -6265,12 +6308,12 @@ ascli aoc admin user list --query.q=dummyuser --fields=id,email
|
|
|
6265
6308
|
```
|
|
6266
6309
|
|
|
6267
6310
|
```text
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6311
|
+
╭───────┬────────────────────────╮
|
|
6312
|
+
│ id │ email │
|
|
6313
|
+
╞═══════╪════════════════════════╡
|
|
6314
|
+
│ 98398 │ dummyuser1@example.com │
|
|
6315
|
+
│ 98399 │ dummyuser2@example.com │
|
|
6316
|
+
╰───────┴────────────────────────╯
|
|
6274
6317
|
```
|
|
6275
6318
|
|
|
6276
6319
|
```shell
|
|
@@ -6278,12 +6321,12 @@ ascli aoc admin user list --query.q=dummyuser --fields=id --out.level=data --for
|
|
|
6278
6321
|
```
|
|
6279
6322
|
|
|
6280
6323
|
```text
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6324
|
+
╭───────┬─────────╮
|
|
6325
|
+
│ id │ status │
|
|
6326
|
+
╞═══════╪═════════╡
|
|
6327
|
+
│ 98398 │ deleted │
|
|
6328
|
+
│ 98399 │ deleted │
|
|
6329
|
+
╰───────┴─────────╯
|
|
6287
6330
|
```
|
|
6288
6331
|
|
|
6289
6332
|
#### Example: Find deactivated users for more than 2 years
|
|
@@ -6317,8 +6360,8 @@ The `aoc user settings` sub-command manages persistent client-side settings stor
|
|
|
6317
6360
|
|
|
6318
6361
|
```shell
|
|
6319
6362
|
ascli aoc user settings list
|
|
6320
|
-
ascli aoc user settings show <
|
|
6321
|
-
ascli aoc user settings modify <
|
|
6363
|
+
ascli aoc user settings show <ID>
|
|
6364
|
+
ascli aoc user settings modify <ID> @json:'{"value":"..."}'
|
|
6322
6365
|
```
|
|
6323
6366
|
|
|
6324
6367
|
> [!NOTE]
|
|
@@ -6332,10 +6375,10 @@ ascli aoc user settings modify <id> @json:'{"value":"..."}'
|
|
|
6332
6375
|
|
|
6333
6376
|
#### Example: Create a sub access key in a `node`
|
|
6334
6377
|
|
|
6335
|
-
Creation of a sub-access key is like creation of access key with the following
|
|
6378
|
+
Creation of a sub-access key is like creation of an access key, with the following differences: authentication to the Node API is made with an access key (the master access key), and only the path parameter is provided, relative to the storage root of the master key (`id` and `secret` are optional).
|
|
6336
6379
|
|
|
6337
6380
|
```shell
|
|
6338
|
-
ascli aoc admin
|
|
6381
|
+
ascli aoc admin node do %name:'<NODE_NAME>' v3 access_keys create @: storage.path=/folder1
|
|
6339
6382
|
```
|
|
6340
6383
|
|
|
6341
6384
|
#### Example: Display transfer events (ops/transfer)
|
|
@@ -6357,7 +6400,7 @@ Examples of query:
|
|
|
6357
6400
|
#### Example: Display node events (events)
|
|
6358
6401
|
|
|
6359
6402
|
```shell
|
|
6360
|
-
ascli aoc admin node v3 events
|
|
6403
|
+
ascli aoc admin node do <NODE_ID> v3 events
|
|
6361
6404
|
```
|
|
6362
6405
|
|
|
6363
6406
|
#### Example: Display members of a workspace
|
|
@@ -6367,16 +6410,16 @@ ascli aoc admin workspace_membership list --fields=member_type,manager,member.em
|
|
|
6367
6410
|
```
|
|
6368
6411
|
|
|
6369
6412
|
```text
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6413
|
+
╭─────────────┬─────────┬──────────────────────────╮
|
|
6414
|
+
│ member_type │ manager │ member.email │
|
|
6415
|
+
╞═════════════╪═════════╪══════════════════════════╡
|
|
6416
|
+
│ user │ true │ john.curtis@email.com │
|
|
6417
|
+
│ user │ false │ someuser@example.com │
|
|
6418
|
+
│ user │ false │ jean.dupont@me.com │
|
|
6419
|
+
│ user │ false │ another.user@example.com │
|
|
6420
|
+
│ group │ false │ │
|
|
6421
|
+
│ user │ false │ aspera.user@gmail.com │
|
|
6422
|
+
╰─────────────┴─────────┴──────────────────────────╯
|
|
6380
6423
|
```
|
|
6381
6424
|
|
|
6382
6425
|
Other query parameters:
|
|
@@ -6425,19 +6468,19 @@ e- Add members to second workspace
|
|
|
6425
6468
|
ascli aoc admin workspace_membership create --bulk=yes @json:@file:ws2_members.json
|
|
6426
6469
|
```
|
|
6427
6470
|
|
|
6428
|
-
#### Example: Get users who did not log since a date
|
|
6471
|
+
#### Example: Get users who did not log in since a date
|
|
6429
6472
|
|
|
6430
6473
|
```shell
|
|
6431
6474
|
ascli aoc admin user list --fields=email --query=@json:'{"q":"last_login_at:<2018-05-28"}'
|
|
6432
6475
|
```
|
|
6433
6476
|
|
|
6434
6477
|
```text
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6478
|
+
╭──────────────────────────╮
|
|
6479
|
+
│ email │
|
|
6480
|
+
╞══════════════════════════╡
|
|
6481
|
+
│ John.curtis@acme.com │
|
|
6482
|
+
│ Jean.Dupont@tropfort.com │
|
|
6483
|
+
╰──────────────────────────╯
|
|
6441
6484
|
```
|
|
6442
6485
|
|
|
6443
6486
|
#### Example: List **Limited** users
|
|
@@ -6473,7 +6516,7 @@ Workspace: <WORKSPACE_ID>
|
|
|
6473
6516
|
- Add group to workspace
|
|
6474
6517
|
|
|
6475
6518
|
```shell
|
|
6476
|
-
ascli aoc admin workspace_membership create @json:'{"workspace_id":<WORKSPACE_ID>,"member_type":"
|
|
6519
|
+
ascli aoc admin workspace_membership create @json:'{"workspace_id":<WORKSPACE_ID>,"member_type":"group","member_id":<GROUP_ID>}'
|
|
6477
6520
|
```
|
|
6478
6521
|
|
|
6479
6522
|
- Get a user's ID
|
|
@@ -6494,42 +6537,20 @@ ascli aoc admin group_membership create @json:'{"group_id":<GROUP_ID>,"member_ty
|
|
|
6494
6537
|
|
|
6495
6538
|
In this example, a user has access to a workspace where two shared folders are located on different sites, for example, different cloud regions.
|
|
6496
6539
|
|
|
6497
|
-
First, set up the environment (skip if already done)
|
|
6540
|
+
First, set up the environment (skip if already done), see [AoC configuration: Using Wizard](#aoc-configuration-using-wizard):
|
|
6498
6541
|
|
|
6499
6542
|
```shell
|
|
6500
|
-
ascli config wizard
|
|
6501
|
-
```
|
|
6502
|
-
|
|
6503
|
-
```text
|
|
6504
|
-
Detected: Aspera on Cloud
|
|
6505
|
-
Preparing preset: aoc_sedemo
|
|
6506
|
-
Using existing key:
|
|
6507
|
-
/Users/laurent/.aspera/ascli/aspera_aoc_key
|
|
6508
|
-
Using global client_id.
|
|
6509
|
-
Please Login to your Aspera on Cloud instance.
|
|
6510
|
-
Navigate to your "Account Settings"
|
|
6511
|
-
Check or update the value of "Public Key" to be:
|
|
6512
|
-
-----BEGIN PUBLIC KEY-----
|
|
6513
|
-
SOME PUBLIC KEY PEM DATA HERE
|
|
6514
|
-
-----END PUBLIC KEY-----
|
|
6515
|
-
Once updated or validated, press enter.
|
|
6516
|
-
|
|
6517
|
-
creating new config preset: aoc_sedemo
|
|
6518
|
-
Setting config preset as default for aspera
|
|
6519
|
-
saving configuration file
|
|
6520
|
-
Done.
|
|
6521
|
-
You can test with:
|
|
6522
|
-
ascli aoc user profile show
|
|
6543
|
+
ascli config wizard https://sedemo.ibmaspera.com aoc aoc_sedemo --username=someuser@example.com
|
|
6523
6544
|
```
|
|
6524
6545
|
|
|
6525
|
-
This creates the option preset `
|
|
6546
|
+
This creates the option preset `aoc_sedemo` to allow seamless command line access and sets it as default for Aspera on Cloud.
|
|
6526
6547
|
|
|
6527
6548
|
Then, create two shared folders located in two regions, in your files home, in a workspace.
|
|
6528
6549
|
|
|
6529
6550
|
Then, transfer between those:
|
|
6530
6551
|
|
|
6531
6552
|
```shell
|
|
6532
|
-
ascli -
|
|
6553
|
+
ascli -Paoc_sedemo aoc files transfer push 'IBM Cloud SJ' --to-folder='AWS Singapore' 100GB.file --ts=@json:'{"target_rate_kbps":1000000,"multi_session":10,"multi_session_threshold":1}'
|
|
6533
6554
|
```
|
|
6534
6555
|
|
|
6535
6556
|
#### Example: Delete all registration keys
|
|
@@ -6539,14 +6560,14 @@ ascli aoc admin client_registration_token list --fields=id --format=csv|ascli ao
|
|
|
6539
6560
|
```
|
|
6540
6561
|
|
|
6541
6562
|
```text
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6563
|
+
╭─────┬─────────╮
|
|
6564
|
+
│ id │ status │
|
|
6565
|
+
╞═════╪═════════╡
|
|
6566
|
+
│ 99 │ deleted │
|
|
6567
|
+
│ 100 │ deleted │
|
|
6568
|
+
│ 101 │ deleted │
|
|
6569
|
+
│ 102 │ deleted │
|
|
6570
|
+
╰─────┴─────────╯
|
|
6550
6571
|
```
|
|
6551
6572
|
|
|
6552
6573
|
#### Example: Create a tethered Node
|
|
@@ -6555,7 +6576,7 @@ Follow these steps to configure a new HSTS and link it to your existing Aspera o
|
|
|
6555
6576
|
|
|
6556
6577
|
- Retrieve the Organization Public Key
|
|
6557
6578
|
|
|
6558
|
-
First, obtain the public key
|
|
6579
|
+
First, obtain the organization's public key.
|
|
6559
6580
|
This key is used to verify bearer tokens generated by your organization.
|
|
6560
6581
|
This key remains constant for the lifetime of your Organization.
|
|
6561
6582
|
|
|
@@ -6580,7 +6601,7 @@ ascli aoc admin node do %name:'<NODE_NAME>' v3 access_keys show self --fields=to
|
|
|
6580
6601
|
> Record the generated secret immediately; it cannot be retrieved later, only reset.
|
|
6581
6602
|
|
|
6582
6603
|
```shell
|
|
6583
|
-
ascli node
|
|
6604
|
+
ascli node access_keys create @: id=<ACCESS_KEY_ID> secret=<SECRET> storage.type=local storage.path=/data/aoc token_verification_key=@file:mypubkey.pem
|
|
6584
6605
|
```
|
|
6585
6606
|
|
|
6586
6607
|
- Register the Node in AoC
|
|
@@ -6601,14 +6622,14 @@ ascli aoc admin node create @: url=https://aspera.example.com access_key=<ACCESS
|
|
|
6601
6622
|
> If the node is configured for admin user, then add options: `--username=<ACCESS_KEY_ID> --password=<SECRET>`.
|
|
6602
6623
|
|
|
6603
6624
|
```shell
|
|
6604
|
-
ascli node
|
|
6625
|
+
ascli node access_keys do self permission / create @: access_type=user access_id='F4 System'
|
|
6605
6626
|
```
|
|
6606
6627
|
|
|
6607
6628
|
```shell
|
|
6608
|
-
ascli node
|
|
6629
|
+
ascli node access_keys do self permission / create @: access_type=user access_id=NODE_OWNER
|
|
6609
6630
|
```
|
|
6610
6631
|
|
|
6611
|
-
- Optional next
|
|
6632
|
+
- Optional next steps
|
|
6612
6633
|
|
|
6613
6634
|
To register an Aspera Event Journal (AEJ) as described in the HSTS manual, refer to:
|
|
6614
6635
|
|
|
@@ -6644,13 +6665,13 @@ So, for example, the creation of a node using ATS in IBM Cloud looks like (see o
|
|
|
6644
6665
|
The creation options are the ones of ATS API, refer to the [section on ATS](#ats-access-key-creation-parameters) for more details and examples.
|
|
6645
6666
|
|
|
6646
6667
|
```shell
|
|
6647
|
-
ascli aoc admin ats access_key create
|
|
6668
|
+
ascli aoc admin ats access_key create @json:'{"storage":{"type":"ibm-s3","bucket":"mybucket","credentials":{"access_key_id":"mykey","secret_access_key":"mysecret"},"path":"/"}}' --cloud=softlayer --region=eu-de
|
|
6648
6669
|
```
|
|
6649
6670
|
|
|
6650
|
-
Once executed, the access key `id` and `secret`, randomly generated by the Node API,
|
|
6671
|
+
Once executed, the access key `id` and `secret`, randomly generated by the Node API, are displayed.
|
|
6651
6672
|
|
|
6652
6673
|
> [!NOTE]
|
|
6653
|
-
> Once returned by the API, the secret will not be available anymore, so store
|
|
6674
|
+
> Once returned by the API, the secret will not be available anymore, so store it securely.
|
|
6654
6675
|
> ATS secrets can only be reset by asking IBM support.
|
|
6655
6676
|
|
|
6656
6677
|
- Create the AoC node resource
|
|
@@ -6667,11 +6688,11 @@ Then use the returned address for the `url` key to create the AoC Node resource:
|
|
|
6667
6688
|
ascli aoc admin node create @json:'{"name":"myname","access_key":"myaccesskeyid","ats_access_key":true,"ats_storage_type":"ibm-s3","url":"https://ats-sl-fra-all.aspera.io"}'
|
|
6668
6689
|
```
|
|
6669
6690
|
|
|
6670
|
-
Creation of a node with a self-managed node is similar, but the command `aoc admin ats access_key create` is replaced with `node
|
|
6691
|
+
Creation of a node with a self-managed node is similar, but the command `aoc admin ats access_key create` is replaced with `node access_keys create` on the private node itself.
|
|
6671
6692
|
|
|
6672
6693
|
#### Example: Deactivate an application in a workspace
|
|
6673
6694
|
|
|
6674
|
-
This is a two-
|
|
6695
|
+
This is a two-step procedure:
|
|
6675
6696
|
|
|
6676
6697
|
1. Find the application ID in the workspace:
|
|
6677
6698
|
|
|
@@ -6690,13 +6711,13 @@ This is a two-steps procedure:
|
|
|
6690
6711
|
2. Deactivate the application:
|
|
6691
6712
|
|
|
6692
6713
|
```shell
|
|
6693
|
-
ascli aoc admin application instance modify
|
|
6714
|
+
ascli aoc admin application instance packages modify <APP_ID> @: enabled=false inherit_organization_app_settings=false
|
|
6694
6715
|
```
|
|
6695
6716
|
|
|
6696
6717
|
### List of files to transfer
|
|
6697
6718
|
|
|
6698
6719
|
Source files are provided as a list with the `sources` option.
|
|
6699
|
-
By default, the list of files on the command line.
|
|
6720
|
+
By default, the list of files is provided on the command line.
|
|
6700
6721
|
See [File list](#list-of-files-for-transfers).
|
|
6701
6722
|
|
|
6702
6723
|
### Packages app
|
|
@@ -6766,20 +6787,20 @@ ascli aoc files browse /src_folder
|
|
|
6766
6787
|
```
|
|
6767
6788
|
|
|
6768
6789
|
```text
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6790
|
+
╭──────────────┬──────┬────────────────┬──────────────┬──────────────────────┬──────────────╮
|
|
6791
|
+
│ name │ type │ recursive_size │ size │ modified_time │ access_level │
|
|
6792
|
+
╞══════════════╪══════╪════════════════╪══════════════╪══════════════════════╪══════════════╡
|
|
6793
|
+
│ sample_video │ link │ │ │ 2020-11-29T22:49:09Z │ edit │
|
|
6794
|
+
│ 100G │ file │ │ 107374182400 │ 2021-04-21T18:19:25Z │ edit │
|
|
6795
|
+
│ 10M.dat │ file │ │ 10485760 │ 2021-05-18T08:22:39Z │ edit │
|
|
6796
|
+
│ Test.pdf │ file │ │ 1265103 │ 2022-06-16T12:49:55Z │ edit │
|
|
6797
|
+
╰──────────────┴──────┴────────────────┴──────────────┴──────────────────────┴──────────────╯
|
|
6777
6798
|
```
|
|
6778
6799
|
|
|
6779
6800
|
To send a package with the file `10M.dat` from subfolder /src_folder:
|
|
6780
6801
|
|
|
6781
6802
|
```shell
|
|
6782
|
-
ascli aoc files node_info /src_folder --format=json --out.level=data | ascli aoc packages send @json:'{"name":"test","recipients":["someuser@example.com"]}' 10M.dat --transfer=@json:@stdin:
|
|
6803
|
+
ascli aoc files node_info /src_folder --format=json --out.level=data | ascli aoc packages send @json:'{"name":"test","recipients":["someuser@example.com"]}' 10M.dat --transfer=@json:@stdin: --transfer.agent=node
|
|
6783
6804
|
```
|
|
6784
6805
|
|
|
6785
6806
|
#### Receive packages
|
|
@@ -6837,7 +6858,7 @@ The `package_folder` option (`Hash`) controls how downloaded packages are organi
|
|
|
6837
6858
|
ascli aoc packages recv ALL --workspace=_workspace_ --once-only=yes --lock-port=12345 --query=@json:'{"dropbox_name":"_shared_inbox_name_","archived":false,"received":true,"has_content":true,"exclude_dropbox_packages":false,"include_draft":false}' --ts=@json:'{"resume_policy":"sparse_csum","target_rate_kbps":50000}'
|
|
6838
6859
|
```
|
|
6839
6860
|
|
|
6840
|
-
To list packages that would be downloaded, without downloading them, replace `recv ALL` with `list` (keep options `once_only` and `query`)
|
|
6861
|
+
To list packages that would be downloaded, without downloading them, replace `recv ALL` with `list` (keep options `once_only` and `query`).
|
|
6841
6862
|
|
|
6842
6863
|
##### Receive new packages only (Cargo)
|
|
6843
6864
|
|
|
@@ -6861,7 +6882,7 @@ To list the content of a package, use command `packages browse <PACKAGE_ID> <FOL
|
|
|
6861
6882
|
Example:
|
|
6862
6883
|
|
|
6863
6884
|
```shell
|
|
6864
|
-
ascli aoc
|
|
6885
|
+
ascli aoc packages browse xx5CnbeWng /
|
|
6865
6886
|
```
|
|
6866
6887
|
|
|
6867
6888
|
Use command `find` to list recursively.
|
|
@@ -6869,7 +6890,7 @@ Use command `find` to list recursively.
|
|
|
6869
6890
|
For advanced users, it is also possible to pipe node information for the package and use node operations:
|
|
6870
6891
|
|
|
6871
6892
|
```shell
|
|
6872
|
-
ascli aoc
|
|
6893
|
+
ascli aoc packages node_info <PACKAGE_ID> / --format=json --out.secrets=yes --out.level=data | ascli node -N --preset=@json:@stdin: access_keys do self browse /
|
|
6873
6894
|
```
|
|
6874
6895
|
|
|
6875
6896
|
#### List packages
|
|
@@ -6914,7 +6935,7 @@ ascli aoc packages list --query=@json:'{"dropbox_name":"My Shared Inbox","archiv
|
|
|
6914
6935
|
Using shared inbox identifier: first retrieve the ID of the shared inbox, and then list packages with the appropriate filter.
|
|
6915
6936
|
|
|
6916
6937
|
```shell
|
|
6917
|
-
shared_box_id=$(ascli aoc packages shared_inboxes show
|
|
6938
|
+
shared_box_id=$(ascli aoc packages shared_inboxes show %name:'My Shared Inbox' --format=csv --out.level=data --fields=id)
|
|
6918
6939
|
```
|
|
6919
6940
|
|
|
6920
6941
|
```shell
|
|
@@ -6978,7 +6999,7 @@ When creating a Shared Folder, `ascli` expects a `Hash` payload (typically passe
|
|
|
6978
6999
|
"access_levels": ["list","read","write","delete","mkdir","rename","preview"],
|
|
6979
7000
|
"access_type": "user",
|
|
6980
7001
|
"access_id": "john@example.com",
|
|
6981
|
-
"tags": {...}
|
|
7002
|
+
"tags": {...}
|
|
6982
7003
|
}
|
|
6983
7004
|
```
|
|
6984
7005
|
|
|
@@ -6997,13 +7018,13 @@ When creating a Shared Folder, `ascli` expects a `Hash` payload (typically passe
|
|
|
6997
7018
|
| `link_name` | `ascli` | Name of the link file created in the user's home folder for private links. |
|
|
6998
7019
|
| `as` | `ascli` | Name of the link file created in the user's home folder for admin shared folders. |
|
|
6999
7020
|
|
|
7000
|
-
To declare or create the shared folder in the workspace, a special value for `access_id` is used: `ASPERA_ACCESS_KEY_ADMIN_WS_[workspace ID]`, with
|
|
7021
|
+
To declare or create the shared folder in the workspace, a special value for `access_id` is used: `ASPERA_ACCESS_KEY_ADMIN_WS_[workspace ID]`, with an `access_type` of `user`.
|
|
7001
7022
|
This is conveniently set by `ascli` using an **empty string** for field `with`.
|
|
7002
7023
|
To share a folder with a different user, special tags are set, but this is conveniently done by `ascli` using the `as` field.
|
|
7003
7024
|
|
|
7004
7025
|
##### User Shared Folders
|
|
7005
7026
|
|
|
7006
|
-
Personal shared folders, created by users in a workspace follow the syntax:
|
|
7027
|
+
Personal shared folders, created by users in a workspace, follow the syntax:
|
|
7007
7028
|
|
|
7008
7029
|
```shell
|
|
7009
7030
|
ascli aoc files permission --workspace=<WORKSPACE_NAME> <PATH_TO_FOLDER> ...
|
|
@@ -7024,7 +7045,7 @@ ascli aoc admin node do <NODE_ID> permission --workspace=<WORKSPACE_NAME> <PATH_
|
|
|
7024
7045
|
> [!TIP]
|
|
7025
7046
|
> The node is identified by identifier.
|
|
7026
7047
|
> To use a name instead, one can use the [percent selector](#percent-selector), like `%name:"<NODE_NAME>"`.
|
|
7027
|
-
> The
|
|
7048
|
+
> The folder is identified by its path; a file ID can be specified instead, with `%id:123`.
|
|
7028
7049
|
> If the ID is left blank: `%id:`, then it means `*`, that is, "all".
|
|
7029
7050
|
|
|
7030
7051
|
##### Example: List permissions on a user shared folder
|
|
@@ -7054,8 +7075,8 @@ ascli aoc files short_link <PATH_TO_FOLDER> private create
|
|
|
7054
7075
|
ascli aoc files short_link <PATH_TO_FOLDER> private list
|
|
7055
7076
|
ascli aoc files short_link <PATH_TO_FOLDER> public create @json:'{...}'
|
|
7056
7077
|
ascli aoc files short_link <PATH_TO_FOLDER> public list
|
|
7057
|
-
ascli aoc files short_link public delete <ID>
|
|
7058
|
-
ascli aoc files short_link public modify <ID> @json:'{...}'
|
|
7078
|
+
ascli aoc files short_link <PATH_TO_FOLDER> public delete <ID>
|
|
7079
|
+
ascli aoc files short_link <PATH_TO_FOLDER> public modify <ID> @json:'{...}'
|
|
7059
7080
|
```
|
|
7060
7081
|
|
|
7061
7082
|
Only `public` short links can be modified.
|
|
@@ -7176,7 +7197,7 @@ ascli aoc admin node do <NODE_ID> permission <FOLDER_PATH> create @json:'{"with"
|
|
|
7176
7197
|
> [!NOTE]
|
|
7177
7198
|
> In the previous commands, field `as` is optional.
|
|
7178
7199
|
|
|
7179
|
-
##### Example: List all workspace admin shared
|
|
7200
|
+
##### Example: List all workspace admin shared folders in a workspace
|
|
7180
7201
|
|
|
7181
7202
|
```shell
|
|
7182
7203
|
ascli aoc admin workspace shared_folder %name:'<WORKSPACE_NAME>' list
|
|
@@ -7210,10 +7231,10 @@ ascli aoc admin workspace shared_folder %name:'<WORKSPACE_NAME>' member 198 list
|
|
|
7210
7231
|
If you have the node ID of the shared folder, then it is equivalent to:
|
|
7211
7232
|
|
|
7212
7233
|
```shell
|
|
7213
|
-
ascli aoc admin node do
|
|
7234
|
+
ascli aoc admin node do 8666 permission /project1 list --query=@json:'{"tag":"aspera.files.workspace.id=<WORKSPACE_ID>"}'
|
|
7214
7235
|
```
|
|
7215
7236
|
|
|
7216
|
-
##### Example: List all workspace admin shared
|
|
7237
|
+
##### Example: List all workspace admin shared folders on a node
|
|
7217
7238
|
|
|
7218
7239
|
First get the workspace identifier:
|
|
7219
7240
|
|
|
@@ -7245,14 +7266,14 @@ Although optional, the creation of [Option Preset](#option-preset) is recommende
|
|
|
7245
7266
|
|
|
7246
7267
|
Procedure to send a file from org1 to org2:
|
|
7247
7268
|
|
|
7248
|
-
- Get access to Organization 1 and create an [Option Preset](#option-preset)
|
|
7249
|
-
- Check that access works and locate the source
|
|
7250
|
-
- Get access to Organization 2 and create an [Option Preset](#option-preset)
|
|
7269
|
+
- Get access to Organization 1 and create an [Option Preset](#option-preset), for example `org1` (for instance, using the [Wizard](#wizard))
|
|
7270
|
+
- Check that access works and locate the source folder `<SOURCE_FOLDER>` and the file `<SOURCE_FILE>` in it, for example, using command `files browse`
|
|
7271
|
+
- Get access to Organization 2 and create an [Option Preset](#option-preset), for example `org2`
|
|
7251
7272
|
- Check that access works and locate the destination folder `<DEST_FOLDER>`
|
|
7252
7273
|
- Execute the following:
|
|
7253
7274
|
|
|
7254
7275
|
```shell
|
|
7255
|
-
ascli -Porg1 aoc files node_info <
|
|
7276
|
+
ascli -Porg1 aoc files node_info <SOURCE_FOLDER> --format=json --out.level=data | ascli -Porg2 aoc files upload <SOURCE_FILE> --to-folder=<DEST_FOLDER> --transfer=@json:@stdin: --transfer.agent=node
|
|
7256
7277
|
```
|
|
7257
7278
|
|
|
7258
7279
|
Explanation:
|
|
@@ -7260,13 +7281,14 @@ Explanation:
|
|
|
7260
7281
|
- `ascli` is the command executed by the shell
|
|
7261
7282
|
- `-Porg1` loads options for preset `org1` (URL and credentials)
|
|
7262
7283
|
- `aoc` uses the Aspera on Cloud plugin
|
|
7263
|
-
- `files node_info
|
|
7284
|
+
- `files node_info <SOURCE_FOLDER>` generates transfer information for the source folder: Node API URL, credentials and root file ID, suitable for the next command
|
|
7264
7285
|
- `--format=json` formats the output as JSON (instead of the default text table)
|
|
7265
7286
|
- `--out.level=data` displays only the result, removing other information such as workspace name
|
|
7266
7287
|
- `|` pipes the standard output of the first command into the second one
|
|
7267
7288
|
- `-Porg2 aoc` uses the Aspera on Cloud plugin and loads credentials for `org2`
|
|
7268
|
-
- `files upload <SOURCE_FILE>` uploads the file
|
|
7269
|
-
- `--transfer=@json:@stdin:`
|
|
7289
|
+
- `files upload <SOURCE_FILE> --to-folder=<DEST_FOLDER>` uploads the file `<SOURCE_FILE>` (located in `<SOURCE_FOLDER>` of `org1`) to `<DEST_FOLDER>` in `org2`
|
|
7290
|
+
- `--transfer=@json:@stdin:` reads the Node API information from standard input (JSON) and uses it as parameters of the transfer agent
|
|
7291
|
+
- `--transfer.agent=node` selects the `node` transfer agent: the source node of `org1` pushes the file to `org2`
|
|
7270
7292
|
|
|
7271
7293
|
#### Find Files
|
|
7272
7294
|
|
|
@@ -7419,6 +7441,7 @@ packages send @: 'name=package title' recipients.0=my_username 'note=some notes'
|
|
|
7419
7441
|
packages send @json:'{"name":"package title","recipients":["my_email_external"]}' --new-user-option.package_contact=true test_file.bin
|
|
7420
7442
|
packages shared_inboxes list
|
|
7421
7443
|
packages shared_inboxes show %name:my_shared_inbox_name
|
|
7444
|
+
packages show '%name:package title'
|
|
7422
7445
|
remind --username=my_user_email --url=https://aoc.example.com/path
|
|
7423
7446
|
servers --url=https://aoc.example.com/path
|
|
7424
7447
|
tier_restrictions
|
|
@@ -7433,11 +7456,11 @@ user workspaces list
|
|
|
7433
7456
|
|
|
7434
7457
|
## Plugin: `ats`: IBM Aspera Transfer Service
|
|
7435
7458
|
|
|
7436
|
-
ATS is usable either
|
|
7459
|
+
ATS is usable either:
|
|
7437
7460
|
|
|
7438
|
-
- From an AoC subscription
|
|
7461
|
+
- From an AoC subscription: `ascli aoc admin ats`: use AoC authentication
|
|
7439
7462
|
|
|
7440
|
-
- Or from an IBM Cloud subscription
|
|
7463
|
+
- Or from an IBM Cloud subscription: `ascli ats`: use IBM Cloud API key authentication
|
|
7441
7464
|
|
|
7442
7465
|
### IBM Cloud ATS: Creation of API key
|
|
7443
7466
|
|
|
@@ -7445,7 +7468,7 @@ ATS is usable either :
|
|
|
7445
7468
|
> If you are using ATS as part of AoC, then authentication is through AoC, not IBM Cloud.
|
|
7446
7469
|
> See the AoC section instead.
|
|
7447
7470
|
|
|
7448
|
-
This section is about using ATS with an IBM
|
|
7471
|
+
This section is about using ATS with an IBM Cloud subscription.
|
|
7449
7472
|
|
|
7450
7473
|
First get your IBM Cloud API key.
|
|
7451
7474
|
For instance, it can be created using the IBM Cloud web interface, or using command line:
|
|
@@ -7492,11 +7515,7 @@ ascli ats api_key instances
|
|
|
7492
7515
|
```
|
|
7493
7516
|
|
|
7494
7517
|
```text
|
|
7495
|
-
|
|
7496
|
-
| instance |
|
|
7497
|
-
+--------------------------------------+
|
|
7498
|
-
| aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
|
|
7499
|
-
+--------------------------------------+
|
|
7518
|
+
aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
|
|
7500
7519
|
```
|
|
7501
7520
|
|
|
7502
7521
|
```shell
|
|
@@ -7504,22 +7523,26 @@ ascli config preset update <PRESET_NAME> --instance=aaaaaaaa-bbbb-cccc-dddd-eeee
|
|
|
7504
7523
|
```
|
|
7505
7524
|
|
|
7506
7525
|
```shell
|
|
7507
|
-
ascli ats api_key create
|
|
7526
|
+
ascli ats api_key create --out.secrets=yes
|
|
7508
7527
|
```
|
|
7509
7528
|
|
|
7510
7529
|
```text
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7530
|
+
╭────────┬──────────────────────────────────────────────╮
|
|
7531
|
+
│ field │ value │
|
|
7532
|
+
╞════════╪══════════════════════════════════════════════╡
|
|
7533
|
+
│ id │ ats_XXXXXXXXXXXXXXXXXXXXXXXX │
|
|
7534
|
+
│ secret │ YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY │
|
|
7535
|
+
╰────────┴──────────────────────────────────────────────╯
|
|
7536
|
+
```
|
|
7537
|
+
|
|
7538
|
+
```shell
|
|
7517
7539
|
ascli config preset update <PRESET_NAME> --ats-key=ats_XXXXXXXXXXXXXXXXXXXXXXXX --ats-secret=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
|
|
7518
7540
|
```
|
|
7519
7541
|
|
|
7520
7542
|
### ATS Access key creation parameters
|
|
7521
7543
|
|
|
7522
|
-
When creating an ATS access key, the
|
|
7544
|
+
When creating an ATS access key, the creation parameters are provided as a positional argument of `access_key create`, as a `Hash` [Extended Value](#extended-value-syntax).
|
|
7545
|
+
If key `transfer_server_id` is not provided, the transfer server is selected with options `cloud` and `region`.
|
|
7523
7546
|
Those are directly the parameters expected by the [ATS API](https://developer.ibm.com/apis/catalog?search=%22Aspera%20ATS%20API%22).
|
|
7524
7547
|
|
|
7525
7548
|
### Misc. Examples
|
|
@@ -7527,34 +7550,34 @@ Those are directly the parameters expected by the [ATS API](https://developer.ib
|
|
|
7527
7550
|
Example: create access key on IBM Cloud (Softlayer):
|
|
7528
7551
|
|
|
7529
7552
|
```shell
|
|
7530
|
-
ascli ats access_key create
|
|
7553
|
+
ascli ats access_key create @json:'{"storage":{"type":"softlayer_swift","container":"_container_name_","credentials":{"api_key":"<SECRET>","username":"_name_:_usr_name_"},"path":"/"},"id":"_optional_id_","name":"_optional_name_"}' --cloud=softlayer --region=ams
|
|
7531
7554
|
```
|
|
7532
7555
|
|
|
7533
7556
|
Example: create access key on AWS:
|
|
7534
7557
|
|
|
7535
7558
|
```shell
|
|
7536
|
-
ascli ats access_key create
|
|
7559
|
+
ascli ats access_key create @json:'{"id":"<ACCESS_KEY>","name":"laurent key AWS","storage":{"type":"aws_s3","bucket":"my-bucket","credentials":{"access_key_id":"_access_key_id_here_","secret_access_key":"<SECRET>"},"path":"/laurent"}}' --cloud=aws --region=eu-west-1
|
|
7537
7560
|
```
|
|
7538
7561
|
|
|
7539
7562
|
Example: create access key on Azure SAS:
|
|
7540
7563
|
|
|
7541
7564
|
```shell
|
|
7542
|
-
ascli ats access_key create
|
|
7565
|
+
ascli ats access_key create @json:'{"id":"<ACCESS_KEY>","name":"laurent key azure","storage":{"type":"azure_sas","credentials":{"shared_access_signature":"https://containername.blob.core.windows.net/blobname?sr=c&..."},"path":"/"}}' --cloud=azure --region=eastus
|
|
7543
7566
|
```
|
|
7544
7567
|
|
|
7545
7568
|
> [!NOTE]
|
|
7546
|
-
> The blob name is mandatory after server address and before parameters, and
|
|
7569
|
+
> The blob name is mandatory after the server address and before the parameters, and parameter `sr=c` is mandatory.
|
|
7547
7570
|
|
|
7548
7571
|
Example: create access key on Azure:
|
|
7549
7572
|
|
|
7550
7573
|
```shell
|
|
7551
|
-
ascli ats access_key create
|
|
7574
|
+
ascli ats access_key create @json:'{"id":"<ACCESS_KEY>","name":"laurent key azure","storage":{"type":"azure","credentials":{"account":"myaccount","key":"<ACCESS_KEY>","storage_endpoint":"myblob"},"path":"/"}}' --cloud=azure --region=eastus
|
|
7552
7575
|
```
|
|
7553
7576
|
|
|
7554
7577
|
Delete all access keys:
|
|
7555
7578
|
|
|
7556
7579
|
```shell
|
|
7557
|
-
ascli ats access_key list --
|
|
7580
|
+
ascli ats access_key list --fields=id --format=csv | ascli ats access_key delete @lines:@stdin: --bulk=yes
|
|
7558
7581
|
```
|
|
7559
7582
|
|
|
7560
7583
|
The parameters provided to ATS for access key creation are the ones of [ATS API](https://developer.ibm.com/apis/catalog?search=%22aspera%20ats%22) for the `POST /access_keys` endpoint.
|
|
@@ -7651,14 +7674,14 @@ upload test_file.bin --to-folder=my_inside_folder --ts=@json:'{"multi_session":3
|
|
|
7651
7674
|
|
|
7652
7675
|
### Authentication on Server with SSH session
|
|
7653
7676
|
|
|
7654
|
-
If SSH is the session protocol (by default, that is, not WSS), then following session authentication methods are supported:
|
|
7677
|
+
If SSH is the session protocol (by default, that is, not WSS), then the following session authentication methods are supported:
|
|
7655
7678
|
|
|
7656
7679
|
- `password`: SSH password
|
|
7657
7680
|
- `ssh_keys`: SSH keys (Multiple SSH key paths can be provided.)
|
|
7658
7681
|
|
|
7659
7682
|
If `username` is not provided then the default transfer user `xfer` is used.
|
|
7660
7683
|
|
|
7661
|
-
If neither SSH password nor key is provided and a transfer token is provided in transfer spec (option `ts`), then standard SSH bypass
|
|
7684
|
+
If neither SSH password nor key is provided and a transfer token is provided in transfer spec (option `ts`), then the standard SSH bypass keys are used.
|
|
7662
7685
|
|
|
7663
7686
|
Example:
|
|
7664
7687
|
|
|
@@ -7681,7 +7704,7 @@ ascli server --ssh-keys=@list:,~/.ssh/id_rsa
|
|
|
7681
7704
|
ascli server --ssh-keys=@json:'["~/.ssh/id_rsa"]'
|
|
7682
7705
|
```
|
|
7683
7706
|
|
|
7684
|
-
For file operation
|
|
7707
|
+
For file operation commands (browse, delete), the Ruby SSH client library `Net::SSH` is used and provides several options settable using option `ssh_options` (additive option like `ts`).
|
|
7685
7708
|
|
|
7686
7709
|
For a list of SSH client options, refer to the Ruby documentation of [Net::SSH](http://net-ssh.github.io/net-ssh/Net/SSH.html#method-c-start).
|
|
7687
7710
|
|
|
@@ -7695,19 +7718,19 @@ By default, the SSH library will check if a local `ssh-agent` is running.
|
|
|
7695
7718
|
|
|
7696
7719
|
On Linux, if you get an error message such as:
|
|
7697
7720
|
|
|
7698
|
-
```
|
|
7721
|
+
```text
|
|
7699
7722
|
ERROR -- net.ssh.authentication.agent: could not connect to ssh-agent: Agent not configured
|
|
7700
7723
|
```
|
|
7701
7724
|
|
|
7702
7725
|
Or on Windows:
|
|
7703
7726
|
|
|
7704
|
-
```
|
|
7727
|
+
```text
|
|
7705
7728
|
ERROR -- net.ssh.authentication.agent: could not connect to ssh-agent: pageant process not running
|
|
7706
7729
|
```
|
|
7707
7730
|
|
|
7708
|
-
This means that your environment suggests using an agent, but
|
|
7731
|
+
This means that your environment suggests using an agent, but no SSH agent is running. In that case:
|
|
7709
7732
|
|
|
7710
|
-
- Check env var: `
|
|
7733
|
+
- Check env var: `SSH_AUTH_SOCK`
|
|
7711
7734
|
- Check your file: `$HOME/.ssh/config`
|
|
7712
7735
|
- Check if the SSH key is protected with a passphrase (then, use the `passphrase` SSH option)
|
|
7713
7736
|
- [Check the Ruby SSH options in start method](https://github.com/net-ssh/net-ssh/blob/master/lib/net/ssh.rb)
|
|
@@ -7725,15 +7748,15 @@ It is equivalent to setting both options `ssh_options.passphrase` and `ts.ssh_pr
|
|
|
7725
7748
|
|
|
7726
7749
|
### Other session channels for `server`
|
|
7727
7750
|
|
|
7728
|
-
URL schemes `local` and `https` are also supported (mainly for testing
|
|
7751
|
+
URL schemes `local` and `https` are also supported (mainly for testing purposes).
|
|
7729
7752
|
(`--url=local:`, `--url=https://...`)
|
|
7730
7753
|
|
|
7731
7754
|
- `local` will execute `ascmd` locally, instead of using an SSH connection.
|
|
7732
7755
|
- `https` will use Web Socket Session:
|
|
7733
7756
|
This requires the use of a transfer token.
|
|
7734
|
-
For example a `Basic` token can be used.
|
|
7757
|
+
For example, a `Basic` token can be used.
|
|
7735
7758
|
|
|
7736
|
-
As
|
|
7759
|
+
As SSH is used most of the time, if an `http` scheme is provided without a token, the plugin falls back to SSH and port 33001.
|
|
7737
7760
|
|
|
7738
7761
|
### Examples: `server`
|
|
7739
7762
|
|
|
@@ -7750,14 +7773,14 @@ ascli server download /aspera-test-dir-large/200MB
|
|
|
7750
7773
|
If an SSH private key is used for authentication with a passphrase, the passphrase needs to be provided to both options: `ssh_options` (for browsing) and `ts` (for transfers):
|
|
7751
7774
|
|
|
7752
7775
|
```shell
|
|
7753
|
-
ascli server --url=ssh://_server_address_here_:33001 --username=_user_here_ --
|
|
7776
|
+
ascli server --url=ssh://_server_address_here_:33001 --username=_user_here_ --ssh-keys=_private_key_path_here_ --passphrase=_passphrase_here_
|
|
7754
7777
|
```
|
|
7755
7778
|
|
|
7756
7779
|
## Plugin: `node`: IBM Aspera High Speed Transfer Server Node
|
|
7757
7780
|
|
|
7758
7781
|
This plugin gives access to capabilities provided by the HSTS Node API.
|
|
7759
7782
|
|
|
7760
|
-
|
|
7783
|
+
Authentication uses either a Node API username and password, or an access key and secret, provided with options `username` and `password`.
|
|
7761
7784
|
|
|
7762
7785
|
> [!NOTE]
|
|
7763
7786
|
> Capabilities of this plugin are used in other plugins that access the Node API, such as `aoc`, `ats`, `shares`.
|
|
@@ -7780,7 +7803,7 @@ When using an access key, the so-called **gen4/access key** API is also supporte
|
|
|
7780
7803
|
Example:
|
|
7781
7804
|
|
|
7782
7805
|
- `ascli node browse /` : list files with **gen3/node user** API
|
|
7783
|
-
- `ascli node
|
|
7806
|
+
- `ascli node access_keys do self browse /` : list files with **gen4/access key** API
|
|
7784
7807
|
|
|
7785
7808
|
#### Browse
|
|
7786
7809
|
|
|
@@ -7801,7 +7824,7 @@ Special parameters can be placed in option `query` for "gen3" browse:
|
|
|
7801
7824
|
|
|
7802
7825
|
##### Gen4
|
|
7803
7826
|
|
|
7804
|
-
This is when executing `browse` in `aoc files` or in `
|
|
7827
|
+
This is when executing `browse` in `aoc files` or in `node access_keys do`.
|
|
7805
7828
|
|
|
7806
7829
|
Option `node_api` (`Hash`) controls some options of API used, with the following parameters:
|
|
7807
7830
|
|
|
@@ -7832,7 +7855,7 @@ Examples of expressions:
|
|
|
7832
7855
|
- Find all files and folders under `/`
|
|
7833
7856
|
|
|
7834
7857
|
```shell
|
|
7835
|
-
ascli node access_keys do self find
|
|
7858
|
+
ascli node access_keys do self find /
|
|
7836
7859
|
```
|
|
7837
7860
|
|
|
7838
7861
|
- Find all text files in `/Documents`
|
|
@@ -7913,7 +7936,7 @@ Other query parameters are passed through to the underlying API (`GET /ops/trans
|
|
|
7913
7936
|
The `central` sub-command uses the **reliable query** API (session and file).
|
|
7914
7937
|
Use it to list transfer sessions and transferred files.
|
|
7915
7938
|
|
|
7916
|
-
To
|
|
7939
|
+
To list transferred files:
|
|
7917
7940
|
|
|
7918
7941
|
```shell
|
|
7919
7942
|
ascli node central file list
|
|
@@ -7943,7 +7966,7 @@ For the `async` subcommands `show` and `delete`, you can use the special identif
|
|
|
7943
7966
|
You can start a FASP Stream session from the Node API.
|
|
7944
7967
|
|
|
7945
7968
|
Run the following command:
|
|
7946
|
-
`ascli node stream create
|
|
7969
|
+
`ascli node stream create @json:<VALUE>`
|
|
7947
7970
|
with the following [**transfer-spec**](#transfer-specification):
|
|
7948
7971
|
|
|
7949
7972
|
```json
|
|
@@ -7976,17 +7999,17 @@ ascli node central file list --validator=ascli @json:'{"file_transfer_filter":{"
|
|
|
7976
7999
|
```
|
|
7977
8000
|
|
|
7978
8001
|
```text
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
8002
|
+
╭──────────────┬──────────────┬────────────┬─────────────────────────────────────╮
|
|
8003
|
+
│ session_uuid │ file_id │ status │ path │
|
|
8004
|
+
╞══════════════╪══════════════╪════════════╪═════════════════════════════════════╡
|
|
8005
|
+
│ 1a74444c-... │ 084fb181-... │ validating │ /home/xfer.../PKG - <TITLE>/200KB.1 │
|
|
8006
|
+
╰──────────────┴──────────────┴────────────┴─────────────────────────────────────╯
|
|
7984
8007
|
```
|
|
7985
8008
|
|
|
7986
8009
|
To update the status of the file, use the following command:
|
|
7987
8010
|
|
|
7988
8011
|
```shell
|
|
7989
|
-
ascli node central file
|
|
8012
|
+
ascli node central file modify --validator=ascli @json:'{"files":[{"session_uuid": "1a74444c-...","file_id": "084fb181-...","status": "completed"}]}'
|
|
7990
8013
|
```
|
|
7991
8014
|
|
|
7992
8015
|
```text
|
|
@@ -7998,12 +8021,12 @@ updated
|
|
|
7998
8021
|
Scenario: Access to a **Shares on Demand** (SHOD) server on AWS is provided by a partner.
|
|
7999
8022
|
We need to transfer files from this third party SHOD instance into our Azure BLOB storage.
|
|
8000
8023
|
Create an **Aspera Transfer Service** instance, which provides access to the Node API.
|
|
8001
|
-
Then create
|
|
8002
|
-
Create another
|
|
8024
|
+
Then create an [Option Preset](#option-preset) with the Node API URL and credentials of the **SHOD** instance, named `aws_shod`.
|
|
8025
|
+
Create another [Option Preset](#option-preset) for the Azure ATS instance, named `azure_ats`.
|
|
8003
8026
|
Then execute the following command:
|
|
8004
8027
|
|
|
8005
8028
|
```shell
|
|
8006
|
-
ascli node download /share/sourcefile --to-folder=/destination_folder --preset=aws_shod --transfer=@preset:azure_ats
|
|
8029
|
+
ascli node download /share/sourcefile --to-folder=/destination_folder --preset=aws_shod --transfer=@preset:azure_ats --transfer.agent=node
|
|
8007
8030
|
```
|
|
8008
8031
|
|
|
8009
8032
|
This will get transfer information from the SHOD instance and tell the Azure ATS instance to download files.
|
|
@@ -8023,10 +8046,10 @@ gem install rmagick rainbow
|
|
|
8023
8046
|
For example, it is possible to display the preview of a file, if it exists, using an access key on node:
|
|
8024
8047
|
|
|
8025
8048
|
```shell
|
|
8026
|
-
ascli node
|
|
8049
|
+
ascli node access_keys do self thumbnail /preview_samples/Aspera.mpg
|
|
8027
8050
|
```
|
|
8028
8051
|
|
|
8029
|
-
Previews are mainly used in AoC
|
|
8052
|
+
Previews are mainly used in AoC; this also works with AoC:
|
|
8030
8053
|
|
|
8031
8054
|
```shell
|
|
8032
8055
|
ascli aoc files thumbnail /preview_samples/Aspera.mpg
|
|
@@ -8041,12 +8064,12 @@ ascli aoc files thumbnail /preview_samples/Aspera.mpg
|
|
|
8041
8064
|
### Creating an access key
|
|
8042
8065
|
|
|
8043
8066
|
```shell
|
|
8044
|
-
ascli node
|
|
8067
|
+
ascli node access_keys create @json:'{"id":"<ACCESS_KEY>","secret":"<SECRET>","storage":{"type":"local","path":"/data/mydir"}}'
|
|
8045
8068
|
```
|
|
8046
8069
|
|
|
8047
8070
|
> [!TIP]
|
|
8048
8071
|
> The `id` and `secret` fields are optional.
|
|
8049
|
-
> If not provided, they will be generated and returned
|
|
8072
|
+
> If not provided, they will be generated and returned in the result.
|
|
8050
8073
|
> In that case, provide option `--out.secrets=yes` to get the generated secret.
|
|
8051
8074
|
|
|
8052
8075
|
Access keys support extra overriding parameters using parameter: `configuration` and sub keys `transfer` and `server`.
|
|
@@ -8059,7 +8082,7 @@ For example, an access key can be modified or created with the following options
|
|
|
8059
8082
|
The list of supported options can be displayed using command:
|
|
8060
8083
|
|
|
8061
8084
|
```shell
|
|
8062
|
-
ascli node info --
|
|
8085
|
+
ascli node info --fields=@ruby:'/^access_key_configuration_capabilities.*/'
|
|
8063
8086
|
```
|
|
8064
8087
|
|
|
8065
8088
|
### Generating and using a bearer token
|
|
@@ -8106,7 +8129,7 @@ The way to create access keys depends slightly on the type of HSTS:
|
|
|
8106
8129
|
It has no `docroot` but has at least one file restriction (for testing, one can use `*` to accept creation of an access key with any storage root path).
|
|
8107
8130
|
See the Aspera HSTS documentation.
|
|
8108
8131
|
|
|
8109
|
-
- If Cloud Pak for
|
|
8132
|
+
- If Cloud Pak for Integration is used, then the node admin is created automatically.
|
|
8110
8133
|
|
|
8111
8134
|
- If Aspera on Cloud or ATS is used, then the SaaS API for access key creation is used.
|
|
8112
8135
|
|
|
@@ -8118,7 +8141,7 @@ The following sections assume that an access key has been created and that `ascl
|
|
|
8118
8141
|
#### Bearer token: Preparation
|
|
8119
8142
|
|
|
8120
8143
|
Assume that the access key was created, and a default configuration is set to use this **access key**.
|
|
8121
|
-
Using `ascli`, an access key can be created using the `
|
|
8144
|
+
Using `ascli`, an access key can be created using the `access_keys create` command on the node (using main node credentials) or on ATS.
|
|
8122
8145
|
|
|
8123
8146
|
Create a private key (organization key) that will be used to sign bearer tokens:
|
|
8124
8147
|
|
|
@@ -8135,18 +8158,18 @@ ascli config genkey $my_private_pem
|
|
|
8135
8158
|
The corresponding public key shall be placed as an attribute of the **access key** (done with `PUT /access_keys/<ID>`):
|
|
8136
8159
|
|
|
8137
8160
|
```shell
|
|
8138
|
-
ascli node
|
|
8161
|
+
ascli node access_keys set_bearer_key self @file:$my_private_pem
|
|
8139
8162
|
```
|
|
8140
8163
|
|
|
8141
8164
|
> [!NOTE]
|
|
8142
8165
|
> Either the public or private key can be provided, and only the public key is used.
|
|
8143
|
-
> This
|
|
8166
|
+
> This enables checking the signature of bearer tokens.
|
|
8144
8167
|
> Above command is executed with access key credentials.
|
|
8145
8168
|
|
|
8146
|
-
Alternatively, use the following equivalent command, as `
|
|
8169
|
+
Alternatively, use the following equivalent command, as `config genkey` also saves the public key with extension `.pub`:
|
|
8147
8170
|
|
|
8148
8171
|
```shell
|
|
8149
|
-
ascli node
|
|
8172
|
+
ascli node access_keys modify %id:self @ruby:'{token_verification_key: File.read("'$my_private_pem'.pub")}'
|
|
8150
8173
|
```
|
|
8151
8174
|
|
|
8152
8175
|
#### Bearer token: Configuration for user
|
|
@@ -8154,7 +8177,7 @@ ascli node access_key modify %id:self @ruby:'{token_verification_key: File.read(
|
|
|
8154
8177
|
- Select a folder for which to grant access to a user, and get its identifier:
|
|
8155
8178
|
|
|
8156
8179
|
```shell
|
|
8157
|
-
my_folder_id=$(ascli node
|
|
8180
|
+
my_folder_id=$(ascli node access_keys do self show / --fields=id)
|
|
8158
8181
|
```
|
|
8159
8182
|
|
|
8160
8183
|
> [!NOTE]
|
|
@@ -8173,7 +8196,7 @@ ascli node access_key modify %id:self @ruby:'{token_verification_key: File.read(
|
|
|
8173
8196
|
- Grant this user access to the selected folder:
|
|
8174
8197
|
|
|
8175
8198
|
```shell
|
|
8176
|
-
ascli node
|
|
8199
|
+
ascli node access_keys do self permission %id:$my_folder_id create @json:'{"access_type":"user","access_id":"'$my_user_id'"}'
|
|
8177
8200
|
```
|
|
8178
8201
|
|
|
8179
8202
|
- Create a Bearer token for the user:
|
|
@@ -8198,7 +8221,7 @@ Assume the role of the user, with the following information:
|
|
|
8198
8221
|
To use this information:
|
|
8199
8222
|
|
|
8200
8223
|
```shell
|
|
8201
|
-
ascli node -N --url=https://... --password="Bearer $(cat bearer.txt)" --root-id=$my_folder_id
|
|
8224
|
+
ascli node -N --url=https://... --password="Bearer $(cat bearer.txt)" --root-id=$my_folder_id access_keys do self browse /
|
|
8202
8225
|
```
|
|
8203
8226
|
|
|
8204
8227
|
### Tested commands for `node`
|
|
@@ -8318,7 +8341,7 @@ Identify the region and the endpoint URL will be `https://otlp-[region]-saas.ins
|
|
|
8318
8341
|
For convenience, those parameters can be provided in a preset, for example, named `otel_default`.
|
|
8319
8342
|
|
|
8320
8343
|
```shell
|
|
8321
|
-
ascli config preset
|
|
8344
|
+
ascli config preset initialize otel_default @json:'{"url":"https://otlp-orange-saas.instana.io:4318","key":"*********","interval":1.1}'
|
|
8322
8345
|
```
|
|
8323
8346
|
|
|
8324
8347
|
Then it is invoked like this (assuming a default node is configured):
|
|
@@ -8335,9 +8358,9 @@ In Instana, create a custom Dashboard to visualize the OTel data:
|
|
|
8335
8358
|
|
|
8336
8359
|
## Plugin: `faspex5`: IBM Aspera Faspex v5
|
|
8337
8360
|
|
|
8338
|
-
IBM Aspera's newer self-managed application.
|
|
8361
|
+
Faspex 5 is IBM Aspera's newer self-managed application.
|
|
8339
8362
|
|
|
8340
|
-
|
|
8363
|
+
The following authentication methods are supported (option `auth`):
|
|
8341
8364
|
|
|
8342
8365
|
| Method | Description |
|
|
8343
8366
|
|---------------|---------------------------------------------------------------------|
|
|
@@ -8363,20 +8386,20 @@ Then, answer questions interactively:
|
|
|
8363
8386
|
argument: url> faspex5.example.com
|
|
8364
8387
|
```
|
|
8365
8388
|
|
|
8366
|
-
|
|
8389
|
+
If multiple applications are detected, the wizard asks which one to use (this step is skipped if only Faspex is detected):
|
|
8367
8390
|
|
|
8368
8391
|
```text
|
|
8369
8392
|
Multiple applications detected:
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8393
|
+
╭─────────┬───────────────────────────────────────────┬─────────────╮
|
|
8394
|
+
│ product │ url │ version │
|
|
8395
|
+
╞═════════╪═══════════════════════════════════════════╪═════════════╡
|
|
8396
|
+
│ faspex5 │ https://faspex5.example.com/aspera/faspex │ F5.0.6 │
|
|
8397
|
+
│ server │ ssh://faspex5.example.com:22 │ OpenSSH_8.3 │
|
|
8398
|
+
╰─────────┴───────────────────────────────────────────┴─────────────╯
|
|
8376
8399
|
product> faspex5
|
|
8377
8400
|
```
|
|
8378
8401
|
|
|
8379
|
-
When Faspex is detected,
|
|
8402
|
+
When Faspex is detected, the wizard asks for the path to a private key.
|
|
8380
8403
|
If you do not have a private key, leave that field blank, and one will be generated or a previously generated key will be used.
|
|
8381
8404
|
|
|
8382
8405
|
```text
|
|
@@ -8403,7 +8426,7 @@ Create an API client with:
|
|
|
8403
8426
|
- name: ascli
|
|
8404
8427
|
- JWT: enabled
|
|
8405
8428
|
Then, logged in as someuser@example.com go to your profile:
|
|
8406
|
-
() → Account Settings → Preferences
|
|
8429
|
+
(User) → Account Settings → Preferences → Public Key in PEM:
|
|
8407
8430
|
-----BEGIN PUBLIC KEY-----
|
|
8408
8431
|
redacted
|
|
8409
8432
|
-----END PUBLIC KEY-----
|
|
@@ -8456,7 +8479,7 @@ Activation is in two steps:
|
|
|
8456
8479
|
- At the bottom, in the `Public key in PEM format` field, paste the **public key** that corresponds to the private key assigned to your account.
|
|
8457
8480
|
|
|
8458
8481
|
> [!TIP]
|
|
8459
|
-
> If you don
|
|
8482
|
+
> If you don't have a private key, see [Private Key](#private-key) to generate one.
|
|
8460
8483
|
|
|
8461
8484
|
Then use these options:
|
|
8462
8485
|
|
|
@@ -8472,7 +8495,7 @@ Then use these options:
|
|
|
8472
8495
|
> Use the `private_key` option to provide the PEM content (not the file path).
|
|
8473
8496
|
> To load from a file, prefix the path with `@file:`, for example, `@file:/path/to/key.pem`.
|
|
8474
8497
|
|
|
8475
|
-
Typically, users create a preset so they don
|
|
8498
|
+
Typically, users create a preset so they don't have to enter these options each time.
|
|
8476
8499
|
|
|
8477
8500
|
Example:
|
|
8478
8501
|
|
|
@@ -8486,7 +8509,7 @@ ascli faspex5 user profile show
|
|
|
8486
8509
|
|
|
8487
8510
|
### Faspex 5 web authentication
|
|
8488
8511
|
|
|
8489
|
-
For web-based authentication, the administrator must create an **API client** in Faspex
|
|
8512
|
+
For web-based authentication, the administrator must create an **API client** in Faspex to support an external web app:
|
|
8490
8513
|
|
|
8491
8514
|
- As Admin, Navigate to the web UI: Admin → Configurations → API Clients → Create
|
|
8492
8515
|
- Do not Activate JWT
|
|
@@ -8620,7 +8643,7 @@ For multiple parameters or when copying directly from API documentation, `@json:
|
|
|
8620
8643
|
|
|
8621
8644
|
### Faspex 5: Inbox selection
|
|
8622
8645
|
|
|
8623
|
-
By default, package operations
|
|
8646
|
+
By default, package operations `receive` and `list` are performed on all the user's inboxes, not archived (`inbox_all`).
|
|
8624
8647
|
|
|
8625
8648
|
To select another inbox, use option `box` with one of the following values:
|
|
8626
8649
|
|
|
@@ -8636,7 +8659,7 @@ To select another inbox, use option `box` with one of the following values:
|
|
|
8636
8659
|
| `pending_history` | Archived pending packages. |
|
|
8637
8660
|
| `all` | All boxes accessible by current user. |
|
|
8638
8661
|
| `ALL` | All boxes of all users. **admin only**. |
|
|
8639
|
-
| `<NAME>` | Name of shared
|
|
8662
|
+
| `<NAME>` | Name of shared inbox or workgroup.<br/>If option `group_type` is `shared_inboxes`: name of a shared inbox (default).<br/>If `group_type` is `workgroups`: name of workgroup. |
|
|
8640
8663
|
|
|
8641
8664
|
> [!NOTE]
|
|
8642
8665
|
> In case the name of the `box` is an open value, use option `group_type` set to either `shared_inboxes` or `workgroups`.
|
|
@@ -8651,7 +8674,7 @@ ascli faspex5 packages send <PACKAGE_DATA> <FILE_LIST> ...
|
|
|
8651
8674
|
```
|
|
8652
8675
|
|
|
8653
8676
|
The `Hash` passed as a command parameter corresponds to the Faspex 5 API endpoint [`POST /packages`](https://developer.ibm.com/apis/catalog/aspera--ibm-aspera-faspex-5-0-api/api/API--aspera--ibm-aspera-faspex-api#createPackageRecord).
|
|
8654
|
-
See the API reference for a full list of supported fields, or inspect such request
|
|
8677
|
+
See the API reference for a full list of supported fields, or inspect such a request in the browser developer tools.
|
|
8655
8678
|
|
|
8656
8679
|
The following fields are required:
|
|
8657
8680
|
|
|
@@ -8729,7 +8752,7 @@ To limit automatic contact lookup to one or more specific types, include the `re
|
|
|
8729
8752
|
To enable content protection (CSEAR), set parameter `ear_enabled` to `true` in the package creation payload.
|
|
8730
8753
|
See the Faspex package creation API for full details.
|
|
8731
8754
|
|
|
8732
|
-
The following error is returned by Faspex
|
|
8755
|
+
The following error is returned by Faspex if CSEAR was not specified in the package creation and if it is configured as mandatory on the server:
|
|
8733
8756
|
|
|
8734
8757
|
```text
|
|
8735
8758
|
the provided encryption value (no) does not match the expected server side encryption value (yes)
|
|
@@ -8761,7 +8784,7 @@ Option `query` can be used to filter the list of packages, based on native API p
|
|
|
8761
8784
|
| `pmax` | Special | Maximum number of **pages** to request.<br/>Stop pages when the maximum is passed. |
|
|
8762
8785
|
|
|
8763
8786
|
A **Command Parameter** in last position, of type `Proc`, can be used to filter the list of packages.
|
|
8764
|
-
|
|
8787
|
+
The advantage of this method is that the expression can be any test, even complex, as it is Ruby code.
|
|
8765
8788
|
But the disadvantage is that the filtering is done in `ascli` and not in Faspex 5, so it is less efficient.
|
|
8766
8789
|
|
|
8767
8790
|
Examples:
|
|
@@ -8784,7 +8807,7 @@ Several entities support folder browsing: Packages, Nodes, Shared Folders.
|
|
|
8784
8807
|
All support two modes: paging and legacy API.
|
|
8785
8808
|
By default, paging is used.
|
|
8786
8809
|
|
|
8787
|
-
Option `query` is available with parameters supported by the API and `ascli
|
|
8810
|
+
Option `query` is available with parameters supported by the API and `ascli`:
|
|
8788
8811
|
|
|
8789
8812
|
| Parameter | Evaluation | Default | Description |
|
|
8790
8813
|
|-----------|--------------|-------------------| ----------------------------------------|
|
|
@@ -8821,7 +8844,8 @@ In this case, typically, only `completed` packages should be downloaded, so use
|
|
|
8821
8844
|
If a package is password protected, then the content protection password is asked interactively.
|
|
8822
8845
|
To keep the content encrypted, use option: `--ts=@json:'{"content_protection":null}'`, or provide the password instead of `null`.
|
|
8823
8846
|
|
|
8824
|
-
>
|
|
8847
|
+
> [!TIP]
|
|
8848
|
+
> If you use option `query` and/or positional `filter`, you can use the `list` command for a dry run.
|
|
8825
8849
|
|
|
8826
8850
|
### Faspex 5: List all shared inboxes and work groups
|
|
8827
8851
|
|
|
@@ -8832,29 +8856,29 @@ To keep the content encrypted, use option: `--ts=@json:'{"content_protection":nu
|
|
|
8832
8856
|
If you are a regular user, to list work groups you belong to:
|
|
8833
8857
|
|
|
8834
8858
|
```shell
|
|
8835
|
-
ascli faspex5 admin
|
|
8859
|
+
ascli faspex5 admin workgroups list
|
|
8836
8860
|
```
|
|
8837
8861
|
|
|
8838
|
-
If you are admin or manager, add option
|
|
8862
|
+
If you are admin or manager, add option `--query=@json:'{"all":true}'`: this lists items you manage, even if you do not belong to them.
|
|
8839
8863
|
Example:
|
|
8840
8864
|
|
|
8841
8865
|
```shell
|
|
8842
|
-
ascli faspex5 admin
|
|
8866
|
+
ascli faspex5 admin shared_inboxes list --query=@json:'{"all":true}' --fields=id,name
|
|
8843
8867
|
```
|
|
8844
8868
|
|
|
8845
8869
|
Shared inbox members can also be listed, added, removed, and external users can be invited to a shared inbox.
|
|
8846
8870
|
|
|
8847
8871
|
```shell
|
|
8848
|
-
ascli faspex5 admin shared_inboxes
|
|
8872
|
+
ascli faspex5 admin shared_inboxes invite_external_collaborator '%name:the shared inbox' @: email_address=john@example.com
|
|
8849
8873
|
```
|
|
8850
8874
|
|
|
8851
8875
|
It is equivalent to:
|
|
8852
8876
|
|
|
8853
8877
|
```shell
|
|
8854
|
-
ascli faspex5 admin shared_inboxes
|
|
8878
|
+
ascli faspex5 admin shared_inboxes invite_external_collaborator '%name:the shared inbox' @json:'{"email_address":"john@example.com"}'
|
|
8855
8879
|
```
|
|
8856
8880
|
|
|
8857
|
-
Other payload parameters are possible for `
|
|
8881
|
+
Other payload parameters are possible for `invite_external_collaborator` in this last `Hash` **Command Parameter**:
|
|
8858
8882
|
|
|
8859
8883
|
```json
|
|
8860
8884
|
{"description":"blah","prevent_http_upload":true,"custom_link_expiration_policy":false,"invitation_expires_after_upload":false,"set_invitation_link_expiration":false,"invitation_expiration_days":3}
|
|
@@ -8869,7 +8893,7 @@ ascli faspex5 admin metadata_profiles create @json:'{"name":"the profile","defau
|
|
|
8869
8893
|
### Faspex 5: Create a Shared inbox with specific metadata profile
|
|
8870
8894
|
|
|
8871
8895
|
```shell
|
|
8872
|
-
ascli faspex5 admin
|
|
8896
|
+
ascli faspex5 admin shared_inboxes create @json:'{"name":"the shared inbox","metadata_profile_id":1}'
|
|
8873
8897
|
```
|
|
8874
8898
|
|
|
8875
8899
|
### Faspex 5: List content in Shared folder and send package from remote source
|
|
@@ -8891,7 +8915,7 @@ ascli faspex5 shared_folders list --fields=id,name
|
|
|
8891
8915
|
```
|
|
8892
8916
|
|
|
8893
8917
|
```shell
|
|
8894
|
-
ascli faspex5 shared_folders
|
|
8918
|
+
ascli faspex5 shared_folders browse %name:'Server Files' /folder
|
|
8895
8919
|
```
|
|
8896
8920
|
|
|
8897
8921
|
```shell
|
|
@@ -8899,7 +8923,7 @@ ascli faspex5 packages send @json:'{"title":"hello","recipients":[{"name":"_reci
|
|
|
8899
8923
|
```
|
|
8900
8924
|
|
|
8901
8925
|
> [!TIP]
|
|
8902
|
-
> The shared folder can be identified by its numerical `id` or by name using [percent selector](#percent-selector): `%<FIELD>:<VALUE>`.
|
|
8926
|
+
> The shared folder can be identified by its numerical `id` or by name using the [percent selector](#percent-selector): `%<FIELD>:<VALUE>`. For example: `--shared-folder=3` or `--shared-folder=%name:partages`.
|
|
8903
8927
|
|
|
8904
8928
|
### Faspex 5: Receive all packages (cargo)
|
|
8905
8929
|
|
|
@@ -8909,7 +8933,7 @@ To receive all packages, only once, through persistency of already received pack
|
|
|
8909
8933
|
ascli faspex5 packages receive ALL --once-only=yes --query=@json:'{"status":"completed"}'
|
|
8910
8934
|
```
|
|
8911
8935
|
|
|
8912
|
-
To initialize,
|
|
8936
|
+
To initialize, that is, skip all current packages, so that next time `ALL` is used, only newer packages are downloaded:
|
|
8913
8937
|
|
|
8914
8938
|
```shell
|
|
8915
8939
|
ascli faspex5 packages receive INIT --once-only=yes
|
|
@@ -8917,7 +8941,7 @@ ascli faspex5 packages receive INIT --once-only=yes
|
|
|
8917
8941
|
|
|
8918
8942
|
### Faspex 5: Invitations
|
|
8919
8943
|
|
|
8920
|
-
There are two types of invitations
|
|
8944
|
+
There are two types of invitations for package submission: public or private.
|
|
8921
8945
|
|
|
8922
8946
|
Public invitations are for external users; provide only the email address.
|
|
8923
8947
|
|
|
@@ -8925,7 +8949,7 @@ Public invitations are for external users; provide only the email address.
|
|
|
8925
8949
|
ascli faspex5 invitations create @json:'{"email_address":"john@example.com"}' --fields=access_url
|
|
8926
8950
|
```
|
|
8927
8951
|
|
|
8928
|
-
Private invitations are for internal users
|
|
8952
|
+
Private invitations are for internal users: provide the user or shared inbox identifier through field `recipient_name`.
|
|
8929
8953
|
|
|
8930
8954
|
### Faspex 5: Cleanup packages
|
|
8931
8955
|
|
|
@@ -8979,16 +9003,16 @@ ascli faspex5 admin accounts modify %name:some.user@example.com @json:'{"account
|
|
|
8979
9003
|
> [!TIP]
|
|
8980
9004
|
> This example uses the [percent selector](#percent-selector), but the numerical ID can be used as well.
|
|
8981
9005
|
|
|
8982
|
-
To send a password reset link to a user, use command `
|
|
9006
|
+
To send a password reset link to a user, use command `faspex5 admin accounts reset_password <ACCOUNT_ID>`.
|
|
8983
9007
|
|
|
8984
9008
|
### Faspex 5: Faspex 4-style post-processing
|
|
8985
9009
|
|
|
8986
9010
|
The command `ascli faspex5 postprocessing` emulates Faspex 4 post-processing script execution in Faspex 5.
|
|
8987
9011
|
It implements a web hook for Faspex 5 and calls a script with the same environment variables as set by Faspex 4.
|
|
8988
|
-
Environment variables
|
|
9012
|
+
Environment variables are set to the values provided by the web hook, which are the same as Faspex 4 post-processing.
|
|
8989
9013
|
|
|
8990
9014
|
It allows migrating workflows from Faspex 4 to Faspex 5 while preserving scripts.
|
|
8991
|
-
Nevertheless,
|
|
9015
|
+
Nevertheless, in the long term, a native approach shall be considered, such as using Aspera Orchestrator or other workflow engine, using Faspex 5 native web hooks or File Processing.
|
|
8992
9016
|
|
|
8993
9017
|
It is invoked like this:
|
|
8994
9018
|
|
|
@@ -9020,12 +9044,12 @@ ascli faspex5 postprocessing @json:'{"url":"http://localhost:8080/processing","s
|
|
|
9020
9044
|
```
|
|
9021
9045
|
|
|
9022
9046
|
In Faspex 5, the URL of the webhook endpoint shall be reachable from within Faspex containers.
|
|
9023
|
-
For example, if `ascli`
|
|
9047
|
+
For example, if `ascli` is running on the host, the URL hostname shall not be `localhost`, as this refers to the local address inside the Faspex container.
|
|
9024
9048
|
Instead, one can specify the **IP address of the host** or `host.containers.internal` (Check `podman` manual).
|
|
9025
9049
|
|
|
9026
9050
|
Define the web hook as follows:
|
|
9027
9051
|
|
|
9028
|
-
**Webhook endpoint URI
|
|
9052
|
+
**Webhook endpoint URI**: `http://host.containers.internal:8080/processing/script1.sh`
|
|
9029
9053
|
|
|
9030
9054
|
Then the post-processing script executed will be `/opt/scripts/script1.sh`.
|
|
9031
9055
|
|
|
@@ -9049,32 +9073,32 @@ There are many limitations:
|
|
|
9049
9073
|
- No support for remote sources, only for an actual file transfer by the client.
|
|
9050
9074
|
- The client must use the transfer spec returned by the API (not `faspe:` URL).
|
|
9051
9075
|
- Tags returned in transfer spec must be used in transfer.
|
|
9052
|
-
- Only a single authentication is possible (per gateway) on
|
|
9053
|
-
- No authentication
|
|
9076
|
+
- Only a single authentication is possible (per gateway) on Faspex 5.
|
|
9077
|
+
- No authentication on the Faspex 4 side (ignored).
|
|
9054
9078
|
|
|
9055
9079
|
Behavior:
|
|
9056
|
-
The API client calls the Faspex 4 API on the gateway, then the gateway transforms this into a
|
|
9080
|
+
The API client calls the Faspex 4 API on the gateway, then the gateway transforms this into a Faspex 5 API call, which returns a transfer spec, which is returned to the calling client.
|
|
9057
9081
|
The calling client uses this to start a transfer to HSTS, which is managed by Faspex 5.
|
|
9058
9082
|
|
|
9059
9083
|
For other parameters, see [Web service](#web-service).
|
|
9060
9084
|
|
|
9061
9085
|
### Faspex 5: Get Bearer token to use API
|
|
9062
9086
|
|
|
9063
|
-
If a command is missing, then it is still possible to
|
|
9087
|
+
If a command is missing, then it is still possible to call the API directly on the command line using `curl`:
|
|
9064
9088
|
|
|
9065
9089
|
```shell
|
|
9066
|
-
curl -H "Authorization: $(ascli
|
|
9090
|
+
curl -H "Authorization: $(ascli faspex5 bearer_token)" https://faspex5.example.com/aspera/faspex/api/v5/api_endpoint_here
|
|
9067
9091
|
```
|
|
9068
9092
|
|
|
9069
9093
|
## Plugin: `shares`: IBM Aspera Shares v1
|
|
9070
9094
|
|
|
9071
9095
|
Aspera Shares supports the **Node API** for the file transfer part.
|
|
9072
9096
|
|
|
9073
|
-
Supported commands are listed in
|
|
9097
|
+
Supported commands are listed in the Shares API documentation:
|
|
9074
9098
|
|
|
9075
9099
|
<https://developer.ibm.com/apis/catalog/aspera--aspera-shares-api/Introduction>
|
|
9076
9100
|
|
|
9077
|
-
The payload for creation is the same as for the API
|
|
9101
|
+
The payload for creation is the same as for the API: parameters are provided as a positional `Hash`.
|
|
9078
9102
|
|
|
9079
9103
|
Example: Create a Node: Attributes are like API:
|
|
9080
9104
|
|
|
@@ -9090,18 +9114,20 @@ Example: Create a Node: Attributes are like API:
|
|
|
9090
9114
|
| `timeout` | | `30s` |
|
|
9091
9115
|
| `open_timeout` | | `10s` |
|
|
9092
9116
|
|
|
9093
|
-
Example: Create a share and
|
|
9117
|
+
Example: Create a share and list user permissions on it.
|
|
9094
9118
|
|
|
9095
9119
|
```shell
|
|
9096
9120
|
ascli shares admin share create @json:'{"node_id":1,"name":"test1","directory":"test1","create_directory":true}'
|
|
9097
9121
|
|
|
9098
|
-
share_id=$(ascli shares admin share list --select=@json:'{"name":"test1"}' --fields=id)
|
|
9099
|
-
|
|
9100
|
-
user_id=$(ascli shares admin user all list --select=@json:'{"username":"username1"}' --fields=id)
|
|
9122
|
+
share_id=$(ascli shares admin share list --select=@json:'{"name":"test1"}' --fields=id --out.level=data)
|
|
9101
9123
|
|
|
9102
|
-
ascli shares admin share user_permissions $share_id
|
|
9124
|
+
ascli shares admin share user_permissions $share_id list
|
|
9103
9125
|
```
|
|
9104
9126
|
|
|
9127
|
+
> [!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.
|
|
9130
|
+
|
|
9105
9131
|
### Tested commands for `shares`
|
|
9106
9132
|
|
|
9107
9133
|
> [!NOTE]
|
|
@@ -9144,7 +9170,7 @@ info
|
|
|
9144
9170
|
|
|
9145
9171
|
Listing transfers supports the API syntax.
|
|
9146
9172
|
|
|
9147
|
-
In addition, it is possible to place a single `query` parameter in the request to filter the results
|
|
9173
|
+
In addition, it is possible to place a single `query` parameter in the request to filter the results: `filter`, following the syntax:
|
|
9148
9174
|
|
|
9149
9175
|
```text
|
|
9150
9176
|
(field operator value)and(field operator value)...
|
|
@@ -9156,7 +9182,9 @@ In addition, it is possible to place a single `query` parameter in the request t
|
|
|
9156
9182
|
> Add `ascli console` in front of the following commands:
|
|
9157
9183
|
|
|
9158
9184
|
```shell
|
|
9185
|
+
endpoint list
|
|
9159
9186
|
health
|
|
9187
|
+
ssh_key list
|
|
9160
9188
|
transfer current files <id>
|
|
9161
9189
|
transfer current list --query.filter='(transfer_name contain aoc)'
|
|
9162
9190
|
transfer current list --query=@json:'{"filter1":"transfer_name","comp1":"contain","val1":"aoc"}'
|
|
@@ -9167,6 +9195,36 @@ transfer smart sub my_smart_id @: source.paths.0=my_smart_file source_type=user_
|
|
|
9167
9195
|
|
|
9168
9196
|
## Plugin: `orchestrator`: IBM Aspera Orchestrator
|
|
9169
9197
|
|
|
9198
|
+
### Start a workflow
|
|
9199
|
+
|
|
9200
|
+
Command `workflows start` creates a work order:
|
|
9201
|
+
|
|
9202
|
+
```shell
|
|
9203
|
+
ascli orchestrator workflows start <WORKFLOW_ID> [<PARAMETERS>] [<EXECUTION>]
|
|
9204
|
+
```
|
|
9205
|
+
|
|
9206
|
+
- `parameters`: `Hash` of external parameters of the workflow (optional).
|
|
9207
|
+
- `execution`: `Hash` controlling the execution of the work order (optional):
|
|
9208
|
+
|
|
9209
|
+
| Key | Type | Description |
|
|
9210
|
+
|---------------|-----------|-------------|
|
|
9211
|
+
| `synchronous` | `Boolean` | Wait for completion of the work order (default: `false`). |
|
|
9212
|
+
| `step` | `String` | Name of the work step providing the result. |
|
|
9213
|
+
| `variable` | `String` | Name of the output variable of `step` returned as result. |
|
|
9214
|
+
|
|
9215
|
+
`step` and `variable` must be provided together, and imply `synchronous`.
|
|
9216
|
+
|
|
9217
|
+
By default, the call is asynchronous and returns the work order information.
|
|
9218
|
+
|
|
9219
|
+
Example: Start workflow `1234` with parameter `Param`, wait for completion and display the value of output `Complete_status_message` of step `ResultStep`:
|
|
9220
|
+
|
|
9221
|
+
```shell
|
|
9222
|
+
ascli orchestrator workflows start 1234 @json:'{"Param":"world !"}' @json:'{"step":"ResultStep","variable":"Complete_status_message"}'
|
|
9223
|
+
```
|
|
9224
|
+
|
|
9225
|
+
> [!NOTE]
|
|
9226
|
+
> Options `synchronous` and `result` (`--result=<WORK_STEP>:<VARIABLE>`) are deprecated: use `execution` instead.
|
|
9227
|
+
|
|
9170
9228
|
### Tested commands for `orchestrator`
|
|
9171
9229
|
|
|
9172
9230
|
> [!NOTE]
|
|
@@ -9184,7 +9242,7 @@ workflow inputs my_workflow_id
|
|
|
9184
9242
|
workflow list
|
|
9185
9243
|
workflow outputs my_workflow_id
|
|
9186
9244
|
workflow start my_workflow_id @: 'Param=world !'
|
|
9187
|
-
workflow start my_workflow_id @: 'Param=world !'
|
|
9245
|
+
workflow start my_workflow_id @: 'Param=world !' END @: step=ResultStep variable=Complete_status_message
|
|
9188
9246
|
workflow status ALL
|
|
9189
9247
|
workflow status my_workflow_id
|
|
9190
9248
|
workflow workorders my_workflow_id
|
|
@@ -9310,7 +9368,7 @@ ascli cos node upload 'faux:///sample1G?1g'
|
|
|
9310
9368
|
```
|
|
9311
9369
|
|
|
9312
9370
|
> [!NOTE]
|
|
9313
|
-
> The file `sample1G` is a dummy file of size
|
|
9371
|
+
> The file `sample1G` is a dummy file of size 1 GiB, generated using the `faux` PVCL scheme (see previous section and `man ascp`).
|
|
9314
9372
|
> To upload a real file, replace the `faux:///...` URI with the actual file path.
|
|
9315
9373
|
|
|
9316
9374
|
### Tested commands for `cos`
|
|
@@ -9399,7 +9457,7 @@ Using `ascli` is an alternative to <https://github.com/IBM/aspera-on-cloud-file-
|
|
|
9399
9457
|
|
|
9400
9458
|
### Aspera Server configuration
|
|
9401
9459
|
|
|
9402
|
-
Specify the
|
|
9460
|
+
Specify the previews folder as shown in:
|
|
9403
9461
|
|
|
9404
9462
|
<https://ibmaspera.com/help/admin/organization/installing_the_preview_maker>
|
|
9405
9463
|
|
|
@@ -9414,7 +9472,7 @@ asnodeadmin --reload
|
|
|
9414
9472
|
```
|
|
9415
9473
|
|
|
9416
9474
|
> [!NOTE]
|
|
9417
|
-
> The configuration `preview_dir` is **relative** to the storage root
|
|
9475
|
+
> The configuration `preview_dir` is **relative** to the storage root: no leading or trailing `/` is needed.
|
|
9418
9476
|
> Set the value to `previews`.
|
|
9419
9477
|
|
|
9420
9478
|
If another folder is configured on the HSTS, then specify it to `ascli` using the option `previews_folder`.
|
|
@@ -9451,7 +9509,7 @@ If you use a value different from `16777216`, then specify it using option `max_
|
|
|
9451
9509
|
- **FFmpeg** : `ffmpeg` `ffprobe`
|
|
9452
9510
|
- **LibreOffice** : `unoconv`
|
|
9453
9511
|
|
|
9454
|
-
|
|
9512
|
+
Installation is shown here for Red Hat/Rocky Linux.
|
|
9455
9513
|
|
|
9456
9514
|
Other OSes should work as well, but are not tested.
|
|
9457
9515
|
|
|
@@ -9520,7 +9578,7 @@ rm -rf /opt/ffmpeg* /usr/bin/{ffmpeg,ffprobe}
|
|
|
9520
9578
|
|
|
9521
9579
|
To skip office document preview generation, use option: `--skip-types=office`
|
|
9522
9580
|
|
|
9523
|
-
The generation of
|
|
9581
|
+
The generation of previews is based on LibreOffice's `unoconv`.
|
|
9524
9582
|
|
|
9525
9583
|
- RHEL 8/Rocky Linux 8+
|
|
9526
9584
|
|
|
@@ -9541,12 +9599,12 @@ chmod a+x /usr/bin/unoconv
|
|
|
9541
9599
|
|
|
9542
9600
|
### Configuration
|
|
9543
9601
|
|
|
9544
|
-
The preview generator should be executed as a non-user.
|
|
9602
|
+
The preview generator should be executed as a non-root user.
|
|
9545
9603
|
When using object storage, any user can be used, but when using local storage it is usually better to use the user `xfer`, as uploaded files are under this identity: this ensures proper access rights.
|
|
9546
9604
|
The following procedure uses `xfer` as the running user.
|
|
9547
9605
|
|
|
9548
9606
|
Like any `ascli` commands, options can be passed on command line or using a configuration [Option Preset](#option-preset).
|
|
9549
|
-
The configuration file must be created
|
|
9607
|
+
The configuration file must be created by the same user that runs the generator, so that it is used at runtime.
|
|
9550
9608
|
|
|
9551
9609
|
The `xfer` user has a special protected shell: `aspshell`, so to update the configuration and when changing identity, specify an alternate shell.
|
|
9552
9610
|
For example:
|
|
@@ -9565,7 +9623,7 @@ This example assumes that Office file generation is disabled. Remove `--skip-typ
|
|
|
9565
9623
|
One can check if the access key is well configured using:
|
|
9566
9624
|
|
|
9567
9625
|
```shell
|
|
9568
|
-
ascli -
|
|
9626
|
+
ascli -P<PREVIEW_PRESET_NAME> node browse /
|
|
9569
9627
|
```
|
|
9570
9628
|
|
|
9571
9629
|
This shall list the contents of the storage root of the access key.
|
|
@@ -9603,8 +9661,8 @@ Then:
|
|
|
9603
9661
|
ascli preview scan --overwrite=always
|
|
9604
9662
|
```
|
|
9605
9663
|
|
|
9606
|
-
When the preview generator is first executed it
|
|
9607
|
-
On subsequent
|
|
9664
|
+
When the preview generator is first executed, it creates a file `.aspera_access_key` in the previews folder, which contains the access key used.
|
|
9665
|
+
On subsequent runs, it reads this file and checks that previews are generated for the same access key, else it fails.
|
|
9608
9666
|
This is to prevent clash of different access keys using the same root.
|
|
9609
9667
|
|
|
9610
9668
|
### Configuration for Execution in scheduler
|
|
@@ -9613,7 +9671,7 @@ Details are provided in section [Scheduler](#scheduler).
|
|
|
9613
9671
|
|
|
9614
9672
|
Shorter commands can be specified if a configuration preset was created as shown previously.
|
|
9615
9673
|
|
|
9616
|
-
For example the timeout value can be differentiated depending on the
|
|
9674
|
+
For example, the timeout value can be differentiated depending on the command: event versus scan:
|
|
9617
9675
|
|
|
9618
9676
|
```shell
|
|
9619
9677
|
case "$*" in *trev*) tmout=10m ;; *) tmout=30m ;; esac
|
|
@@ -9636,7 +9694,7 @@ ascli preview scan %id:<file_id>
|
|
|
9636
9694
|
ascli preview scan /videos --filter='@ruby:->(f){f["name"].end_with?(".mp4")}'
|
|
9637
9695
|
```
|
|
9638
9696
|
|
|
9639
|
-
Once
|
|
9697
|
+
Once candidates are selected, a preview is always generated if it does not already exist; if a preview already exists, generation depends on the value of option `overwrite`:
|
|
9640
9698
|
|
|
9641
9699
|
- `always` : preview is always generated, even if it already exists and is newer than original
|
|
9642
9700
|
- `never` : preview is generated only if it does not exist already
|
|
@@ -9644,8 +9702,8 @@ Once candidate are selected, a preview is always generated if it does not exist
|
|
|
9644
9702
|
|
|
9645
9703
|
Deletion of preview for deleted source files: not implemented yet (TODO).
|
|
9646
9704
|
|
|
9647
|
-
If the `scan` or `events` detection method is used, then
|
|
9648
|
-
It expects a list of
|
|
9705
|
+
If the `scan` or `events` detection method is used, then option `skip_folders` can be used to skip some folders.
|
|
9706
|
+
It expects a list of paths relative to the storage root (docroot), starting with a slash, for example:
|
|
9649
9707
|
|
|
9650
9708
|
```shell
|
|
9651
9709
|
ascli preview scan --skip-folders=@json:'["/not_here"]'
|
|
@@ -9682,8 +9740,8 @@ The mp4 video preview file is only for category `video`.
|
|
|
9682
9740
|
|
|
9683
9741
|
By default, the Mime type used for conversion is the one returned by the Node API, based on file name extension.
|
|
9684
9742
|
|
|
9685
|
-
It is also possible to detect the MIME type using option `
|
|
9686
|
-
To use it, set option `
|
|
9743
|
+
It is also possible to detect the MIME type using option `detect_mime`.
|
|
9744
|
+
To use it, set option `detect_mime` to `yes`: `--detect-mime=yes`.
|
|
9687
9745
|
|
|
9688
9746
|
In this case the `preview` command will first analyze the file content using gem `marcel`, and if no match, will try by extension.
|
|
9689
9747
|
|
|
@@ -9701,7 +9759,7 @@ Nevertheless, `ascli` may or may not have direct file system access to the acces
|
|
|
9701
9759
|
| `root_url` | Description |
|
|
9702
9760
|
|---------------|-------------------------------------------------------------------------------|
|
|
9703
9761
|
| `<empty>` | (Default) If the access key storage type is `local`, then the storage root is used as the main folder.<br/>This assumes that `ascli` runs on the same system as HSTS, or has access through a common "mount".<br/>Else, remote access is assumed. |
|
|
9704
|
-
| `aspera:` | Source files are **downloaded** to a temporary directory, and preview files are **uploaded** to the storage.<br/>Two transfers are
|
|
9762
|
+
| `aspera:` | Source files are **downloaded** to a temporary directory, and preview files are **uploaded** to the storage.<br/>Two transfers are performed using Aspera: one download transfer for source files, one upload transfer for preview files. |
|
|
9705
9763
|
| `file:///<path>` | Files are accessed from the specified path locally. |
|
|
9706
9764
|
|
|
9707
9765
|
### Tested commands for `preview`
|
|
@@ -9722,8 +9780,8 @@ show my_pdf --base=test
|
|
|
9722
9780
|
show my_small_mp4 --base=test --video-png-conv=animated
|
|
9723
9781
|
show my_small_mp4 --base=test --video-png-conv=fixed
|
|
9724
9782
|
test my_dcm --base=test
|
|
9725
|
-
test my_dcm --base=test --
|
|
9726
|
-
test my_jpg_unk --base=test --
|
|
9783
|
+
test my_dcm --base=test --detect-mime=yes
|
|
9784
|
+
test my_jpg_unk --base=test --detect-mime=yes
|
|
9727
9785
|
test my_mpg mp4 --base=test --video-conversion=clips
|
|
9728
9786
|
test my_mpg mp4 --base=test --video-conversion=reencode
|
|
9729
9787
|
test my_mxf mp4 --base=test --video-conversion=blend --query.text=true --query.double=true
|
|
@@ -9741,7 +9799,7 @@ The server registers a single tool, `execute_ascli_command`, which executes any
|
|
|
9741
9799
|
|
|
9742
9800
|
> [!IMPORTANT]
|
|
9743
9801
|
> The `mcp` and `rack` gems are required.
|
|
9744
|
-
> Check section [Installing Optional Gems](#installing-optional-gems)
|
|
9802
|
+
> Check section [Installing Optional Gems](#installing-optional-gems).
|
|
9745
9803
|
> Install them with the following command:
|
|
9746
9804
|
|
|
9747
9805
|
```shell
|
|
@@ -9779,7 +9837,7 @@ The `server` command accepts an optional [Hash](#extended-value-syntax) argument
|
|
|
9779
9837
|
|
|
9780
9838
|
> [!NOTE]
|
|
9781
9839
|
> **`stdio` transport and server description** - The MCP protocol does not carry a `description` field in the `initialize` handshake.
|
|
9782
|
-
> For `stdio` servers, AI clients (Claude Desktop, VS Code, Bob,
|
|
9840
|
+
> For `stdio` servers, AI clients (Claude Desktop, VS Code, Bob, and so on) cannot retrieve the description automatically.
|
|
9783
9841
|
> Add a `"description"` field directly in the client's `mcpServers` configuration to display it in the UI.
|
|
9784
9842
|
|
|
9785
9843
|
#### `http` transport (Streamable HTTP)
|
|
@@ -9843,7 +9901,7 @@ For [**IBM Bob**](https://bob.ibm.com/docs/ide/configuration/mcp/mcp-in-bob), ad
|
|
|
9843
9901
|
}
|
|
9844
9902
|
```
|
|
9845
9903
|
|
|
9846
|
-
For other clients (Claude Desktop, VS Code,
|
|
9904
|
+
For other clients (Claude Desktop, VS Code, and so on):
|
|
9847
9905
|
|
|
9848
9906
|
```json
|
|
9849
9907
|
{
|
|
@@ -9882,13 +9940,13 @@ For [**IBM Bob**](https://bob.ibm.com/docs/ide/configuration/mcp/mcp-in-bob), ad
|
|
|
9882
9940
|
}
|
|
9883
9941
|
```
|
|
9884
9942
|
|
|
9885
|
-
For other clients (Claude Desktop, VS Code,
|
|
9943
|
+
For other clients (Claude Desktop, VS Code, and so on), the configuration is identical.
|
|
9886
9944
|
|
|
9887
9945
|
##### Claude Desktop `stdio`
|
|
9888
9946
|
|
|
9889
9947
|
Find the configuration file as specified in [Claude Desktop Documentation](https://modelcontextprotocol.io/docs/2026-07-28/develop/connect-local-servers).
|
|
9890
9948
|
|
|
9891
|
-
|
|
9949
|
+
Place this section in `mcpServers`:
|
|
9892
9950
|
|
|
9893
9951
|
```json
|
|
9894
9952
|
{
|
|
@@ -9951,23 +10009,27 @@ credential safety.
|
|
|
9951
10009
|
|
|
9952
10010
|
Always start a session with two discovery calls before doing anything else:
|
|
9953
10011
|
|
|
9954
|
-
```
|
|
10012
|
+
```json
|
|
9955
10013
|
["config", "preset", "list"]
|
|
9956
10014
|
["config", "preset", "show", "default"]
|
|
9957
10015
|
```
|
|
9958
10016
|
|
|
9959
|
-
The second call returns the `plugin
|
|
10017
|
+
The second call returns the mapping from `plugin` to `preset_name` so you know which credentials
|
|
9960
10018
|
are active for each plugin.
|
|
9961
10019
|
|
|
9962
10020
|
#### Command discovery
|
|
9963
10021
|
|
|
9964
|
-
Always use `["config", "commands"]` to enumerate
|
|
9965
|
-
|
|
10022
|
+
Always use `["config", "commands", "<plugin>"]` to enumerate the commands of a plugin and their syntax.
|
|
10023
|
+
Add command words to list only the commands under that path, e.g. `["config", "commands", "aoc", "files"]`.
|
|
10024
|
+
A line ending with `<command...>` provides the commands of another plugin, given by `(see: ...)`.
|
|
10025
|
+
Use option `--expand-mounts=yes` to list them in place.
|
|
10026
|
+
Omit `<plugin>` to list the commands of all plugins (much larger result).
|
|
10027
|
+
Never guess command names from training data: names like `shared_folders` vs
|
|
9966
10028
|
`shared_inboxes` are easily confused.
|
|
9967
10029
|
|
|
9968
10030
|
#### Schema introspection for Hash arguments
|
|
9969
10031
|
|
|
9970
|
-
Whenever a command syntax shows a `<
|
|
10032
|
+
Whenever a command syntax shows a Hash argument (e.g. `<account:Hash>`), call `help` in its place **before** the real call:
|
|
9971
10033
|
|
|
9972
10034
|
```json
|
|
9973
10035
|
["<plugin>", "<cmd>", ..., "help"]
|
|
@@ -9979,7 +10041,7 @@ server error messages.
|
|
|
9979
10041
|
#### Async transfers and cross-call status tracking
|
|
9980
10042
|
|
|
9981
10043
|
The `direct` agent keeps transfer state in-memory. A job started in one MCP call **cannot**
|
|
9982
|
-
be monitored in a subsequent call
|
|
10044
|
+
be monitored in a subsequent call: the in-memory agent is gone between calls.
|
|
9983
10045
|
|
|
9984
10046
|
Use the `transferd` agent when you need to check transfer status in a later call:
|
|
9985
10047
|
|
|
@@ -9994,7 +10056,7 @@ The `desktop` agent is also unaffected because it runs in an external process.
|
|
|
9994
10056
|
`aoc files` and `aoc packages` commands require a workspace context. If no default
|
|
9995
10057
|
workspace is configured in the preset, always add `--workspace=NAME`:
|
|
9996
10058
|
|
|
9997
|
-
```
|
|
10059
|
+
```json
|
|
9998
10060
|
["aoc", "files", "ls", "/", "--workspace=MyWorkspace"]
|
|
9999
10061
|
```
|
|
10000
10062
|
|
|
@@ -10005,14 +10067,14 @@ List available workspaces with `["aoc", "user", "workspaces", "list"]`.
|
|
|
10005
10067
|
Before calling any `admin` sub-command, verify that the active preset has admin rights.
|
|
10006
10068
|
`access_denied` typically means the wrong preset is active, not a syntax error. Check with:
|
|
10007
10069
|
|
|
10008
|
-
```
|
|
10070
|
+
```json
|
|
10009
10071
|
["config", "preset", "show", "<preset_name>"]
|
|
10010
10072
|
```
|
|
10011
10073
|
|
|
10012
10074
|
## Operational Utilities
|
|
10013
10075
|
|
|
10014
10076
|
This section covers the specialized modules and utilities used to integrate `ascli` into your broader operational infrastructure.
|
|
10015
|
-
While the core plugins handle data movement, these tools provide the "integration layer" for enterprise environments: Aspera Sync and Hot Folder enable automated, folder-based synchronization; Nagios and SMTP modules provide health monitoring and automated email alerting for transfer status; and `asession` and module
|
|
10077
|
+
While the core plugins handle data movement, these tools provide the "integration layer" for enterprise environments: Aspera Sync and Hot Folder enable automated, folder-based synchronization; Nagios and SMTP modules provide health monitoring and automated email alerting for transfer status; and the `asession` tool and the Ruby module `Aspera` allow integration of transfers into other programs.
|
|
10016
10078
|
Together, these features transform the CLI from a manual tool into a fully integrated component of an automated, monitored data workflow.
|
|
10017
10079
|
|
|
10018
10080
|
### IBM Aspera Sync
|
|
@@ -10027,11 +10089,11 @@ An interface for the `async` utility is provided in the following plugins:
|
|
|
10027
10089
|
The `sync` command, available in above plugins, performs the following actions:
|
|
10028
10090
|
|
|
10029
10091
|
- Start a local Sync session by executing the `async` command with the appropriate parameters.
|
|
10030
|
-
- Get local Sync session information accessing
|
|
10092
|
+
- Get local Sync session information by accessing the Async snap database directly.
|
|
10031
10093
|
- Get local Sync session information using the `asyncadmin` command, if available.
|
|
10032
10094
|
|
|
10033
10095
|
One advantage of using `ascli` over the `async` command line is the possibility to use a configuration file, using standard options of `ascli`.
|
|
10034
|
-
Moreover, `ascli` supports sync with
|
|
10096
|
+
Moreover, `ascli` supports sync with applications requiring token-based authorization.
|
|
10035
10097
|
|
|
10036
10098
|
Some `sync` parameters are filled by the related plugin using transfer spec parameters (for example, including token).
|
|
10037
10099
|
|
|
@@ -10129,7 +10191,7 @@ ascli config sync spec
|
|
|
10129
10191
|
|
|
10130
10192
|
> [!NOTE]
|
|
10131
10193
|
> `ascli` accepts the following fields within the `sync_info` Hash.
|
|
10132
|
-
> The
|
|
10194
|
+
> The options listed in the **Description** column correspond to the equivalent parameters used by the low-level `async` command.
|
|
10133
10195
|
|
|
10134
10196
|
| Field | Type | Description |
|
|
10135
10197
|
|------------------------------------------|---------------|----------------------------------------------------------------------------------|
|
|
@@ -10273,7 +10335,7 @@ This is the **legacy** syntax.
|
|
|
10273
10335
|
It is based on a JSON representation of `async` command line options.
|
|
10274
10336
|
Technically, it allows definition of multiple sync sessions in a single command, but `ascli` only accepts a single session for consistency with the previous syntax.
|
|
10275
10337
|
|
|
10276
|
-
This is
|
|
10338
|
+
This format is selected if the `sync_info` `Hash` has either key `sessions` or `instance`.
|
|
10277
10339
|
|
|
10278
10340
|
The following parameters are automatically filled from mandatory arguments, and are not allowed:
|
|
10279
10341
|
|
|
@@ -10461,12 +10523,12 @@ Instead, you create a Hot Folder by combining the upload or download commands wi
|
|
|
10461
10523
|
|
|
10462
10524
|
#### Requirements
|
|
10463
10525
|
|
|
10464
|
-
`ascli`
|
|
10465
|
-
A hot folder
|
|
10526
|
+
`ascli` may be used as a simple hot folder engine.
|
|
10527
|
+
A hot folder is defined as a tool that:
|
|
10466
10528
|
|
|
10467
10529
|
- Locally (or remotely) detects new files in a top folder
|
|
10468
|
-
-
|
|
10469
|
-
- Only sends new files,
|
|
10530
|
+
- Sends detected files to a remote (respectively, local) repository
|
|
10531
|
+
- Only sends new files, and does not re-send already sent files
|
|
10470
10532
|
- Optionally: sends only files that are not still **growing**
|
|
10471
10533
|
- Optionally: after transfer of files, deletes or moves to an archive
|
|
10472
10534
|
|
|
@@ -10474,15 +10536,15 @@ In addition: the detection should be made **continuously** or on specific time/d
|
|
|
10474
10536
|
|
|
10475
10537
|
#### Setting up a hot folder
|
|
10476
10538
|
|
|
10477
|
-
The general idea is to rely on
|
|
10539
|
+
The general idea is to rely on:
|
|
10478
10540
|
|
|
10479
10541
|
- Existing `ascp` features for detection and transfer
|
|
10480
|
-
-
|
|
10542
|
+
- `ascli` configuration capabilities and server-side knowledge
|
|
10481
10543
|
- The OS scheduler for reliability and continuous operation
|
|
10482
10544
|
|
|
10483
10545
|
##### `ascp` features
|
|
10484
10546
|
|
|
10485
|
-
|
|
10547
|
+
Useful `ascp` features are available as arguments (see the `ascp` manual):
|
|
10486
10548
|
|
|
10487
10549
|
- Sending only **new** files
|
|
10488
10550
|
- Option `-k 1,2,3` (`resume_policy`)
|
|
@@ -10517,9 +10579,8 @@ Virtually any transfer on a **repository** on a regular basis might emulate a ho
|
|
|
10517
10579
|
|
|
10518
10580
|
##### Scheduling
|
|
10519
10581
|
|
|
10520
|
-
Once `ascli` command line arguments are defined, run the command using the OS native scheduler, for example, every minute
|
|
10521
|
-
See [Scheduler](#scheduler).
|
|
10522
|
-
(on use of option `lock_port`)
|
|
10582
|
+
Once `ascli` command line arguments are defined, run the command using the OS native scheduler, for example, every minute or every 5 minutes.
|
|
10583
|
+
See [Scheduler](#scheduler) (and option `lock_port`).
|
|
10523
10584
|
|
|
10524
10585
|
#### Example: Upload hot folder
|
|
10525
10586
|
|
|
@@ -10550,11 +10611,11 @@ ascli aoc files download . --to-folder=. --lock-port=12345 --progress-bar=no --o
|
|
|
10550
10611
|
> Option `delete_before_transfer` will delete files locally, if they are not present on remote side.
|
|
10551
10612
|
|
|
10552
10613
|
> [!NOTE]
|
|
10553
|
-
> Options `
|
|
10614
|
+
> Options `progress_bar` and `--out.level` limit output for headless operation (for example, a cron job).
|
|
10554
10615
|
|
|
10555
10616
|
### Health check and Nagios
|
|
10556
10617
|
|
|
10557
|
-
Most
|
|
10618
|
+
Most plugins provide a `health` command that checks the health status of the application.
|
|
10558
10619
|
Example:
|
|
10559
10620
|
|
|
10560
10621
|
```shell
|
|
@@ -10569,14 +10630,10 @@ ascli console health
|
|
|
10569
10630
|
╰────────┴─────────────┴────────────╯
|
|
10570
10631
|
```
|
|
10571
10632
|
|
|
10572
|
-
Typically, the health check uses the REST API of the application with the following exception: the `server` plugin
|
|
10573
|
-
|
|
10574
|
-
- Issuing a transfer to the server
|
|
10575
|
-
- Checking web app status with `asctl all:status`
|
|
10576
|
-
- Checking daemons process status
|
|
10633
|
+
Typically, the health check uses the REST API of the application, with the following exception: the `server` plugin checks health by issuing a transfer to the server (`server health transfer`).
|
|
10577
10634
|
|
|
10578
10635
|
`ascli` can be called by Nagios to check the health status of an Aspera server.
|
|
10579
|
-
The output can be made compatible
|
|
10636
|
+
The output can be made compatible with Nagios with option `--format=nagios`:
|
|
10580
10637
|
|
|
10581
10638
|
```shell
|
|
10582
10639
|
ascli server health transfer --to-folder=/Upload --format=nagios --progress-bar=no
|
|
@@ -10588,8 +10645,8 @@ OK - [transfer:ok]
|
|
|
10588
10645
|
|
|
10589
10646
|
### SMTP for email notifications
|
|
10590
10647
|
|
|
10591
|
-
`ascli` can send
|
|
10592
|
-
|
|
10648
|
+
`ascli` can send emails.
|
|
10649
|
+
To do so, set up the SMTP configuration with option `smtp`.
|
|
10593
10650
|
|
|
10594
10651
|
The `smtp` option is a `Hash` ([Extended Value](#extended-value-syntax)) with the following fields:
|
|
10595
10652
|
|
|
@@ -10616,11 +10673,12 @@ ascli config preset set smtp_google password <PASSWORD>
|
|
|
10616
10673
|
or
|
|
10617
10674
|
|
|
10618
10675
|
```shell
|
|
10619
|
-
ascli config preset
|
|
10676
|
+
ascli config preset initialize smtp_google @json:'{"server":"smtp.google.com","username":"john@gmail.com","password":"<PASSWORD>"}'
|
|
10620
10677
|
```
|
|
10621
10678
|
|
|
10622
10679
|
or
|
|
10623
10680
|
|
|
10681
|
+
|
|
10624
10682
|
```shell
|
|
10625
10683
|
ascli config preset update smtp_google --server=smtp.google.com --username=john@gmail.com --password=<PASSWORD>
|
|
10626
10684
|
```
|
|
@@ -10652,8 +10710,8 @@ Check settings with `smtp_settings` command.
|
|
|
10652
10710
|
Send test email with `email_test`.
|
|
10653
10711
|
|
|
10654
10712
|
```shell
|
|
10655
|
-
ascli config --smtp=@preset:smtp_google
|
|
10656
|
-
ascli config --smtp=@preset:smtp_google
|
|
10713
|
+
ascli config smtp_settings --smtp=@preset:smtp_google
|
|
10714
|
+
ascli config email_test --smtp=@preset:smtp_google --notify-to=sample.dest@example.com
|
|
10657
10715
|
```
|
|
10658
10716
|
|
|
10659
10717
|
#### Notifications for transfer status
|
|
@@ -10697,12 +10755,12 @@ Ideally, IBM will integrate this directly into `ascp`, making this tool redundan
|
|
|
10697
10755
|
|
|
10698
10756
|
Integration with any language is possible, provided that the language can spawn a subprocess, write to its STDIN, read from STDOUT, and generate and parse JSON.
|
|
10699
10757
|
|
|
10700
|
-
`
|
|
10758
|
+
`asession` expects a single argument: a session specification that contains parameters and a [**transfer-spec**](#transfer-specification).
|
|
10701
10759
|
|
|
10702
|
-
If no argument is provided, it assumes a value of: `@json:@stdin:`, that is,
|
|
10760
|
+
If no argument is provided, it assumes a value of: `@json:@stdin:`, that is, JSON on stdin.
|
|
10703
10761
|
|
|
10704
10762
|
> [!NOTE]
|
|
10705
|
-
> If JSON is the format, specify `@json:` to tell `
|
|
10763
|
+
> If JSON is the format, specify `@json:` to tell `asession` to decode the `Hash` using JSON syntax.
|
|
10706
10764
|
|
|
10707
10765
|
During execution, it generates all low level events, one per line, in JSON format on stdout.
|
|
10708
10766
|
|
|
@@ -10747,7 +10805,7 @@ Instead of the traditional text protocol as described in `ascp` manual, the form
|
|
|
10747
10805
|
|
|
10748
10806
|
This is particularly useful for a persistent session (with the [**transfer-spec**](#transfer-specification) parameter: `"keepalive":true`)
|
|
10749
10807
|
|
|
10750
|
-
```
|
|
10808
|
+
```text
|
|
10751
10809
|
asession
|
|
10752
10810
|
{"remote_host":"demo.asperasoft.com","ssh_port":33001,"remote_user":"asperaweb","remote_password":"<PASSWORD>","direction":"receive","destination_root":".","keepalive":true,"resume_level":"none"}
|
|
10753
10811
|
{"type":"START","source":"/aspera-test-dir-tiny/200KB.2"}
|
|
@@ -10806,7 +10864,7 @@ Working examples can be found in repo: <https://github.com/laurent-martin/aspera
|
|
|
10806
10864
|
### Error: "Remote host is not who we expected"
|
|
10807
10865
|
|
|
10808
10866
|
Cause: `ascp` >= 4.x checks fingerprint of the highest server host key, including ECDSA.
|
|
10809
|
-
`ascp` < 4.0 (3.9.6 and earlier)
|
|
10867
|
+
`ascp` < 4.0 (3.9.6 and earlier) supports only RSA (and ignores ECDSA presented by the server).
|
|
10810
10868
|
`aspera.conf` supports a single fingerprint.
|
|
10811
10869
|
|
|
10812
10870
|
Workaround on client side: To ignore the certificate (SSH fingerprint) add option on client side (this option can also be added permanently to the configuration file):
|
|
@@ -10817,13 +10875,13 @@ Workaround on client side: To ignore the certificate (SSH fingerprint) add optio
|
|
|
10817
10875
|
|
|
10818
10876
|
Workaround on server side: Either remove the fingerprint from `aspera.conf`, or keep only RSA host keys in `sshd_config`.
|
|
10819
10877
|
|
|
10820
|
-
References: ES-1944 in release notes of 4.1 and
|
|
10878
|
+
References: ES-1944 in the release notes of 4.1, and the [HSTS admin manual section "Configuring Transfer Server Authentication With a Host-Key Fingerprint"](https://www.ibm.com/docs/en/ahts/4.2?topic=upgrades-configuring-ssh-server).
|
|
10821
10879
|
|
|
10822
10880
|
### Error: "can't find header files for ruby"
|
|
10823
10881
|
|
|
10824
10882
|
Some Ruby gems dependencies require compilation of native parts (C).
|
|
10825
10883
|
This also requires Ruby header files.
|
|
10826
|
-
If Ruby was installed as a Linux
|
|
10884
|
+
If Ruby was installed as a Linux package, then also install the Ruby development package:
|
|
10827
10885
|
`ruby-dev` or `ruby-devel`, depending on distribution.
|
|
10828
10886
|
|
|
10829
10887
|
### Private key type: `ed25519` not supported by default
|
|
@@ -10831,7 +10889,7 @@ If Ruby was installed as a Linux Packages, then also install Ruby development pa
|
|
|
10831
10889
|
There are a few aspects concerning ED25519 keys.
|
|
10832
10890
|
|
|
10833
10891
|
By default, the `aspera-cli` gem does not depend on the `ed25519` gem because it requires compilation of native code which can cause problems and prevent the installation of `ascli`, especially when using JRuby.
|
|
10834
|
-
See [
|
|
10892
|
+
See [net-ssh issue 565](https://github.com/net-ssh/net-ssh/issues/565).
|
|
10835
10893
|
If you want to use `ed25519` keys, then install the required gems:
|
|
10836
10894
|
|
|
10837
10895
|
```shell
|
|
@@ -10869,7 +10927,7 @@ For example:
|
|
|
10869
10927
|
|
|
10870
10928
|
### Error: "SSL_read: unexpected eof while reading"
|
|
10871
10929
|
|
|
10872
|
-
Newer OpenSSL
|
|
10930
|
+
Newer OpenSSL libraries expect a clean SSL close.
|
|
10873
10931
|
To deactivate this error, enable option `IGNORE_UNEXPECTED_EOF` for `ssl_options` in option `http_options`.
|
|
10874
10932
|
|
|
10875
10933
|
```shell
|
|
@@ -10886,7 +10944,7 @@ Workaround: Install an older version of `transferd`:
|
|
|
10886
10944
|
ascli config transferd install 1.1.2
|
|
10887
10945
|
```
|
|
10888
10946
|
|
|
10889
|
-
See [
|
|
10947
|
+
See [Single file executable](#single-file-executable).
|
|
10890
10948
|
|
|
10891
10949
|
### Error: Cannot rename partial file
|
|
10892
10950
|
|
|
@@ -10899,7 +10957,7 @@ This often happens when two transfers start in parallel for the same file:
|
|
|
10899
10957
|
- Session 1 finishes, and renames file1.partial to file1.
|
|
10900
10958
|
- Session 2 finishes, and tries to rename file1.partial to file1, but it fails as it does not exist anymore...
|
|
10901
10959
|
|
|
10902
|
-
By default, `ascli` creates a
|
|
10960
|
+
By default, `ascli` creates a configuration file `~/.aspera/sdk/aspera.conf` like this:
|
|
10903
10961
|
|
|
10904
10962
|
```xml
|
|
10905
10963
|
<?xml version='1.0' encoding='UTF-8'?>
|
|
@@ -10932,11 +10990,11 @@ Another possibility is to add this option: `--transfer=@json:'{"ascp_args":["--p
|
|
|
10932
10990
|
|
|
10933
10991
|
Hootput lives in the terminal, watching over every command with wide, unblinking eyes.
|
|
10934
10992
|
Known for concise output and sharp insight, this owl thrives where others get lost in the dark.
|
|
10935
|
-
It doesn
|
|
10993
|
+
It doesn't chatter; it hoots: clear, precise, and always on time.
|
|
10936
10994
|
|
|
10937
10995
|
Like `ascli`, Hootput is built for action: launching transfers, parsing options, and navigating APIs without hesitation.
|
|
10938
10996
|
Light on feathers but heavy on wisdom, it turns complexity into simple one-liners.
|
|
10939
|
-
When you hear Hootput
|
|
10997
|
+
When you hear Hootput's call, you know your data is already in flight.
|
|
10940
10998
|
|
|
10941
10999
|
### History
|
|
10942
11000
|
|