asperalm 0.11.7 → 0.99

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0732ae0627dd9619bfef274835a8066476891a677383e4fb24601c9f696da28
4
- data.tar.gz: deac831f8c65bef962034d8ee10e8c3c41036c754de48f38e9e9b05fc211337c
3
+ metadata.gz: 3df24f5c2144d0e1bfa07db6739d95ee9f75b3a9efaebe4d82d4141516f5b4bc
4
+ data.tar.gz: d52704a2456b737ba642c632361ae5ccc7f73f84ee741d0b9a9bb560d4135715
5
5
  SHA512:
6
- metadata.gz: eea3302b33932eed9a4867d1c8a7c6e8cd97895009941f4fee917ab4dd109367206967b60067212adae5dcd368659db24df8c05e4db717858f8bd5563ddc9efb
7
- data.tar.gz: 30878d93e1d1ad9340cea48f752bb98ac8a023d3ac89bfc82a62d9d678dd46700befb137b52dc92946326a7bc608b7bb85a5e4db4b0989d69decf10300952569
6
+ metadata.gz: 5a00b381893670bb3b65bdfe97ae174860091acb7a6106ea6d9c8c22c0314f5ecf5895c08d8fca97f86b18326d2e20c31ed68052a9f48531e673a6932c9e5e3b
7
+ data.tar.gz: d4ab78d69c258095882be985d644e3ac8d4479eebc69963eaec4c9dc3c42e0884f7523ff600ea3ee61786ade5cdf3be9801eb38475633b794b953099359123f9
data/README.md CHANGED
@@ -1,3624 +1,8 @@
1
- # Asperalm - A Ruby library for Aspera transfers and "Amelia", the _Multi Layer IBM Aspera_ Command Line Tool
1
+ This Gem is Deprecated.
2
2
 
3
- Version : 0.11.7
3
+ It has been replaced by gem:
4
4
 
5
+ aspera-cli
5
6
 
