aspera-cli 4.0.0.pre2 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +761 -210
- data/bin/ascli +2 -0
- data/bin/dascli +13 -0
- data/docs/Makefile +2 -1
- data/docs/README.erb.md +628 -160
- data/docs/test_env.conf +22 -10
- data/docs/transfer_spec.html +1 -1
- data/lib/aspera/aoc.rb +87 -108
- data/lib/aspera/cli/formater.rb +2 -0
- data/lib/aspera/cli/main.rb +48 -45
- data/lib/aspera/cli/manager.rb +19 -6
- data/lib/aspera/cli/plugin.rb +9 -4
- data/lib/aspera/cli/plugins/alee.rb +1 -1
- data/lib/aspera/cli/plugins/aoc.rb +208 -183
- data/lib/aspera/cli/plugins/ats.rb +2 -2
- data/lib/aspera/cli/plugins/config.rb +205 -125
- data/lib/aspera/cli/plugins/console.rb +2 -2
- data/lib/aspera/cli/plugins/faspex.rb +15 -8
- data/lib/aspera/cli/plugins/faspex5.rb +76 -37
- data/lib/aspera/cli/plugins/node.rb +3 -3
- data/lib/aspera/cli/plugins/preview.rb +35 -25
- data/lib/aspera/cli/plugins/server.rb +23 -8
- data/lib/aspera/cli/transfer_agent.rb +7 -6
- data/lib/aspera/cli/version.rb +1 -1
- data/lib/aspera/colors.rb +5 -1
- data/lib/aspera/cos_node.rb +33 -28
- data/lib/aspera/environment.rb +15 -4
- data/lib/aspera/fasp/connect.rb +28 -21
- data/lib/aspera/fasp/http_gw.rb +140 -28
- data/lib/aspera/fasp/installation.rb +119 -57
- data/lib/aspera/fasp/local.rb +174 -178
- data/lib/aspera/fasp/manager.rb +12 -0
- data/lib/aspera/fasp/node.rb +4 -4
- data/lib/aspera/fasp/parameters.rb +6 -18
- data/lib/aspera/fasp/resume_policy.rb +13 -12
- data/lib/aspera/log.rb +10 -2
- data/lib/aspera/node.rb +61 -1
- data/lib/aspera/oauth.rb +36 -13
- data/lib/aspera/persistency_folder.rb +9 -4
- data/lib/aspera/preview/file_types.rb +53 -21
- data/lib/aspera/preview/generator.rb +3 -3
- data/lib/aspera/rest.rb +29 -18
- data/lib/aspera/secrets.rb +20 -0
- data/lib/aspera/temp_file_manager.rb +19 -0
- metadata +40 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cc7508185a5c551f30a30e54a0cfa2d0ac7931a1bbb565bc7b15e98cca31479
|
4
|
+
data.tar.gz: ca9aae212a8411ddcfa4d1db4aa842fb273bf56fe247490b31037dcb0d628c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 929bcc3dee9158eb60c810796ed8dc88cfd52d187abb47cb6733adb09971e67849ce1b0bf5cff7daf3dc1f7af327490b574ab8351c94435c6ac83f0674423cd8
|
7
|
+
data.tar.gz: 5c3cba44333dfca675a3cc3b0b77bb6d16654f322b580c936c911551dc85bcc55b16b01649faac2a5ae1f0805b3a2a83315c648ea6c1fb7987c569dc431887b4
|
data/README.md
CHANGED
@@ -1,30 +1,75 @@
|
|
1
1
|
[comment1]: # (Do not edit this README.md, edit docs/README.erb.md, for details, read docs/README.md)
|
2
|
-
# `ascli` :
|
2
|
+
# `ascli` : Command Line Interface for IBM Aspera products
|
3
3
|
|
4
|
-
Version : 4.
|
4
|
+
Version : 4.2.0
|
5
5
|
|
6
6
|
_Laurent/2016-2021_
|
7
7
|
|
8
|
-
This gem provides a command line interface to Aspera Applications.
|
8
|
+
This gem provides `ascli`: a command line interface to Aspera Applications.
|
9
9
|
|
10
|
-
|
11
|
-
[https://rubygems.org/gems/aspera-cli](https://rubygems.org/gems/aspera-cli)
|
10
|
+
`ascli` is a also great tool to learn Aspera APIs.
|
12
11
|
|
13
|
-
|
12
|
+
Ruby Gem: [https://rubygems.org/gems/aspera-cli](https://rubygems.org/gems/aspera-cli)
|
14
13
|
|
15
|
-
|
14
|
+
Ruby Doc: [https://www.rubydoc.info/gems/aspera-cli](https://www.rubydoc.info/gems/aspera-cli)
|
16
15
|
|
17
|
-
|
16
|
+
Ruby version must be >= > 2.4
|
18
17
|
|
19
|
-
|
18
|
+
# <a name="when_to_use"></a>When to use and when not to use
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
*
|
20
|
+
`ascli` is designed to be used as a command line tool to:
|
21
|
+
|
22
|
+
* execute commands on Aspera products
|
23
|
+
* transfer to/from Aspera products
|
24
|
+
|
25
|
+
So it is designed for:
|
26
|
+
|
27
|
+
* Interactive operations on a text terminal (typically, VT100 compatible)
|
28
|
+
* Batch operations in (shell) scripts (e.g. cron job)
|
29
|
+
|
30
|
+
`ascli` can be seen as a command line tool integrating:
|
31
|
+
|
32
|
+
* a configuration file (config.yaml) and advanced command line options
|
33
|
+
* cURL (for REST calls)
|
34
|
+
* Aspera transfer (ascp)
|
35
|
+
|
36
|
+
One might be tempted to use it as an integration element, e.g. by building a command line programmatically, and then executing it. It is generally not a good idea.
|
37
|
+
For such integration cases, e.g. performing operations and transfer to aspera products, it is preferred to use [Aspera APIs](https://ibm.biz/aspera_api):
|
38
|
+
|
39
|
+
* Product APIs (REST) : e.g. AoC, Faspex, node
|
40
|
+
* Transfer SDK : with gRPC interface and laguage stubs (C, C++, Python, .NET/C#, java, ruby, etc...)
|
41
|
+
|
42
|
+
Using APIs (application REST API and transfer SDK) will prove to be easier to develop and maintain.
|
43
|
+
|
44
|
+
For scripting and ad'hoc command line operations, `ascli` is perfect.
|
45
|
+
|
46
|
+
# Notations
|
24
47
|
|
25
48
|
In examples, command line operations (starting with `$`) are shown using a standard shell: `bash` or `zsh`.
|
49
|
+
Prompt `# ` refers to user `root`, prompt `xfer$ ` refer to user `xfer`.
|
50
|
+
|
51
|
+
Command line parameters in examples beginning with `my_`, like `my_param_value` are user-provided value and not fixed value commands.
|
52
|
+
|
53
|
+
# <a name="parsing"></a>Shell and Command line parsing
|
54
|
+
|
55
|
+
`ascli` is typically executed in a shell, either interactively or in a script. `ascli` receives its arguments from this shell.
|
56
|
+
|
57
|
+
On Linux and Unix environments, this is typically a POSIX shell (bash, zsh, ksh, sh). In this environment shell command line parsing applies before `ascli` (Ruby) is executed, e.g. [bash shell operation](https://www.gnu.org/software/bash/manual/bash.html#Shell-Operation). Ruby receives a list parameters and gives it to `ascli`. So special character handling (quotes, spaces, env vars, ...) is done in the shell.
|
58
|
+
|
59
|
+
On Windows, `cmd` is typically used. Windows process creation does not receive the list of arguments but just the whole line. It's up to the program to parse arguments. Ruby follows the Microsoft C/C++ parameter parsing rules.
|
60
|
+
|
61
|
+
* [Windows: How Command Line Parameters Are Parsed](https://daviddeley.com/autohotkey/parameters/parameters.htm#RUBY)
|
62
|
+
* [Understand Quoting and Escaping of Windows Command Line Arguments](http://www.windowsinspired.com/understanding-the-command-line-string-and-arguments-received-by-a-windows-program/)
|
63
|
+
|
64
|
+
In case of doubt of argument values after parsing test like this:
|
26
65
|
|
27
|
-
|
66
|
+
```
|
67
|
+
$ ascli conf echo "Hello World" arg2 3
|
68
|
+
"Hello World"
|
69
|
+
ERROR: Argument: unprocessed values: ["arg2", "3"]
|
70
|
+
```
|
71
|
+
|
72
|
+
`echo` displays the value of the first argument using ruby syntax (strings get double quotes) after command line parsing (shell) and extended value parsing (ascli), next command line arguments are shown in the error message.
|
28
73
|
|
29
74
|
# Quick Start
|
30
75
|
|
@@ -36,7 +81,7 @@ Once the gem is installed, `ascli` shall be accessible:
|
|
36
81
|
|
37
82
|
```
|
38
83
|
$ ascli --version
|
39
|
-
4.
|
84
|
+
4.2.0
|
40
85
|
```
|
41
86
|
|
42
87
|
## First use
|
@@ -45,9 +90,10 @@ Once installation is completed, you can proceed to the first use with a demo ser
|
|
45
90
|
|
46
91
|
If you want to test with Aspera on Cloud, jump to section: [Wizard](#aocwizard)
|
47
92
|
|
48
|
-
|
93
|
+
To test with Aspera demo transfer server, setup the environment and then test:
|
49
94
|
|
50
95
|
```
|
96
|
+
$ ascli config initdemo
|
51
97
|
$ ascli server browse /
|
52
98
|
:............:...........:......:........:...........................:.......................:
|
53
99
|
: zmode : zuid : zgid : size : mtime : name :
|
@@ -67,7 +113,7 @@ If you want to use `ascli` with another server, and in order to make further cal
|
|
67
113
|
* download a file
|
68
114
|
|
69
115
|
```
|
70
|
-
$ ascli config id myserver update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=
|
116
|
+
$ ascli config id myserver update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=_demo_pass_
|
71
117
|
updated: myserver
|
72
118
|
$ ascli config id default set server myserver
|
73
119
|
updated: default→server to myserver
|
@@ -101,78 +147,159 @@ Then, follow the section relative to the product you want to interact with ( Asp
|
|
101
147
|
|
102
148
|
# <a name="installation"></a>Installation
|
103
149
|
|
104
|
-
|
150
|
+
It is possible to install *either* directly on the host operating system (Linux, Windows, Macos) or as a docker container.
|
105
151
|
|
106
|
-
|
152
|
+
The direct installation is recommended and consists in installing:
|
153
|
+
|
154
|
+
* [Ruby](#ruby) version >= > 2.4
|
107
155
|
* [aspera-cli](#the_gem)
|
108
|
-
* [
|
156
|
+
* [Aspera SDK (ascp)](#fasp_prot)
|
157
|
+
|
158
|
+
The following sections provide information on the various installation methods.
|
159
|
+
|
160
|
+
An internet connection is required for the installation. If you dont have internet for the installation, refer to section [Installation without internet access](#offline_install).
|
161
|
+
|
162
|
+
## Docker container
|
163
|
+
|
164
|
+
Use this method only if you know what you do, else use the standard recommended method as described here above.
|
165
|
+
|
166
|
+
This method installs a docker image that contains: Ruby, ascli and the FASP sdk.
|
167
|
+
|
168
|
+
Ensure that you have Docker installed.
|
169
|
+
|
170
|
+
```
|
171
|
+
$ docker --version
|
172
|
+
```
|
173
|
+
|
174
|
+
Download the wrapping script:
|
175
|
+
|
176
|
+
```
|
177
|
+
$ curl -o ascli https://raw.githubusercontent.com/IBM/aspera-cli/develop/bin/dascli
|
178
|
+
$ chmod a+x ascli
|
179
|
+
```
|
109
180
|
|
110
|
-
|
181
|
+
Install the container image:
|
182
|
+
|
183
|
+
```
|
184
|
+
$ ./ascli install
|
185
|
+
```
|
186
|
+
|
187
|
+
Start using it !
|
188
|
+
|
189
|
+
Note that the tool is run in the container, so transfers are also executed in the container, not calling host.
|
190
|
+
|
191
|
+
The wrapping script maps the container folder `/usr/src/app/config` to configuration folder `$HOME/.aspera/ascli` on host.
|
192
|
+
|
193
|
+
To transfer to/from the native host, you will need to map a volume in docker or use the config folder (already mapped).
|
194
|
+
To add local storage as a volume edit the script: ascli and add a `--volume` stanza.
|
111
195
|
|
112
196
|
## <a name="ruby"></a>Ruby
|
113
197
|
|
198
|
+
Use this method to install on the native host.
|
199
|
+
|
114
200
|
A ruby interpreter is required to run the tool or to use the gem and tool.
|
115
|
-
|
116
|
-
|
201
|
+
|
202
|
+
Ruby minimum version: > 2.4. Ruby version 3 is also supported.
|
203
|
+
|
204
|
+
*Ruby can be installed using any method* : rpm, yum, dnf, rvm, brew, windows installer, ... .
|
117
205
|
|
118
206
|
Refer to the following sections for a proposed method for specific operating systems.
|
119
207
|
|
120
|
-
|
208
|
+
The recommended installation method is `rvm` for systems with "bash-like" shell (Linux, Macos, Windows with cygwin, etc...).
|
209
|
+
If the generic install is not suitable (e.g. Windows, no cygwin), you can use one of OS-specific install method.
|
210
|
+
If you have a simpler better way to install Ruby version >= > 2.4 : use it !
|
211
|
+
|
212
|
+
### Generic: RVM: single user installation (not root)
|
121
213
|
|
214
|
+
Use this method which provides more flexibility.
|
122
215
|
|
123
|
-
|
216
|
+
Install "rvm": follow [https://rvm.io/](https://rvm.io/) :
|
217
|
+
|
218
|
+
Install the 2 keys
|
124
219
|
|
125
220
|
```
|
126
|
-
$
|
221
|
+
$ gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
127
222
|
```
|
128
223
|
|
129
|
-
|
224
|
+
Execute the shell/curl command. As regular user, it install in the user's home: `~/.rvm` .
|
130
225
|
|
131
226
|
```
|
132
|
-
$
|
227
|
+
$ \curl -sSL https://get.rvm.io | bash -s stable
|
133
228
|
```
|
134
229
|
|
135
|
-
|
230
|
+
If you keep the same terminal (ont needed if re-login):
|
136
231
|
|
137
|
-
|
232
|
+
```
|
233
|
+
$ source ~/.rvm/scripts/rvm
|
234
|
+
```
|
138
235
|
|
139
|
-
|
236
|
+
It is advised to get one of the pre-compiled ruby version, you can list with:
|
140
237
|
|
141
|
-
|
238
|
+
```
|
239
|
+
$ rvm list --remote
|
240
|
+
```
|
241
|
+
|
242
|
+
Install the chosen pre-compiled Ruby version:
|
243
|
+
|
244
|
+
```
|
245
|
+
$ rvm install 2.7.2 --binary
|
246
|
+
```
|
247
|
+
|
248
|
+
Ruby is now installed for the user, go on to Gem installation.
|
142
249
|
|
143
|
-
|
250
|
+
### Generic: RVM: global installation (as root)
|
144
251
|
|
145
|
-
|
252
|
+
Follow the same method as single user install, but execute as "root".
|
146
253
|
|
147
|
-
|
148
|
-
|
254
|
+
As root, it installs by default in /usr/local/rvm for all users and creates `/etc/profile.d/rvm.sh`.
|
255
|
+
One can install in another location with :
|
149
256
|
|
150
257
|
```
|
151
|
-
curl -sSL https://get.rvm.io | bash -s -- --path /usr/local
|
258
|
+
# curl -sSL https://get.rvm.io | bash -s -- --path /usr/local
|
152
259
|
```
|
153
260
|
|
154
|
-
|
261
|
+
As root, make sure this will not collide with other application using Ruby (e.g. Faspex).
|
262
|
+
If so, one can rename the login script: `mv /etc/profile.d/rvm.sh /etc/profile.d/rvm.sh.ok`.
|
263
|
+
To activate ruby (and ascli) later, source it:
|
155
264
|
|
156
265
|
```
|
157
|
-
# rvm
|
266
|
+
# source /etc/profile.d/rvm.sh.ok
|
267
|
+
# rvm version
|
158
268
|
```
|
159
269
|
|
160
|
-
|
161
|
-
|
270
|
+
### Windows: Installer
|
271
|
+
|
272
|
+
Install Latest stable Ruby using [https://rubyinstaller.org/](https://rubyinstaller.org/) :
|
273
|
+
|
274
|
+
* Go to "Downloads".
|
275
|
+
* Select the Ruby 2 version "without devkit", x64 corresponding to the one recommended "with devkit". Devkit is not needed.
|
276
|
+
* At the end of the installer uncheck the box to skip the installation of "MSys2": not needed.
|
162
277
|
|
163
|
-
|
278
|
+
### macOS: pre-installed or `brew`
|
279
|
+
|
280
|
+
MacOS 10.13+ (High Sierra) comes with a recent Ruby. So you can use it directly. You will need to install aspera-cli using `sudo` :
|
164
281
|
|
165
282
|
```
|
166
|
-
|
283
|
+
$ sudo gem install aspera-cli
|
167
284
|
```
|
168
285
|
|
169
|
-
|
286
|
+
Alternatively, if you use [Homebrew](https://brew.sh/) already you can install Ruby with it:
|
170
287
|
|
171
288
|
```
|
172
|
-
|
289
|
+
$ brew install ruby
|
173
290
|
```
|
174
291
|
|
175
|
-
|
292
|
+
### Linux: package
|
293
|
+
|
294
|
+
If your Linux distribution provides a standard ruby package, you can use it provided that the version is compatible (check at beginning of section).
|
295
|
+
|
296
|
+
Example:
|
297
|
+
|
298
|
+
```
|
299
|
+
# yum install -y ruby rubygems ruby-json
|
300
|
+
```
|
301
|
+
|
302
|
+
One can cleanup the whole yum-installed ruby environment like this to uninstall:
|
176
303
|
|
177
304
|
```
|
178
305
|
gem uninstall $(ls $(gem env gemdir)/gems/|sed -e 's/-[^-]*$//'|sort -u)
|
@@ -181,7 +308,7 @@ yum remove -y ruby ruby-libs
|
|
181
308
|
|
182
309
|
### Other Unixes: Aix, etc...
|
183
310
|
|
184
|
-
If your unix do not provide a pre-built ruby, you can get using one of those
|
311
|
+
If your unix do not provide a pre-built ruby, you can get it using one of those
|
185
312
|
[methods](https://www.ruby-lang.org/en/documentation/installation/)
|
186
313
|
|
187
314
|
For instance to build from source, and install in `/opt/ruby` :
|
@@ -197,12 +324,56 @@ For instance to build from source, and install in `/opt/ruby` :
|
|
197
324
|
# make install
|
198
325
|
```
|
199
326
|
|
327
|
+
### <a name="offline_install"></a>Installation without internet access
|
328
|
+
|
329
|
+
Note that currently no pre-packaged version exist yet.
|
330
|
+
A method to build one provided here:
|
331
|
+
|
332
|
+
On a server with the same OS version and with internet access follow the "Generic single user installation" method.
|
333
|
+
|
334
|
+
Then create an archive:
|
335
|
+
|
336
|
+
```
|
337
|
+
$ cd
|
338
|
+
$ tar zcvf rvm-ascli.tgz .rvm
|
339
|
+
```
|
340
|
+
|
341
|
+
Get the Aspera SDK. Execute:
|
342
|
+
|
343
|
+
```
|
344
|
+
$ ascli conf --show-config|grep sdk_url
|
345
|
+
```
|
346
|
+
|
347
|
+
Then download the SDK archive from that URL.
|
348
|
+
|
349
|
+
Another method for the SDK is to install the SDK (`ascli conf ascp install`) on the first system, and archive `$HOME/.aspera`.
|
350
|
+
|
351
|
+
Transfer those 2 archives to the target system without internet access.
|
352
|
+
|
353
|
+
On the target system:
|
354
|
+
|
355
|
+
* Extract the RVM archive either in a global location, or in a user's home folder : `path_to_rvm_root`
|
356
|
+
* in the user's `.profile` add this line: (replace `path_to_rvm_root` with the actual location)
|
357
|
+
|
358
|
+
```
|
359
|
+
source path_to_rvm_root/scripts/rvm
|
360
|
+
rvm use 2.7.2
|
361
|
+
```
|
362
|
+
|
363
|
+
For the SDK, either install from archive:
|
364
|
+
|
365
|
+
```
|
366
|
+
$ ascli conf ascp install --sdk-url=file:///SDK.zip
|
367
|
+
```
|
368
|
+
|
369
|
+
or restore the `$HOME/.aspera` folder for the user.
|
370
|
+
|
200
371
|
## <a name="the_gem"></a>`aspera-cli` gem
|
201
372
|
|
202
373
|
Once you have Ruby and rights to install gems: Install the gem and its dependencies:
|
203
374
|
|
204
375
|
```
|
205
|
-
# gem install aspera-cli
|
376
|
+
# gem install aspera-cli
|
206
377
|
```
|
207
378
|
|
208
379
|
To upgrade to the latest version:
|
@@ -211,21 +382,40 @@ To upgrade to the latest version:
|
|
211
382
|
# gem update aspera-cli
|
212
383
|
```
|
213
384
|
|
385
|
+
`ascli` checks every week if a new version is available and notify the user in a WARN log. To de-activate this feature set the option `version_check_days` to `0`, or specify a different period in days.
|
386
|
+
|
387
|
+
To check manually:
|
388
|
+
|
389
|
+
```
|
390
|
+
# ascli conf check_update
|
391
|
+
```
|
392
|
+
|
393
|
+
|
394
|
+
|
214
395
|
## <a name="fasp_prot"></a>FASP Protocol
|
215
396
|
|
216
|
-
Most file transfers will be done using the FASP protocol
|
217
|
-
an Aspera Transfer:
|
397
|
+
Most file transfers will be done using the FASP protocol, using `ascp`.
|
398
|
+
Only two additional files are required to perform an Aspera Transfer, which are part of Aspera SDK:
|
218
399
|
|
219
400
|
* ascp
|
220
401
|
* aspera-license (in same folder, or ../etc)
|
221
402
|
|
222
|
-
This can be installed
|
403
|
+
This can be installed either be installing an Aspera transfer sofware, or using an embedded command:
|
223
404
|
|
224
405
|
```
|
225
406
|
$ ascli conf ascp install
|
226
407
|
```
|
227
408
|
|
228
|
-
|
409
|
+
If a local SDK installation is prefered instead of fetching from internet: one can specify the location of the SDK file:
|
410
|
+
|
411
|
+
```
|
412
|
+
$ curl -Lso SDK.zip https://ibm.biz/aspera_sdk
|
413
|
+
$ ascli conf ascp install --sdk-url=file:///SDK.zip
|
414
|
+
```
|
415
|
+
|
416
|
+
The format is: `file:///<path>`, where `<path>` can be either a relative path (not starting with `/`), or an absolute path.
|
417
|
+
|
418
|
+
If the embedded method is not used, the following packages are also suitable:
|
229
419
|
|
230
420
|
* IBM Aspera Connect Client (Free)
|
231
421
|
* IBM Aspera Desktop Client (Free)
|
@@ -234,7 +424,7 @@ Those can be found in one of IBM Aspera transfer server or client with its licen
|
|
234
424
|
* IBM Aspera High Speed Transfer EndPoint (Licensed)
|
235
425
|
|
236
426
|
For instance, Aspera Connect Client can be installed
|
237
|
-
by visiting the page: [
|
427
|
+
by visiting the page: [https://www.ibm.com/aspera/connect/](https://www.ibm.com/aspera/connect/).
|
238
428
|
|
239
429
|
`ascli` will detect most of Aspera transfer products in standard locations and use the first one found.
|
240
430
|
Refer to section [FASP](#client) for details on how to select a client or set path to the FASP protocol.
|
@@ -242,6 +432,33 @@ Refer to section [FASP](#client) for details on how to select a client or set pa
|
|
242
432
|
Several methods are provided on how to start a transfer. Use of a local client is one of them, but
|
243
433
|
other methods are available. Refer to section: [Transfer Agents](#agents)
|
244
434
|
|
435
|
+
## <a name="offline_install"></a>Offline Installation (without internet)
|
436
|
+
|
437
|
+
The procedure consists in:
|
438
|
+
|
439
|
+
* Follow the non-root installation procedure with RVM, including gem
|
440
|
+
* archive (zip, tar) the main RVM folder (includes ascli):
|
441
|
+
|
442
|
+
```
|
443
|
+
$ cd ~
|
444
|
+
$ tar zcvf rvm_ascli.tgz .rvm
|
445
|
+
```
|
446
|
+
|
447
|
+
* retrieve the SDK:
|
448
|
+
|
449
|
+
```
|
450
|
+
$ curl -Lso SDK.zip https://ibm.biz/aspera_sdk
|
451
|
+
```
|
452
|
+
|
453
|
+
* on the system without internet access:
|
454
|
+
|
455
|
+
```
|
456
|
+
$ cd ~
|
457
|
+
$ tar zxvf rvm_ascli.tgz
|
458
|
+
$ source ~/.rvm/scripts/rvm
|
459
|
+
$ ascli conf ascp install --sdk-url=file:///SDK.zip
|
460
|
+
```
|
461
|
+
|
245
462
|
# <a name="cli"></a>Command Line Interface: `ascli`
|
246
463
|
|
247
464
|
The `aspera-cli` Gem provides a command line interface (CLI) which interacts with Aspera Products (mostly using REST APIs):
|
@@ -422,6 +639,7 @@ By default, a table output will display one line per entry, and columns for each
|
|
422
639
|
* a,b,c : the list of attributes specified by the comma separated list
|
423
640
|
* Array extended value: for instance, @json:'["a","b","c"]' same as above
|
424
641
|
* +a,b,c : add selected properties to the default selection.
|
642
|
+
* -a,b,c : remove selected properties from the default selection.
|
425
643
|
|
426
644
|
## <a name="extended"></a>Extended Value Syntax
|
427
645
|
|
@@ -435,25 +653,25 @@ The extended value syntax is:
|
|
435
653
|
|
436
654
|
The difference between reader and decoder is order and ordinality. Both act like a function of value on right hand side. Decoders are at the beginning of the value, followed by a single optional reader, followed by the optional value.
|
437
655
|
|
438
|
-
The following "readers" are supported:
|
656
|
+
The following "readers" are supported (returns value in []):
|
439
657
|
|
440
|
-
* @val:VALUE
|
441
|
-
* @file:PATH
|
442
|
-
* @path:PATH
|
443
|
-
* @env:ENVVAR
|
444
|
-
* @stdin:
|
445
|
-
* @preset:NAME
|
658
|
+
* @val:VALUE : [String] prevent further special prefix processing, e.g. `--username=@val:laurent` sets the option `username` to value `laurent`.
|
659
|
+
* @file:PATH : [String] read value from a file (prefix "~/" is replaced with the users home folder), e.g. --key=@file:~/.ssh/mykey
|
660
|
+
* @path:PATH : [String] performs path expansion (prefix "~/" is replaced with the users home folder), e.g. --config-file=@path:~/sample_config.yml
|
661
|
+
* @env:ENVVAR : [String] read from a named env var, e.g.--password=@env:MYPASSVAR
|
662
|
+
* @stdin: : [String] read from stdin (no value on right)
|
663
|
+
* @preset:NAME : [Hash] get whole option preset value by name
|
446
664
|
|
447
665
|
In addition it is possible to decode a value, using one or multiple decoders :
|
448
666
|
|
449
|
-
* @base64: decode a base64 encoded string
|
450
|
-
* @json: decode JSON values (convenient to provide complex structures)
|
451
|
-
* @zlib: uncompress data
|
452
|
-
* @ruby: execute ruby code
|
453
|
-
* @csvt: decode a titled CSV value
|
454
|
-
* @lines: split a string in multiple lines and return an array
|
455
|
-
* @list: split a string in multiple items taking first character as separator and return an array
|
456
|
-
* @incps: include values of presets specified by key
|
667
|
+
* @base64: [String] decode a base64 encoded string
|
668
|
+
* @json: [any] decode JSON values (convenient to provide complex structures)
|
669
|
+
* @zlib: [String] uncompress data
|
670
|
+
* @ruby: [any] execute ruby code
|
671
|
+
* @csvt: [Array] decode a titled CSV value
|
672
|
+
* @lines: [Array] split a string in multiple lines and return an array
|
673
|
+
* @list: [Array] split a string in multiple items taking first character as separator and return an array
|
674
|
+
* @incps: [Hash] include values of presets specified by key `incps` in input hash
|
457
675
|
|
458
676
|
To display the result of an extended value, use the `config echo` command.
|
459
677
|
|
@@ -485,7 +703,7 @@ $ ascli config echo @csvt:@file:test.csv
|
|
485
703
|
:......:.....................:
|
486
704
|
```
|
487
705
|
|
488
|
-
Example: create a hash and include values from preset named "config" of config file
|
706
|
+
Example: create a hash and include values from preset named "config" of config file in this hash
|
489
707
|
|
490
708
|
```
|
491
709
|
$ ascli config echo @incps:@json:'{"hello":true,"incps":["config"]}'
|
@@ -507,14 +725,28 @@ It is also possible to provide a _Structured Value_ in a file using `@json:@file
|
|
507
725
|
|
508
726
|
## <a name="conffolder"></a>Configuration and Persistency Folder
|
509
727
|
|
510
|
-
`ascli` configuration and other runtime files (token cache, file lists, persistency files)
|
511
|
-
|
728
|
+
`ascli` configuration and other runtime files (token cache, file lists, persistency files, SDK) are stored in folder `[User's home folder]/.aspera/ascli`.
|
729
|
+
|
730
|
+
Note: `[User's home folder]` is found using ruby's `Dir.home` (`rb_w32_home_dir`).
|
731
|
+
It uses the `HOME` env var primarily, and on MS Windows it also looks at `%HOMEDRIVE%%HOMEPATH%` and `%USERPROFILE%`. `ascli` sets the env var `%HOME%` to the value of `%USERPROFILE%` if set and exists. So, on Windows `%USERPROFILE%` is used as it is more reliable than `%HOMEDRIVE%%HOMEPATH%`.
|
732
|
+
|
733
|
+
The main folder can be displayed using :
|
512
734
|
|
513
735
|
```
|
514
736
|
$ ascli config folder
|
515
737
|
/Users/kenji/.aspera/ascli
|
516
738
|
```
|
517
739
|
|
740
|
+
It can be overriden using the envinonment variable `ASCLI_HOME`.
|
741
|
+
|
742
|
+
Example (Windows):
|
743
|
+
|
744
|
+
```
|
745
|
+
$ set ASCLI_HOME=C:\Users\Kenji\.aspera\ascli
|
746
|
+
$ ascli config folder
|
747
|
+
C:\Users\Kenji\.aspera\ascli
|
748
|
+
```
|
749
|
+
|
518
750
|
## <a name="configfile"></a>Configuration file
|
519
751
|
|
520
752
|
On the first execution of `ascli`, an empty configuration file is created in the configuration folder.
|
@@ -547,7 +779,7 @@ $ ascli config id <option preset> set|delete|show|initialize|update
|
|
547
779
|
The command `update` allows the easy creation of [option preset](#lprt) by simply providing the options in their command line format, e.g. :
|
548
780
|
|
549
781
|
```
|
550
|
-
$ ascli config id demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=
|
782
|
+
$ ascli config id demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=_demo_pass_ --ts=@json:'{"precalculate_job_size":true}'
|
551
783
|
```
|
552
784
|
|
553
785
|
* This creates a [option preset](#lprt) `demo_server` with all provided options.
|
@@ -555,13 +787,13 @@ $ ascli config id demo_server update --url=ssh://demo.asperasoft.com:33001 --use
|
|
555
787
|
The command `set` allows setting individual options in a [option preset](#lprt).
|
556
788
|
|
557
789
|
```
|
558
|
-
$ ascli config id demo_server set password
|
790
|
+
$ ascli config id demo_server set password _demo_pass_
|
559
791
|
```
|
560
792
|
|
561
793
|
The command `initialize`, like `update` allows to set several parameters at once, but it deletes an existing configuration instead of updating it, and expects a _[Structured Value](#native)_.
|
562
794
|
|
563
795
|
```
|
564
|
-
$ ascli config id demo_server initialize @json:'{"url":"ssh://demo.asperasoft.com:33001","username":"asperaweb","password":"
|
796
|
+
$ ascli config id demo_server initialize @json:'{"url":"ssh://demo.asperasoft.com:33001","username":"asperaweb","password":"_demo_pass_","ts":{"precalculate_job_size":true}}'
|
565
797
|
```
|
566
798
|
|
567
799
|
A good practice is to not manually edit the configuration file and use modification commands instead.
|
@@ -598,11 +830,19 @@ Note that special plugin name: `config` can be associated with a preset that is
|
|
598
830
|
Operations on this preset are done using regular `config` operations:
|
599
831
|
|
600
832
|
```
|
601
|
-
$ ascli config id default set _plugin_name_
|
833
|
+
$ ascli config id default set _plugin_name_ _default_preset_for_plugin_
|
602
834
|
$ ascli config id default get _plugin_name_
|
603
|
-
"
|
835
|
+
"_default_preset_for_plugin_"
|
604
836
|
```
|
605
837
|
|
838
|
+
### <a name="lprtdef"></a>Special Plugin: config
|
839
|
+
|
840
|
+
Plugin `config` (not to be confused with Option preset config) is used to configure `ascli` but it also contains global options.
|
841
|
+
|
842
|
+
When `ascli` starts, it lookjs for the `default` Option preset and if there is a value for `config`, if so, it loads the option values for any plugin used.
|
843
|
+
|
844
|
+
If no global default is set by the user, the tool will use `global_common_defaults` when setting global parameters (e.g. `conf ascp use`)
|
845
|
+
|
606
846
|
### Format of file
|
607
847
|
|
608
848
|
The configuration file is a hash in a YAML file. Example:
|
@@ -618,7 +858,7 @@ cli_default:
|
|
618
858
|
demo_server:
|
619
859
|
url: ssh://demo.asperasoft.com:33001
|
620
860
|
username: asperaweb
|
621
|
-
password:
|
861
|
+
password: _demo_pass_
|
622
862
|
```
|
623
863
|
|
624
864
|
We can see here:
|
@@ -687,7 +927,6 @@ A [option preset](#lprt) value can be removed with `unset`:
|
|
687
927
|
$ ascli config id cli_default unset interactive
|
688
928
|
```
|
689
929
|
|
690
|
-
|
691
930
|
### Examples
|
692
931
|
|
693
932
|
For Faspex, Shares, Node (including ATS, Aspera Transfer Service), Console,
|
@@ -751,6 +990,8 @@ EOF
|
|
751
990
|
|
752
991
|
The gem is equipped with traces. By default logging level is "warn". To increase debug level, use parameter `log_level`, so either command line `--log-level=xx` or env var `ASCLI_LOG_LEVEL`.
|
753
992
|
|
993
|
+
It is also possible to activate traces before initialisation using env var `AS_LOG_LEVEL`.
|
994
|
+
|
754
995
|
## Learning Aspera Product APIs (REST)
|
755
996
|
|
756
997
|
This CLI uses REST APIs.
|
@@ -805,21 +1046,42 @@ The `config` plugin also allows specification for the use of a local FASP client
|
|
805
1046
|
|
806
1047
|
```
|
807
1048
|
$ ascli config ascp show
|
808
|
-
/Users/laurent/
|
1049
|
+
/Users/laurent/.aspera/ascli/sdk/ascp
|
1050
|
+
$ ascli config ascp info
|
1051
|
+
+--------------------+-----------------------------------------------------------+
|
1052
|
+
| key | value |
|
1053
|
+
+--------------------+-----------------------------------------------------------+
|
1054
|
+
| ascp | /Users/laurent/.aspera/ascli/sdk/ascp |
|
1055
|
+
...
|
809
1056
|
```
|
810
1057
|
|
811
1058
|
### Selection of local `ascp`
|
812
1059
|
|
1060
|
+
By default, `ascli` uses any found local product with ascp, including SDK.
|
1061
|
+
|
813
1062
|
To temporarily use an alternate ascp path use option `ascp_path` (`--ascp-path=`)
|
814
1063
|
|
815
|
-
|
1064
|
+
For a permanent change, the command `config ascp use` sets the same parameter for the global default.
|
1065
|
+
|
1066
|
+
Using a POSIX shell:
|
816
1067
|
|
817
1068
|
```
|
818
1069
|
$ ascli config ascp use '/Users/laurent/Applications/Aspera CLI/bin/ascp'
|
819
|
-
|
1070
|
+
ascp version: 4.0.0.182279
|
1071
|
+
Updated: global_common_defaults: ascp_path <- /Users/laurent/Applications/Aspera CLI/bin/ascp
|
1072
|
+
Saved to default global preset global_common_defaults
|
1073
|
+
```
|
1074
|
+
|
1075
|
+
Windows:
|
1076
|
+
|
1077
|
+
```
|
1078
|
+
$ ascli config ascp use C:\Users\admin\.aspera\ascli\sdk\ascp.exe
|
1079
|
+
ascp version: 4.0.0.182279
|
1080
|
+
Updated: global_common_defaults: ascp_path <- C:\Users\admin\.aspera\ascli\sdk\ascp.exe
|
1081
|
+
Saved to default global preset global_common_defaults
|
820
1082
|
```
|
821
1083
|
|
822
|
-
|
1084
|
+
If the path has spaces, read section: [Shell and Command line parsing](#parsing).
|
823
1085
|
|
824
1086
|
### List locally installed Aspera Transfer products
|
825
1087
|
|
@@ -906,7 +1168,7 @@ will effectively push files to the related server from the agent node.
|
|
906
1168
|
|
907
1169
|
### <a name="direct"></a>Direct (local ascp using FASPManager API)
|
908
1170
|
|
909
|
-
By default
|
1171
|
+
By default `ascli` uses a local ascp, equivalent to specifying `--transfer=direct`.
|
910
1172
|
`ascli` will detect locally installed Aspera products.
|
911
1173
|
Refer to section [FASP](#client).
|
912
1174
|
|
@@ -916,17 +1178,33 @@ To specify a FASP proxy (only supported with the `direct` agent), set the approp
|
|
916
1178
|
* `EX_http_proxy_url` (proxy for legacy http fallback)
|
917
1179
|
* `EX_ascp_args`
|
918
1180
|
|
919
|
-
The `transfer-info`
|
1181
|
+
The `transfer-info` accepts the following optional parameters:
|
920
1182
|
|
921
1183
|
<table>
|
922
|
-
<tr><th>Name</th><th>Default</th><th>Feature</th><th>Description</th></tr>
|
923
|
-
<tr><td>
|
924
|
-
<tr><td>
|
925
|
-
<tr><td>
|
926
|
-
<tr><td>
|
927
|
-
<tr><td>wss</td> <td>false</td><td>Web Socket Session</td><td>Enable use of web socket session in case it is available</td></tr>
|
1184
|
+
<tr><th>Name</th><th>Type</th><th>Default</th><th>Feature</th><th>Description</th></tr>
|
1185
|
+
<tr><td>spawn_timeout_sec</td><td>Float</td><td>3</td><td>Multi session</td><td>Verification time that ascp is running</td></tr>
|
1186
|
+
<tr><td>spawn_delay_sec</td><td>Float</td><td>2</td><td>Multi session</td><td>Delay between startup of sessions</td></tr>
|
1187
|
+
<tr><td>wss</td><td>Bool</td><td>false</td><td>Web Socket Session</td><td>Enable use of web socket session in case it is available</td></tr>
|
1188
|
+
<tr><td>resume</td><td>Hash</td><td>nil</td><td>Resumer parameters</td><td>See below</td></tr>
|
928
1189
|
</table>
|
929
1190
|
|
1191
|
+
Resume parameters:
|
1192
|
+
|
1193
|
+
<table>
|
1194
|
+
<tr><th>Name</th><th>Type</th><th>Default</th><th>Feature</th><th>Description</th></tr>
|
1195
|
+
<tr><td>iter_max</td><td>int</td><td>7</td><td>Resume</td><td>Max number of retry on error</td></tr>
|
1196
|
+
<tr><td>sleep_initial</td><td>int</td><td>2</td><td>Resume</td><td>First Sleep before retry</td></tr>
|
1197
|
+
<tr><td>sleep_factor</td><td>int</td><td>2</td><td>Resume</td><td>Multiplier of Sleep</td></tr>
|
1198
|
+
<tr><td>sleep_max</td><td>int</td><td>60</td><td>Resume</td><td>Maximum sleep</td></tr>
|
1199
|
+
</table>
|
1200
|
+
|
1201
|
+
Examples:
|
1202
|
+
|
1203
|
+
```
|
1204
|
+
$ ascli ... --transfer-info=@json:'{"wss":true,"resume":{"iter_max":10}}'
|
1205
|
+
$ ascli ... --transfer-info=@json:'{"spawn_delay_sec":2.5}'
|
1206
|
+
```
|
1207
|
+
|
930
1208
|
### IBM Aspera Connect Client GUI
|
931
1209
|
|
932
1210
|
By specifying option: `--transfer=connect`, `ascli` will start transfers
|
@@ -958,9 +1236,11 @@ If it possible to send using a HTTP gateway, in case FASP is not allowed.
|
|
958
1236
|
Example:
|
959
1237
|
|
960
1238
|
```
|
961
|
-
$ ascli faspex package recv --id=323 --transfer=httpgw --transfer-info=@json:'{"url":"https://
|
1239
|
+
$ ascli faspex package recv --id=323 --transfer=httpgw --transfer-info=@json:'{"url":"https://asperagw.example.com:9443/aspera/http-gwy/v1"}'
|
962
1240
|
```
|
963
1241
|
|
1242
|
+
Note that the gateway only supports transfers authorized with a token.
|
1243
|
+
|
964
1244
|
## <a name="transferspec"></a>Transfer Specification
|
965
1245
|
|
966
1246
|
Some commands lead to file transfer (upload/download), all parameters necessary for this transfer
|
@@ -974,7 +1254,7 @@ is described in a _transfer-spec_ (Transfer Specification), such as:
|
|
974
1254
|
|
975
1255
|
`ascli` builds a default _transfer-spec_ internally, so it is not necessary to provide additional parameters on the command line for this transfer.
|
976
1256
|
|
977
|
-
If needed, it is possible to modify or add any of the supported _transfer-spec_ parameter using the `ts` option. The `ts` option accepts a [Structured Value](#native) containing one or several _transfer-spec_ parameters.
|
1257
|
+
If needed, it is possible to modify or add any of the supported _transfer-spec_ parameter using the `ts` option. The `ts` option accepts a [Structured Value](#native) containing one or several _transfer-spec_ parameters. Multiple `ts` options on command line are cummulative.
|
978
1258
|
|
979
1259
|
It is possible to specify ascp options when the `transfer` option is set to `direct` using the special [_transfer-spec_](#transferspec) parameter: `EX_ascp_args`. Example: `--ts=@json:'{"EX_ascp_args":["-l","100m"]}'`. This is espacially useful for ascp command line parameters not supported yet in the transfer spec.
|
980
1260
|
|
@@ -1011,7 +1291,7 @@ arg: related ascp argument or env var suffix (PASS for ASPERA_SCP_PASS)
|
|
1011
1291
|
</p>
|
1012
1292
|
<p>
|
1013
1293
|
UNDER CONSTRUCTION<br/>
|
1014
|
-
<a href="https://developer.ibm.com/
|
1294
|
+
<a href="https://developer.ibm.com/apis/catalog/?search=aspera">Aspera API Documentation</a>→Node API→/opt/transfers<br/>
|
1015
1295
|
</p>
|
1016
1296
|
|
1017
1297
|
<table>
|
@@ -1093,8 +1373,8 @@ The option `to_folder` provides an equivalent and convenient way to change this
|
|
1093
1373
|
|
1094
1374
|
### List of files for transfers
|
1095
1375
|
|
1096
|
-
When uploading, downloading or sending files, the user must specify
|
1097
|
-
|
1376
|
+
When uploading, downloading or sending files, the user must specify the list of files to transfer.
|
1377
|
+
Most of the time, the list of files to transfer will be simply specified on the command line:
|
1098
1378
|
|
1099
1379
|
```
|
1100
1380
|
$ ascli server upload ~/mysample.file secondfile
|
@@ -1108,7 +1388,8 @@ $ ascli server upload --sources=@args ~/mysample.file secondfile
|
|
1108
1388
|
|
1109
1389
|
More advanced options are provided to adapt to various cases. In fact, list of files to transfer are conveyed using the [_transfer-spec_](#transferspec) using the field: "paths" which is a list (array) of pairs of "source" (mandatory) and "destination" (optional).
|
1110
1390
|
|
1111
|
-
Note that this is different from the "ascp" command line. The paradigm used by `ascli` is:
|
1391
|
+
Note that this is different from the "ascp" command line. The paradigm used by `ascli` is:
|
1392
|
+
all transfer parameters are kept in [_transfer-spec_](#transferspec) so that execution of a transfer is independent of the transfer agent. Note that other IBM Aspera interfaces use this: connect, node, transfer sdk.
|
1112
1393
|
|
1113
1394
|
For ease of use and flexibility, the list of files to transfer is specified by the option `sources`. Accepted values are:
|
1114
1395
|
|
@@ -1225,6 +1506,8 @@ A non complete list of commands used in unit tests:
|
|
1225
1506
|
```
|
1226
1507
|
ascli
|
1227
1508
|
ascli -h
|
1509
|
+
ascli aoc -N remind --username=my_aoc_user_email
|
1510
|
+
ascli aoc -N servers
|
1228
1511
|
ascli aoc admin analytics transfers --query=@json:'{"status":"completed","direction":"receive"}'
|
1229
1512
|
ascli aoc admin ats access_key --id=akibmcloud --secret=somesecret node browse /
|
1230
1513
|
ascli aoc admin ats access_key --id=akibmcloud delete
|
@@ -1235,6 +1518,26 @@ ascli aoc admin ats cluster clouds
|
|
1235
1518
|
ascli aoc admin ats cluster list
|
1236
1519
|
ascli aoc admin ats cluster show --cloud=aws --region=eu-west-1
|
1237
1520
|
ascli aoc admin ats cluster show --id=1f412ae7-869a-445c-9c05-02ad16813be2
|
1521
|
+
ascli aoc admin res apps_new list
|
1522
|
+
ascli aoc admin res client list
|
1523
|
+
ascli aoc admin res client_access_key list
|
1524
|
+
ascli aoc admin res client_registration_token --id=my_clt_reg_id delete
|
1525
|
+
ascli aoc admin res client_registration_token create @json:'{"data":{"name":"test_client_reg1","client_subject_scopes":["alee","aejd"],"client_subject_enabled":true}}'
|
1526
|
+
ascli aoc admin res client_registration_token list
|
1527
|
+
ascli aoc admin res contact list
|
1528
|
+
ascli aoc admin res dropbox list
|
1529
|
+
ascli aoc admin res dropbox_membership list
|
1530
|
+
ascli aoc admin res group list
|
1531
|
+
ascli aoc admin res kms_profile list
|
1532
|
+
ascli aoc admin res node list
|
1533
|
+
ascli aoc admin res operation list
|
1534
|
+
ascli aoc admin res organization show
|
1535
|
+
ascli aoc admin res package list
|
1536
|
+
ascli aoc admin res saml_configuration list
|
1537
|
+
ascli aoc admin res self show
|
1538
|
+
ascli aoc admin res short_link list
|
1539
|
+
ascli aoc admin res user list
|
1540
|
+
ascli aoc admin res workspace_membership list
|
1238
1541
|
ascli aoc admin resource node --name=AOC_NODE1_NAME --secret=AOC_NODE1_SECRET v3 access_key create --value=@json:'{"id":"testsub1","storage":{"path":"/folder1"}}'
|
1239
1542
|
ascli aoc admin resource node --name=AOC_NODE1_NAME --secret=AOC_NODE1_SECRET v3 access_key delete --id=testsub1
|
1240
1543
|
ascli aoc admin resource node --name=AOC_NODE1_NAME --secret=AOC_NODE1_SECRET v3 events
|
@@ -1243,7 +1546,6 @@ ascli aoc admin resource node --name=AOC_NODE1_NAME --secret=AOC_NODE1_SECRET v4
|
|
1243
1546
|
ascli aoc admin resource node --name=AOC_NODE1_NAME --secret=AOC_NODE1_SECRET v4 mkdir /folder1
|
1244
1547
|
ascli aoc admin resource workspace list
|
1245
1548
|
ascli aoc admin resource workspace_membership list --fields=ALL --query=@json:'{"page":1,"per_page":50,"embed":"member","inherited":false,"workspace_id":11363,"sort":"name"}'
|
1246
|
-
ascli aoc apiinfo
|
1247
1549
|
ascli aoc automation workflow --id="my_wf_id" action create --value=@json:'{"name":"toto"}' | tee action.info
|
1248
1550
|
ascli aoc automation workflow create --value=@json:'{"name":"test_workflow"}'
|
1249
1551
|
ascli aoc automation workflow delete --id="my_wf_id"
|
@@ -1257,7 +1559,7 @@ ascli aoc files browse /
|
|
1257
1559
|
ascli aoc files browse / -N --link=my_aoc_publink_folder
|
1258
1560
|
ascli aoc files delete /testsrc
|
1259
1561
|
ascli aoc files download --transfer=connect /200KB.1
|
1260
|
-
ascli aoc files file
|
1562
|
+
ascli aoc files file --id=my_file_id show
|
1261
1563
|
ascli aoc files find / --value='\.partial$'
|
1262
1564
|
ascli aoc files http_node_download --to-folder=. /200KB.1
|
1263
1565
|
ascli aoc files mkdir /testsrc
|
@@ -1278,7 +1580,7 @@ ascli aoc packages recv --id=ALL --to-folder=. --once-only=yes --lock-port=12345
|
|
1278
1580
|
ascli aoc packages send --value=@json:'{"name":"Important files delivery","recipients":["external.user@example.com"]}' --new-user-option=@json:'{"package_contact":true}' testfile.bin
|
1279
1581
|
ascli aoc packages send --value=@json:'{"name":"Important files delivery","recipients":["internal.user@example.com"],"note":"my note"}' testfile.bin
|
1280
1582
|
ascli aoc packages send --workspace="my_aoc_shbx_ws" --value=@json:'{"name":"Important files delivery","recipients":["my_aoc_shbx_name"]}' testfile.bin
|
1281
|
-
ascli aoc packages send -N --value=@json:'{"name":"Important files delivery"}' testfile.bin --link=my_aoc_publink_send_aoc_user
|
1583
|
+
ascli aoc packages send -N --value=@json:'{"name":"Important files delivery"}' testfile.bin --link=my_aoc_publink_send_aoc_user --password=my_aoc_publink_send_use_pass
|
1282
1584
|
ascli aoc packages send -N --value=@json:'{"name":"Important files delivery"}' testfile.bin --link=my_aoc_publink_send_shd_inbox
|
1283
1585
|
ascli aoc user info modify @json:'{"name":"dummy change"}'
|
1284
1586
|
ascli aoc user info show
|
@@ -1298,8 +1600,8 @@ ascli ats cluster list
|
|
1298
1600
|
ascli ats cluster show --cloud=aws --region=eu-west-1
|
1299
1601
|
ascli ats cluster show --id=1f412ae7-869a-445c-9c05-02ad16813be2
|
1300
1602
|
ascli conf flush_tokens
|
1301
|
-
ascli conf wiz --url=https://my_aoc_org.ibmaspera.com --config-file=SAMPLE_CONFIG_FILE --pkeypath='' --username=
|
1302
|
-
ascli conf wiz --url=https://my_aoc_org.ibmaspera.com --config-file=SAMPLE_CONFIG_FILE --pkeypath='' --username=
|
1603
|
+
ascli conf wiz --url=https://my_aoc_org.ibmaspera.com --config-file=SAMPLE_CONFIG_FILE --pkeypath='' --username=my_aoc_user_email --test-mode=yes
|
1604
|
+
ascli conf wiz --url=https://my_aoc_org.ibmaspera.com --config-file=SAMPLE_CONFIG_FILE --pkeypath='' --username=my_aoc_user_email --test-mode=yes --use-generic-client=yes
|
1303
1605
|
ascli config ascp connect id 'Aspera Connect for Windows' info
|
1304
1606
|
ascli config ascp connect id 'Aspera Connect for Windows' links id 'Windows Installer' download --to-folder=.
|
1305
1607
|
ascli config ascp connect id 'Aspera Connect for Windows' links list
|
@@ -1308,6 +1610,9 @@ ascli config ascp info
|
|
1308
1610
|
ascli config ascp install
|
1309
1611
|
ascli config ascp products list
|
1310
1612
|
ascli config ascp show
|
1613
|
+
ascli config check_update
|
1614
|
+
ascli config doc
|
1615
|
+
ascli config doc transfer-parameters
|
1311
1616
|
ascli config email_test aspera.user1@gmail.com
|
1312
1617
|
ascli config export
|
1313
1618
|
ascli config genkey mykey
|
@@ -1315,28 +1620,29 @@ ascli config plugins
|
|
1315
1620
|
ascli config proxy_check --fpac=file:///examples/proxy.pac https://eudemo.asperademo.com
|
1316
1621
|
ascli console transfer current list
|
1317
1622
|
ascli console transfer smart list
|
1318
|
-
ascli console transfer smart sub
|
1623
|
+
ascli console transfer smart sub my_job_id @json:'{"source":{"paths":["my_file_name"]},"source_type":"user_selected"}'
|
1319
1624
|
ascli cos -N --bucket=my_icos_bucket_name --endpoint=my_icos_bucket_endpoint --apikey=my_icos_bucket_apikey --crn=my_icos_resource_instance_id node info
|
1320
1625
|
ascli cos -N --bucket=my_icos_bucket_name --region=my_icos_bucket_region --service-credentials=@json:@file:service_creds.json node info
|
1321
1626
|
ascli cos node access_key --id=self show
|
1322
1627
|
ascli cos node download testfile.bin --to-folder=.
|
1323
1628
|
ascli cos node info
|
1324
1629
|
ascli cos node upload testfile.bin
|
1325
|
-
ascli faspex
|
1630
|
+
ascli faspex health
|
1326
1631
|
ascli faspex package list
|
1327
1632
|
ascli faspex package list --box=sent --fields=package_id --format=csv --display=data|tail -n 1);\
|
1328
|
-
ascli faspex package
|
1633
|
+
ascli faspex package list --fields=package_id --format=csv --display=data|tail -n 1);\
|
1634
|
+
ascli faspex package recv --to-folder=. --box=sent --id="my_package_id"
|
1329
1635
|
ascli faspex package recv --to-folder=. --id="my_package_id"
|
1330
1636
|
ascli faspex package recv --to-folder=. --id=ALL --once-only=yes
|
1331
1637
|
ascli faspex package recv --to-folder=. --link="my_faspex_publink_recv_from_fxuser"
|
1332
|
-
ascli faspex package send --delivery-info=@json:'{"title":"Important files delivery","recipients":["internal.user@example.com"]}' testfile.bin
|
1638
|
+
ascli faspex package send --delivery-info=@json:'{"title":"Important files delivery","recipients":["internal.user@example.com","FASPEX_USERNAME"]}' testfile.bin
|
1333
1639
|
ascli faspex package send --link="my_faspex_publink_send_to_dropbox" --delivery-info=@json:'{"title":"Important files delivery"}' testfile.bin
|
1334
1640
|
ascli faspex package send --link="my_faspex_publink_send_to_fxuser" --delivery-info=@json:'{"title":"Important files delivery"}' testfile.bin
|
1335
1641
|
ascli faspex source name "Server Files" node br /
|
1336
1642
|
ascli faspex5 node list --value=@json:'{"type":"received","subtype":"mypackages"}'
|
1337
|
-
ascli faspex5 package list --value=@json:'{"state":["released"]}'
|
1643
|
+
ascli faspex5 package list --value=@json:'{"mailbox":"inbox","state":["released"]}'
|
1338
1644
|
ascli faspex5 package receive --id="my_package_id" --to-folder=.
|
1339
|
-
ascli faspex5 package send --value=@json:'{"title":"test title","recipients":["
|
1645
|
+
ascli faspex5 package send --value=@json:'{"title":"test title","recipients":[{"name":"${f5_user}"}]}' testfile.bin
|
1340
1646
|
ascli node -N -Ptst_node_preview access_key create --value=@json:'{"id":"aoc_1","storage":{"type":"local","path":"/"}}'
|
1341
1647
|
ascli node -N -Ptst_node_preview access_key delete --id=aoc_1
|
1342
1648
|
ascli node async --id=1 bandwidth
|
@@ -1350,8 +1656,8 @@ ascli node browse / -r
|
|
1350
1656
|
ascli node delete folder_1/10MB.1
|
1351
1657
|
ascli node delete folder_1/testfile.bin
|
1352
1658
|
ascli node download --to-folder=. folder_1/testfile.bin
|
1659
|
+
ascli node health
|
1353
1660
|
ascli node info
|
1354
|
-
ascli node nagios_check
|
1355
1661
|
ascli node search / --value=@json:'{"sort":"mtime"}'
|
1356
1662
|
ascli node service --id=service1 delete
|
1357
1663
|
ascli node service create @json:'{"id":"service1","type":"WATCHD","run_as":{"user":"user1"}}'
|
@@ -1381,7 +1687,8 @@ ascli preview test --case=test png "TSTFILE_MXF" --video-png-conv=fixed --log-le
|
|
1381
1687
|
ascli preview test --case=test png "TSTFILE_PDF" --log-level=debug
|
1382
1688
|
ascli preview trevents --once-only=yes --skip-types=office --log-level=info
|
1383
1689
|
ascli server -N -Ptst_hstsfaspex_ssh -Plocal_user ctl all:status
|
1384
|
-
ascli server -N -Ptst_hstsfaspex_ssh -Plocal_user
|
1690
|
+
ascli server -N -Ptst_hstsfaspex_ssh -Plocal_user health app_services --format=nagios
|
1691
|
+
ascli server -N -Ptst_hstsfaspex_ssh -Plocal_user health asctlstatus --format=nagios --cmd-prefix='sudo '
|
1385
1692
|
ascli server -N -Ptst_hstsfaspex_ssh -Plocal_user nodeadmin -- -l
|
1386
1693
|
ascli server -N -Ptst_server_bykey -Plocal_user br /
|
1387
1694
|
ascli server browse /
|
@@ -1391,24 +1698,27 @@ ascli server delete NEW_SERVER_FOLDER
|
|
1391
1698
|
ascli server delete folder_1/target_hot
|
1392
1699
|
ascli server delete folder_1/to.delete
|
1393
1700
|
ascli server df
|
1394
|
-
ascli server download NEW_SERVER_FOLDER/testfile.bin --to-folder=.
|
1701
|
+
ascli server download NEW_SERVER_FOLDER/testfile.bin --to-folder=. --transfer-info=@json:'{"wss":false,"resume":{"iter_max":1}}'
|
1395
1702
|
ascli server download NEW_SERVER_FOLDER/testfile.bin --to-folder=folder_1 --transfer=node
|
1396
1703
|
ascli server du /
|
1704
|
+
ascli server health transfer --to-folder=folder_1 --format=nagios
|
1397
1705
|
ascli server info
|
1398
1706
|
ascli server md5sum NEW_SERVER_FOLDER/testfile.bin
|
1399
1707
|
ascli server mkdir NEW_SERVER_FOLDER --logger=stdout
|
1400
1708
|
ascli server mkdir folder_1/target_hot
|
1401
1709
|
ascli server mv folder_1/200KB.2 folder_1/to.delete
|
1402
|
-
ascli server nagios transfer --to-folder=folder_1 --format=nagios
|
1403
1710
|
ascli server upload --sources=@ts --ts=@json:'{"paths":[{"source":"testfile.bin","destination":"NEW_SERVER_FOLDER/othername"}]}'
|
1404
1711
|
ascli server upload --src-type=pair --sources=@json:'["testfile.bin","NEW_SERVER_FOLDER/othername"]'
|
1405
1712
|
ascli server upload --src-type=pair testfile.bin NEW_SERVER_FOLDER/othername
|
1406
1713
|
ascli server upload --to-folder=folder_1/target_hot --lock-port=12345 --ts=@json:'{"EX_ascp_args":["--remove-after-transfer","--remove-empty-directories","--exclude-newer-than=-8","--src-base","source_hot"]}' source_hot
|
1407
|
-
ascli server upload testfile.bin --to-folder=NEW_SERVER_FOLDER
|
1714
|
+
ascli server upload testfile.bin --to-folder=NEW_SERVER_FOLDER --ts=@json:'{"multi_session":3,"multi_session_threshold":1,"resume_policy":"none","target_rate_kbps":1500}' --transfer-info=@json:'{"spawn_delay_sec":2.5}' --progress=multi
|
1715
|
+
ascli shares admin share list
|
1408
1716
|
ascli shares repository browse /
|
1409
1717
|
ascli shares repository delete /SHARES_UPLOAD/testfile.bin
|
1410
1718
|
ascli shares repository download --to-folder=. /SHARES_UPLOAD/testfile.bin
|
1719
|
+
ascli shares repository download --to-folder=. /SHARES_UPLOAD/testfile.bin --transfer=httpgw --transfer-info=@json:'{"url":"https://HTTP_GW_FQDN/aspera/http-gwy/v1"}'
|
1411
1720
|
ascli shares repository upload --to-folder=/SHARES_UPLOAD testfile.bin
|
1721
|
+
ascli shares repository upload --to-folder=/SHARES_UPLOAD testfile.bin --transfer=httpgw --transfer-info=@json:'{"url":"https://HTTP_GW_FQDN/aspera/http-gwy/v1"}'
|
1412
1722
|
ascli shares2 appinfo
|
1413
1723
|
ascli shares2 organization list
|
1414
1724
|
ascli shares2 project list --organization=Sport
|
@@ -1424,7 +1734,7 @@ ascli sync start --parameters=@json:'{"sessions":[{"name":"test","reset":true,"r
|
|
1424
1734
|
```
|
1425
1735
|
$ ascli -h
|
1426
1736
|
NAME
|
1427
|
-
ascli -- a command line tool for Aspera Applications (v4.
|
1737
|
+
ascli -- a command line tool for Aspera Applications (v4.2.0)
|
1428
1738
|
|
1429
1739
|
SYNOPSIS
|
1430
1740
|
ascli COMMANDS [OPTIONS] [ARGS]
|
@@ -1435,6 +1745,10 @@ DESCRIPTION
|
|
1435
1745
|
execute: ascli conf doc
|
1436
1746
|
or visit: http://www.rubydoc.info/gems/aspera-cli
|
1437
1747
|
|
1748
|
+
ENVIRONMENT VARIABLES
|
1749
|
+
ASCLI_HOME config folder, default: $HOME/.aspera/ascli
|
1750
|
+
#any option can be set as an environment variable, refer to the manual
|
1751
|
+
|
1438
1752
|
COMMANDS
|
1439
1753
|
To list first level commands, execute: ascli
|
1440
1754
|
Note that commands can be written shortened (provided it is unique).
|
@@ -1448,38 +1762,38 @@ ARGS
|
|
1448
1762
|
Some commands require mandatory arguments, e.g. a path.
|
1449
1763
|
|
1450
1764
|
OPTIONS: global
|
1451
|
-
--interactive=ENUM use interactive input of missing params: yes,
|
1452
|
-
--ask-options=ENUM ask even optional options: yes,
|
1765
|
+
--interactive=ENUM use interactive input of missing params: yes, no
|
1766
|
+
--ask-options=ENUM ask even optional options: yes, no
|
1453
1767
|
--format=ENUM output format: table, ruby, json, jsonpp, yaml, csv, nagios
|
1454
1768
|
--display=ENUM output only some information: info, data, error
|
1455
1769
|
--fields=VALUE comma separated list of fields, or ALL, or DEF
|
1456
1770
|
--select=VALUE select only some items in lists, extended value: hash (column, value)
|
1457
1771
|
--table-style=VALUE table display style
|
1458
|
-
--flat-hash=ENUM display hash values as additional keys:
|
1772
|
+
--flat-hash=ENUM display hash values as additional keys: yes, no
|
1459
1773
|
-h, --help Show this message.
|
1460
1774
|
--bash-comp generate bash completion for command
|
1461
1775
|
--show-config Display parameters used for the provided action.
|
1462
1776
|
-r, --rest-debug more debug for HTTP calls
|
1463
1777
|
-v, --version display version
|
1464
1778
|
-w, --warnings check for language warnings
|
1465
|
-
--ui=ENUM method to start browser: text,
|
1466
|
-
--log-level=ENUM Log level: info,
|
1467
|
-
--logger=ENUM log method:
|
1779
|
+
--ui=ENUM method to start browser: text, graphical
|
1780
|
+
--log-level=ENUM Log level: debug, info, warn, error, fatal, unknown
|
1781
|
+
--logger=ENUM log method: stderr, stdout, syslog
|
1468
1782
|
--lock-port=VALUE prevent dual execution of a command, e.g. in cron
|
1469
1783
|
--query=VALUE additional filter for API calls (extended value) (some commands)
|
1470
|
-
--insecure=ENUM do not validate HTTPS certificate:
|
1471
|
-
--once-only=ENUM process only new items (some commands): yes,
|
1784
|
+
--insecure=ENUM do not validate HTTPS certificate: yes, no
|
1785
|
+
--once-only=ENUM process only new items (some commands): yes, no
|
1472
1786
|
|
1473
1787
|
COMMAND: config
|
1474
|
-
SUBCOMMANDS: gem_path genkey plugins flush_tokens list overview open echo id documentation wizard export_to_cli detect coffee ascp email_test smtp_settings proxy_check folder file
|
1788
|
+
SUBCOMMANDS: gem_path genkey plugins flush_tokens list overview open echo id documentation wizard export_to_cli detect coffee ascp email_test smtp_settings proxy_check folder file check_update initdemo
|
1475
1789
|
OPTIONS:
|
1476
1790
|
--value=VALUE extended value for create, update, list filter
|
1477
1791
|
--property=VALUE name of property to set
|
1478
1792
|
--id=VALUE resource identifier (modify,delete,show)
|
1479
|
-
--config-file=VALUE read parameters from file in YAML format, current=/Users/
|
1480
|
-
--override=ENUM override existing value:
|
1793
|
+
--config-file=VALUE read parameters from file in YAML format, current=/Users/FooBar/.aspera/ascli/config.yaml
|
1794
|
+
--override=ENUM override existing value: yes, no
|
1481
1795
|
-N, --no-default do not load default configuration for plugin
|
1482
|
-
--use-generic-client=ENUM wizard: AoC: use global or org specific jwt client id: yes,
|
1796
|
+
--use-generic-client=ENUM wizard: AoC: use global or org specific jwt client id: yes, no
|
1483
1797
|
--pkeypath=VALUE path to private key for JWT (wizard)
|
1484
1798
|
--ascp-path=VALUE path to ascp
|
1485
1799
|
--use-product=VALUE use ascp from specified product
|
@@ -1487,10 +1801,13 @@ OPTIONS:
|
|
1487
1801
|
--fpac=VALUE proxy auto configuration URL
|
1488
1802
|
-P, --presetVALUE load the named option preset from current config file
|
1489
1803
|
--default=VALUE set as default configuration for specified plugin
|
1490
|
-
--secret=VALUE
|
1491
|
-
--secrets=VALUE
|
1492
|
-
--
|
1493
|
-
--
|
1804
|
+
--secret=VALUE default secret
|
1805
|
+
--secrets=VALUE secret repository (Hash)
|
1806
|
+
--sdk-url=VALUE URL to get SDK
|
1807
|
+
--sdk-folder=VALUE SDK folder location
|
1808
|
+
--test-mode=ENUM skip user validation in wizard mode: yes, no
|
1809
|
+
--version-check-days=VALUE period to check neew version in days (zero to disable)
|
1810
|
+
--ts=VALUE override transfer spec values (Hash, use @json: prefix), current={"create_dir"=>true}
|
1494
1811
|
--local-resume=VALUE set resume policy (Hash, use @json: prefix), current=
|
1495
1812
|
--to-folder=VALUE destination folder for downloaded files
|
1496
1813
|
--sources=VALUE list of source files (see doc)
|
@@ -1509,7 +1826,7 @@ OPTIONS:
|
|
1509
1826
|
|
1510
1827
|
|
1511
1828
|
COMMAND: node
|
1512
|
-
SUBCOMMANDS: postprocess stream transfer cleanup forward access_key watch_folder service async central asperabrowser basic_token browse upload download api_details
|
1829
|
+
SUBCOMMANDS: postprocess stream transfer cleanup forward access_key watch_folder service async central asperabrowser basic_token browse upload download api_details health events space info license mkdir mklink mkfile rename delete search
|
1513
1830
|
OPTIONS:
|
1514
1831
|
--url=VALUE URL of application, e.g. https://org.asperafiles.com
|
1515
1832
|
--username=VALUE username to log in
|
@@ -1528,7 +1845,7 @@ OPTIONS:
|
|
1528
1845
|
--password=VALUE user's password
|
1529
1846
|
--params=VALUE parameters hash table, use @json:{"param":"value"}
|
1530
1847
|
--result=VALUE specify result value as: 'work step:parameter'
|
1531
|
-
--synchronous=ENUM work step:parameter expected as result: yes,
|
1848
|
+
--synchronous=ENUM work step:parameter expected as result: yes, no
|
1532
1849
|
--ret-style=ENUM how return type is requested in api: header, arg, ext
|
1533
1850
|
--auth-style=ENUM authentication type: arg_pass, head_basic, apikey
|
1534
1851
|
|
@@ -1562,11 +1879,16 @@ OPTIONS:
|
|
1562
1879
|
|
1563
1880
|
|
1564
1881
|
COMMAND: faspex5
|
1565
|
-
SUBCOMMANDS: node package
|
1882
|
+
SUBCOMMANDS: node package auth_client
|
1566
1883
|
OPTIONS:
|
1567
1884
|
--url=VALUE URL of application, e.g. https://org.asperafiles.com
|
1568
1885
|
--username=VALUE username to log in
|
1569
1886
|
--password=VALUE user's password
|
1887
|
+
--client-id=VALUE API client identifier in application
|
1888
|
+
--client-secret=VALUE API client secret in application
|
1889
|
+
--redirect-uri=VALUE API client redirect URI
|
1890
|
+
--auth=ENUM type of Oauth authentication: body_userpass, header_userpass, web, jwt, url_token, ibm_apikey, boot
|
1891
|
+
--private-key=VALUE RSA private key PEM value for JWT (prefix file path with @val:@file:)
|
1570
1892
|
|
1571
1893
|
|
1572
1894
|
COMMAND: cos
|
@@ -1581,7 +1903,7 @@ OPTIONS:
|
|
1581
1903
|
|
1582
1904
|
|
1583
1905
|
COMMAND: faspex
|
1584
|
-
SUBCOMMANDS:
|
1906
|
+
SUBCOMMANDS: health package source me dropbox v4 address_book login_methods
|
1585
1907
|
OPTIONS:
|
1586
1908
|
--url=VALUE URL of application, e.g. https://org.asperafiles.com
|
1587
1909
|
--username=VALUE username to log in
|
@@ -1611,7 +1933,7 @@ OPTIONS:
|
|
1611
1933
|
--username=VALUE username to log in
|
1612
1934
|
--password=VALUE user's password
|
1613
1935
|
--skip-format=ENUM skip this preview format (multiple possible): png, mp4
|
1614
|
-
--folder-reset-cache=ENUM force detection of generated preview by refresh cache:
|
1936
|
+
--folder-reset-cache=ENUM force detection of generated preview by refresh cache: no, header, read
|
1615
1937
|
--skip-types=VALUE skip types in comma separated list
|
1616
1938
|
--previews-folder=VALUE preview folder in storage root
|
1617
1939
|
--temp-folder=VALUE path to temp folder
|
@@ -1619,14 +1941,15 @@ OPTIONS:
|
|
1619
1941
|
--case=VALUE basename of output for for test
|
1620
1942
|
--scan-path=VALUE subpath in folder id to start scan in (default=/)
|
1621
1943
|
--scan-id=VALUE forder id in storage to start scan in, default is access key main folder id
|
1622
|
-
--
|
1623
|
-
--
|
1944
|
+
--mimemagic=ENUM use Mime type detection of gem mimemagic: yes, no
|
1945
|
+
--overwrite=ENUM when to overwrite result file: always, never, mtime
|
1946
|
+
--file-access=ENUM how to read and write files in repository: local, remote
|
1624
1947
|
--max-size=VALUE maximum size (in bytes) of preview file
|
1625
1948
|
--thumb-vid-scale=VALUE png: video: size (ffmpeg scale argument)
|
1626
1949
|
--thumb-vid-fraction=VALUE png: video: position of snapshot
|
1627
1950
|
--thumb-img-size=VALUE png: non-video: height (and width)
|
1628
|
-
--video-conversion=ENUM mp4: method for preview generation:
|
1629
|
-
--video-png-conv=ENUM mp4: method for thumbnail generation:
|
1951
|
+
--video-conversion=ENUM mp4: method for preview generation: reencode, blend, clips
|
1952
|
+
--video-png-conv=ENUM mp4: method for thumbnail generation: fixed, animated
|
1630
1953
|
--video-start-sec=VALUE mp4: start offset (seconds) of video preview
|
1631
1954
|
--video-scale=VALUE mp4: video scale (ffmpeg)
|
1632
1955
|
--blend-keyframes=VALUE mp4: blend: # key frames
|
@@ -1642,10 +1965,51 @@ SUBCOMMANDS: start admin
|
|
1642
1965
|
OPTIONS:
|
1643
1966
|
--parameters=VALUE extended value for session set definition
|
1644
1967
|
--session-name=VALUE name of session to use for admin commands, by default first one
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1968
|
+
|
1969
|
+
|
1970
|
+
COMMAND: aoc
|
1971
|
+
SUBCOMMANDS: reminder bearer_token organization tier_restrictions user workspace packages files gateway admin automation servers
|
1972
|
+
OPTIONS:
|
1973
|
+
--url=VALUE URL of application, e.g. https://org.asperafiles.com
|
1974
|
+
--username=VALUE username to log in
|
1975
|
+
--password=VALUE user's password
|
1976
|
+
--auth=ENUM OAuth type of authentication: body_userpass, header_userpass, web, jwt, url_token, ibm_apikey
|
1977
|
+
--operation=ENUM client operation for transfers: push, pull
|
1978
|
+
--client-id=VALUE OAuth API client identifier in application
|
1979
|
+
--client-secret=VALUE OAuth API client passcode
|
1980
|
+
--redirect-uri=VALUE OAuth API client redirect URI
|
1981
|
+
--private-key=VALUE OAuth JWT RSA private key PEM value (prefix file path with @val:@file:)
|
1982
|
+
--workspace=VALUE name of workspace
|
1983
|
+
--name=VALUE resource name
|
1984
|
+
--path=VALUE file or folder path
|
1985
|
+
--link=VALUE public link to shared resource
|
1986
|
+
--new-user-option=VALUE new user creation option
|
1987
|
+
--from-folder=VALUE share to share source folder
|
1988
|
+
--scope=VALUE OAuth scope for AoC API calls
|
1989
|
+
--notify=VALUE notify users that file was received
|
1990
|
+
--bulk=ENUM bulk operation: yes, no
|
1991
|
+
--default-ports=ENUM use standard FASP ports or get from node api: yes, no
|
1992
|
+
|
1993
|
+
|
1994
|
+
COMMAND: server
|
1995
|
+
SUBCOMMANDS: health nodeadmin userdata configurator ctl download upload browse delete rename ls rm mv du info mkdir cp df md5sum
|
1996
|
+
OPTIONS:
|
1997
|
+
--url=VALUE URL of application, e.g. https://org.asperafiles.com
|
1998
|
+
--username=VALUE username to log in
|
1999
|
+
--password=VALUE user's password
|
2000
|
+
--ssh-keys=VALUE ssh key path list (Array or single)
|
2001
|
+
--ssh-options=VALUE ssh options (Hash)
|
2002
|
+
--cmd-prefix=VALUE prefix to add for as cmd execution, e.g. sudo or /opt/aspera/bin
|
2003
|
+
|
2004
|
+
|
2005
|
+
COMMAND: console
|
2006
|
+
SUBCOMMANDS: transfer health
|
2007
|
+
OPTIONS:
|
2008
|
+
--url=VALUE URL of application, e.g. https://org.asperafiles.com
|
2009
|
+
--username=VALUE username to log in
|
2010
|
+
--password=VALUE user's password
|
2011
|
+
--filter-from=DATE only after date
|
2012
|
+
--filter-to=DATE only before date
|
1649
2013
|
|
1650
2014
|
|
1651
2015
|
```
|
@@ -1766,7 +2130,7 @@ updated: my_aoc_org
|
|
1766
2130
|
Define this [option preset](#lprt) as default configuration for the `aspera` plugin:
|
1767
2131
|
|
1768
2132
|
```
|
1769
|
-
$ ascli config id default set
|
2133
|
+
$ ascli config id default set aoc my_aoc_org
|
1770
2134
|
```
|
1771
2135
|
|
1772
2136
|
Note: Default `auth` method is `web` and default `redirect_uri` is `http://localhost:12345`. Leave those default values.
|
@@ -2140,7 +2504,7 @@ Then, create two shared folders located in two regions, in your files home, in a
|
|
2140
2504
|
Then, transfer between those:
|
2141
2505
|
|
2142
2506
|
```
|
2143
|
-
$ ascli -Paoc_show
|
2507
|
+
$ ascli -Paoc_show aoc files transfer --from-folder='IBM Cloud SJ' --to-folder='AWS Singapore' 100GB.file --ts=@json:'{"target_rate_kbps":"1000000","multi_session":10,"multi_session_threshold":1}'
|
2144
2508
|
```
|
2145
2509
|
|
2146
2510
|
* create registration key to register a node
|
@@ -2188,17 +2552,27 @@ $ ascli aoc admin res node --id=8669 v4 perm 82 show
|
|
2188
2552
|
Send a package:
|
2189
2553
|
|
2190
2554
|
```
|
2191
|
-
$ ascli aoc packages send --value
|
2555
|
+
$ ascli aoc packages send --value=[package extended value] [other parameters such as file list and transfer parameters]
|
2192
2556
|
```
|
2193
2557
|
|
2194
2558
|
Notes:
|
2195
2559
|
|
2196
|
-
* the `value` parameter can contain any supported package creation parameter. Refer to the API, or display an existing package.
|
2197
|
-
* to list recipients use fields: "recipients" and/or "bcc_recipients". ascli will resolve the list of email addresses to expected user ids.
|
2560
|
+
* the `value` parameter can contain any supported package creation parameter. Refer to the AoC package creation API, or display an existing package to find attributes.
|
2561
|
+
* to provide the list of recipients, use fields: "recipients" and/or "bcc_recipients". ascli will resolve the list of email addresses to expected user ids.
|
2562
|
+
* a recipîent can be a shared inbox, in this case just use the name of the shared inbox as recipient.
|
2563
|
+
* If a recipient is not already registered and the workspace allows external users, then the package is sent to an external user, and
|
2198
2564
|
* if the option `new_user_option` is `@json:{"package_contact":true}` (default), then a public link is sent and the external user does not need to create an account.
|
2199
2565
|
* if the option `new_user_option` is `@json:{}`, then external users are invited to join the workspace
|
2200
2566
|
|
2201
|
-
|
2567
|
+
Examples:
|
2568
|
+
|
2569
|
+
```
|
2570
|
+
$ ascli aoc package send --value=@json:'{"name":"my title","note":"my note","recipients":["laurent.martin.aspera@fr.ibm.com","other@example.com"]}' --sources=@args my_file.dat
|
2571
|
+
$ ascli aoc package send --value=@json:'{"name":"my file in shared inbox","recipients":["The Shared Inbox"]}' my_file.dat --ts=@json:'{"target_rate_kbps":100000}'
|
2572
|
+
$ ascli aoc package send --workspace=eudemo --value=@json:'{"name":"my pack title","recipients":["Shared Inbox Name"],"metadata":[{"input_type":"single-text","name":"Project Id","values":["123"]},{"input_type":"single-dropdown","name":"Type","values":["Opt2"]},{"input_type":"multiple-checkbox","name":"CheckThose","values":["Check1","Check2"]},{"input_type":"date","name":"Optional Date","values":["2021-01-13T15:02:00.000Z"]}]}' ~/Documents/Samples/200KB.1
|
2573
|
+
```
|
2574
|
+
|
2575
|
+
## <a name="aoccargo"></a>Receive new packages only
|
2202
2576
|
|
2203
2577
|
It is possible to automatically download new packages, like using Aspera Cargo:
|
2204
2578
|
|
@@ -2210,10 +2584,10 @@ $ ascli aoc packages recv --id=ALL --once-only=yes --lock-port=12345
|
|
2210
2584
|
* `--once-only=yes` keeps memory of any downloaded package in persistency files located in the configuration folder.
|
2211
2585
|
* `--lock-port=12345` ensures that only one instance is started at the same time, to avoid collisions
|
2212
2586
|
|
2213
|
-
Typically, one would regularly execute this command on a regular basis, using the method
|
2587
|
+
Typically, one would regularly execute this command on a regular basis, using the method of your choice:
|
2214
2588
|
|
2215
|
-
* Windows scheduler
|
2216
|
-
* cron
|
2589
|
+
* Windows: [Task Scheduler](https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page)
|
2590
|
+
* Linux/Unix: [cron](https://www.man7.org/linux/man-pages/man5/crontab.5.html)
|
2217
2591
|
* etc...
|
2218
2592
|
|
2219
2593
|
## Download Files
|
@@ -2433,7 +2807,7 @@ This can also be set as default using a preset
|
|
2433
2807
|
One can test the "server" application using the well known demo server:
|
2434
2808
|
|
2435
2809
|
```
|
2436
|
-
$ ascli config id aspera_demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=
|
2810
|
+
$ ascli config id aspera_demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=_demo_pass_
|
2437
2811
|
$ ascli config id default set server aspera_demo_server
|
2438
2812
|
$ ascli server browse /aspera-test-dir-large
|
2439
2813
|
$ ascli server download /aspera-test-dir-large/200MB
|
@@ -2531,23 +2905,67 @@ $ ascli node access_key create --value=@json:'{"id":"eudemo-sedemo","secret":"my
|
|
2531
2905
|
|
2532
2906
|
# Plugin: IBM Aspera Faspex
|
2533
2907
|
|
2534
|
-
|
2908
|
+
Notes:
|
2535
2909
|
|
2536
|
-
|
2910
|
+
* the command "v4" requires the use of APIv4, refer to the Faspex Admin manual on how to activate.
|
2911
|
+
* for full details on Faspex API, refer to: [Reference on Developer Site](https://www.ibm.com/products/aspera/developer)
|
2912
|
+
|
2913
|
+
## Faspex 5 Beta1
|
2914
|
+
|
2915
|
+
As the web UI does not yet allow adding API client yet, the way to use CLI is:
|
2916
|
+
|
2917
|
+
* open a browser
|
2918
|
+
* start developer mode
|
2919
|
+
* login to faspex 5
|
2920
|
+
* find the first API call with `Authorization` token, and copy it (kind of base64 long string)
|
2921
|
+
|
2922
|
+
Use it as password and use `--auth=boot`.
|
2923
|
+
|
2924
|
+
```
|
2925
|
+
$ ascli conf id f5boot update --url=https://localhost/aspera/faspex --auth=boot --password=ABC.DEF.GHI...
|
2926
|
+
```
|
2537
2927
|
|
2538
|
-
|
2928
|
+
An JWT client can then be created with a private key:
|
2539
2929
|
|
2540
2930
|
```
|
2541
|
-
|
2931
|
+
$ jsonk=$(openssl rsa -in ~/.aspera/ascli/aspera_on_cloud_key -pubout 2> /dev/null | sed -e :a -e N -e '$!ba' -e 's/\n/\\n/g')
|
2932
|
+
$ ascli faspex5 -Pf5boot auth_client create --value=@json:'{"name":"hello","client_type":"public","redirect_uris":["https://localhost:12345"],"allow_jwt_grant":true,"public_key":"'$jsonk'"}'
|
2542
2933
|
```
|
2543
2934
|
|
2544
|
-
|
2935
|
+
or deleted by name:
|
2936
|
+
|
2937
|
+
```
|
2938
|
+
$ id=$(ascli faspex5 auth_client list --select=@json:'{"name":"hello"}' --fields=client_id --format=csv)
|
2939
|
+
$ ascli faspex5 auth_client delete --id=$id
|
2940
|
+
```
|
2941
|
+
|
2942
|
+
Once the API client is created with a client_id and secret (result of create command), create a configuration:
|
2943
|
+
|
2944
|
+
```
|
2945
|
+
$ ascli conf id f5 update --url=https://localhost/aspera/faspex --auth=jwt --client-id=abcd --client-secret=def --username=pierre@example.com --private-key=@val:@file:~/.aspera/ascli/aspera_on_cloud_key
|
2946
|
+
$ ascli conf id default set faspex5 f5
|
2947
|
+
```
|
2948
|
+
|
2949
|
+
Ready to use Faspex5 with CLI.
|
2950
|
+
|
2951
|
+
Once the graphical registration form exist, ther bootstrap method can be removed.
|
2952
|
+
|
2953
|
+
## Sending a Package
|
2954
|
+
|
2955
|
+
The command is `faspex package send`. Package information (title, note, metadata, options) is provided in option `delivery_info`. (Refer to Faspex API).
|
2956
|
+
|
2957
|
+
Example:
|
2958
|
+
|
2959
|
+
```
|
2960
|
+
$ ascli faspex package send --delivery-info=@json:'{"title":"my title","recipients":["laurent.martin.aspera@fr.ibm.com"]}' --url=https://faspex.corp.com/aspera/faspex --username=foo --password=bar /tmp/file1 /home/bar/file2
|
2961
|
+
```
|
2545
2962
|
|
2546
|
-
|
2963
|
+
If the recipient is a dropbox, just provide the name of the dropbox in `recipients`: `"recipients":["My Dropbox Name"]`
|
2547
2964
|
|
2965
|
+
Additional optional parameters in `delivery_info`:
|
2548
2966
|
|
2549
|
-
Note
|
2550
|
-
|
2967
|
+
* Package Note: : `"note":"note this and that"`
|
2968
|
+
* Package Metadata: `"metadata":{"Meta1":"Val1","Meta2":"Val2"}`
|
2551
2969
|
|
2552
2970
|
## operation on dropboxes
|
2553
2971
|
|
@@ -2610,6 +3028,8 @@ $ for p in 1 2 3;do ascli shares2 admin users list --value=@json:'{"page":'$p'}'
|
|
2610
3028
|
# Plugin: IBM Cloud Object Storage
|
2611
3029
|
|
2612
3030
|
The IBM Cloud Object Storage provides the possibility to execute transfers using FASP.
|
3031
|
+
It uses the same transfer service as Aspera on Cloud.
|
3032
|
+
see [https://status.aspera.io](https://status.aspera.io)
|
2613
3033
|
|
2614
3034
|
Required options are either:
|
2615
3035
|
|
@@ -2666,7 +3086,14 @@ Endpoints for regions can be found by querying the `endpoints` URL.
|
|
2666
3086
|
For convenience, let us create a default configuration, for example:
|
2667
3087
|
|
2668
3088
|
```
|
2669
|
-
$ ascli conf id mycos update --service-credentials=@val:@json:@file
|
3089
|
+
$ ascli conf id mycos update --bucket=laurent --service-credentials=@val:@json:@file:~/service_creds.json --region=us-south
|
3090
|
+
$ ascli conf id default set cos mycos
|
3091
|
+
```
|
3092
|
+
|
3093
|
+
or using direct parameters:
|
3094
|
+
|
3095
|
+
```
|
3096
|
+
$ ascli conf id mycos update --bucket=mybucket --endpoint=https://s3.us-east.cloud-object-storage.appdomain.cloud --apikey=abcdefgh --crn=crn:v1:bluemix:public:iam-identity::a/xxxxxxx
|
2670
3097
|
$ ascli conf id default set cos mycos
|
2671
3098
|
```
|
2672
3099
|
|
@@ -2684,7 +3111,7 @@ to start from ma configuration file, using `ascli` standard options.
|
|
2684
3111
|
|
2685
3112
|
# Plugin: Preview
|
2686
3113
|
|
2687
|
-
The `preview` generates "previews" of graphical files, i.e. thumbnails (office, images, video) and video previews on
|
3114
|
+
The `preview` generates "previews" of graphical files, i.e. thumbnails (office, images, video) and video previews on storage for use primarily in the Aspera on Cloud application.
|
2688
3115
|
This is based on the "node API" of Aspera HSTS when using Access Keys only inside it's "storage root".
|
2689
3116
|
Several parameters can be used to tune several aspects:
|
2690
3117
|
|
@@ -2732,6 +3159,7 @@ The tool requires the following external tools available in the `PATH`:
|
|
2732
3159
|
* OptiPNG : `optipng`
|
2733
3160
|
* FFmpeg : `ffmpeg` `ffprobe`
|
2734
3161
|
* Libreoffice : `libreoffice`
|
3162
|
+
* ruby gem `mimemagic`
|
2735
3163
|
|
2736
3164
|
Here shown on Redhat/CentOS.
|
2737
3165
|
|
@@ -2743,6 +3171,26 @@ To check if all tools are found properly, execute:
|
|
2743
3171
|
$ ascli preview check
|
2744
3172
|
```
|
2745
3173
|
|
3174
|
+
### mimemagic
|
3175
|
+
|
3176
|
+
To benefit from extra mime type detection install gem mimemagic:
|
3177
|
+
|
3178
|
+
```
|
3179
|
+
# gem install mimemagic
|
3180
|
+
```
|
3181
|
+
|
3182
|
+
or to install an earlier version if any problem:
|
3183
|
+
|
3184
|
+
```
|
3185
|
+
# gem install mimemagic -v '~> 0.3.0'
|
3186
|
+
```
|
3187
|
+
|
3188
|
+
To use it, set option `mimemagic` to `yes`: `--mimemagic=yes`
|
3189
|
+
|
3190
|
+
If not used, Mime type used for conversion is the one provided by the node API.
|
3191
|
+
|
3192
|
+
If used, it the `preview` command will first analyse the file content using mimemagic, and if no match, will try by extension.
|
3193
|
+
|
2746
3194
|
### Image: Imagemagick and optipng
|
2747
3195
|
|
2748
3196
|
```
|
@@ -2767,90 +3215,111 @@ The generation of preview in based on the use of `unoconv` and `libreoffice`
|
|
2767
3215
|
# dnf install unoconv
|
2768
3216
|
```
|
2769
3217
|
|
3218
|
+
* Amazon Linux
|
3219
|
+
|
3220
|
+
```
|
3221
|
+
# amazon-linux-extras enable libreoffice
|
3222
|
+
# yum clean metadata
|
3223
|
+
# yum install libreoffice-core libreoffice-calc libreoffice-opensymbol-fonts libreoffice-ure libreoffice-writer libreoffice-pyuno libreoffice-impress
|
3224
|
+
# wget https://raw.githubusercontent.com/unoconv/unoconv/master/unoconv
|
3225
|
+
# mv unoconv /usr/bin
|
3226
|
+
# chmod a+x /usr/bin/unoconv
|
3227
|
+
```
|
2770
3228
|
|
2771
3229
|
## Configuration
|
2772
3230
|
|
2773
|
-
|
3231
|
+
The preview generator is run as a user, preferably a regular user (not root). 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. (we will assume this)
|
3232
|
+
|
3233
|
+
Like any `ascli` commands, parameters can be passed on command line or using a configuration [option preset](#lprt). The configuration file must be created with the same user used to run so that it is properly used on runtime.
|
3234
|
+
|
3235
|
+
Note that the `xfer` user has a special protected shell: `aspshell`, so changing identity requires specification of alternate shell:
|
2774
3236
|
|
2775
3237
|
```
|
2776
3238
|
# su -s /bin/bash - xfer
|
2777
|
-
$ ascli config id
|
2778
|
-
$ ascli config id default set preview
|
3239
|
+
$ ascli config id previewconf update --url=https://localhost:9092 --username=my_access_key --password=my_secret --skip-types=office --lock-port=12346
|
3240
|
+
$ ascli config id default set preview previewconf
|
2779
3241
|
```
|
2780
3242
|
|
2781
|
-
Here we assume that Office file generation is disabled, else remove
|
3243
|
+
Here we assume that Office file generation is disabled, else remove this option.
|
3244
|
+
`lock_port` prevents concurrent execution of generation when using a scheduler.
|
2782
3245
|
|
2783
|
-
|
3246
|
+
One can check if the access key is well configured using:
|
2784
3247
|
|
2785
3248
|
```
|
2786
|
-
$ ascli -
|
3249
|
+
$ ascli -Ppreviewconf node browse /
|
2787
3250
|
```
|
2788
3251
|
|
2789
3252
|
This shall list the contents of the storage root of the access key.
|
2790
3253
|
|
2791
3254
|
## Execution
|
2792
3255
|
|
2793
|
-
The tool intentionally supports only a "one shot" mode in order to avoid having a hanging process or using too many resources (calling REST api too quickly during the scan or event method).
|
2794
|
-
It needs to be run
|
3256
|
+
The tool intentionally supports only a "one shot" mode (no infinite loop) in order to avoid having a hanging process or using too many resources (calling REST api too quickly during the scan or event method).
|
3257
|
+
It needs to be run on a regular basis to create or update preview files. For that use your best
|
2795
3258
|
reliable scheduler. For instance use "CRON" on Linux or Task Scheduler on Windows.
|
2796
3259
|
|
2797
|
-
Typically, for "Access key" access, the system/transfer is `xfer`. So, in order to be
|
2798
|
-
should be run as user `xfer`.
|
3260
|
+
Typically, for "Access key" access, the system/transfer is `xfer`. So, in order to be consistent have generate the appropriate access rights, the generation process should be run as user `xfer`.
|
2799
3261
|
|
2800
3262
|
Lets do a one shot test, using the configuration previously created:
|
2801
3263
|
|
2802
3264
|
```
|
2803
3265
|
# su -s /bin/bash - xfer
|
2804
|
-
$ ascli preview scan --overwrite=always
|
3266
|
+
xfer$ ascli preview scan --overwrite=always
|
2805
3267
|
```
|
2806
3268
|
|
2807
3269
|
When the preview generator is first executed it will create a file: `.aspera_access_key`
|
2808
|
-
which contains the access key used.
|
3270
|
+
in the previews folder which contains the access key used.
|
2809
3271
|
On subsequent run it reads this file and check that previews are generated for the same access key, else it fails. This is to prevent clash of different access keys using the same root.
|
2810
3272
|
|
2811
3273
|
## Configuration for Execution in scheduler
|
2812
3274
|
|
2813
|
-
Here is an example of configuration for use with cron on Linux.
|
3275
|
+
Here is an example of configuration for use with cron on Linux.
|
3276
|
+
Adapt the scripts to your own preference.
|
2814
3277
|
|
2815
3278
|
We assume here that a configuration preset was created as shown previously.
|
2816
3279
|
|
2817
|
-
|
3280
|
+
Lets first setup a script that will be used in the sceduler and sets up the environment.
|
3281
|
+
|
3282
|
+
Example of startup script `cron_ascli`, which sets the Ruby environment and adds some timeout protection:
|
3283
|
+
|
3284
|
+
```
|
3285
|
+
#!/bin/bash
|
3286
|
+
# set a timeout protection, just in case
|
3287
|
+
case "$*" in *trev*) tmout=10m ;; *) tmout=30m ;; esac
|
3288
|
+
. /etc/profile.d/rvm.sh
|
3289
|
+
rvm use 2.6 --quiet
|
3290
|
+
exec timeout ${tmout} ascli "${@}"
|
3291
|
+
```
|
3292
|
+
|
3293
|
+
Here the cronjob is created for user `xfer`.
|
2818
3294
|
|
2819
3295
|
```
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
3296
|
+
xfer$ crontab<<EOF
|
3297
|
+
0 * * * * /home/xfer/cron_ascli preview scan --logger=syslog --display=error
|
3298
|
+
2-59 * * * * /home/xfer/cron_ascli preview trev --logger=syslog --display=error
|
2823
3299
|
EOF
|
2824
3300
|
```
|
2825
3301
|
|
2826
|
-
|
3302
|
+
Note that the loging options are kept in the cronfile instead of conf file to allow execution on command line with output on command line.
|
2827
3303
|
|
2828
3304
|
## Candidate detection for creation or update (or deletion)
|
2829
3305
|
|
2830
|
-
The tool
|
3306
|
+
The tool generates preview files using those commands:
|
2831
3307
|
|
2832
3308
|
* `trevents` : only recently uploaded files will be tested (transfer events)
|
2833
3309
|
* `events` : only recently uploaded files will be tested (file events: not working)
|
2834
|
-
* `scan` :
|
2835
|
-
* `
|
2836
|
-
* `file` : for an individual file generation
|
2837
|
-
|
2838
|
-
Note that for the `event`, the option `iteration_file` should be specified so that
|
2839
|
-
successive calls only process new events. This file will hold an identifier
|
2840
|
-
telling from where to get new events.
|
2841
|
-
|
2842
|
-
It is also possible to test a local file, using the `test` command.
|
3310
|
+
* `scan` : recursively scan all files under the access key's "storage root"
|
3311
|
+
* `test` : test using a local file
|
2843
3312
|
|
2844
3313
|
Once candidate are selected, once candidates are selected,
|
2845
3314
|
a preview is always generated if it does not exist already,
|
2846
3315
|
else if a preview already exist, it will be generated
|
2847
|
-
using one of three overwrite
|
3316
|
+
using one of three values for the `overwrite` option:
|
2848
3317
|
|
2849
3318
|
* `always` : preview is always generated, even if it already exists and is newer than original
|
2850
3319
|
* `never` : preview is generated only if it does not exist already
|
2851
3320
|
* `mtime` : preview is generated only if the original file is newer than the existing
|
2852
3321
|
|
2853
|
-
Deletion of preview for deleted source files: not implemented yet.
|
3322
|
+
Deletion of preview for deleted source files: not implemented yet (TODO).
|
2854
3323
|
|
2855
3324
|
If the `scan` or `events` detection method is used, then the option : `skip_folders` can be used to skip some folders. It expects a list of path relative to the storage root (docroot) starting with slash, use the `@json:` notation, example:
|
2856
3325
|
|
@@ -2860,6 +3329,14 @@ $ ascli preview scan --skip-folders=@json:'["/not_here"]'
|
|
2860
3329
|
|
2861
3330
|
The option `folder_reset_cache` forces the node service to refresh folder contents using various methods.
|
2862
3331
|
|
3332
|
+
When scanning the option `value` has the same behaviour as for the `node find` command.
|
3333
|
+
|
3334
|
+
For instance to filter out files beginning with `._` do:
|
3335
|
+
|
3336
|
+
```
|
3337
|
+
... --value='exec:!f["name"].start_with?("._") or f["name"].eql?(".DS_Store")'
|
3338
|
+
```
|
3339
|
+
|
2863
3340
|
## Preview File types
|
2864
3341
|
|
2865
3342
|
Two types of preview can be generated:
|
@@ -2997,7 +3474,7 @@ Note that in addition, many "EX_" [_transfer-spec_](#transferspec) parameters ar
|
|
2997
3474
|
## Simple session
|
2998
3475
|
|
2999
3476
|
```
|
3000
|
-
MY_TSPEC='{"remote_host":"demo.asperasoft.com","remote_user":"asperaweb","ssh_port":33001,"remote_password":"
|
3477
|
+
MY_TSPEC='{"remote_host":"demo.asperasoft.com","remote_user":"asperaweb","ssh_port":33001,"remote_password":"_demo_pass_","direction":"receive","destination_root":"./test.dir","paths":[{"source":"/aspera-test-dir-tiny/200KB.1"}],"resume_level":"none"}'
|
3001
3478
|
|
3002
3479
|
echo "${MY_TSPEC}"|asession
|
3003
3480
|
```
|
@@ -3010,7 +3487,7 @@ This is particularly useful for a persistent session ( with the [_transfer-spec_
|
|
3010
3487
|
|
3011
3488
|
```
|
3012
3489
|
$ asession
|
3013
|
-
{"remote_host":"demo.asperasoft.com","ssh_port":33001,"remote_user":"asperaweb","remote_password":"
|
3490
|
+
{"remote_host":"demo.asperasoft.com","ssh_port":33001,"remote_user":"asperaweb","remote_password":"_demo_pass_","direction":"receive","destination_root":".","keepalive":true,"resume_level":"none"}
|
3014
3491
|
{"type":"START","source":"/aspera-test-dir-tiny/200KB.2"}
|
3015
3492
|
{"type":"DONE"}
|
3016
3493
|
```
|
@@ -3104,6 +3581,34 @@ $ ascli server upload source_hot --to-folder=/Upload/target_hot --lock-port=1234
|
|
3104
3581
|
|
3105
3582
|
The local (here, relative path: source_hot) is sent (upload) to basic fasp server, source files are deleted after transfer. growing files will be sent only once they dont grow anymore (based ona 8 second cooloff period). If a transfer takes more than the execution period, then the subsequent execution is skipped (lock-port).
|
3106
3583
|
|
3584
|
+
# Aspera Health check and Nagios
|
3585
|
+
|
3586
|
+
Each plugin provide a `health` command that will check the health status of the application. Example:
|
3587
|
+
|
3588
|
+
```
|
3589
|
+
$ ascli console health
|
3590
|
+
+--------+-------------+------------+
|
3591
|
+
| status | component | message |
|
3592
|
+
+--------+-------------+------------+
|
3593
|
+
| ok | console api | accessible |
|
3594
|
+
+--------+-------------+------------+
|
3595
|
+
```
|
3596
|
+
|
3597
|
+
Typically, the health check uses the REST API of the application with the following exception: the `server` plugin allows checking health by:
|
3598
|
+
|
3599
|
+
* issuing a transfer to the server
|
3600
|
+
* checking web app status with `asctl all:status`
|
3601
|
+
* checking daemons process status
|
3602
|
+
|
3603
|
+
`ascli` can be called by Nagios to check the health status of an Aspera server. The output can be made compatible to Nagios with option `--format=nagios` :
|
3604
|
+
|
3605
|
+
```
|
3606
|
+
$ ascli server health transfer --to-folder=/Upload --format=nagios --progress=none
|
3607
|
+
OK - [transfer:ok]
|
3608
|
+
$ ascli server health asctlstatus --cmd_prefix='sudo ' --format=nagios
|
3609
|
+
OK - [NP:running, MySQL:running, Mongrels:running, Background:running, DS:running, DB:running, Email:running, Apache:running]
|
3610
|
+
```
|
3611
|
+
|
3107
3612
|
# Module: `Aspera`
|
3108
3613
|
|
3109
3614
|
Main components:
|
@@ -3123,6 +3628,16 @@ This sample code shows some example of use of the API as well as
|
|
3123
3628
|
REST API.
|
3124
3629
|
Note: although nice, it's probably a good idea to use RestClient for REST.
|
3125
3630
|
|
3631
|
+
Example of use of the API of Aspera on Cloud:
|
3632
|
+
|
3633
|
+
```
|
3634
|
+
require 'aspera/aoc'
|
3635
|
+
|
3636
|
+
aoc=Aspera::AoC.new(url: 'https://sedemo.ibmaspera.com',auth: :jwt, scope: 'user:all', private_key: File.read(File.expand_path('~/.aspera/ascli/aspera_on_cloud_key')),username: 'laurent.martin.aspera@fr.ibm.com',subpath: 'api/v1')
|
3637
|
+
|
3638
|
+
aoc.read('self')
|
3639
|
+
```
|
3640
|
+
|
3126
3641
|
# History
|
3127
3642
|
|
3128
3643
|
When I joined Aspera, there was only one CLI: `ascp`, which is the implementation of the FASP protocol, but there was no CLI to access the various existing products (Server, Faspex, Shares). Once, Serban (founder) provided a shell script able to create a Faspex Package using Faspex REST API. Since all products relate to file transfers using FASP (ascp), I thought it would be interesting to have a unified CLI for transfers using FASP. Also, because there was already the `ascp` tool, I thought of an extended tool : `eascp.pl` which was accepting all `ascp` options for transfer but was also able to transfer to Faspex and Shares (destination was a kind of URI for the applications).
|
@@ -3139,11 +3654,38 @@ So, it evolved into `ascli`:
|
|
3139
3654
|
* supports transfers with multiple [Transfer Agents](#agents), that's why transfer parameters moved from ascp command line to [_transfer-spec_](#transferspec) (more reliable , more standard)
|
3140
3655
|
* `ruby` is consistent with other Aspera products
|
3141
3656
|
|
3142
|
-
|
3143
|
-
|
3144
|
-
|
3145
|
-
|
3146
|
-
*
|
3657
|
+
# Changes (Release notes)
|
3658
|
+
|
3659
|
+
* 4.2.0
|
3660
|
+
|
3661
|
+
* new: command `aoc remind` to receive organization membership by email
|
3662
|
+
* new: in `preview` option `value` to filter out on file name
|
3663
|
+
* new: `initdemo` to initialize for demo server
|
3664
|
+
* new: `direct` transfer agent options: `spawn_timeout_sec` and `spawn_delay_sec`
|
3665
|
+
* fix: on Windows `conf ascp use` expects ascp.exe
|
3666
|
+
* fix: (break) multi_session_threshold is Integer, not String
|
3667
|
+
* fix: `conf ascp install` renames sdk folder if it already exists (leftover shared lib may make fail)
|
3668
|
+
* fix: removed replace_illegal_chars from default aspera.conf causing "Error creating illegal char conversion table"
|
3669
|
+
* change: (break) `aoc apiinfo` is removed, use `aoc servers` to provide the list of cloud systems
|
3670
|
+
* change: (break) parameters for resume in `transfer-info` for `direct` are now in sub-key `"resume"`
|
3671
|
+
|
3672
|
+
* 4.1.0
|
3673
|
+
|
3674
|
+
* fix: remove keys from transfer spec and command line when not needed
|
3675
|
+
* fix: default to create_dir:true so that sending single file to a folder does not rename file if folder does not exist
|
3676
|
+
* new: update documentation with regard to offline and docker installation
|
3677
|
+
* new: renamed command `nagios_check` to `health`
|
3678
|
+
* new: agent `http_gw` now supports upload
|
3679
|
+
* new: added option `sdk_url` to install SDK from local file for offline install
|
3680
|
+
* new: check new gem version periodically
|
3681
|
+
* new: the --fields= option, support -_fieldname_ to remove a field from default fields
|
3682
|
+
* new: Oauth tokens are discarded automatically after 30 minutes (useful for COS delegated refresh tokens)
|
3683
|
+
* new: mimemagic is now optional, needs manual install for `preview`, compatible with version 0.4.x
|
3684
|
+
* new: AoC a password can be provided for a public link
|
3685
|
+
* new: `conf doc` take an optional parameter to go to a section
|
3686
|
+
* new: initial support for Faspex 5 Beta 1
|
3687
|
+
|
3688
|
+
* 4.0.0
|
3147
3689
|
|
3148
3690
|
* now available as open source at [https://github.com/IBM/aspera-cli](https://github.com/IBM/aspera-cli) with general cleanup
|
3149
3691
|
* changed default tool name from `mlia` to `ascli`
|
@@ -3271,7 +3813,7 @@ So, it evolved into `ascli`:
|
|
3271
3813
|
|
3272
3814
|
* 0.10.6
|
3273
3815
|
|
3274
|
-
* FaspManager: transfer spec `authentication` no more needed for local tranfer to use
|
3816
|
+
* FaspManager: transfer spec `authentication` no more needed for local tranfer to use Aspera public keys. public keys will be used if there is a token and no key or password is provided.
|
3275
3817
|
* gem version requirements made more open
|
3276
3818
|
|
3277
3819
|
* 0.10.5
|
@@ -3498,11 +4040,15 @@ Breaking change:
|
|
3498
4040
|
|
3499
4041
|
* Breaking change: "files" application renamed to "aspera" (for "Aspera on Cloud"). "repository" renamed to "files". Default is automatically reset, e.g. in config files and change key "files" to "aspera" in [option preset](#lprt) "default".
|
3500
4042
|
|
3501
|
-
# BUGS
|
4043
|
+
# BUGS, FEATURES, CONTRIBUTION
|
3502
4044
|
|
3503
|
-
|
4045
|
+
For issues or feature requests use the Github repository and issues.
|
3504
4046
|
|
3505
|
-
|
4047
|
+
You can also contribute to this open source project.
|
4048
|
+
|
4049
|
+
One can also create one's own command nplugin.
|
4050
|
+
|
4051
|
+
## Only one value for any option
|
3506
4052
|
|
3507
4053
|
Some commands and sub commands may ask for the same option name.
|
3508
4054
|
Currently, since option definition is position independant (last one wins), it is not possible
|
@@ -3516,7 +4062,8 @@ This happens typically for the `node` sub command, e.g. identify the node by nam
|
|
3516
4062
|
|
3517
4063
|
## ED255519 key not supported
|
3518
4064
|
|
3519
|
-
|
4065
|
+
ED25519 keys are deactivated since version 0.9.24 so this type of key will just be ignored.
|
4066
|
+
|
3520
4067
|
Without this deactivation, if such key was present the following error was generated:
|
3521
4068
|
|
3522
4069
|
```
|
@@ -3526,7 +4073,17 @@ OpenSSH keys only supported if ED25519 is available
|
|
3526
4073
|
Which meant that you do not have ruby support for ED25519 SSH keys.
|
3527
4074
|
You may either install the suggested Gems, or remove your ed25519 key from your `.ssh` folder to solve the issue.
|
3528
4075
|
|
3529
|
-
|
4076
|
+
## Error "Remote host is not who we expected"
|
4077
|
+
|
4078
|
+
`ascp` version 4.x changed the algorithm used to check the SSH server certificate. To ignore the certificate (SSH fingerprint) add option on client side:
|
4079
|
+
|
4080
|
+
```
|
4081
|
+
--ts=@json:'{"sshfp":null}'
|
4082
|
+
```
|
4083
|
+
|
4084
|
+
Refer to ES-1944 in release notes of 4.1 and to [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): if you have access to server side, basically disable other SSH host keys than RSA.
|
4085
|
+
|
4086
|
+
## Miscelaneous
|
3530
4087
|
|
3531
4088
|
* remove rest and oauth classes and use ruby standard gems:
|
3532
4089
|
|
@@ -3542,9 +4099,3 @@ You may either install the suggested Gems, or remove your ed25519 key from your
|
|
3542
4099
|
* Going through proxy: use env var http_proxy and https_proxy, no_proxy
|
3543
4100
|
|
3544
4101
|
* easier use with https://github.com/pmq20/ruby-packer
|
3545
|
-
|
3546
|
-
# Contribution
|
3547
|
-
|
3548
|
-
Send comments !
|
3549
|
-
|
3550
|
-
Create your own plugin !
|