6
- _Laurent/2016-2020_
7
-
8
- This gem provides a ruby API to Aspera transfers and a command line interface to Aspera Applications. Location:
9
- [https://rubygems.org/gems/asperalm](https://rubygems.org/gems/asperalm)
10
-
11
- Disclaimers:
12
-
13
- * Aspera, FASP are owned by IBM
14
- * This GEM is not endorsed/supported by IBM/Aspera
15
- * Use at your risk (not in production environments)
16
- * This gem is provided as-is, and is not intended to be a complete CLI, or industry-grade product.
17
- * some features may not be fully validated
18
- * IBM provides an officially supported Aspera CLI: [http://downloads.asperasoft.com/en/downloads/62](http://downloads.asperasoft.com/en/downloads/62) .
19
-
20
- That being said, `mlia` is very powerful and gets things done, it's also a great tool to learn Aspera APIs.
21
-
22
- This manual addresses three parts:
23
-
24
- * `mlia` : ("Amelia") The Multi Layer IBM Aspera tool
25
- * `asession` : starting a FASP Session with JSON parameters
26
- * `Asperalm` : includes a Ruby "FASPManager"
27
-
28
- In examples, command line operations (starting with `$`) are shown using a standard shell: `bash`.
29
-
30
- Command line parameters in example beginning with `my_`, like `my_param_value` are user proviuded value and not fixed value commands.
31
-
32
- # Quick Start
33
-
34
- This section guides you from installation, first use and advanced use.
35
-
36
- First, follow the section: [Installation](#installation) (Ruby, Gem, FASP) to start using `mlia`.
37
-
38
- Once the gem is installed, `mlia` shall be accessible:
39
-
40
- ```
41
- $ mlia --version
42
- 0.11.7
43
- ```
44
-
45
- ## First use
46
-
47
- Once installation is completed, you can proceed to the first use with a demo server:
48
-
49
- If you want to test with Aspera on Cloud, jump to section: [Wizard](#aocwizard)
50
-
51
- If you want to test with Aspera demo transfer server:
52
-
53
- ```
54
- $ mlia server browse / --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=demoaspera
55
- :............:...........:......:........:...........................:.......................:
56
- : zmode : zuid : zgid : size : mtime : name :
57
- :............:...........:......:........:...........................:.......................:
58
- : dr-xr-xr-x : asperaweb : fasp : 4096 : 2014-04-10 19:44:05 +0200 : aspera-test-dir-tiny :
59
- : drwxr-xr-x : asperaweb : fasp : 176128 : 2018-03-15 12:20:10 +0100 : Upload :
60
- : dr-xr-xr-x : asperaweb : fasp : 4096 : 2015-04-01 00:37:22 +0200 : aspera-test-dir-small :
61
- : dr-xr-xr-x : asperaweb : fasp : 4096 : 2018-05-04 14:26:55 +0200 : aspera-test-dir-large :
62
- :............:...........:......:........:...........................:.......................:
63
- ```
64
-
65
- In order to make further calls more convenient, it is advised to define a [option preset](#lprt) for the servers identification options. The following example will:
66
-
67
- * create a [option preset](#lprt)
68
- * define it as default for "server" plugin
69
- * list files in a folder
70
- * download a file
71
-
72
- ```
73
- $ mlia config id demoserver update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=demoaspera
74
- updated: demoserver
75
- $ mlia config id default set server demoserver
76
- updated: default→server to demoserver
77
- $ mlia server browse /aspera-test-dir-large
78
- :............:...........:......:..............:...........................:............................:
79
- : zmode : zuid : zgid : size : mtime : name :
80
- :............:...........:......:..............:...........................:............................:
81
- : -rw-rw-rw- : asperaweb : fasp : 10133504 : 2018-05-04 14:16:24 +0200 : ctl_female_2.fastq.partial :
82
- : -rw-r--r-- : asperaweb : fasp : 209715200 : 2014-04-10 19:49:27 +0200 : 200MB :
83
- : -rw-r--r-- : asperaweb : fasp : 524288000 : 2014-04-10 19:44:15 +0200 : 500MB :
84
- : -rw-r--r-- : asperaweb : fasp : 5368709120 : 2014-04-10 19:45:52 +0200 : 5GB :
85
- : -rw-r--r-- : asperaweb : fasp : 500000000000 : 2017-06-14 20:09:57 +0200 : 500GB :
86
- : -rw-rw-rw- : asperaweb : fasp : 13606912 : 2018-05-04 14:20:21 +0200 : ctl_male_2.fastq.partial :
87
- : -rw-rw-rw- : asperaweb : fasp : 76 : 2018-05-04 14:13:18 +0200 : ctl_female_2.fastq.haspx :
88
- : -rw-rw-rw- : asperaweb : fasp : 647348 : 2018-05-04 14:26:39 +0200 : ctl_female_2.gz :
89
- : -rw-rw-rw- : asperaweb : fasp : 74 : 2018-05-04 14:16:00 +0200 : ctl_male_2.fastq.haspx :
90
- : -rw-r--r-- : asperaweb : fasp : 1048576000 : 2014-04-10 19:49:23 +0200 : 1GB :
91
- : -rw-r--r-- : asperaweb : fasp : 104857600 : 2014-04-10 19:49:29 +0200 : 100MB :
92
- : -rw-r--r-- : asperaweb : fasp : 10737418240 : 2014-04-10 19:49:04 +0200 : 10GB :
93
- :............:...........:......:..............:...........................:............................:
94
- $ mlia server download /aspera-test-dir-large/200MB
95
- Time: 00:00:02 ========================================================================================================== 100% 100 Mbps Time: 00:00:00
96
- complete
97
- ```
98
-
99
- ## Going further
100
-
101
- Get familiar with configuration, options, commands : [Command Line Interface](#cli).
102
-
103
- Then, follow the section relative to the product you want to interact with ( Aspera on Cloud, Faspex, ...) : [Application Plugins](plugins)
104
-
105
- # <a name="installation"></a>Installation
106
-
107
- In order to use the tool or the gem, it is necessary to install those components:
108
-
109
- * [Ruby](#ruby)
110
- * [asperalm](#the_gem)
111
- * [FASP](#fasp_prot)
112
-
113
- The following sections provide information on the installation.
114
-
115
- ## <a name="ruby"></a>Ruby
116
-
117
- A ruby interpreter is required to run the tool or to use the gem and tool.
118
- It is required to have privilege to install gems.
119
- Ruby 2.5+ is prefered, but it should also work with 2.1+.
120
- Any type of Ruby installation can be used.
121
-
122
- Refer to the following sections for a proposed method for specific operating systems.
123
-
124
- ### macOS
125
-
126
- Install Ruby using "homebrew" from here: [https://brew.sh/](https://brew.sh/).
127
-
128
- Then install latest Ruby:
129
-
130
- ```
131
- $ brew install ruby
132
- ```
133
-
134
- Alternatively, Ruby came pre-installed on macOS (but maybe not on more modern versions).
135
- Starting with Macos Sierra, the version of Ruby is high enough.
136
- In that case, installation of the gem requires: `sudo gem install asperalm`.
137
-
138
- ### Windows
139
-
140
- Install Latest stable Ruby using [https://rubyinstaller.org/](https://rubyinstaller.org/).
141
-
142
- Go to "Downloads".
143
-
144
- Select the version "without devkit", x64 corresponding to the one recommended "with devkit".
145
-
146
- During installation, skip the installation of "MSys2".
147
-
148
- ### Linux
149
-
150
- Install Latest Ruby using "rvm" [https://rvm.io/](https://rvm.io/) .
151
- It installs by default in /usr/local/rvm , but you can install in another location:
152
-
153
- ```
154
- curl -sSL https://get.rvm.io | bash -s -- --path /my/special/path
155
- ```
156
-
157
- Once installed, you can install latest ruby:
158
-
159
- ```
160
- # rvm install ruby
161
- ```
162
-
163
- If you dont want all users to have ruby by default,
164
- rename the file: `/etc/profile.d/rvm.sh` with another extension, and source it to get rvm.
165
-
166
- Alternatively, only if you know what you do, on RPM based systems (CentOs, Redhat), install the ruby provided by yum which may be 2.0.
167
-
168
- ```
169
- # yum install -y ruby rubygems ruby-json
170
- ```
171
-
172
- If necessary, pre-install jwt for older Ruby < 2.1.
173
-
174
- ```
175
- # gem install jwt -v 1.5.6
176
- ```
177
-
178
- You can cleanup your whole yum-installed ruby environment like this to uninstall:
179
-
180
- ```
181
- gem uninstall $(ls $(gem env gemdir)/gems/|sed -e 's/-[^-]*$//'|sort -u)
182
- yum remove -y ruby ruby-libs
183
- ```
184
-
185
- ### Other Unixes: Aix, etc...
186
-
187
- If your unix do not provide a pre-built ruby, you can get using one of those
188
- [methods](https://www.ruby-lang.org/en/documentation/installation/)
189
-
190
-
191
- For instance to build from source, and install in `/opt/ruby` :
192
-
193
- ```
194
- # wget https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz
195
- # gzip -d ruby-2.7.2.tar.gz
196
- # tar xvf ruby-2.7.2.tar
197
- # cd ruby-2.7.2
198
- # ./configure --prefix=/opt/ruby
199
- # make ruby.imp
200
- # make
201
- # make install
202
- ```
203
-
204
- ## <a name="the_gem"></a>`asperalm` gem
205
-
206
- Once you have Ruby and rights to install gems: Install the gem and its dependencies:
207
-
208
- ```
209
- # gem install asperalm
210
- ```
211
-
212
- To upgrade to the latest version:
213
-
214
- ```
215
- # gem update asperalm
216
- ```
217
-
218
- ## <a name="fasp_prot"></a>FASP Protocol
219
-
220
- Most file transfers will be done using the FASP protocol. Only two additional files are required to perform
221
- an Aspera Transfer:
222
-
223
- * ascp
224
- * aspera-license (in same folder, or ../etc)
225
-
226
- Those can be found in one of IBM Asprea transfer server or client with its license file (some are free):
227
-
228
- * IBM Aspera Connect Client (Free)
229
- * IBM Aspera Desktop Client (Free)
230
- * IBM Aspera CLI (Free)
231
- * IBM Aspera High Speed Transfer Server (Licensed)
232
- * IBM Aspera High Speed Transfer EndPoint (Licensed)
233
-
234
- For instance, Aspera Connect Client can be installed
235
- by visiting the page: [http://downloads.asperasoft.com/connect2/](http://downloads.asperasoft.com/connect2/).
236
-
237
- `mlia` will detect most of Aspera transfer products in standard locations and use the first one found.
238
- Refer to section [FASP](#client) for details on how to select a client or set path to the FASP protocol.
239
-
240
- Several methods are provided on how to start a transfer. Use of a local client is one of them, but
241
- other methods are available. Refer to section: [Transfer Agents](#agents)
242
-
243
- # <a name="cli"></a>Command Line Interface: `mlia`
244
-
245
- The `asperalm` Gem provides a command line interface (CLI) which interacts with Aspera Products (mostly using REST APIs):
246
-
247
- * IBM Aspera High Speed Transfer Server (FASP and Node)
248
- * IBM Aspera on Cloud (including ATS)
249
- * IBM Aspera Faspex
250
- * IBM Aspera Shares
251
- * IBM Aspera Console
252
- * IBM Aspera Orchestrator
253
- * and more...
254
-
255
- `mlia` provides the following features:
256
-
257
- * Supports most Aspera server products (on-premise and SaaS)
258
- * Any command line options (products URL, credentials or any option) can be provided on command line, in configuration file, in env var, in files
259
- * Supports Commands, Option values and Parameters shortcuts
260
- * FASP [Transfer Agents](#agents) can be: FaspManager (local ascp), or Connect Client, or any transfer node
261
- * Transfer parameters can be altered by modification of _transfer-spec_, this includes requiring multi-session
262
- * Allows transfers from products to products, essentially at node level (using the node transfer agent)
263
- * Supports FaspStream creation (using Node API)
264
- * Supports Watchfolder creation (using Node API)
265
- * Additional command plugins can be written by the user
266
- * Supports download of faspex and Aspera on Cloud "external" links
267
- * Supports "legacy" ssh based FASP transfers and remote commands (ascmd)
268
-
269
- Basic usage is displayed by executing:
270
-
271
- ```
272
- $ mlia -h
273
- ```
274
-
275
- Refer to sections: [Usage](#usage) and [Sample Commands](#commands).
276
-
277
- Not all `mlia` features are fully documented here, the user may explore commands on the command line.
278
-
279
- ## Arguments : Commands and options
280
-
281
- Arguments are the units of command line, as parsed by the shell, typically separated by spaces (and called "argv").
282
-
283
- There are two types of arguments: Commands and Options. Example :
284
-
285
- ```
286
- $ mlia command --option-name=VAL1 VAL2
287
- ```
288
-
289
- * executes _command_: `command`
290
- * with one _option_: `option_name`
291
- * this option has a _value_ of: `VAL1`
292
- * the command has one additional _argument_: `VAL2`
293
-
294
- When the value of a command, option or argument is constrained by a fixed list of values, it is possible to use the first letters of the value only, provided that it uniquely identifies a value. For example `mlia conf ov` is the same as `mlia config overview`.
295
-
296
- The value of options and arguments is evaluated with the [Extended Value Syntax](#extended).
297
-
298
- ### Options
299
-
300
- All options, e.g. `--log-level=debug`, are command line arguments that:
301
-
302
- * start with `--`
303
- * have a name, in lowercase, using `-` as word separator in name (e.g. `--log-level=debug`)
304
- * have a value, separated from name with a `=`
305
- * can be used by prefix, provided that it is unique. E.g. `--log-l=debug` is the same as `--log-level=debug`
306
-
307
- Exceptions:
308
-
309
- * some options accept a short form, e.g. `-Ptoto` is equivalent to `--preset=toto`, refer to the manual or `-h`.
310
- * some options (flags) don't take a value, e.g. `-r`
311
- * the special option `--` stops option processing and is ignored, following command line arguments are taken as arguments, including the ones starting with a `-`. Example:
312
-
313
- ```
314
- $ mlia config echo -- --sample
315
- "--sample"
316
- ```
317
-
318
- Note that `--sample` is taken as an argument, and not option.
319
-
320
- Options can be optional or mandatory, with or without (hardcoded) default value. Options can be placed anywhere on comand line and evaluated in order.
321
-
322
- The value for _any_ options can come from the following locations (in this order, last value evaluated overrides previous value):
323
-
324
- * [Configuration file](#configfile).
325
- * Environment variable
326
- * Command line
327
-
328
- Environment variable starting with prefix: MLIA_ are taken as option values,
329
- e.g. `MLIA_OPTION_NAME` is for `--option-name`.
330
-
331
- Options values can be displayed for a given command by providing the `--show-config` option: `mlia node --show-config`
332
-
333
- ### Commands and Arguments
334
-
335
- Command line arguments that are not options are either commands or arguments. If an argument must begin with `-`, then either use the `@val:` syntax (see [Extended Values](#extended)), or use the `--` separator (see above).
336
-
337
- ## Interactive Input
338
-
339
- Some options and parameters are mandatory and other optional. By default, the tool will ask for missing mandatory options or parameters for interactive execution.
340
-
341
- The behaviour can be controlled with:
342
-
343
- * --interactive=&lt;yes|no&gt; (default=yes if STDIN is a terminal, else no)
344
- * yes : missing mandatory parameters/options are asked to the user
345
- * no : missing mandatory parameters/options raise an error message
346
- * --ask-options=&lt;yes|no&gt; (default=no)
347
- * optional parameters/options are asked to user
348
-
349
- ## Output
350
-
351
- Command execution will result in output (terminal, stdout/stderr).
352
- The information displayed depends on the action.
353
-
354
- ### Types of output data
355
-
356
- Depending on action, the output will contain:
357
-
358
- * `single_object` : displayed as a 2 dimensional table: one line per attribute, first column is attribute name, and second is atteribute value. Nested hashes are collapsed.
359
- * `object_list` : displayed as a 2 dimensional table: one line per item, one colum per attribute.
360
- * `value_list` : a table with one column.
361
- * `empty` : nothing
362
- * `status` : a message
363
- * `other_struct` : a complex structure that cannot be displayed as an array
364
-
365
- ### Format of output
366
-
367
- By default, result of type single_object and object_list are displayed using format `table`.
368
- The table style can be customized with parameter: `table_style` (horizontal, vertical and intersection characters) and is `:.:` by default.
369
-
370
- In a table format, when displaying "objects" (single, or list), by default, sub object are
371
- flatten (option flat_hash). So, object {"user":{"id":1,"name":"toto"}} will have attributes: user.id and user.name. Setting `flat_hash` to `false` will only display one
372
- field: "user" and value is the sub hash table. When in flatten mode, it is possible to
373
- filter fields by "dotted" field name.
374
-
375
- The style of output can be set using the `format` parameter, supporting:
376
-
377
- * `table` : Text table
378
- * `ruby` : Ruby code
379
- * `json` : JSON code
380
- * `jsonpp` : JSON pretty printed
381
- * `yaml` : YAML
382
- * `csv` : Comma Separated Values
383
-
384
- ### Filtering columns for `object_list`
385
-
386
- Table output can be filtered using the `select` parameter. Example:
387
-
388
- ```
389
- $ mlia aspera admin res user list --fields=name,email,ats_admin --query=@json:'{"per_page":1000,"page":1,"sort":"name"}' --select=@json:'{"ats_admin":true}'
390
- :...............................:..................................:...........:
391
- : name : email : ats_admin :
392
- :...............................:..................................:...........:
393
- : John Custis : john@example.com : true :
394
- : Laurent Martin : laurent@example.com : true :
395
- :...............................:..................................:...........:
396
- ```
397
-
398
- Note that `select` filters selected elements from the result of API calls, while the `query` parameters gives filtering parameters to the API when listing elements.
399
-
400
- ### Verbosity of output
401
-
402
- Outpout messages are categorized in 3 types:
403
-
404
- * `info` output contain additional information, such as number of elements in a table
405
- * `data` output contain the actual output of the command (object, or list of objects)
406
- * `error`output contain error messages
407
-
408
- The option `display` controls the level of output:
409
-
410
- * `info` displays all messages
411
- * `data` display `data` and `error` messages
412
- * `error` display only error messages.
413
-
414
- ### Selection of output object properties
415
-
416
- By default, a table output will display one line per entry, and columns for each entries. Depending on the command, columns may include by default all properties, or only some selected properties. It is possible to define specific colums to be displayed, by setting the `fields` option to one of the following value:
417
-
418
- * DEF : default display of columns (that's the default, when not set)
419
- * ALL : all columns available
420
- * a,b,c : the list of attributes specified by the comma separated list
421
- * Array extended value: for instance, @json:'["a","b","c"]' same as above
422
- * +a,b,c : add selected properties to the default selection.
423
-
424
- ## <a name="extended"></a>Extended Value Syntax
425
-
426
- Usually, values of options and arguments are specified by a simple string. But sometime it is convenient to read a value from a file, or decode it, or have a value more complex than a string (e.g. Hash table).
427
-
428
- The extended value syntax is:
429
-
430
- ```
431
- <0 or more decoders><0 or 1 reader><nothing or some text value>
432
- ```
433
-
434
- 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.
435
-
436
- The following "readers" are supported:
437
-
438
- * @val:VALUE , prevent further special prefix processing, e.g. `--username=@val:laurent` sets the option `username` to value `laurent`.
439
- * @file:PATH , read value from a file (prefix "~/" is replaced with the users home folder), e.g. --key=@file:~/.ssh/mykey
440
- * @path:PATH , performs path expansion (prefix "~/" is replaced with the users home folder), e.g. --config-file=@path:~/sample_config.yml
441
- * @env:ENVVAR , read from a named env var, e.g.--password=@env:MYPASSVAR
442
- * @stdin: , read from stdin (no value on right)
443
- * @preset:NAME , get whole option preset value by name
444
-
445
- In addition it is possible to decode a value, using one or multiple decoders :
446
-
447
- * @base64: decode a base64 encoded string
448
- * @json: decode JSON values (convenient to provide complex structures)
449
- * @zlib: uncompress data
450
- * @ruby: execute ruby code
451
- * @csvt: decode a titled CSV value
452
- * @lines: split a string in multiple lines and return an array
453
- * @list: split a string in multiple items taking first character as separator and return an array
454
- * @incps: include values of presets specified by key include_presets in hash
455
-
456
- To display the result of an extended value, use the `config echo` command.
457
-
458
- Example: read the content of the specified file, then, base64 decode, then unzip:
459
-
460
- ```
461
- $ mlia config echo @zlib:@base64:@file:myfile.dat
462
- ```
463
-
464
- Example: create a value as a hash, with one key and the value is read from a file:
465
-
466
- ```
467
- $ mlia config echo @ruby:'{"token_verification_key"=>File.read("pubkey.txt")}'
468
- ```
469
-
470
- Example: read a csv file and create a list of hash for bulk provisioning:
471
-
472
- ```
473
- $ cat test.csv
474
- name,email
475
- lolo,laurent@example.com
476
- toto,titi@tutu.tata
477
- $ mlia config echo @csvt:@file:test.csv
478
- :......:.....................:
479
- : name : email :
480
- :......:.....................:
481
- : lolo : laurent@example.com :
482
- : toto : titi@tutu.tata :
483
- :......:.....................:
484
- ```
485
-
486
- Example: create a hash and include values from preset named "config" of config file
487
-
488
- ```
489
- $ mlia config echo @incps:@json:'{"hello":true,"incps":["config"]}'
490
- {"version"=>"0.9", "hello"=>true}
491
- ```
492
-
493
- Note that `@incps:@json:'{"incps":["config"]}'` or `@incps:@ruby:'{"incps"=>["config"]}'` is equivalent to: `@preset:config`
494
-
495
- ## <a name="native"></a>Structured Value
496
-
497
- Some options and parameters expect a _Structured Value_, i.e. a value more complex than a simple string. This is usually a Hash table or an Array, which could also contain sub structures.
498
-
499
- For instance, a [_transfer-spec_](#transferspec) is expected to be a _Structured Value_.
500
-
501
- Structured values shall be described using the [Extended Value Syntax](#extended).
502
- A convenient way to specify a _Structured Value_ is to use the `@json:` decoder, and describe the value in JSON format. The `@ruby:` decoder can also be used. For an array of hash tables, the `@csvt:` decoder can be used.
503
-
504
- It is also possible to provide a _Structured Value_ in a file using `@json:@file:<path>`
505
-
506
- ## <a name="conffolder"></a>Configuration and Persistency Folder
507
-
508
- `mlia` configuration and other runtime files (token cache, file lists, persistency files)
509
- are stored in folder `$HOME/.aspera/mlia`. The folder can be displayed using :
510
-
511
- ```
512
- $ mlia config folder
513
- /Users/laurent/.aspera/mlia
514
- ```
515
-
516
- ## <a name="configfile"></a>Configuration file
517
-
518
- On the first execution of `mlia`, an empty configuration file is created in the configuration folder.
519
- Nevertheless, there is no mandatory information required in this file, the use of it is optional as any option can be provided on the command line.
520
-
521
- Although the file is a standard YAML file, `mlia` provides commands to read and modify it
522
- using the `config` command.
523
-
524
- All options for `mlia` commands can be set on command line, or by env vars, or using [option presets](#lprt) in the configuratin file.
525
-
526
- A configuration file provides a way to define default values, especially
527
- for authentication parameters, thus avoiding to always having to specify those parameters on the command line.
528
-
529
- The default configuration file is: `$HOME/.aspera/mlia/config.yaml`
530
- (this can be overriden with option `--config-file=path` or equivalent env var).
531
-
532
- So, finally, the configuration file is simply a catalog of pre-defined lists of options,
533
- called: [option presets](#lprt). Then, instead of specifying some common options on the command line (e.g. address, credentials), it is possible to invoke the ones of a [option preset](#lprt) (e.g. `mypreset`) using the option: `-Pmypreset` or `--preset=mypreset`.
534
-
535
- ### <a name="lprt"></a>Option preset
536
-
537
- A [option preset](#lprt) is simply a collection of parameters and their associated values in a named section in the configuration file.
538
-
539
- A named [option preset](#lprt) can be modified directly using `mlia`, which will update the configuration file :
540
-
541
- ```
542
- $ mlia config id <option preset> set|delete|show|initialize|update
543
- ```
544
-
545
- The command `update` allows the easy creation of [option preset](#lprt) by simply providing the options in their command line format, e.g. :
546
-
547
- ```
548
- $ mlia config id demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=demoaspera --ts=@json:'{"precalculate_job_size":true}'
549
- ```
550
-
551
- * This creates a [option preset](#lprt) `demo_server` with all provided options.
552
-
553
- The command `set` allows setting individual options in a [option preset](#lprt).
554
-
555
- ```
556
- $ mlia config id demo_server set password demoaspera
557
- ```
558
-
559
- 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)_.
560
-
561
- ```
562
- $ mlia config id demo_server initialize @json:'{"url":"ssh://demo.asperasoft.com:33001","username":"asperaweb","password":"demoaspera","ts":{"precalculate_job_size":true}}'
563
- ```
564
-
565
- A good practice is to not manually edit the configuration file and use modification commands instead.
566
- If necessary, the configuration file can be edited (or simply consulted) with:
567
-
568
- ```
569
- $ mlia config open
570
- ```
571
-
572
- A full terminal based overview of the configuration can be displayed using:
573
-
574
- ```
575
- $ mlia config over
576
- ```
577
-
578
- A list of [option preset](#lprt) can be displayed using:
579
-
580
- ```
581
- $ mlia config list
582
- ```
583
-
584
- ### <a name="lprtconf"></a>Special Option preset: config
585
-
586
- This preset name is reserved and contains a single key: `version`. This is the version of Amelia which created the file.
587
-
588
- ### <a name="lprtdef"></a>Special Option preset: default
589
-
590
- This preset name is reserved and contains an array of key-value , where the key is the name of a plugin, and the value is the name of another preset.
591
-
592
- When a plugin is invoked, the preset associated with the name of the plugin is loaded, unless the option --no-default (or -N) is used.
593
-
594
- Note that special plugin name: `config` can be associated with a preset that is loaded initially, typically used for default values.
595
-
596
- Operations on this preset are done using regular `config` operations:
597
-
598
- ```
599
- $ mlia config id default set _plugin_name_ _defauklt_preset_for_plugin_
600
- $ mlia config id default get _plugin_name_
601
- "_defauklt_preset_for_plugin_"
602
- ```
603
-
604
- ### Format of file
605
-
606
- The configuration file is a hash in a YAML file. Example:
607
-
608
- ```yaml
609
- config:
610
- version: 0.3.7
611
- default:
612
- config: cli_default
613
- server: demo_server
614
- cli_default:
615
- interactive: no
616
- demo_server:
617
- url: ssh://demo.asperasoft.com:33001
618
- username: asperaweb
619
- password: demoaspera
620
- ```
621
-
622
- We can see here:
623
-
624
- * The configuration was created with CLI version 0.3.7
625
- * the default [option preset](#lprt) to load for plugin "server" is : `demo_server`
626
- * the [option preset](#lprt) `demo_server` defines some parameters: the URL and credentials
627
- * the default [option preset](#lprt) to load in any case is : `cli_default`
628
-
629
- Two [option presets](#lprt) are reserved:
630
-
631
- * `config` contains a single value: `version` showing the CLI
632
- version used to create the configuration file. It is used to check compatibility.
633
- * `default` is reserved to define the default [option preset](#lprt) name used for known plugins.
634
-
635
- The user may create as many [option presets](#lprt) as needed. For instance, a particular [option preset](#lprt) can be created for a particular application instance and contain URL and credentials.
636
-
637
- Values in the configuration also follow the [Extended Value Syntax](#extended).
638
-
639
- Note: if the user wants to use the [Extended Value Syntax](#extended) inside the configuration file, using the `config id update` command, the user shall use the `@val:` prefix. Example:
640
-
641
- ```
642
- $ mlia config id my_aoc_org set private_key @val:@file:"$HOME/.aspera/mlia/aocapikey"
643
- ```
644
-
645
- This creates the [option preset](#lprt):
646
-
647
- ```
648
- ...
649
- my_aoc_org:
650
- private_key: @file:"/Users/laurent/.aspera/mlia/aocapikey"
651
- ...
652
- ```
653
-
654
- So, the key file will be read only at execution time, but not be embedded in the configuration file.
655
-
656
- Options are loaded using this algorithm:
657
-
658
- * if option '--preset=xxxx' is specified (or -Pxxxx), this reads the [option preset](#lprt) specified from the configuration file.
659
- * else if option --no-default (or -N) is specified, then dont load default
660
- * else it looks for the name of the default [option preset](#lprt) in section "default" and loads it
661
- * environment variables are evaluated
662
- * command line options are evaluated
663
-
664
- Parameters are evaluated in the order of command line.
665
-
666
- To avoid loading the default [option preset](#lprt) for a plugin, just specify a non existing configuration: `-Pnone`
667
-
668
- On command line, words in parameter names are separated by a dash, in configuration file, separator
669
- is an underscore. E.g. --xxx-yyy on command line gives xxx_yyy in configuration file.
670
-
671
- Note: before version 0.4.5, some keys could be ruby symbols, from 0.4.5 all keys are strings. To
672
- convert olver versions, remove the leading ":" in front of keys.
673
-
674
- The main plugin name is *config*, so it is possible to define a default [option preset](#lprt) for
675
- the main plugin with:
676
-
677
- ```
678
- $ mlia config id cli_default set interactive no
679
- $ mlia config id default set config cli_default
680
- ```
681
-
682
- A [option preset](#lprt) value can be removed with `unset`:
683
-
684
- ```
685
- $ mlia config id cli_default unset interactive
686
- ```
687
-
688
-
689
- ### Examples
690
-
691
- For Faspex, Shares, Node (including ATS, Aspera Transfer Service), Console,
692
- only username/password and url are required (either on command line, or from config file).
693
- Those can usually be provided on the command line:
694
-
695
- ```
696
- $ mlia shares repo browse / --url=https://10.25.0.6 --username=john --password=4sp3ra
697
- ```
698
-
699
- This can also be provisioned in a config file:
700
-
701
- ```
702
- 1$ mlia config id shares06 set url https://10.25.0.6
703
- 2$ mlia config id shares06 set username john
704
- 3$ mlia config id shares06 set password 4sp3ra
705
- 4$ mlia config id default set shares shares06
706
- 5$ mlia config overview
707
- 6$ mlia shares repo browse /
708
- ```
709
-
710
- The three first commands build a [option preset](#lprt).
711
- Note that this can also be done with one single command:
712
-
713
- ```
714
- $ mlia config id shares06 init @json:'{"url":"https://10.25.0.6","username":"john","password":"4sp3ra"}'
715
- ```
716
-
717
- The fourth command defines this [option preset](#lprt) as the default [option preset](#lprt) for the
718
- specified application ("shares"). The 5th command displays the content of configuration file in table format.
719
- Alternative [option presets](#lprt) can be used with option "-P&lt;[option preset](#lprt)&gt;"
720
- (or --preset=&lt;[option preset](#lprt)&gt;)
721
-
722
- Eventually, the last command shows a call to the shares application using default parameters.
723
-
724
-
725
- ## Plugins
726
-
727
- The CLI tool uses a plugin mechanism. The first level command (just after `mlia` on the command line) is the name of the concerned plugin which will execute the command. Each plugin usually represent commands sent to a specific application.
728
- For instance, the plugin "faspex" allows operations on the application "Aspera Faspex".
729
-
730
- ### Create your own plugin
731
- ```
732
- $ mkdir -p ~/.aspera/mlia/plugins
733
- $ cat<<EOF>~/.aspera/mlia/plugins/test.rb
734
- require 'asperalm/cli/plugin'
735
- module Asperalm
736
- module Cli
737
- module Plugins
738
- class Test < Plugin
739
- ACTIONS=[]
740
- def execute_action; puts "Hello World!"; end
741
- end # Test
742
- end # Plugins
743
- end # Cli
744
- end # Asperalm
745
- EOF
746
- ```
747
-
748
- ## Debugging
749
-
750
- 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 `MLIA_LOG_LEVEL`.
751
-
752
- ## Learning Aspera Product APIs (REST)
753
-
754
- This CLI uses REST APIs.
755
- To display HTTP calls, use argument `-r` or `--rest-debug`, this is useful to display
756
- exact content or HTTP requests and responses.
757
-
758
- In order to get traces of execution, use argument : `--log-level=debug`
759
-
760
- ## <a name="graphical"></a>Graphical Interactions: Browser and Text Editor
761
-
762
- Some actions may require the use of a graphical tool:
763
-
764
- * a browser for Aspera on Cloud authentication (web auth method)
765
- * a text editor for configuration file edition
766
-
767
- By default the CLI will assume that a graphical environment is available on windows,
768
- and on other systems, rely on the presence of the "DISPLAY" environment variable.
769
- It is also possible to force the graphical mode with option --ui :
770
-
771
- * `--ui=graphical` forces a graphical environment, a browser will be opened for URLs or
772
- a text editor for file edition.
773
- * `--ui=text` forces a text environment, the URL or file path to open is displayed on
774
- terminal.
775
-
776
- ## HTTP proxy for REST
777
-
778
- To specify a HTTP proxy, set the HTTP_PROXY environment variable (or HTTPS_PROXY), those are honoured by Ruby when calling REST APIs.
779
-
780
- ## Proxy auto config
781
-
782
- The `fpac` option allows specification of a Proxy Auto Configuration (PAC) file, by its URL for local FASP agent. Supported schemes are : http:, https: and file:.
783
-
784
- The PAC file can be tested with command: `config proxy_check` , example:
785
-
786
- ```
787
- $ mlia config proxy_check --fpac=file:///./proxy.pac http://www.example.com
788
- PROXY proxy.example.com:8080
789
- ```
790
-
791
- This is not yet implemented to specify http proxy, so use `http_proxy` env vars.
792
-
793
- ## <a name="client"></a>FASP configuration
794
-
795
- The `config` plugin also allows specification for the use of a local FASP client. It provides the following commands for `ascp` subcommand:
796
-
797
- * `show` : shows the path of ascp used
798
- * `use` : list,download connect client versions available on internet
799
- * `products` : list Aspera transfer products available locally
800
- * `connect` : list,download connect client versions available on internet
801
-
802
- ### Show path of currently used `ascp`
803
-
804
- ```
805
- $ mlia config ascp show
806
- /Users/laurent/Applications/Aspera Connect.app/Contents/Resources/ascp
807
- ```
808
-
809
- ### Selection of local `ascp`
810
-
811
- To temporarily use an alternate ascp path use option `ascp_path` (`--ascp-path=`)
812
-
813
- To permanently use another ascp:
814
-
815
- ```
816
- $ mlia config ascp use '/Users/laurent/Applications/Aspera CLI/bin/ascp'
817
- saved to default global preset /Users/laurent/Applications/Aspera CLI/bin/ascp
818
- ```
819
-
820
- This sets up a global default.
821
-
822
- ### List locally installed Aspera Transfer products
823
-
824
- Locally installed Aspera products can be listed with:
825
-
826
- ```
827
- $ mlia config ascp products list
828
- :.........................................:................................................:
829
- : name : app_root :
830
- :.........................................:................................................:
831
- : Aspera Connect : /Users/laurent/Applications/Aspera Connect.app :
832
- : IBM Aspera CLI : /Users/laurent/Applications/Aspera CLI :
833
- : IBM Aspera High-Speed Transfer Endpoint : /Library/Aspera :
834
- : Aspera Drive : /Applications/Aspera Drive.app :
835
- :.........................................:................................................:
836
- ```
837
-
838
- ### Selection of local client
839
-
840
- If no ascp is selected, this is equivalent to using option: `--use-product=FIRST`.
841
-
842
- Using the option use_product finds the ascp binary of the selected product.
843
-
844
- To permanently use the ascp of a product:
845
-
846
- ```
847
- $ mlia config ascp products use 'Aspera Connect'
848
- saved to default global preset /Users/laurent/Applications/Aspera Connect.app/Contents/Resources/ascp
849
- ```
850
-
851
- ### Installation of Connect Client on command line
852
-
853
- ```
854
- $ mlia config ascp connect list
855
- :...............................................:......................................:..............:
856
- : id : title : version :
857
- :...............................................:......................................:..............:
858
- : urn:uuid:589F9EE5-0489-4F73-9982-A612FAC70C4E : Aspera Connect for Windows : 3.7.0.138427 :
859
- : urn:uuid:A3820D20-083E-11E2-892E-0800200C9A66 : Aspera Connect for Windows 64-bit : 3.7.0.138427 :
860
- : urn:uuid:589F9EE5-0489-4F73-9982-A612FAC70C4E : Aspera Connect for Windows XP : 3.7.0.138427 :
861
- : urn:uuid:55425020-083E-11E2-892E-0800200C9A66 : Aspera Connect for Windows XP 64-bit : 3.7.0.138427 :
862
- : urn:uuid:D8629AD2-6898-4811-A46F-2AF386531BFF : Aspera Connect for Mac Intel 10.6 : 3.6.1.111259 :
863
- : urn:uuid:D8629AD2-6898-4811-A46F-2AF386531BFF : Aspera Connect for Mac Intel : 3.7.0.138427 :
864
- : urn:uuid:213C9370-22B1-11E2-81C1-0800200C9A66 : Aspera Connect for Linux 32 : 3.6.2.117442 :
865
- : urn:uuid:97F94DF0-22B1-11E2-81C1-0800200C9A66 : Aspera Connect for Linux 64 : 3.7.2.141527 :
866
- :...............................................:......................................:..............:
867
- $ mlia config ascp connect id 'Aspera Connect for Mac Intel 10.6' links list
868
- :.............................................:..........................:.......................................................................:..........:...............:
869
- : title : type : href : hreflang : rel :
870
- :.............................................:..........................:.......................................................................:..........:...............:
871
- : Mac Intel Installer : application/octet-stream : bin/AsperaConnect-3.6.1.111259-mac-intel-10.6.dmg : en : enclosure :
872
- : Aspera Connect for Mac HTML Documentation : text/html : : en : documentation :
873
- : Aspera Connect PDF Documentation for Mac OS : application/pdf : docs/user/osx/ja-jp/pdf/Connect_User_3.7.0_OSX_ja-jp.pdf : ja-jp : documentation :
874
- : Aspera Connect PDF Documentation for Mac OS : application/pdf : docs/user/osx/en/pdf/Connect_User_3.7.0_OSX.pdf : en : documentation :
875
- : Aspera Connect PDF Documentation for Mac OS : application/pdf : docs/user/osx/es-es/pdf/Connect_User_3.7.0_OSX_es-es.pdf : es-es : documentation :
876
- : Aspera Connect PDF Documentation for Mac OS : application/pdf : docs/user/osx/fr-fr/pdf/Connect_User_3.7.0_OSX_fr-fr.pdf : fr-fr : documentation :
877
- : Aspera Connect PDF Documentation for Mac OS : application/pdf : docs/user/osx/zh-cn/pdf/Connect_User_3.7.0_OSX_zh-cn.pdf : zh-cn : documentation :
878
- : Aspera Connect for Mac Release Notes : text/html : http://www.asperasoft.com/en/release_notes/default_1/release_notes_54 : en : release-notes :
879
- :.............................................:..........................:.......................................................................:..........:...............:
880
- $ mlia config ascp connect id 'Aspera Connect for Mac Intel 10.6' links id 'Mac Intel Installer' download --to-folder=.
881
- downloaded: AsperaConnect-3.6.1.111259-mac-intel-10.6.dmg
882
- ```
883
-
884
- ## <a name="agents"></a>Transfer Agents
885
-
886
- Some of the actions on Aspera Applications lead to file transfers (upload and download) using the FASP protocol (`ascp`).
887
-
888
- When a transfer needs to be started, a [_transfer-spec_](#transferspec) has been internally prepared.
889
- This [_transfer-spec_](#transferspec) will be executed by a transfer client, here called "Transfer Agent".
890
-
891
- There are currently 3 agents:
892
-
893
- * `direct` : a local execution of `ascp`
894
- * `connect` : use of a local Connect Client
895
- * `node` : use of an Aspera Transfer Node (potentially _remote_).
896
- * `httpgw` : use of an Aspera HTTP Gateway
897
-
898
- Note that all transfer operation are seen from the point of view of the agent.
899
- For instance, a node agent making an "upload", or "package send" operation,
900
- will effectively push files to the related server from the agent node.
901
-
902
- `mlia` standadizes on the use of a [_transfer-spec_](#transferspec) instead of _raw_ ascp options to provide parameters for a transfer session, as a common method for those three Transfer Agents.
903
-
904
-
905
- ### <a name="direct"></a>Direct (local ascp using FASPManager API)
906
-
907
- By default the CLI will use a local FASP protocol, equivalent to specifying `--transfer=direct`.
908
- `mlia` will detect locally installed Aspera products.
909
- Refer to section [FASP](#client).
910
-
911
- To specify a FASP proxy (only supported with the `direct` agent), set the appropriate [_transfer-spec_](#transferspec) parameter:
912
-
913
- * `EX_fasp_proxy_url`
914
- * `EX_http_proxy_url` (proxy for legacy http fallback)
915
- * `EX_ascp_args`
916
-
917
- The `transfer-info` optionally provides the following auto resume parameters:
918
-
919
- * iter_max (7)
920
- * sleep_initial (2)
921
- * sleep_factor (2)
922
- * sleep_max (60)
923
-
924
- This defines the resume algorithm.
925
-
926
- ### IBM Aspera Connect Client GUI
927
-
928
- By specifying option: `--transfer=connect`, `mlia` will start transfers
929
- using the locally installed Aspera Connect Client.
930
-
931
- ### Aspera Node API : Node to node transfers
932
-
933
- By specifying option: `--transfer=node`, the CLI will start transfers in an Aspera
934
- Transfer Server using the Node API, either on a local or remote node.
935
-
936
- If a default node has been configured
937
- in the configuration file, then this node is used by default else the parameter
938
- `--transfer-info` is required. The node specification shall be a hash table with
939
- three keys: url, username and password, corresponding to the URL of the node API
940
- and associated credentials (node user or access key).
941
-
942
- The `--transfer-info` parameter can directly specify a pre-configured [option preset](#lprt) :
943
- `--transfer-info=@preset:<psetname>` or specified using the option syntax :
944
- `--transfer-info=@json:'{"url":"https://...","username":"theuser","password":"thepass"}'`
945
-
946
- ### <a name="trinfoaoc"></a>Aspera on cloud
947
-
948
- By specifying option: `--transfer=aoc`, WORK IN PROGRESS
949
-
950
- ### <a name="httpgw"></a>HTTP Gateway
951
-
952
- If it possible to send using a HTTP gateway, in case FASP is not allowed.
953
-
954
- Example:
955
-
956
- ```
957
- mlia faspex package recv --id=323 --transfer=httpgw --transfer-info=@json:'{"url":"https://eudemo.asperademo.com:9443/aspera/http-gwy/v1"}'
958
- ```
959
-
960
- ## <a name="transferspec"></a>Transfer Specification
961
-
962
- Some commands lead to file transfer (upload/download), all parameters necessary for this transfer
963
- is described in a _transfer-spec_ (Transfer Specification), such as:
964
-
965
- * server address
966
- * transfer user name
967
- * credentials
968
- * file list
969
- * etc...
970
-
971
- `mlia` builds a default _transfer-spec_ internally, so it is not necessary to provide additional parameters on the command line for this transfer.
972
-
973
- 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.
974
-
975
- 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.
976
-
977
- The use of a _transfer-spec_ instead of `ascp` parameters has the advantage of:
978
-
979
- * common to all [Transfer Agent](#agents)
980
- * not dependent on command line limitations (special characters...)
981
-
982
- A [_transfer-spec_](#transferspec) is a Hash table, so it is described on the command line with the [Extended Value Syntax](#extended).
983
-
984
- ## <a name="transferparams"></a>Transfer Parameters
985
-
986
- All standard _transfer-spec_ parameters can be overloaded. To display parameters,
987
- run in debug mode (--log-level=debug). [_transfer-spec_](#transferspec) can
988
- also be saved/overridden in the config file.
989
-
990
-
991
- <p>
992
- Columns:
993
- <ul>
994
- <li>F=Fasp Manager(local FASP execution)</li>
995
- <li>N=remote node(node API)</li>
996
- <li>C=Connect Client(web plugin)</li>
997
- </ul>
998
- </p>
999
- <p>
1000
- Req/Def : Required or default value (- means emty)
1001
- </p>
1002
- <p>
1003
- Fields with EX_ prefix are specific extensions to local mode.
1004
- </p>
1005
- <p>
1006
- arg: related ascp argument or env var suffix (PASS for ASPERA_SCP_PASS)
1007
- </p>
1008
- <p>
1009
- UNDER CONSTRUCTION<br/>
1010
- <a href="https://developer.ibm.com/api/view/aspera-prod:ibm-aspera:title-IBM_Aspera#id90944">Documentation&rarr;Node API&rarr;/opt/transfers</a><br/>
1011
- </p>
1012
-
1013
- <table>
1014
- <tr><th>Field</th><th>Req/Def</th><th>Type</th><th>F</th><th>N</th><th>C</th><th>arg</th><th>Description</th></tr>
1015
- <tr><td>direction</td><td>Required</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--mode</td><td>Direction: "send" or "receive"</td></tr>
1016
- <tr><td>remote_host</td><td>Required</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--host</td><td>IP or fully qualified domain name of the remote server</td></tr>
1017
- <tr><td>remote_user</td><td>Required</td><td>string</td></td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--user</td><td>Remote user. Default value is "xfer" on node or connect.</td></tr>
1018
- <tr><td>destination_root</td><td>Required</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>last arg</td><td>Destination root directory.</td></tr>
1019
- <tr><td>title</td><td>-</td><td>string</td><td class="no">N</td><td class="yes">Y</td><td class="yes">Y</td><td>-</td><td>Title of the transfer</td></tr>
1020
- <tr><td>tags</td><td>-</td><td>hash</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--tags<br>--tags64</td><td>Metadata for transfer</td></tr>
1021
- <tr><td>token</td><td>-</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>TOKEN<br/>-W</td><td>Authorization token: Bearer, Basic or ATM</td></tr>
1022
- <tr><td>cookie</td><td>-</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>COOKIE</td><td>Metadata for transfer (older,string)</td></tr>
1023
- <tr><td>remote_access_key</td><td>TODO</td><td>string</td><td></td><td></td><td></td><td>?</td><td>Node only?</td></tr>
1024
- <tr><td>source_root</td><td>-</td><td>string</td><td></td><td></td><td></td><td>--source-prefix<br/>--source-prefix64</td><td>Source root directory.(TODO: verify option)</td></tr>
1025
- <tr><td>fasp_port</td><td>33001</td><td>integer</td></td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-O</td><td>Specifies fasp (UDP) port.</td></tr>
1026
- <tr><td>ssh_port</td><td>22 or 33001</td><td>integer</td></td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-P</td><td>Specifies ssh (TCP) port.</td></tr>
1027
- <tr><td>rate_policy</td><td>server config</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--policy</td><td>Valid literals include "low","fair","high" and "fixed".</td></tr>
1028
- <tr><td>symlink_policy</td><td>follow</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--symbolic-links</td><td>copy, follow, copy+force, skip. Default is follow. Handle source side symbolic links by following the link (follow), copying the link itself (copy), skipping (skip), or forcibly copying the link itself (copy+force).</td></tr>
1029
- <tr><td>target_rate_kbps</td><td>-</td><td>integer</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-l</td><td>Specifies desired speed for the transfer.</td></tr>
1030
- <tr><td>min_rate_kbps</td><td>0</td><td>integer</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-m</td><td>Set the minimum transfer rate in kilobits per second.</td></tr>
1031
- <tr><td>cipher</td><td>none</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-c</td><td>in transit encryption type.<br/>none, aes-128, aes-256</td></tr>
1032
- <tr><td>content_protection</td><td>encrypt<br/>decrypt</td><td>string</td><td></td><td></td><td></td><td>--file-crypt=</td><td>encryption at rest</td></tr>
1033
- <tr><td>content_protection_password</td><td>-</td><td>string</td><td></td><td></td><td></td><td>PASS</td><td>Specifies a string password.</td></tr>
1034
- <tr><td>overwrite</td><td>diff</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--overwrite</td><td>Overwrite destination files with the source files of the same name.<br/>never, always, diff, older, or diff+older</td></tr>
1035
- <tr><td>retry_duration</td><td></td><td>string</td><td></td><td></td><td></td><td>TODO</td><td>Specifies how long to wait before retrying transfer. (e.g. "5min")</td></tr>
1036
- <tr><td>http_fallback</td><td></td><td>bool (node), integer</td><td></td><td></td><td></td><td>-y<br/>TODO</td><td>When true(1), attempts to perform an HTTP transfer if a fasp transfer cannot be performed.</td></tr>
1037
- <tr><td>create_dir</td><td></td><td>boolean</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-d</td><td>Specifies whether to create new directories.</td></tr>
1038
- <tr><td>precalculate_job_size</td><td>srv. def.</td><td>boolean</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--precalculate-job-size</td><td>Specifies whether to precalculate the job size.</td></tr>
1039
- <tr><td>delete_source</td><td></td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>?</td><td>?</td></tr>
1040
- <tr><td>remove_after_transfer</td><td></td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>?</td><td>Specifies whether to remove file after transfer.</td></tr>
1041
- <tr><td>remove_empty_directories</td><td></td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>?</td><td>Specifies whether to remove empty directories.</td></tr>
1042
- <tr><td>multi_session</td><td>1</td><td>integer</td><td class="no">N</td><td class="yes">Y</td><td class="no">N</td><td>-C</td><td>Specifies how many parts the transfer is in.</td></tr>
1043
- <tr><td>multi_session_threshold</td><td>null</td><td>integer</td><td class="no">N</td><td class="yes">Y</td><td class="no">N</td><td>-</td><td>in bytes</td></tr>
1044
- <tr><td>exclude_newer_than</td><td></td><td>integer</td><td class="yes">Y</td><td></td><td></td><td>--exclude-newer-than</td><td>-</td></tr>
1045
- <tr><td>exclude_older_than</td><td></td><td>integer</td><td class="yes">Y</td><td></td><td></td><td>--exclude-older-than</td><td>-</td></tr>
1046
- <tr><td>preserve_acls</td><td></td><td>string</td><td class="yes">Y</td><td></td><td></td><td>--preserve-acls</td><td>-</td></tr>
1047
- <tr><td>dgram_size</td><td></td><td>integer</td><td class="yes">Y</td><td></td><td></td><td>-Z</td><td>in bytes</td></tr>
1048
- <tr><td>compression</td><td></td><td>integer</td><td></td><td></td><td></td><td></td><td>ascp4 only, 0 / 1?</td></tr>
1049
- <tr><td>read_threads</td><td></td><td>integer</td><td></td><td></td><td></td><td>-</td><td>ascp4 only</td></tr>
1050
- <tr><td>write_threads</td><td></td><td>integer</td><td></td><td></td><td></td><td>-</td><td>ascp4 only</td></tr>
1051
- <tr><td>use_ascp4</td><td>false</td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>-</td><td>specify version of protocol</td></tr>
1052
- <tr><td>paths</td><td>source files (dest)</td><td>array</td><td></td><td></td><td></td><td>positional<br/>--file-list<br/>--file-pair-list</td><td>Contains a path to the source (required) and a path to the destination.</td></tr>
1053
- <tr><td>http_fallback_port</td><td></td><td>integer</td><td class="yes">Y</td><td></td><td></td><td>-t</td><td>Specifies http port.</td></tr>
1054
- <tr><td>https_fallback_port</td><td></td><td>integer</td><td></td><td></td><td></td><td>todo</td><td>Specifies https port.</td></tr>
1055
- <tr><td>cipher_allowed</td><td></td><td>string</td><td></td><td></td><td></td><td>-</td><td>returned by node API. Valid literals include "aes-128" and "none".</td></tr>
1056
- <tr><td>target_rate_cap_kbps</td><td></td><td></td><td class="no">N</td><td class="no">?</td><td class="yes">?</td><td>-</td><td>Returned by upload/download_setup node api.</td></tr>
1057
- <tr><td>rate_policy_allowed</td><td></td><td></td><td></td><td></td><td></td><td>-</td><td>returned by node API. Specifies most aggressive rate policy that is allowed. Valid literals include "low", "fair","high" and "fixed".</td></tr>
1058
- <tr><td>ssh_private_key</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>KEY</td><td>Private key used for SSH authentication, Shall look like: `-----BEGIN RSA PRIVATE KEY-----\nMII`<br/>Note the JSON encoding `\` + `n` for newlines.</td></tr>
1059
- <tr><td>remote_password</td><td>-</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>PASS</td><td>SSH session password</td></tr>
1060
- <tr><td>resume_policy</td><td>faspmgr:<br/>none<br/>other:<br/>sparse_csum</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-k</td><td>none,attrs,sparse_csum,full_csum</td></tr>
1061
- <tr><td>authentication</td><td>-</td><td class="no">N</td><td class="no">N</td><td class="yes">Y</td><td>-</td><td>token: Aspera web keys are provided to allow transparent web based session initiation. on connect: password is not asked. Else, password is asked, and keys are not provided.</td></tr>
1062
- <tr><td>EX_ssh_key_paths</td><td>-</td><td>array</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-i</td><td>Use public key authentication and specify the private key file</td></tr>
1063
- <tr><td>EX_at_rest_password</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>FILEPASS</td><td>Passphrase used for at rest encryption or decryption</td></tr>
1064
- <tr><td>EX_proxy_password</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>PROXY_PASS</td><td>TODO</td></tr>
1065
- <tr><td>EX_fasp_proxy_url</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>--proxy</td><td>Specify the address of the Aspera high-speed proxy server</td></tr>
1066
- <tr><td>EX_http_proxy_url</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-x</td><td>Specify the proxy server address used by HTTP Fallback</td></tr>
1067
- <tr><td>EX_ascp_args</td><td>-</td><td>array</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>same</td><td>Add command line arguments to ascp</td></tr>
1068
- <tr><td>EX_http_transfer_jpeg</td><td>0</td><td>integer</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-j</td><td>HTTP transfers as JPEG file</td></tr>
1069
- <tr><td>EX_license_text</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>LICENSE</td><td>license file text</td></tr>
1070
- <tr><td>EX_file_list</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>--file-list</td><td>source file list</td></tr>
1071
- <tr><td>EX_file_pair_list</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>--file-pair-list</td><td>source file pair list</td></tr>
1072
- <tr><td>EX_multi_session_part</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-C</td><td>part for multisession</td></tr>
1073
- <tr><td>EX_no_read</td><td>-</td><td>-</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>--no-read</td><td>no read source</td></tr>
1074
- <tr><td>EX_no_write</td><td>-</td><td>-</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>--no-write</td><td>no write estination</td></tr>
1075
- </table>
1076
-
1077
-
1078
- ### Destination folder for transfers
1079
-
1080
- The destination folder is set by `mlia` by default to:
1081
-
1082
- * `.` for downloads
1083
- * `/` for uploads
1084
-
1085
- It is specified by the [_transfer-spec_](#transferspec) parameter `destination_root`.
1086
- As such, it can be modified with option: `--ts=@json:'{"destination_root":"<path>"}'`.
1087
- The option `to_folder` provides an equivalent and convenient way to change this parameter:
1088
- `--to-folder=<path>` .
1089
-
1090
- ### List of files for transfers
1091
-
1092
- When uploading, downloading or sending files, the user must specify
1093
- the list of files to transfer. Most of the time, the list of files to transfer will be simply specified on the command line:
1094
-
1095
- ```
1096
- $ mlia -Pdemoserver server upload ~/mysample.file secondfile
1097
- ```
1098
-
1099
- This is the same as:
1100
-
1101
- ```
1102
- $ mlia -Pdemoserver server upload --sources=@args ~/mysample.file secondfile
1103
- ```
1104
-
1105
- 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).
1106
-
1107
- Note that this is different from the "ascp" command line. The paradigm used by `mlia` is: all transfer parameters are kept in [_transfer-spec_](#transferspec) so that execution of a transfer is independent of the transfer agent. It is envisioned that, one day, ascp will accept a [_transfer-spec_](#transferspec) directly.
1108
-
1109
- For ease of use and flexibility, the list of files to transfer is specified by the option `sources`. The accepted values are:
1110
-
1111
- * the literal `@args` (default value), in that case the list of files is directly provided at the end of the command line (see at the beginning of this section).
1112
-
1113
- * an [Extended Value](#extended) holding an *Array of String*. Examples:
1114
-
1115
- ```
1116
- --sources=@json:'["file1","file2"]'
1117
- --sources=@lines:@stdin:
1118
- --sources=@ruby:'File.read("myfilelist").split("\n")'
1119
- ```
1120
-
1121
- * the literal value `@ts` which specifies that the user provided the list of files directly in the `ts` option, in its `paths` field. Example:
1122
-
1123
- ```
1124
- --sources=@ts --ts=@json:'{"paths":[{"source":"file1"},{"source":"file2"}]}'
1125
- ```
1126
-
1127
- * Although not recommended, because it applies *only* to the `local` transfer agent (i.e. bare ascp), it is possible to specify bare ascp arguments using the pseudo [_transfer-spec_](#transferspec) parameter `EX_ascp_args`. In that case, one must specify a dummy list in the [_transfer-spec_](#transferspec), which will be overriden by the bare ascp command line provided.
1128
-
1129
- ```
1130
- --sources=@ts --ts=@json:'{"paths":[{"source":"dummy"}],"EX_ascp_args":["--file-list","myfilelist"]}'
1131
- ```
1132
-
1133
- In case the file list is provided on the command line (i.e. using `--sources=@args` or `--sources=<Array>`, but not `--sources=@ts`), the list of files will be used either as a simple file list or a file pair list depending on the value of the option: `src_type`:
1134
-
1135
- * `list` : (default) the path of destination is the same as source
1136
- * `pair` : in that case, the first element is the first source, the second element is the first destination, and so on.
1137
-
1138
- Example:
1139
-
1140
- ```
1141
- mlia server upload --src-type=pair ~/Documents/Samples/200KB.1 /Upload/sample1
1142
- ```
1143
-
1144
-
1145
- Note the special case when the source files are located on "Aspera on Cloud", i.e. using access keys and the `file id` API:
1146
-
1147
- * All files must be in the same source folder.
1148
- * If there is a single file : specify the full path
1149
- * For multiple files, specify the source folder as first item in the list followed by the list of file names.
1150
-
1151
- Source files are located on "Aspera on cloud", when :
1152
-
1153
- * the server is Aspera on Cloud, and making a download / recv
1154
- * the agent is Aspera on Cloud, and making an upload / send
1155
-
1156
- ### <a name="multisession"></a>Support of multi-session
1157
-
1158
- Multi session, i.e. starting a transfer of a file set using multiple sessions is supported on "direct" and "node" agents, not yet on connect.
1159
-
1160
- * when agent=node :
1161
-
1162
- ```
1163
- --ts=@json:'{"multi_session":10,"multi_session_threshold":1}'
1164
- ```
1165
-
1166
- Multi-session is directly supported by the node daemon.
1167
-
1168
- * when agent=direct :
1169
-
1170
- ```
1171
- --ts=@json:'{"multi_session":5,"multi_session_threshold":1,"resume_policy":"none"}'
1172
- ```
1173
-
1174
- Note: resume policy of "attr" may cause problems. "none" or "sparse_csum"
1175
- shall be preferred.
1176
-
1177
- Multi-session spawn is done by `mlia`.
1178
-
1179
-
1180
- ### Examples
1181
-
1182
- * Change target rate
1183
-
1184
- ```
1185
- --ts=@json:'{"target_rate_kbps":500000}'
1186
- ```
1187
-
1188
- * Override the FASP SSH port to a specific TCP port:
1189
-
1190
- ```
1191
- --ts=@json:'{"ssh_port":33002}'
1192
- ```
1193
-
1194
- * Force http fallback mode:
1195
-
1196
- ```
1197
- --ts=@json:'{"http_fallback":"force"}'
1198
- ```
1199
-
1200
- * Activate progress when not activated by default on server
1201
-
1202
- ```
1203
- --ts=@json:'{"precalculate_job_size":true}'
1204
- ```
1205
-
1206
-
1207
-
1208
- ## <a name="scheduling"></a>Scheduling an exclusive execution
1209
-
1210
- It is possible to ensure that a given command is only run once at a time with parameter: `--lock-port=nnnn`. This is especially usefull when scheduling a command on a regular basis, for instance involving transfers, and a transfer may last longer than the execution period.
1211
-
1212
- This opens a local TCP server port, and fails if this port is already used, providing a local lock.
1213
-
1214
- This option is used when the tools is executed automatically, for instance with "preview" generation.
1215
-
1216
- Usually the OS native scheduler shall already provide some sort of such protection (windows scheduler has it natively, linux cron can leverage `flock`).
1217
-
1218
- ## <a name="commands"></a>Sample Commands
1219
-
1220
- A non complete list of commands used in unit tests:
1221
-
1222
- ```
1223
- mlia
1224
- mlia --no-default node --url=my_url_here --username=my_username_here --password=my_password_here --insecure=yes delete /500M.dat
1225
- mlia --no-default node --url=my_url_here --username=my_username_here --password=my_password_here --insecure=yes upload --to-folder=CF_HSTS_FOLDER_UPLOAD --sources=@ts --ts=@json:'{"paths":[{"source":"/aspera-test-dir-small/10MB.1"}],"remote_password":"CF_HSTS_SSH_PASS","precalculate_job_size":true}' --transfer=node --transfer-info=@json:'{"url":"my_url_here","username":"my_username_here","password":"my_password_here"}'
1226
- mlia --version)
1227
- mlia --version` TOOLNAME=EXENAME erb README.erb.md > README.md
1228
- mlia --warnings --config-file=MLIA_CONFIG_FILE
1229
- mlia -N --url=my_url_here --username=my_username_here --password=my_password_here node acc create --value=@json:'{"id":"aoc_1","storage":{"type":"local","path":"/"}}'
1230
- mlia -N --url=my_url_here --username=my_username_here --password=my_password_here node acc delete --id=aoc_1
1231
- mlia -N aspera files browse / --link=CF_AOC_PUBLINK_FOLDER
1232
- mlia -N aspera files upload --to-folder=/ CF_SAMPLE_FILEPATH --link=CF_AOC_PUBLINK_FOLDER
1233
- mlia -N aspera org --link=CF_AOC_PUBLINK_RECV_PACKAGE
1234
- mlia -N aspera packages send --value=@json:'{"name":"'"CURRENT_DATE"'"}' CF_SAMPLE_FILEPATH --link=CF_AOC_PUBLINK_SEND_DROPBOX
1235
- mlia -N aspera packages send --value=@json:'{"name":"'"CURRENT_DATE"'"}' CF_SAMPLE_FILEPATH --link=CF_AOC_PUBLINK_SEND_USER
1236
- mlia -N server --url=my_url_here --username=my_username_here --password=my_password_here --format=nagios nagios transfer --to-folder=CF_HSTS_FOLDER_UPLOAD
1237
- mlia -N server --url=my_url_here --username=my_username_here --ssh-keys=CF_HSTS_TEST_KEY --format=nagios nagios app_services
1238
- mlia -N server --url=my_url_here --username=my_username_here --ssh-keys=CF_HSTS_TEST_KEY ctl all:status
1239
- mlia -N server --url=my_url_here --username=my_username_here --ssh-keys=CF_HSTS_TEST_KEY nodeadmin -- -l
1240
- mlia -Pserver_eudemo_key server br /
1241
- mlia -Ptest_preview node upload ~/'Documents/Samples/mxf_video.mxf' --ts=@json:'{"target_rate_kbps":1000000}'
1242
- mlia -h
1243
- mlia aspera admin analytics transfers --query=@json:'{"status":"completed","direction":"receive"}'
1244
- mlia aspera admin ats access_key --id=akibmcloud --secret=my_secret_here node browse /
1245
- mlia aspera admin ats access_key --id=akibmcloud delete
1246
- mlia aspera admin ats access_key create --cloud=aws --region=CF_AWS_REGION --params=@json:'{"id":"ak_aws","name":"laurent key AWS","storage":{"type":"aws_s3","bucket":"'CF_AWS_BUCKET'","credentials":{"access_key_id":"my_access_key_id_here","secret_access_key":"my_secret_access_key_here"},"path":"/"}}'
1247
- mlia aspera admin ats access_key create --cloud=softlayer --region=CF_ICOS_REGION --params=@json:'{"id":"akibmcloud","secret":"somesecret","name":"laurent key","storage":{"type":"ibm-s3","bucket":"CF_ICOS_BUCKET","credentials":{"access_key_id":"my_access_key_id_here","secret_access_key":"my_secret_access_key_here"},"path":"/"}}'
1248
- mlia aspera admin ats access_key list --fields=name,id
1249
- mlia aspera admin ats cluster clouds
1250
- mlia aspera admin ats cluster list
1251
- mlia aspera admin ats cluster show --cloud=aws --region=CF_AWS_REGION
1252
- mlia aspera admin ats cluster show --id=1f412ae7-869a-445c-9c05-02ad16813be2
1253
- mlia aspera admin res client --id=CF_AOC1_CLIENT_ID set_pub_key @file:CF_PRIVATE_KEY_FILE
1254
- mlia aspera admin res node v3 events --secret=my_secret_here
1255
- mlia aspera admin resource node --name=CF_AOC_NODE1_NAME --secret=my_secret_here v3 access_key create --value=@json:'{"id":"testsub1","storage":{"path":"/folder1"}}'
1256
- mlia aspera admin resource node --name=CF_AOC_NODE1_NAME --secret=my_secret_here v3 access_key delete --id=testsub1
1257
- mlia aspera admin resource node --name=CF_AOC_NODE1_NAME --secret=my_secret_here v3 events
1258
- mlia aspera admin resource node --name=CF_AOC_NODE1_NAME --secret=my_secret_here v4 browse /
1259
- mlia aspera admin resource node --name=CF_AOC_NODE1_NAME --secret=my_secret_here v4 delete /folder1
1260
- mlia aspera admin resource node --name=CF_AOC_NODE1_NAME --secret=my_secret_here v4 mkdir /folder1
1261
- mlia aspera admin resource workspace list
1262
- mlia aspera admin resource workspace_membership list --fields=ALL --query=@json:'{"page":1,"per_page":50,"embed":"member","inherited":false,"workspace_id":11363,"sort":"name"}'
1263
- mlia aspera apiinfo
1264
- mlia aspera automation workflow --id=$$WF_ID action create --value=@json:'{"name":"toto"}' | tee action.info
1265
- mlia aspera automation workflow create --value=@json:'{"name":"laurent_test"}'
1266
- mlia aspera automation workflow delete --id=$$WF_ID
1267
- mlia aspera automation workflow list
1268
- mlia aspera automation workflow list --select=@json:'{"name":"laurent_test"}' --fields=id --format=csv --display=data> $@
1269
- mlia aspera automation workflow list --value=@json:'{"show_org_workflows":"true"}' --scope=admin:all
1270
- mlia aspera bearer_token --display=data --scope=user:all
1271
- mlia aspera faspex
1272
- mlia aspera files bearer /
1273
- mlia aspera files browse /
1274
- mlia aspera files delete /newname
1275
- mlia aspera files download --transfer=connect /200KB.1
1276
- mlia aspera files file 18891
1277
- mlia aspera files find / --value='\.partial$$'
1278
- mlia aspera files http_node_download --to-folder=LOCAL_FOLDER /200KB.1
1279
- mlia aspera files mkdir /testfolder
1280
- mlia aspera files rename /testfolder newname
1281
- mlia aspera files short_link create --to-folder='my folder' --value=private
1282
- mlia aspera files short_link create --to-folder='my folder' --value=public
1283
- mlia aspera files short_link list --value=@json:'{"purpose":"shared_folder_auth_link"}'
1284
- mlia aspera files transfer --workspace=eudemo --from-folder='/Demo Files/aspera-test-dir-tiny' --to-folder=unit_test 200KB.1
1285
- mlia aspera files upload --to-folder=/ CF_SAMPLE_FILEPATH
1286
- mlia aspera files v3 info
1287
- mlia aspera organization
1288
- mlia aspera packages list
1289
- mlia aspera packages list --format=csv --fields=id --display=data|head -n 1)
1290
- mlia aspera packages recv --id=ALL --once-only=yes --lock-port=12345
1291
- mlia aspera packages send --value=@json:'{"name":"'"CURRENT_DATE"'","recipients":["laurent.martin.aspera@fr.ibm.com"],"note":"my note"}' CF_SAMPLE_FILEPATH
1292
- mlia aspera packages send --value=@json:'{"name":"'"CURRENT_DATE"'","recipients":["laurent.martin.l+external@gmail.com"]}' --new-user-option=@json:'{"package_contact":true}' CF_SAMPLE_FILEPATH
1293
- mlia aspera packages send --workspace="CF_AOC_WS_SH_BX" --value=@json:'{"name":"'"CURRENT_DATE"'","recipients":["CF_AOC_SH_BX"]}' CF_SAMPLE_FILEPATH
1294
- mlia aspera user info modify @json:'{"name":"dummy change"}'
1295
- mlia aspera user info show
1296
- mlia aspera workspace
1297
- mlia ats access_key --id=ak_aws delete
1298
- mlia ats access_key --id=akibmcloud --secret=my_secret_here cluster
1299
- mlia ats access_key --id=akibmcloud --secret=my_secret_here node browse /
1300
- mlia ats access_key --id=akibmcloud delete
1301
- mlia ats access_key create --cloud=aws --region=CF_AWS_REGION --params=@json:'{"id":"ak_aws","name":"laurent key AWS","storage":{"type":"aws_s3","bucket":"'CF_AWS_BUCKET'","credentials":{"access_key_id":"my_access_key_id_here","secret_access_key":"my_secret_access_key_here"},"path":"/"}}'
1302
- mlia ats access_key create --cloud=softlayer --region=CF_ICOS_REGION --params=@json:'{"id":"akibmcloud","secret":"somesecret","name":"laurent key","storage":{"type":"ibm-s3","bucket":"CF_ICOS_BUCKET","credentials":{"access_key_id":"my_access_key_id_here","secret_access_key":"my_secret_access_key_here"},"path":"/"}}'
1303
- mlia ats access_key list --fields=name,id
1304
- mlia ats api_key create
1305
- mlia ats api_key instances
1306
- mlia ats api_key list
1307
- mlia ats cluster clouds
1308
- mlia ats cluster list
1309
- mlia ats cluster show --cloud=aws --region=CF_AWS_REGION
1310
- mlia ats cluster show --id=1f412ae7-869a-445c-9c05-02ad16813be2
1311
- mlia conf flush
1312
- mlia conf wiz --url=my_url_here --config-file=SAMPLE_CONFIG_FILE --client-id=HIDE_CLIENT_ID --client-secret=HIDE_CLIENT_SECRET --pkeypath='' --use-generic-client=no --username=my_username_here
1313
- mlia conf wiz --url=my_url_here --config-file=SAMPLE_CONFIG_FILE --pkeypath='' --username=my_username_here --test-mode=yes
1314
- mlia config ascp connect id 'Aspera Connect for Windows' info
1315
- mlia config ascp connect id 'Aspera Connect for Windows' links id 'Windows Installer' download --to-folder=.
1316
- mlia config ascp connect id 'Aspera Connect for Windows' links list
1317
- mlia config ascp connect list
1318
- mlia config ascp products list
1319
- mlia config ascp show
1320
- mlia config email_test aspera.user1@gmail.com
1321
- mlia config export
1322
- mlia config genkey LOCAL_FOLDER/mykey
1323
- mlia config id conf_name delete
1324
- mlia config id conf_name initialize @json:'{"p1":"v1","p2":"v2"}'
1325
- mlia config id conf_name set param value
1326
- mlia config id conf_name show
1327
- mlia config id conf_name update --p1=v1 --p2=v2
1328
- mlia config id default set shares conf_name
1329
- mlia config list
1330
- mlia config open
1331
- mlia config overview
1332
- mlia config plugins
1333
- mlia config proxy_check --fpac=file:///./examples/proxy.pac https://eudemo.asperademo.com
1334
- mlia console transfer current list
1335
- mlia console transfer smart list
1336
- mlia console transfer smart sub 112 @json:'{"source":{"paths":["10MB.1"]},"source_type":"user_selected"}'
1337
- mlia cos node --service-credentials=@json:@file:CF_ICOS_CREDS_FILE --region=CF_ICOS_REGION --bucket=CF_ICOS_BUCKET access_key --id=self show
1338
- mlia cos node --service-credentials=@json:@file:CF_ICOS_CREDS_FILE --region=CF_ICOS_REGION --bucket=CF_ICOS_BUCKET download CF_SAMPLE_FILENAME
1339
- mlia cos node --service-credentials=@json:@file:CF_ICOS_CREDS_FILE --region=CF_ICOS_REGION --bucket=CF_ICOS_BUCKET info
1340
- mlia cos node --service-credentials=@json:@file:CF_ICOS_CREDS_FILE --region=CF_ICOS_REGION --bucket=CF_ICOS_BUCKET upload CF_SAMPLE_FILEPATH
1341
- mlia faspex nagios_check
1342
- mlia faspex package list
1343
- mlia faspex package list --box=sent --fields=package_id --format=csv --display=data|tail -n 1)
1344
- mlia faspex package list --fields=package_id --format=csv --display=data|tail -n 1)
1345
- mlia faspex package recv --link='CF_FASPEX_PUBLINK_RECV_PACKAGE'
1346
- mlia faspex package recv --to-folder=LOCAL_FOLDER --id=ALL --once-only=yes
1347
- mlia faspex package send --delivery-info=@json:'{"title":"'"CURRENT_DATE"'","recipients":["laurent.martin.aspera@fr.ibm.com"]}' CF_SAMPLE_FILEPATH
1348
- mlia faspex package send --link='CF_FASPEX_PUBLINK_SEND_DROPBOX' --delivery-info=@json:'{"title":"'"CURRENT_DATE"'"}' CF_SAMPLE_FILEPATH
1349
- mlia faspex package send --link='CF_FASPEX_PUBLINK_SEND_TO_USER' --delivery-info=@json:'{"title":"'"CURRENT_DATE"'"}' CF_SAMPLE_FILEPATH
1350
- mlia faspex source name "Server Files" node br /
1351
- mlia faspex5 node list --value=@json:'{"type":"received","subtype":"mypackages"}'
1352
- mlia faspex5 package list --value=@json:'{"state":["released"]}'
1353
- mlia faspex5 package receive --id=$$LAST_PACK
1354
- mlia faspex5 package send --value=@json:'{"title":"test title","recipients":["admin"]}' CF_SAMPLE_FILEPATH
1355
- mlia node async --id=1 bandwidth
1356
- mlia node async --id=1 counters
1357
- mlia node async --id=1 files
1358
- mlia node async list
1359
- mlia node async show --id=1
1360
- mlia node async show --id=ALL
1361
- mlia node basic_token
1362
- mlia node browse / -r
1363
- mlia node delete CF_HSTS_FOLDER_UPLOAD/CF_SAMPLE_FILENAME
1364
- mlia node download --to-folder=LOCAL_FOLDER CF_HSTS_FOLDER_UPLOAD/CF_SAMPLE_FILENAME
1365
- mlia node info
1366
- mlia node nagios_check
1367
- mlia node search / --value=@json:'{"sort":"mtime"}'
1368
- mlia node service --id=service1 delete
1369
- mlia node service create @json:'{"id":"service1","type":"WATCHD","run_as":{"user":"user1"}}'
1370
- mlia node service list
1371
- mlia node transfer list --value=@json:'{"active_only":true}'
1372
- mlia node upload --to-folder=CF_HSTS_FOLDER_UPLOAD --ts=@json:'{"target_rate_cap_kbps":10000}' CF_SAMPLE_FILEPATH
1373
- mlia orchestrator info
1374
- mlia orchestrator plugins
1375
- mlia orchestrator processes
1376
- mlia orchestrator workflow --id=CF_ORCH_WORKFLOW_ID inputs
1377
- mlia orchestrator workflow --id=CF_ORCH_WORKFLOW_ID start --params=@json:'{"Param":"laurent"}'
1378
- mlia orchestrator workflow --id=CF_ORCH_WORKFLOW_ID start --params=@json:'{"Param":"laurent"}' --result=ResultStep:Complete_status_message
1379
- mlia orchestrator workflow --id=CF_ORCH_WORKFLOW_ID status
1380
- mlia orchestrator workflow list
1381
- mlia orchestrator workflow status
1382
- mlia preview check --skip-types=office
1383
- mlia preview folder 1 --skip-types=office --log-level=info --file-access=remote --ts=@json:'{"target_rate_kbps":1000000}'
1384
- mlia preview scan --skip-types=office --log-level=info
1385
- mlia preview test --case=$@ mp4 ~/'Documents/Samples/mxf_video.mxf' --video-conversion=blend --log-level=debug
1386
- mlia preview test --case=$@ mp4 ~/'Documents/Samples/mxf_video.mxf' --video-conversion=clips --log-level=debug
1387
- mlia preview test --case=$@ mp4 ~/'Documents/Samples/mxf_video.mxf' --video-conversion=reencode --log-level=debug
1388
- mlia preview test --case=$@ png ~/'Documents/Samples/YıçşöğüİÇŞÖĞÜ.pdf' --log-level=debug
1389
- mlia preview test --case=$@ png ~/'Documents/Samples/mxf_video.mxf' --video-png-conv=animated --log-level=debug
1390
- mlia preview test --case=$@ png ~/'Documents/Samples/mxf_video.mxf' --video-png-conv=fixed --log-level=debug
1391
- mlia preview test --case=$@ png ~/Documents/Samples/anatomic-2k/TG18-CH/TG18-CH-2k-01.dcm --log-level=debug
1392
- mlia preview trevents --once-only=yes --skip-types=office --log-level=info
1393
- mlia server browse /
1394
- mlia server browse CF_HSTS_FOLDER_UPLOAD/target_hot
1395
- mlia server cp NEW_SERVER_FOLDER/CF_SAMPLE_FILENAME CF_HSTS_FOLDER_UPLOAD/200KB.2
1396
- mlia server delete CF_HSTS_FOLDER_UPLOAD/target_hot
1397
- mlia server delete CF_HSTS_FOLDER_UPLOAD/to.delete
1398
- mlia server delete NEW_SERVER_FOLDER
1399
- mlia server df
1400
- mlia server download NEW_SERVER_FOLDER/CF_SAMPLE_FILENAME --to-folder=CF_HSTS_FOLDER_UPLOAD --transfer=node
1401
- mlia server download NEW_SERVER_FOLDER/CF_SAMPLE_FILENAME --to-folder=LOCAL_FOLDER
1402
- mlia server du /
1403
- mlia server info
1404
- mlia server md5sum NEW_SERVER_FOLDER/CF_SAMPLE_FILENAME
1405
- mlia server mkdir CF_HSTS_FOLDER_UPLOAD/target_hot
1406
- mlia server mkdir NEW_SERVER_FOLDER --logger=stdout
1407
- mlia server mv CF_HSTS_FOLDER_UPLOAD/200KB.2 CF_HSTS_FOLDER_UPLOAD/to.delete
1408
- mlia server upload --sources=@ts --ts=@json:'{"paths":[{"source":"CF_SAMPLE_FILEPATH","destination":"NEW_SERVER_FOLDER/othername"}]}'
1409
- mlia server upload --src-type=pair --sources=@json:'["CF_SAMPLE_FILEPATH","NEW_SERVER_FOLDER/othername"]'
1410
- mlia server upload --src-type=pair CF_SAMPLE_FILEPATH NEW_SERVER_FOLDER/othername
1411
- mlia server upload --to-folder=CF_HSTS_FOLDER_UPLOAD/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
1412
- mlia server upload CF_SAMPLE_FILEPATH --to-folder=NEW_SERVER_FOLDER
1413
- mlia shares repository browse /
1414
- mlia shares repository delete /CF_SHARES_UPLOAD/CF_SAMPLE_FILENAME
1415
- mlia shares repository download --to-folder=LOCAL_FOLDER /CF_SHARES_UPLOAD/CF_SAMPLE_FILENAME
1416
- mlia shares repository upload --to-folder=/CF_SHARES_UPLOAD CF_SAMPLE_FILEPATH
1417
- mlia shares2 appinfo
1418
- mlia shares2 organization list
1419
- mlia shares2 project list --organization=Sport
1420
- mlia shares2 repository browse /
1421
- mlia shares2 userinfo
1422
- mlia sync start --parameters=@json:'{"sessions":[{"name":"test","reset":true,"remote_dir":"/sync_test","local_dir":"contents","host":"CF_HSTS_ADDR","user":"user1","private_key_path":"CF_HSTS_TEST_KEY"}]}'
1423
-
1424
- ...and more
1425
- ```
1426
-
1427
- ## <a name="usage"></a>Usage
1428
-
1429
- ```
1430
- $ mlia -h
1431
- NAME
1432
- mlia -- a command line tool for Aspera Applications (v0.11.7)
1433
-
1434
- SYNOPSIS
1435
- mlia COMMANDS [OPTIONS] [ARGS]
1436
-
1437
- DESCRIPTION
1438
- Use Aspera application to perform operations on command line.
1439
- Documentation and examples: https://rubygems.org/gems/asperalm
1440
- execute: mlia conf doc
1441
- or visit: http://www.rubydoc.info/gems/asperalm
1442
-
1443
- COMMANDS
1444
- To list first level commands, execute: mlia
1445
- Note that commands can be written shortened (provided it is unique).
1446
-
1447
- OPTIONS
1448
- Options begin with a '-' (minus), and value is provided on command line.
1449
- Special values are supported beginning with special prefix, like: @base64: @json: @zlib: @ruby: @csvt: @lines: @list: @val: @file: @path: @env: @stdin:.
1450
- Dates format is 'DD-MM-YY HH:MM:SS', or 'now' or '-<num>h'
1451
-
1452
- ARGS
1453
- Some commands require mandatory arguments, e.g. a path.
1454
-
1455
- OPTIONS: global
1456
- --interactive=ENUM use interactive input of missing params: yes, no
1457
- --ask-options=ENUM ask even optional options: yes, no
1458
- --format=ENUM output format: table, ruby, json, jsonpp, yaml, csv, nagios
1459
- --display=ENUM output only some information: info, data, error
1460
- --fields=VALUE comma separated list of fields, or ALL, or DEF
1461
- --select=VALUE select only some items in lists, extended value: hash (column, value)
1462
- --table-style=VALUE table display style
1463
- --flat-hash=ENUM display hash values as additional keys: yes, no
1464
- -h, --help Show this message.
1465
- --bash-comp generate bash completion for command
1466
- --show-config Display parameters used for the provided action.
1467
- -r, --rest-debug more debug for HTTP calls
1468
- -v, --version display version
1469
- -w, --warnings check for language warnings
1470
- --ui=ENUM method to start browser: text, graphical
1471
- --log-level=ENUM Log level: fatal, unknown, debug, info, error, warn
1472
- --logger=ENUM log method: stderr, stdout, syslog
1473
- --lock-port=VALUE prevent dual execution of a command, e.g. in cron
1474
- --query=VALUE additional filter for API calls (extended value) (some commands)
1475
- --insecure=ENUM do not validate HTTPS certificate: yes, no
1476
- --once-only=ENUM process only new items (some commands): yes, no
1477
-
1478
- COMMAND: config
1479
- 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
1480
- OPTIONS:
1481
- --value=VALUE extended value for create, update, list filter
1482
- --property=VALUE name of property to set
1483
- --id=VALUE resource identifier (modify,delete,show)
1484
- --config-file=VALUE read parameters from file in YAML format, current=/Users/laurent/.aspera/mlia/config.yaml
1485
- --override=ENUM override existing value: yes, no
1486
- -N, --no-default do not load default configuration for plugin
1487
- --use-generic-client=ENUM wizard: AoC: use global or org specific jwt client id: yes, no
1488
- --pkeypath=VALUE path to private key for JWT (wizard)
1489
- --ascp-path=VALUE path to ascp
1490
- --use-product=VALUE use ascp from specified product
1491
- --smtp=VALUE smtp configuration (extended value: hash)
1492
- --fpac=VALUE proxy auto configuration URL
1493
- -P, --presetVALUE load the named option preset from current config file
1494
- --default=VALUE set as default configuration for specified plugin
1495
- --secret=VALUE access key secret for node
1496
- --secrets=VALUE access key secret for node
1497
- --test-mode=ENUM skip user validation in wizard mode: yes, no
1498
- --ts=VALUE override transfer spec values (Hash, use @json: prefix), current={}
1499
- --local-resume=VALUE set resume policy (Hash, use @json: prefix), current=
1500
- --to-folder=VALUE destination folder for downloaded files
1501
- --sources=VALUE list of source files (see doc)
1502
- --transfer-info=VALUE additional information for transfer client
1503
- --src-type=ENUM type of file list: list, pair
1504
- --transfer=ENUM type of transfer: direct, httpgw, connect, node, aoc
1505
- --progress=ENUM type of progress bar: none, native, multi
1506
-
1507
-
1508
- COMMAND: shares
1509
- SUBCOMMANDS: repository admin
1510
- OPTIONS:
1511
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1512
- --username=VALUE username to log in
1513
- --password=VALUE user's password
1514
-
1515
-
1516
- COMMAND: node
1517
- SUBCOMMANDS: postprocess stream transfer cleanup forward access_key watch_folder service async central asperabrowser basic_token browse upload download api_details nagios_check events space info license mkdir mklink mkfile rename delete search
1518
- OPTIONS:
1519
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1520
- --username=VALUE username to log in
1521
- --password=VALUE user's password
1522
- --validator=VALUE identifier of validator (optional for central)
1523
- --asperabrowserurl=VALUE URL for simple aspera web ui
1524
- --name=VALUE sync name
1525
- --token=ENUM package box: aspera, basic, auto
1526
-
1527
-
1528
- COMMAND: orchestrator
1529
- SUBCOMMANDS: info workflow plugins processes
1530
- OPTIONS:
1531
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1532
- --username=VALUE username to log in
1533
- --password=VALUE user's password
1534
- --params=VALUE parameters hash table, use @json:{"param":"value"}
1535
- --result=VALUE specify result value as: 'work step:parameter'
1536
- --synchronous=ENUM work step:parameter expected as result: yes, no
1537
- --ret-style=ENUM how return type is requested in api: header, arg, ext
1538
- --auth-style=ENUM authentication type: arg_pass, head_basic, apikey
1539
-
1540
-
1541
- COMMAND: bss
1542
- SUBCOMMANDS: subscription
1543
- OPTIONS:
1544
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1545
- --username=VALUE username to log in
1546
- --password=VALUE user's password
1547
-
1548
-
1549
- COMMAND: aspera
1550
- SUBCOMMANDS: apiinfo bearer_token organization tier_restrictions user workspace packages files gateway admin automation servers
1551
- OPTIONS:
1552
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1553
- --username=VALUE username to log in
1554
- --password=VALUE user's password
1555
-
1556
- COMMAND: ats
1557
- SUBCOMMANDS: cluster access_key api_key aws_trust_policy
1558
- OPTIONS:
1559
- --ibm-api-key=VALUE IBM API key, see https://cloud.ibm.com/iam/apikeys
1560
- --instance=VALUE ATS instance in ibm cloud
1561
- --ats-key=VALUE ATS key identifier (ats_xxx)
1562
- --ats-secret=VALUE ATS key secret
1563
- --params=VALUE Parameters access key creation (@json:)
1564
- --cloud=VALUE Cloud provider
1565
- --region=VALUE Cloud region
1566
- --auth=ENUM type of Oauth authentication: body_userpass, header_userpass, web, jwt, url_token, ibm_apikey
1567
- --operation=ENUM client operation for transfers: push, pull
1568
- --client-id=VALUE API client identifier in application
1569
- --client-secret=VALUE API client passcode
1570
- --redirect-uri=VALUE API client redirect URI
1571
- --private-key=VALUE RSA private key PEM value for JWT (prefix file path with @val:@file:)
1572
- --workspace=VALUE name of workspace
1573
- --eid=VALUE identifier
1574
- --name=VALUE resource name
1575
- --link=VALUE public link to shared resource
1576
- --new-user-option=VALUE new user creation option
1577
- --from-folder=VALUE share to share source folder
1578
- --scope=VALUE scope for AoC API calls
1579
- --notify=VALUE notify users that file was received
1580
- --bulk=ENUM bulk operation: yes, no
1581
- --default-ports=ENUM use standard FASP ports or get from node api: yes, no
1582
-
1583
-
1584
- COMMAND: alee
1585
- SUBCOMMANDS: entitlement
1586
- OPTIONS:
1587
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1588
- --username=VALUE username to log in
1589
- --password=VALUE user's password
1590
-
1591
-
1592
- COMMAND: xnode
1593
- SUBCOMMANDS: postprocess cleanup forward
1594
- OPTIONS:
1595
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1596
- --username=VALUE username to log in
1597
- --password=VALUE user's password
1598
- --filter-transfer=VALUE Ruby expression for filter at transfer level (cleanup)
1599
- --filter-file=VALUE Ruby expression for filter at file level (cleanup)
1600
-
1601
-
1602
- COMMAND: ats
1603
- SUBCOMMANDS: cluster access_key api_key aws_trust_policy
1604
- OPTIONS:
1605
- --ibm-api-key=VALUE IBM API key, see https://cloud.ibm.com/iam/apikeys
1606
- --instance=VALUE ATS instance in ibm cloud
1607
- --ats-key=VALUE ATS key identifier (ats_xxx)
1608
- --ats-secret=VALUE ATS key secret
1609
- --params=VALUE Parameters access key creation (@json:)
1610
- --cloud=VALUE Cloud provider
1611
- --region=VALUE Cloud region
1612
-
1613
-
1614
- COMMAND: faspex5
1615
- SUBCOMMANDS: node package
1616
- OPTIONS:
1617
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1618
- --username=VALUE username to log in
1619
- --password=VALUE user's password
1620
-
1621
-
1622
- COMMAND: cos
1623
- SUBCOMMANDS: node
1624
- OPTIONS:
1625
- --service-credentials=VALUE IBM Cloud service credentials (Hash)
1626
- --region=VALUE IBM Cloud Object storage region
1627
- --bucket=VALUE IBM Cloud Object storage bucket
1628
-
1629
-
1630
- COMMAND: faspex
1631
- SUBCOMMANDS: nagios_check package source me dropbox v4 address_book login_methods
1632
- OPTIONS:
1633
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1634
- --username=VALUE username to log in
1635
- --password=VALUE user's password
1636
- --link=VALUE public link for specific operation
1637
- --delivery-info=VALUE package delivery information (extended value)
1638
- --source-name=VALUE create package from remote source (by name)
1639
- --storage=VALUE Faspex local storage definition
1640
- --box=ENUM package box: inbox, sent, archive
1641
-
1642
-
1643
- COMMAND: shares2
1644
- SUBCOMMANDS: repository organization project team share appinfo userinfo admin
1645
- OPTIONS:
1646
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1647
- --username=VALUE username to log in
1648
- --password=VALUE user's password
1649
- --organization=VALUE organization
1650
- --project=VALUE project
1651
- --share=VALUE share
1652
-
1653
-
1654
- COMMAND: preview
1655
- SUBCOMMANDS: scan events trevents folder check test
1656
- OPTIONS:
1657
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1658
- --username=VALUE username to log in
1659
- --password=VALUE user's password
1660
- --skip-format=ENUM skip this preview format (multiple possible): png, mp4
1661
- --folder-reset-cache=ENUM force detection of generated preview by refresh cache: no, header, read
1662
- --skip-types=VALUE skip types in comma separated list
1663
- --previews-folder=VALUE preview folder in storage root
1664
- --temp-folder=VALUE path to temp folder
1665
- --skip-folders=VALUE list of folder to skip
1666
- --case=VALUE test case name
1667
- --overwrite=ENUM when to overwrite result file: always, never, mtime
1668
- --file-access=ENUM how to read and write files in repository: local, remote
1669
- --office-exe=VALUE path for libreoffice executable
1670
- --max-size=VALUE maximum size (in bytes) of preview file
1671
- --thumb-vid-scale=VALUE png: video: size (ffmpeg scale argument)
1672
- --thumb-vid-fraction=VALUE png: video: position of snapshot
1673
- --thumb-img-size=VALUE png: non-video: height (and width)
1674
- --video-conversion=ENUM mp4: method for preview generation: reencode, blend, clips
1675
- --video-png-conv=ENUM mp4: method for thumbnail generation: fixed, animated
1676
- --video-start-sec=VALUE mp4: start offset (seconds) of video preview
1677
- --video-scale=VALUE mp4: video scale (ffmpeg)
1678
- --blend-keyframes=VALUE mp4: blend: # key frames
1679
- --blend-pauseframes=VALUE mp4: blend: # pause frames
1680
- --blend-transframes=VALUE mp4: blend: # transition blend frames
1681
- --blend-fps=VALUE mp4: blend: frame per second
1682
- --clips-count=VALUE mp4: clips: number of clips
1683
- --clips-length=VALUE mp4: clips: length in seconds of each clips
1684
-
1685
-
1686
- COMMAND: sync
1687
- SUBCOMMANDS: start admin
1688
- OPTIONS:
1689
- --parameters=VALUE extended value for session set definition
1690
- --session-name=VALUE name of session to use for admin commands, by default first one
1691
- /Users/laurent/workspace/Rubytools/asperalm/lib/asperalm/ssh.rb:5: warning: method redefined; discarding old default_keys
1692
- /usr/local/lib/ruby/gems/2.7.0/gems/net-ssh-6.1.0/lib/net/ssh/authentication/session.rb:139: warning: previous definition of default_keys was here
1693
-
1694
-
1695
- COMMAND: server
1696
- SUBCOMMANDS: nagios nodeadmin userdata configurator ctl download upload browse delete rename ls rm mv du info mkdir cp df md5sum
1697
- OPTIONS:
1698
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1699
- --username=VALUE username to log in
1700
- --password=VALUE user's password
1701
- --ssh-keys=VALUE ssh key path list (Array or single)
1702
- --ssh-options=VALUE ssh options (Hash)
1703
- --cmd-prefix=VALUE prefix to add for as cmd execution, e.g. sudo or /opt/aspera/bin
1704
-
1705
-
1706
- COMMAND: console
1707
- SUBCOMMANDS: transfer nagios_check
1708
- OPTIONS:
1709
- --url=VALUE URL of application, e.g. https://org.asperafiles.com
1710
- --username=VALUE username to log in
1711
- --password=VALUE user's password
1712
- --filter-from=DATE only after date
1713
- --filter-to=DATE only before date
1714
-
1715
-
1716
- ```
1717
-
1718
- Note that actions and parameter values can be written in short form.
1719
-
1720
- # <a name="plugins"></a>Plugins: Application URL and Authentication
1721
-
1722
- `mlia` comes with several Aspera application plugins.
1723
-
1724
- REST APIs of Aspera legacy applications (Aspera Node, Faspex, Shares, Console, Orchestrator, Server) use simple username/password authentication: HTTP Basic Authentication.
1725
-
1726
- Those are using options:
1727
-
1728
- * url
1729
- * username
1730
- * password
1731
-
1732
- Those can be provided using command line, parameter set, env var, see section above.
1733
-
1734
- Aspera on Cloud relies on Oauth, refer to the [Aspera on Cloud](#aoc) section.
1735
-
1736
- # <a name="aoc"></a>Plugin: Aspera on Cloud
1737
-
1738
- Aspera on Cloud uses the more advanced Oauth v2 mechanism for authentication (HTTP Basic authentication is not supported).
1739
-
1740
- It is recommended to use the wizard to set it up, but manual configuration is also possible.
1741
-
1742
- ## <a name="aocwizard"></a>Configuration: using Wizard
1743
-
1744
- `mlia` provides a configuration wizard. Here is a sample invocation :
1745
-
1746
- ```
1747
- $ mlia config wizard
1748
- option: url> https://myorg.ibmaspera.com
1749
- Detected: Aspera on Cloud
1750
- Preparing preset: aoc_myorg
1751
- Please provide path to your private RSA key, or empty to generate one:
1752
- option: pkeypath>
1753
- using existing key:
1754
- /Users/myself/.aspera/mlia/aspera_on_cloud_key
1755
- Using global client_id.
1756
- option: username> john@example.com
1757
- Updating profile with new key
1758
- creating new config preset: aoc_myorg
1759
- Setting config preset as default for aspera
1760
- saving config file
1761
- Done.
1762
- You can test with:
1763
- mlia aspera user info show
1764
- ```
1765
-
1766
- Optionally, it is possible to create a new organization-specific "integration".
1767
- For this, specify the option: `--use-generic-client=no`.
1768
-
1769
- This will guide you through the steps to create.
1770
-
1771
- ## <a name="aocwizard"></a>Configuration: using manual setup
1772
-
1773
- If you used the wizard (recommended): skip this section.
1774
-
1775
- ### Configuration details
1776
-
1777
- Several types of OAuth authentication are supported:
1778
-
1779
- * JSON Web Token (JWT) : authentication is secured by a private key (recommended for CLI)
1780
- * Web based authentication : authentication is made by user using a browser
1781
- * URL Token : external users authentication with url tokens (public links)
1782
-
1783
- The authentication method is controled by option `auth`.
1784
-
1785
- For a _quick start_, follow the mandatory and sufficient section: [API Client Registration](#clientreg) (auth=web) as well as [[option preset](#lprt) for Aspera on Cloud](#aocpreset).
1786
-
1787
- For a more convenient, browser-less, experience follow the [JWT](#jwt) section (auth=jwt) in addition to Client Registration.
1788
-
1789
- In Oauth, a "Bearer" token are generated to authenticate REST calls. Bearer tokens are valid for a period of time.`mlia` saves generated tokens in its configuration folder, tries to re-use them or regenerates them when they have expired.
1790
-
1791
- ### <a name="clientreg"></a>Optional: API Client Registration
1792
-
1793
- If you use the built-in client_id and client_secret, skip this and do not set them in next section.
1794
-
1795
- Else you can use a specific OAuth API client_id, the first step is to declare `mlia` in Aspera on Cloud using the admin interface.
1796
-
1797
- (official documentation: <https://ibmaspera.com/help/admin/organization/registering_an_api_client> ).
1798
-
1799
- Let's start by a registration with web based authentication (auth=web):
1800
-
1801
- * Open a web browser, log to your instance: e.g. `https://myorg.ibmaspera.com/`
1802
- * Go to Apps&rarr;Admin&rarr;Organization&rarr;Integrations
1803
- * Click "Create New"
1804
- * Client Name: `mlia`
1805
- * Redirect URIs: `http://localhost:12345`
1806
- * Origins: `localhost`
1807
- * uncheck "Prompt users to allow client to access"
1808
- * leave the JWT part for now
1809
- * Save
1810
-
1811
- Note: for web based authentication, `mlia` listens on a local port (e.g. specified by the redirect_uri, in this example: 12345), and the browser will provide the OAuth code there. For ``mlia`, HTTP is required, and 12345 is the default port.
1812
-
1813
- Once the client is registered, a "Client ID" and "Secret" are created, these values will be used in the next step.
1814
-
1815
- ### <a name="aocpreset"></a>[option preset](#lprt) for Aspera on Cloud
1816
-
1817
- If you did not use the wizard, you can also manually create a [option preset](#lprt) for `mlia` in its configuration file.
1818
-
1819
- Lets create an [option preset](#lprt) called: `my_aoc_org` using `ask` interactive input (client info from previous step):
1820
-
1821
- ```
1822
- $ mlia config id my_aoc_org ask url client_id client_secret
1823
- option: url> https://myorg.ibmaspera.com/
1824
- option: client_id> BJLPObQiFw
1825
- option: client_secret> yFS1mu-crbKuQhGFtfhYuoRW...
1826
- updated: my_aoc_org
1827
- ```
1828
-
1829
- (This can also be done in one line using the command `config id my_aoc_org update --url=...`)
1830
-
1831
- Define this [option preset](#lprt) as default configuration for the `aspera` plugin:
1832
-
1833
- ```
1834
- $ mlia config id default set aspera my_aoc_org
1835
- ```
1836
-
1837
- Note: Default `auth` method is `web` and default `redirect_uri` is `http://localhost:12345`. Leave those default values.
1838
-
1839
- ### <a name="jwt"></a>Activation of JSON Web Token (JWT) for direct authentication
1840
-
1841
- For a Browser-less, Private Key-based authentication, use the following steps.
1842
-
1843
- #### Key Pair Generation
1844
-
1845
- In order to use JWT for Aspera on Cloud API client authentication,
1846
- a private/public key pair must be generated (without passphrase)
1847
- This can be done using any of the following method:
1848
-
1849
- (TODO: add passphrase protection as option).
1850
-
1851
- * using the CLI:
1852
-
1853
- ```
1854
- $ mlia config genkey ~/.aspera/mlia/aocapikey
1855
- ```
1856
-
1857
- * `ssh-keygen`:
1858
-
1859
- ```
1860
- $ ssh-keygen -t rsa -f ~/.aspera/mlia/aocapikey -N ''
1861
- ```
1862
-
1863
- * `openssl`
1864
-
1865
- (on some openssl implementation (mac) there is option: -nodes (no DES))
1866
-
1867
- ```
1868
- $ APIKEY=~/.aspera/mlia/aocapikey
1869
- $ openssl genrsa -passout pass:dummypassword -out ${APIKEY}.protected 2048
1870
- $ openssl rsa -passin pass:dummypassword -in ${APIKEY}.protected -out ${APIKEY}
1871
- $ openssl rsa -pubout -in ${APIKEY} -out ${APIKEY}.pub
1872
- $ rm -f ${APIKEY}.protected
1873
- ```
1874
-
1875
- #### API Client JWT activation
1876
-
1877
- If you are not using the built-in client_id and secret, JWT needs to be authorized in Aspera on Cloud. This can be done in two manners:
1878
-
1879
- * Graphically
1880
-
1881
- * Open a web browser, log to your instance: https://myorg.ibmaspera.com/
1882
- * Go to Apps&rarr;Admin&rarr;Organization&rarr;Integrations
1883
- * Click on the previously created application
1884
- * select tab : "JSON Web Token Auth"
1885
- * Modify options if necessary, for instance: activate both options in section "Settings"
1886
- * Click "Save"
1887
-
1888
- * Using command line
1889
-
1890
- ```
1891
- $ mlia aspera admin res client list
1892
- :............:.........:
1893
- : id : name :
1894
- :............:.........:
1895
- : BJLPObQiFw : mlia :
1896
- :............:.........:
1897
- $ mlia aspera admin res client --id=BJLPObQiFw modify @json:'{"jwt_grant_enabled":true,"explicit_authorization_required":false}'
1898
- modified
1899
- ```
1900
-
1901
- ### User key registration
1902
-
1903
- The public key must be assigned to your user. This can be done in two manners:
1904
-
1905
- * Graphically
1906
-
1907
- open the previously generated public key located here: `$HOME/.aspera/mlia/aocapikey.pub`
1908
-
1909
- * Open a web browser, log to your instance: https://myorg.ibmaspera.com/
1910
- * Click on the user's icon (top right)
1911
- * Select "Account Settings"
1912
- * Paste the _Public Key_ in the "Public Key" section
1913
- * Click on "Submit"
1914
-
1915
- * Using command line
1916
-
1917
- ```
1918
- $ mlia aspera admin res user list
1919
- :........:................:
1920
- : id : name :
1921
- :........:................:
1922
- : 109952 : Tech Support :
1923
- : 109951 : LAURENT MARTIN :
1924
- :........:................:
1925
- $ mlia aspera user info modify @ruby:'{"public_key"=>File.read(File.expand_path("~/.aspera/mlia/aocapikey.pub"))}'
1926
- modified
1927
- ```
1928
-
1929
- Note: the `aspera user info show` command can be used to verify modifications.
1930
-
1931
- ### [option preset](#lprt) modification for JWT
1932
-
1933
- To activate default use of JWT authentication for `mlia` using the [option preset](#lprt), do the folowing:
1934
-
1935
- * change auth method to JWT
1936
- * provide location of private key
1937
- * provide username to login as (OAuthg "subject")
1938
-
1939
- Execute:
1940
-
1941
- ```
1942
- $ mlia config id my_aoc_org update --auth=jwt --private-key=@val:@file:~/.aspera/mlia/aocapikey --username=laurent.martin.aspera@fr.ibm.com
1943
- ```
1944
-
1945
- Note: the private key argument represents the actual PEM string. In order to read the content from a file, use the @file: prefix. But if the @file: argument is used as is, it will read the file and set in the config file. So to keep the "@file" tag in the configuration file, the @val: prefix is added.
1946
-
1947
- After this last step, commands do not require web login anymore.
1948
-
1949
-
1950
- ### <a name="aocfirst"></a>First Use
1951
-
1952
- Once client has been registered and [option preset](#lprt) created: `mlia` can be used:
1953
-
1954
- ```
1955
- $ mlia aspera files br /
1956
- Current Workspace: Default Workspace (default)
1957
- empty
1958
- ```
1959
-
1960
-
1961
- ### Administration
1962
-
1963
- The `admin` command allows several administrative tasks (and require admin privilege).
1964
-
1965
- It allows actions (create, update, delete) on "resources": users, group, nodes, workspace, etc... with the `admin resource` command.
1966
-
1967
- Bulk operations are possible using option `bulk` (yes,no(default)): currently: create only. In that case, the operation expects an Array of Hash instead of a simple Hash using the [Extended Value Syntax](#extended).
1968
-
1969
- To get more resources when doing request add:
1970
-
1971
- ```
1972
- --query=@json:'{"per_page":10000}'
1973
- ```
1974
-
1975
- other query parameters can be used:
1976
- ```
1977
- --query=@json:'{"member_of_any_workspace":true}'
1978
- --query=@json:'{"q":"laurent"}'
1979
- ```
1980
-
1981
- Refer to the AoC API for full list of query parameters.
1982
-
1983
- #### Access Key secrets
1984
-
1985
- In order to access some administrative actions on "nodes" (in fact, access keys), the associated
1986
- secret is required, it is usually provided using the `secret` option. For example in a command like:
1987
-
1988
- ```
1989
- $ mlia aspera admin res node --id="access_key1" --secret="secret1" v3 info
1990
- ```
1991
-
1992
- It is also possible to provide a set of secrets used on a regular basis. This can be done using the `secrets` option. The value provided shall be a Hash, where keys are access key ids, and values are the associated secrets.
1993
-
1994
- First choose a repository name, for example `my_secrets`, and populate it like this:
1995
-
1996
- ```
1997
- $ mlia conf id my_secrets set 'access_key1' 'secret1'
1998
- $ mlia conf id my_secrets set 'access_key2' 'secret2'
1999
- $ mlia conf id default get config
2000
- "cli_default"
2001
- ```
2002
-
2003
- Here above, one already has set a `config` global preset to preset `cli_default` (refer to earlier in documentation), then the repository can be read by default like this (note the prefix `@val:` to avoid the evaluation of prefix `@preset:`):
2004
-
2005
- ```
2006
- $ mlia conf id cli_default set secrets @val:@preset:my_secrets
2007
- ```
2008
-
2009
- A secret repository can always be selected at runtime using `--secrets=@preset:xxxx`, or `--secrets=@json:'{"accesskey1":"secret1"}'`
2010
-
2011
- #### Examples
2012
-
2013
- * Bulk creation
2014
-
2015
- ```
2016
- $ mlia aspera admin res user create --bulk=yes @json:'[{"email":"dummyuser1@example.com"},{"email":"dummyuser2@example.com"}]'
2017
- :.......:.........:
2018
- : id : status :
2019
- :.......:.........:
2020
- : 98398 : created :
2021
- : 98399 : created :
2022
- :.......:.........:
2023
- ```
2024
-
2025
- * Find with filter and delete
2026
-
2027
- ```
2028
- $ mlia aspera admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,email
2029
- :.......:........................:
2030
- : id : email :
2031
- :.......:........................:
2032
- : 98398 : dummyuser1@example.com :
2033
- : 98399 : dummyuser2@example.com :
2034
- :.......:........................:
2035
- $ thelist=$(echo $(mlia aspera admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,email --field=id --format=csv)|tr ' ' ,)
2036
- $ echo $thelist
2037
- 98398,98399
2038
- $ mlia aspera admin res user --bulk=yes --id=@json:[$thelist] delete
2039
- :.......:.........:
2040
- : id : status :
2041
- :.......:.........:
2042
- : 98398 : deleted :
2043
- : 98399 : deleted :
2044
- :.......:.........:
2045
- ```
2046
-
2047
- * Display current user's workspaces
2048
-
2049
- ```
2050
- $ mlia aspera user workspaces
2051
- :......:............................:
2052
- : id : name :
2053
- :......:............................:
2054
- : 16 : Engineering :
2055
- : 17 : Marketing :
2056
- : 18 : Sales :
2057
- :......:............................:
2058
- ```
2059
-
2060
- * Create a sub access key in a "node"
2061
-
2062
- Creation of a sub-access key is like creation of access key with the following difference: authentication to node API is made with accesskey (master access key) and only the path parameter is provided: it is relative to the storage root of the master key. (id and secret are optional)
2063
-
2064
- ```
2065
- $ mlia aspera admin resource node --name=_node_name_ --secret=_secret_ v4 access_key create --value=@json:'{"storage":{"path":"/folder1"}}'
2066
- ```
2067
-
2068
- * Display transfer events (ops/transfer)
2069
-
2070
- ```
2071
- $ mlia aspera admin res node --secret=_secret_ v3 transfer list --value=@json:'[["q","*"],["count",5]]'
2072
- ```
2073
-
2074
- # page=1&per_page=10&q=type:(file_upload+OR+file_delete+OR+file_download+OR+file_rename+OR+folder_create+OR+folder_delete+OR+folder_share+OR+folder_share_via_public_link)&sort=-date
2075
- #events=@api_files.read('events',{'q'=>'type:(file_upload OR file_download)'})[:data]
2076
- # can add filters: tag=aspera.files.package_id%3DLA8OU3p8w
2077
- #'tag'=>'aspera.files.package_id%3DJvbl0w-5A'
2078
- # filter= 'id', 'short_summary', or 'summary'
2079
- # count=nnn
2080
- # tag=x.y.z%3Dvalue
2081
- # iteration_token=nnn
2082
- # after_time=2016-05-01T23:53:09Z
2083
- # active_only=true|false
2084
-
2085
-
2086
- * Display node events (events)
2087
-
2088
- ```
2089
- $ mlia aspera admin res node --secret=_secret_ v3 events
2090
- ```
2091
-
2092
- * display members of a workspace
2093
-
2094
- ```
2095
- $ mlia aspera admin res workspace_membership list --fields=member_type,manager,member.email --query=@json:'{"page":1,"per_page":50,"embed":"member","inherited":false,"workspace_id":11363,"sort":"name"}'
2096
- :.............:.........:..................................:
2097
- : member_type : manager : member.email :
2098
- :.............:.........:..................................:
2099
- : user : true : john.curtis@email.com :
2100
- : user : false : laurent.martin.aspera@fr.ibm.com :
2101
- : user : false : jean.dupont@me.com :
2102
- : user : false : another.user@example.com :
2103
- : group : false : :
2104
- : user : false : aspera.user@gmail.com :
2105
- :.............:.........:..................................:
2106
- ```
2107
-
2108
- other query parameters:
2109
-
2110
- ```
2111
- {"workspace_membership_through":true,"include_indirect":true}
2112
- ```
2113
-
2114
- * <a name="aoc_sample_member"></a>add all members of a workspace to another workspace
2115
-
2116
- a- get id of first workspace
2117
-
2118
- ```
2119
- WS1='First Workspace'
2120
- WS1ID=$(mlia aspera admin res workspace list --query=@json:'{"q":"'"$WS1"'"}' --select=@json:'{"name":"'"$WS1"'"}' --fields=id --format=csv)
2121
- ```
2122
-
2123
- b- get id of second workspace
2124
-
2125
- ```
2126
- WS2='Second Workspace'
2127
- WS2ID=$(mlia aspera admin res workspace list --query=@json:'{"q":"'"$WS2"'"}' --select=@json:'{"name":"'"$WS2"'"}' --fields=id --format=csv)
2128
- ```
2129
-
2130
- c- extract membership information and change workspace id
2131
-
2132
- ```
2133
- mlia aspera admin res workspace_membership list --fields=manager,member_id,member_type,workspace_id --query=@json:'{"per_page":10000,"workspace_id":'"$WS1ID"'}' --format=jsonpp > ws1_members.json
2134
- ```
2135
-
2136
- d- convert to creation data for second workspace:
2137
-
2138
- ```
2139
- grep -Eve '(direct|effective_manager|_count|storage|"id")' ws1_members.json|sed '/workspace_id/ s/"'"$WS1ID"'"/"'"$WS2ID"'"/g' > ws2_members.json
2140
- ```
2141
-
2142
- or, using jq:
2143
-
2144
- ```
2145
- jq '[.[] | {member_type,member_id,workspace_id,manager,workspace_id:"'"$WS2ID"'"}]' ws1_members.json > ws2_members.json
2146
- ```
2147
-
2148
- e- add members to second workspace
2149
-
2150
- ```
2151
- mlia aspera admin res workspace_membership create --bulk=yes @json:@file:ws2_members.json
2152
- ```
2153
-
2154
- * get users who did not log since a date
2155
-
2156
- ```
2157
- $ mlia aspera admin res user list --fields=email --query=@json:'{"per_page":10000,"q":"last_login_at:<2018-05-28"}'
2158
- :...............................:
2159
- : email :
2160
- :...............................:
2161
- : John.curtis@acme.com :
2162
- : Jean.Dupont@tropfort.com :
2163
- :...............................:
2164
- ```
2165
-
2166
- * list "Limited" users
2167
-
2168
- ```
2169
- $ mlia aspera admin res user list --fields=email --query=@json:'{"per_page":10000}' --select=@json:'{"member_of_any_workspace":false}'
2170
- ```
2171
-
2172
- * Perform a multi Gbps transfer between two remote shared folders
2173
-
2174
- In this example, a user has access to a workspace where two shared folders are located on differente sites, e.g. different cloud regions.
2175
-
2176
- First, setup the environment (skip if already done)
2177
-
2178
- ```
2179
- $ mlia conf wizard --url=https://sedemo.ibmaspera.com --username=laurent.martin.aspera@fr.ibm.com
2180
- Detected: Aspera on Cloud
2181
- Preparing preset: aoc_sedemo
2182
- Using existing key:
2183
- /Users/laurent/.aspera/mlia/aspera_on_cloud_key
2184
- Using global client_id.
2185
- Please Login to your Aspera on Cloud instance.
2186
- Navigate to your "Account Settings"
2187
- Check or update the value of "Public Key" to be:
2188
- -----BEGIN PUBLIC KEY-----
2189
- SOME PUBLIC KEY PEM DATA HERE
2190
- -----END PUBLIC KEY-----
2191
- Once updated or validated, press enter.
2192
-
2193
- creating new config preset: aoc_sedemo
2194
- Setting config preset as default for aspera
2195
- saving config file
2196
- Done.
2197
- You can test with:
2198
- mlia aspera user info show
2199
- ```
2200
-
2201
- This creates the option preset "aoc_&lt;org name&gt;" to allow seamless command line access and sets it as default for aspera on cloud.
2202
-
2203
- Then, create two shared folders located in two regions, in your files home, in a workspace.
2204
-
2205
- Then, transfer between those:
2206
-
2207
- ```
2208
- $ mlia -Paoc_show aspera 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}'
2209
- ```
2210
-
2211
- * create registration key to register a node
2212
- ```
2213
- $ mlia aspera admin res admin/client create @json:'{"data":{"name":"laurentnode","client_subject_scopes":["alee","aejd"],"client_subject_enabled":true}}' --fields=token --format=csv
2214
- jfqslfdjlfdjfhdjklqfhdkl
2215
- ```
2216
-
2217
- * delete all registration keys
2218
-
2219
- ```
2220
- $ mlia aspera admin res admin/client list --fields=id --format=csv|mlia aspera admin res admin/client delete --bulk=yes --id=@lines:@stdin:
2221
- +-----+---------+
2222
- | id | status |
2223
- +-----+---------+
2224
- | 99 | deleted |
2225
- | 100 | deleted |
2226
- | 101 | deleted |
2227
- | 102 | deleted |
2228
- +-----+---------+
2229
- ```
2230
-
2231
- ## Shared folders
2232
-
2233
- * list shared folders in node
2234
-
2235
- ```
2236
- $ mlia aspera admin res node --id=8669 shared_folders
2237
- ```
2238
-
2239
- * list shared folders in workspace
2240
-
2241
- ```
2242
- $ mlia aspera admin res workspace --id=10818 shared_folders
2243
- ```
2244
-
2245
- * list members of shared folder
2246
-
2247
- ```
2248
- $ mlia aspera admin res node --id=8669 v4 perm 82 show
2249
- ```
2250
-
2251
- ## Send a Package
2252
-
2253
- Send a package:
2254
-
2255
- ```
2256
- $ mlia aspera packages send --value=@json:'{"name":"my title","note":"my note","recipients":["laurent.martin.aspera@fr.ibm.com","other@example.com"]}' --sources=@args my_file.dat
2257
- ```
2258
-
2259
- Notes:
2260
-
2261
- * the `value` parameter can contain any supported package creation parameter. Refer to the API, or display an existing package.
2262
- * to list recipients use fields: "recipients" and/or "bcc_recipients". mlia will resolve the list of email addresses to expected user ids. If a recipient is not already registered and the workspace allows external users, then the package is sent to an external user, and
2263
- * 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.
2264
- * if the option `new_user_option` is `@json:{}`, then external users are invited to join the workspace
2265
-
2266
- ## <a name="aoccargo"></a>Receive only new packages
2267
-
2268
- It is possible to automatically download new packages, like using Aspera Cargo:
2269
-
2270
- ```
2271
- $ mlia aspera packages recv --id=ALL --once-only=yes --lock-port=12345
2272
- ```
2273
-
2274
- * `--id=ALL` (case sensitive) will download all packages
2275
- * `--once-only=yes` keeps memory of any downloaded package in persistency files located in the configuration folder.
2276
- * `--lock-port=12345` ensures that only one instance is started at the same time, to avoid collisions
2277
-
2278
- Typically, one would regularly execute this command on a regular basis, using the method oif your choice:
2279
-
2280
- * Windows scheduler
2281
- * cron
2282
- * etc...
2283
-
2284
- ## Download Files
2285
-
2286
- Download of files is straightforward with a specific syntax for the `aspera files download` action: Like other commands the source file list is provided as a list with the `sources` option. Nevertheless, consider this:
2287
-
2288
- * if only one source is provided, it is downloaded
2289
- * if multiple sources must be downloaded, then the first in list is the path of the source folder, and the remaining items are the file names in this folder (without path).
2290
-
2291
- ## Find Files
2292
-
2293
- The command `aspera files find [--value=expression]` will recursively scan storage to find files matching the expression criteria. It works also on node resource using the v4 command. (see examples)
2294
-
2295
- The expression can be of 3 formats:
2296
-
2297
- * empty (default) : all files, equivalent to: `exec:true`
2298
- * not starting with `exec:` : the expression is a regular expression, using ruby regex syntax. equivalent to: `exec:f['name'].match(/expression/)`
2299
-
2300
- For instance, to find files with a special extension, use `--value='\.myext$'`
2301
-
2302
- * starting with `exec:` : the ruby code after the prefix is executed for each entry found. the entry variable name is `f`. the file is displayed if the result is true;
2303
-
2304
- Examples of expressions: (think to prefix with `exec:` and put in single quotes using bash)
2305
-
2306
- * find files more recent than 100 days
2307
-
<