aspera-cli 4.0.0.pre2 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +761 -210
  3. data/bin/ascli +2 -0
  4. data/bin/dascli +13 -0
  5. data/docs/Makefile +2 -1
  6. data/docs/README.erb.md +628 -160
  7. data/docs/test_env.conf +22 -10
  8. data/docs/transfer_spec.html +1 -1
  9. data/lib/aspera/aoc.rb +87 -108
  10. data/lib/aspera/cli/formater.rb +2 -0
  11. data/lib/aspera/cli/main.rb +48 -45
  12. data/lib/aspera/cli/manager.rb +19 -6
  13. data/lib/aspera/cli/plugin.rb +9 -4
  14. data/lib/aspera/cli/plugins/alee.rb +1 -1
  15. data/lib/aspera/cli/plugins/aoc.rb +208 -183
  16. data/lib/aspera/cli/plugins/ats.rb +2 -2
  17. data/lib/aspera/cli/plugins/config.rb +205 -125
  18. data/lib/aspera/cli/plugins/console.rb +2 -2
  19. data/lib/aspera/cli/plugins/faspex.rb +15 -8
  20. data/lib/aspera/cli/plugins/faspex5.rb +76 -37
  21. data/lib/aspera/cli/plugins/node.rb +3 -3
  22. data/lib/aspera/cli/plugins/preview.rb +35 -25
  23. data/lib/aspera/cli/plugins/server.rb +23 -8
  24. data/lib/aspera/cli/transfer_agent.rb +7 -6
  25. data/lib/aspera/cli/version.rb +1 -1
  26. data/lib/aspera/colors.rb +5 -1
  27. data/lib/aspera/cos_node.rb +33 -28
  28. data/lib/aspera/environment.rb +15 -4
  29. data/lib/aspera/fasp/connect.rb +28 -21
  30. data/lib/aspera/fasp/http_gw.rb +140 -28
  31. data/lib/aspera/fasp/installation.rb +119 -57
  32. data/lib/aspera/fasp/local.rb +174 -178
  33. data/lib/aspera/fasp/manager.rb +12 -0
  34. data/lib/aspera/fasp/node.rb +4 -4
  35. data/lib/aspera/fasp/parameters.rb +6 -18
  36. data/lib/aspera/fasp/resume_policy.rb +13 -12
  37. data/lib/aspera/log.rb +10 -2
  38. data/lib/aspera/node.rb +61 -1
  39. data/lib/aspera/oauth.rb +36 -13
  40. data/lib/aspera/persistency_folder.rb +9 -4
  41. data/lib/aspera/preview/file_types.rb +53 -21
  42. data/lib/aspera/preview/generator.rb +3 -3
  43. data/lib/aspera/rest.rb +29 -18
  44. data/lib/aspera/secrets.rb +20 -0
  45. data/lib/aspera/temp_file_manager.rb +19 -0
  46. metadata +40 -22
data/bin/ascli CHANGED
@@ -2,6 +2,8 @@
2
2
  require 'rubygems'
3
3
  $LOAD_PATH.unshift(File.dirname(__FILE__)+"/../lib")
4
4
  require 'aspera/cli/main'
5
+ require 'aspera/environment'
5
6
  Encoding.default_internal = Encoding::UTF_8
6
7
  Encoding.default_external = Encoding::UTF_8
8
+ Aspera::Environment.fix_home
7
9
  Aspera::Cli::Main.new(ARGV).process_command_line
data/bin/dascli ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+ tag=martinlaurent/ascli:latest
3
+ case "$1" in install)
4
+ docker pull $tag
5
+ exit 0
6
+ esac
7
+ conf_host=${ASCLI_HOME:-$HOME/.aspera/ascli}
8
+ if test ! -d $conf_host;then
9
+ echo creating foder: $conf_host
10
+ mkdir -p $conf_host
11
+ fi
12
+ conf_img=/usr/src/app/config
13
+ exec docker run --tty --interactive --rm --env ASCLI_HOME="$conf_img" --volume "$conf_host:$conf_img" $tag ascli "$@"
data/docs/Makefile CHANGED
@@ -56,7 +56,8 @@ $(INCL_COMMANDS): $(DIR_TMP).exists $(TEST_MAKEFILE)
56
56
  # generated help of tools depends on all sources, so regenerate always
57
57
  .PHONY: $(INCL_USAGE)
58
58
  $(INCL_USAGE): $(DIR_TMP).exists
59
- $(EXETESTB) -Cnone -h 2> $(INCL_USAGE) || true
59
+ -$(EXETESTB) -Cnone -h 2> $(INCL_USAGE)
60
+ sed -i -e 's/\/Users\/[^\/]*/\/Users\/FooBar/g' $(INCL_USAGE)
60
61
  .PHONY: $(INCL_ASESSION)
61
62
  $(INCL_ASESSION): $(DIR_TMP).exists
62
63
  $(DIR_BIN)/asession -h 2> $(INCL_ASESSION) || true
data/docs/README.erb.md CHANGED
@@ -15,32 +15,77 @@ prstt=opprst.capitalize # in title
15
15
  gemspec=Gem::Specification::load(ENV["GEMSPEC"]) or raise "error loading #{ENV["GEMSPEC"]}"
16
16
  geminstadd=gemspec.version.to_s.match(/\.[^0-9]/)?' --pre':''
17
17
  -%>
18
- # <%=tool%> : a Command Line for IBM Aspera products
18
+ # <%=tool%> : Command Line Interface for IBM Aspera products
19
19
 
20
20
  Version : <%= gemspec.version.to_s %>
21
21
 
22
22
  _Laurent/2016-<%=Time.new.year%>_
23
23
 
24
- This gem provides a command line interface to Aspera Applications.
24
+ This gem provides <%=tool%>: a command line interface to Aspera Applications.
25
25
 
26
- Location (once released):
27
- [<%= gemspec.metadata['rubygems_uri'] %>](<%= gemspec.metadata['rubygems_uri'] %>)
26
+ <%=tool%> is a also great tool to learn Aspera APIs.
28
27
 
29
- Disclaimers:
28
+ Ruby Gem: [<%= gemspec.metadata['rubygems_uri'] %>](<%= gemspec.metadata['rubygems_uri'] %>)
30
29
 
31
- * This has not yet been officially released so things may change
30
+ Ruby Doc: [<%= gemspec.metadata['documentation_uri'] %>](<%= gemspec.metadata['documentation_uri'] %>)
32
31
 
33
- That being said, <%=tool%> is very powerful and gets things done, it&apos;s also a great tool to learn Aspera APIs.
32
+ Ruby version must be >= <%= gemspec.required_ruby_version %>
34
33
 
35
- This manual addresses three parts:
34
+ # <a name="when_to_use"></a>When to use and when not to use
36
35
 
37
- * <%=tool%> : The command line tool
38
- * `asession` : starting a FASP Session with JSON parameters
39
- * `Aspera` : includes a Ruby "FASPManager"
36
+ <%=tool%> is designed to be used as a command line tool to:
37
+
38
+ * execute commands on Aspera products
39
+ * transfer to/from Aspera products
40
+
41
+ So it is designed for:
42
+
43
+ * Interactive operations on a text terminal (typically, VT100 compatible)
44
+ * Batch operations in (shell) scripts (e.g. cron job)
45
+
46
+ <%=tool%> can be seen as a command line tool integrating:
47
+
48
+ * a configuration file (config.yaml) and advanced command line options
49
+ * cURL (for REST calls)
50
+ * Aspera transfer (ascp)
51
+
52
+ One might be tempted to use it as an integration element, e.g. by building a command line programmatically, and then executing it. It is generally not a good idea.
53
+ For such integration cases, e.g. performing operations and transfer to aspera products, it is preferred to use [Aspera APIs](https://ibm.biz/aspera_api):
54
+
55
+ * Product APIs (REST) : e.g. AoC, Faspex, node
56
+ * Transfer SDK : with gRPC interface and laguage stubs (C, C++, Python, .NET/C#, java, ruby, etc...)
57
+
58
+ Using APIs (application REST API and transfer SDK) will prove to be easier to develop and maintain.
59
+
60
+ For scripting and ad'hoc command line operations, <%=tool%> is perfect.
61
+
62
+ # Notations
40
63
 
41
64
  In examples, command line operations (starting with `$`) are shown using a standard shell: `bash` or `zsh`.
65
+ Prompt `# ` refers to user `root`, prompt `xfer$ ` refer to user `xfer`.
66
+
67
+ Command line parameters in examples beginning with `my_`, like `my_param_value` are user-provided value and not fixed value commands.
68
+
69
+ # <a name="parsing"></a>Shell and Command line parsing
70
+
71
+ <%=tool%> is typically executed in a shell, either interactively or in a script. <%=tool%> receives its arguments from this shell.
72
+
73
+ On Linux and Unix environments, this is typically a POSIX shell (bash, zsh, ksh, sh). In this environment shell command line parsing applies before <%=tool%> (Ruby) is executed, e.g. [bash shell operation](https://www.gnu.org/software/bash/manual/bash.html#Shell-Operation). Ruby receives a list parameters and gives it to <%=tool%>. So special character handling (quotes, spaces, env vars, ...) is done in the shell.
74
+
75
+ On Windows, `cmd` is typically used. Windows process creation does not receive the list of arguments but just the whole line. It's up to the program to parse arguments. Ruby follows the Microsoft C/C++ parameter parsing rules.
76
+
77
+ * [Windows: How Command Line Parameters Are Parsed](https://daviddeley.com/autohotkey/parameters/parameters.htm#RUBY)
78
+ * [Understand Quoting and Escaping of Windows Command Line Arguments](http://www.windowsinspired.com/understanding-the-command-line-string-and-arguments-received-by-a-windows-program/)
42
79
 
43
- Command line parameters in example beginning with `my_`, like `my_param_value` are user-provided value and not fixed value commands.
80
+ In case of doubt of argument values after parsing test like this:
81
+
82
+ ```
83
+ $ <%=cmd%> conf echo "Hello World" arg2 3
84
+ "Hello World"
85
+ ERROR: Argument: unprocessed values: ["arg2", "3"]
86
+ ```
87
+
88
+ `echo` displays the value of the first argument using ruby syntax (strings get double quotes) after command line parsing (shell) and extended value parsing (ascli), next command line arguments are shown in the error message.
44
89
 
45
90
  # Quick Start
46
91
 
@@ -61,9 +106,10 @@ Once installation is completed, you can proceed to the first use with a demo ser
61
106
 
62
107
  If you want to test with Aspera on Cloud, jump to section: [Wizard](#aocwizard)
63
108
 
64
- If you want to test with Aspera demo transfer server, a default configuration is created on first use:
109
+ To test with Aspera demo transfer server, setup the environment and then test:
65
110
 
66
111
  ```
112
+ $ <%=cmd%> config initdemo
67
113
  $ <%=cmd%> server browse /
68
114
  :............:...........:......:........:...........................:.......................:
69
115
  : zmode : zuid : zgid : size : mtime : name :
@@ -83,7 +129,7 @@ If you want to use <%=tool%> with another server, and in order to make further c
83
129
  * download a file
84
130
 
85
131
  ```
86
- $ <%=cmd%> config id myserver update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=demoaspera
132
+ $ <%=cmd%> config id myserver update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=_demo_pass_
87
133
  updated: myserver
88
134
  $ <%=cmd%> config id default set server myserver
89
135
  updated: default&rarr;server to myserver
@@ -117,78 +163,159 @@ Then, follow the section relative to the product you want to interact with ( Asp
117
163
 
118
164
  # <a name="installation"></a>Installation
119
165
 
120
- In order to use the tool or the gem, it is necessary to install those components:
166
+ It is possible to install *either* directly on the host operating system (Linux, Windows, Macos) or as a docker container.
121
167
 
122
- * [Ruby](#ruby)
168
+ The direct installation is recommended and consists in installing:
169
+
170
+ * [Ruby](#ruby) version >= <%= gemspec.required_ruby_version %>
123
171
  * [<%= gemspec.name %>](#the_gem)
124
- * [FASP](#fasp_prot)
172
+ * [Aspera SDK (ascp)](#fasp_prot)
173
+
174
+ The following sections provide information on the various installation methods.
175
+
176
+ An internet connection is required for the installation. If you dont have internet for the installation, refer to section [Installation without internet access](#offline_install).
177
+
178
+ ## Docker container
125
179
 
126
- The following sections provide information on the installation.
180
+ Use this method only if you know what you do, else use the standard recommended method as described here above.
181
+
182
+ This method installs a docker image that contains: Ruby, ascli and the FASP sdk.
183
+
184
+ Ensure that you have Docker installed.
185
+
186
+ ```
187
+ $ docker --version
188
+ ```
189
+
190
+ Download the wrapping script:
191
+
192
+ ```
193
+ $ curl -o <%=cmd%> https://raw.githubusercontent.com/IBM/aspera-cli/develop/bin/dascli
194
+ $ chmod a+x <%=cmd%>
195
+ ```
196
+
197
+ Install the container image:
198
+
199
+ ```
200
+ $ ./<%=cmd%> install
201
+ ```
202
+
203
+ Start using it !
204
+
205
+ Note that the tool is run in the container, so transfers are also executed in the container, not calling host.
206
+
207
+ The wrapping script maps the container folder `/usr/src/app/config` to configuration folder `$HOME/.aspera/<%=cmd%>` on host.
208
+
209
+ To transfer to/from the native host, you will need to map a volume in docker or use the config folder (already mapped).
210
+ To add local storage as a volume edit the script: ascli and add a `--volume` stanza.
127
211
 
128
212
  ## <a name="ruby"></a>Ruby
129
213
 
214
+ Use this method to install on the native host.
215
+
130
216
  A ruby interpreter is required to run the tool or to use the gem and tool.
131
- The Ruby version shall be <%= gemspec.required_ruby_version %>.
132
- Any type of Ruby installation can be used.
217
+
218
+ Ruby minimum version: <%= gemspec.required_ruby_version %>. Ruby version 3 is also supported.
219
+
220
+ *Ruby can be installed using any method* : rpm, yum, dnf, rvm, brew, windows installer, ... .
133
221
 
134
222
  Refer to the following sections for a proposed method for specific operating systems.
135
223
 
136
- ### macOS
224
+ The recommended installation method is `rvm` for systems with "bash-like" shell (Linux, Macos, Windows with cygwin, etc...).
225
+ If the generic install is not suitable (e.g. Windows, no cygwin), you can use one of OS-specific install method.
226
+ If you have a simpler better way to install Ruby version >= <%= gemspec.required_ruby_version %> : use it !
137
227
 
228
+ ### Generic: RVM: single user installation (not root)
138
229
 
139
- MacOS 10.13+ (High Sierra) comes with a recent Ruby, so you can use it directly, you will need to install <%= gemspec.name %> using `sudo` :
230
+ Use this method which provides more flexibility.
231
+
232
+ Install "rvm": follow [https://rvm.io/](https://rvm.io/) :
233
+
234
+ Install the 2 keys
140
235
 
141
236
  ```
142
- $ sudo gem install <%= gemspec.name %><%=geminstadd%>
237
+ $ gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
143
238
  ```
144
239
 
145
- Alternatively, if you use [Homebrew](https://brew.sh/) already you can install Ruby with it:
240
+ Execute the shell/curl command. As regular user, it install in the user's home: `~/.rvm` .
146
241
 
147
242
  ```
148
- $ brew install ruby
243
+ $ \curl -sSL https://get.rvm.io | bash -s stable
149
244
  ```
150
245
 
151
- ### Windows
246
+ If you keep the same terminal (ont needed if re-login):
247
+
248
+ ```
249
+ $ source ~/.rvm/scripts/rvm
250
+ ```
152
251
 
153
- Install Latest stable Ruby using [https://rubyinstaller.org/](https://rubyinstaller.org/).
252
+ It is advised to get one of the pre-compiled ruby version, you can list with:
154
253
 
155
- Go to "Downloads".
254
+ ```
255
+ $ rvm list --remote
256
+ ```
156
257
 
157
- Select the version "without devkit", x64 corresponding to the one recommended "with devkit".
258
+ Install the chosen pre-compiled Ruby version:
158
259
 
159
- During installation, skip the installation of "MSys2".
260
+ ```
261
+ $ rvm install 2.7.2 --binary
262
+ ```
160
263
 
161
- ### Linux
264
+ Ruby is now installed for the user, go on to Gem installation.
162
265
 
163
- Install Latest Ruby using "rvm" [https://rvm.io/](https://rvm.io/) .
164
- It installs by default in /usr/local/rvm , but you can install in another location:
266
+ ### Generic: RVM: global installation (as root)
267
+
268
+ Follow the same method as single user install, but execute as "root".
269
+
270
+ As root, it installs by default in /usr/local/rvm for all users and creates `/etc/profile.d/rvm.sh`.
271
+ One can install in another location with :
165
272
 
166
273
  ```
167
- curl -sSL https://get.rvm.io | bash -s -- --path /usr/local
274
+ # curl -sSL https://get.rvm.io | bash -s -- --path /usr/local
168
275
  ```
169
276
 
170
- Once installed, you can install latest ruby:
277
+ As root, make sure this will not collide with other application using Ruby (e.g. Faspex).
278
+ If so, one can rename the login script: `mv /etc/profile.d/rvm.sh /etc/profile.d/rvm.sh.ok`.
279
+ To activate ruby (and <%=cmd%>) later, source it:
171
280
 
172
281
  ```
173
- # rvm install ruby
282
+ # source /etc/profile.d/rvm.sh.ok
283
+ # rvm version
174
284
  ```
175
285
 
176
- If you dont want all users to have ruby by default,
177
- rename the file: `/etc/profile.d/rvm.sh` with another extension, and source it to get rvm.
286
+ ### Windows: Installer
287
+
288
+ Install Latest stable Ruby using [https://rubyinstaller.org/](https://rubyinstaller.org/) :
289
+
290
+ * Go to "Downloads".
291
+ * Select the Ruby 2 version "without devkit", x64 corresponding to the one recommended "with devkit". Devkit is not needed.
292
+ * At the end of the installer uncheck the box to skip the installation of "MSys2": not needed.
178
293
 
179
- 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.
294
+ ### macOS: pre-installed or `brew`
295
+
296
+ MacOS 10.13+ (High Sierra) comes with a recent Ruby. So you can use it directly. You will need to install <%= gemspec.name %> using `sudo` :
180
297
 
181
298
  ```
182
- # yum install -y ruby rubygems ruby-json
299
+ $ sudo gem install <%= gemspec.name %><%=geminstadd%>
183
300
  ```
184
301
 
185
- If necessary, pre-install jwt for older Ruby < 2.1.
302
+ Alternatively, if you use [Homebrew](https://brew.sh/) already you can install Ruby with it:
303
+
304
+ ```
305
+ $ brew install ruby
306
+ ```
307
+
308
+ ### Linux: package
309
+
310
+ If your Linux distribution provides a standard ruby package, you can use it provided that the version is compatible (check at beginning of section).
311
+
312
+ Example:
186
313
 
187
314
  ```
188
- # gem install jwt -v 1.5.6
315
+ # yum install -y ruby rubygems ruby-json
189
316
  ```
190
317
 
191
- You can cleanup your whole yum-installed ruby environment like this to uninstall:
318
+ One can cleanup the whole yum-installed ruby environment like this to uninstall:
192
319
 
193
320
  ```
194
321
  gem uninstall $(ls $(gem env gemdir)/gems/|sed -e 's/-[^-]*$//'|sort -u)
@@ -197,7 +324,7 @@ yum remove -y ruby ruby-libs
197
324
 
198
325
  ### Other Unixes: Aix, etc...
199
326
 
200
- If your unix do not provide a pre-built ruby, you can get using one of those
327
+ If your unix do not provide a pre-built ruby, you can get it using one of those
201
328
  [methods](https://www.ruby-lang.org/en/documentation/installation/)
202
329
 
203
330
  For instance to build from source, and install in `/opt/ruby` :
@@ -213,6 +340,50 @@ For instance to build from source, and install in `/opt/ruby` :
213
340
  # make install
214
341
  ```
215
342
 
343
+ ### <a name="offline_install"></a>Installation without internet access
344
+
345
+ Note that currently no pre-packaged version exist yet.
346
+ A method to build one provided here:
347
+
348
+ On a server with the same OS version and with internet access follow the "Generic single user installation" method.
349
+
350
+ Then create an archive:
351
+
352
+ ```
353
+ $ cd
354
+ $ tar zcvf rvm-<%=cmd%>.tgz .rvm
355
+ ```
356
+
357
+ Get the Aspera SDK. Execute:
358
+
359
+ ```
360
+ $ <%=cmd%> conf --show-config|grep sdk_url
361
+ ```
362
+
363
+ Then download the SDK archive from that URL.
364
+
365
+ Another method for the SDK is to install the SDK (`<%=cmd%> conf ascp install`) on the first system, and archive `$HOME/.aspera`.
366
+
367
+ Transfer those 2 archives to the target system without internet access.
368
+
369
+ On the target system:
370
+
371
+ * Extract the RVM archive either in a global location, or in a user's home folder : `path_to_rvm_root`
372
+ * in the user's `.profile` add this line: (replace `path_to_rvm_root` with the actual location)
373
+
374
+ ```
375
+ source path_to_rvm_root/scripts/rvm
376
+ rvm use 2.7.2
377
+ ```
378
+
379
+ For the SDK, either install from archive:
380
+
381
+ ```
382
+ $ <%=cmd%> conf ascp install --sdk-url=file:///SDK.zip
383
+ ```
384
+
385
+ or restore the `$HOME/.aspera` folder for the user.
386
+
216
387
  ## <a name="the_gem"></a>`<%= gemspec.name %>` gem
217
388
 
218
389
  Once you have Ruby and rights to install gems: Install the gem and its dependencies:
@@ -227,21 +398,40 @@ To upgrade to the latest version:
227
398
  # gem update <%= gemspec.name %>
228
399
  ```
229
400
 
401
+ <%=tool%> checks every week if a new version is available and notify the user in a WARN log. To de-activate this feature set the option `version_check_days` to `0`, or specify a different period in days.
402
+
403
+ To check manually:
404
+
405
+ ```
406
+ # <%=cmd%> conf check_update
407
+ ```
408
+
409
+
410
+
230
411
  ## <a name="fasp_prot"></a>FASP Protocol
231
412
 
232
- Most file transfers will be done using the FASP protocol. Only two additional files are required to perform
233
- an Aspera Transfer:
413
+ Most file transfers will be done using the FASP protocol, using `ascp`.
414
+ Only two additional files are required to perform an Aspera Transfer, which are part of Aspera SDK:
234
415
 
235
416
  * ascp
236
417
  * aspera-license (in same folder, or ../etc)
237
418
 
238
- This can be installed directly with
419
+ This can be installed either be installing an Aspera transfer sofware, or using an embedded command:
239
420
 
240
421
  ```
241
422
  $ <%=cmd%> conf ascp install
242
423
  ```
243
424
 
244
- Those can be found in one of IBM Aspera transfer server or client with its license file (some are free):
425
+ If a local SDK installation is prefered instead of fetching from internet: one can specify the location of the SDK file:
426
+
427
+ ```
428
+ $ curl -Lso SDK.zip https://ibm.biz/aspera_sdk
429
+ $ <%=cmd%> conf ascp install --sdk-url=file:///SDK.zip
430
+ ```
431
+
432
+ The format is: `file:///<path>`, where `<path>` can be either a relative path (not starting with `/`), or an absolute path.
433
+
434
+ If the embedded method is not used, the following packages are also suitable:
245
435
 
246
436
  * IBM Aspera Connect Client (Free)
247
437
  * IBM Aspera Desktop Client (Free)
@@ -250,7 +440,7 @@ Those can be found in one of IBM Aspera transfer server or client with its licen
250
440
  * IBM Aspera High Speed Transfer EndPoint (Licensed)
251
441
 
252
442
  For instance, Aspera Connect Client can be installed
253
- by visiting the page: [http://downloads.asperasoft.com/connect2/](http://downloads.asperasoft.com/connect2/).
443
+ by visiting the page: [https://www.ibm.com/aspera/connect/](https://www.ibm.com/aspera/connect/).
254
444
 
255
445
  <%=tool%> will detect most of Aspera transfer products in standard locations and use the first one found.
256
446
  Refer to section [FASP](#client) for details on how to select a client or set path to the FASP protocol.
@@ -258,6 +448,33 @@ Refer to section [FASP](#client) for details on how to select a client or set pa
258
448
  Several methods are provided on how to start a transfer. Use of a local client is one of them, but
259
449
  other methods are available. Refer to section: [Transfer Agents](#agents)
260
450
 
451
+ ## <a name="offline_install"></a>Offline Installation (without internet)
452
+
453
+ The procedure consists in:
454
+
455
+ * Follow the non-root installation procedure with RVM, including gem
456
+ * archive (zip, tar) the main RVM folder (includes <%=cmd%>):
457
+
458
+ ```
459
+ $ cd ~
460
+ $ tar zcvf rvm_<%=cmd%>.tgz .rvm
461
+ ```
462
+
463
+ * retrieve the SDK:
464
+
465
+ ```
466
+ $ curl -Lso SDK.zip https://ibm.biz/aspera_sdk
467
+ ```
468
+
469
+ * on the system without internet access:
470
+
471
+ ```
472
+ $ cd ~
473
+ $ tar zxvf rvm_<%=cmd%>.tgz
474
+ $ source ~/.rvm/scripts/rvm
475
+ $ <%=cmd%> conf ascp install --sdk-url=file:///SDK.zip
476
+ ```
477
+
261
478
  # <a name="cli"></a>Command Line Interface: <%=tool%>
262
479
 
263
480
  The `<%= gemspec.name %>` Gem provides a command line interface (CLI) which interacts with Aspera Products (mostly using REST APIs):
@@ -438,6 +655,7 @@ By default, a table output will display one line per entry, and columns for each
438
655
  * a,b,c : the list of attributes specified by the comma separated list
439
656
  * Array extended value: for instance, @json:'["a","b","c"]' same as above
440
657
  * +a,b,c : add selected properties to the default selection.
658
+ * -a,b,c : remove selected properties from the default selection.
441
659
 
442
660
  ## <a name="extended"></a>Extended Value Syntax
443
661
 
@@ -451,25 +669,25 @@ The extended value syntax is:
451
669
 
452
670
  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.
453
671
 
454
- The following "readers" are supported:
672
+ The following "readers" are supported (returns value in []):
455
673
 
456
- * @val:VALUE , prevent further special prefix processing, e.g. `--username=@val:laurent` sets the option `username` to value `laurent`.
457
- * @file:PATH , read value from a file (prefix "~/" is replaced with the users home folder), e.g. --key=@file:~/.ssh/mykey
458
- * @path:PATH , performs path expansion (prefix "~/" is replaced with the users home folder), e.g. --config-file=@path:~/sample_config.yml
459
- * @env:ENVVAR , read from a named env var, e.g.--password=@env:MYPASSVAR
460
- * @stdin: , read from stdin (no value on right)
461
- * @preset:NAME , get whole <%=opprst%> value by name
674
+ * @val:VALUE : [String] prevent further special prefix processing, e.g. `--username=@val:laurent` sets the option `username` to value `laurent`.
675
+ * @file:PATH : [String] read value from a file (prefix "~/" is replaced with the users home folder), e.g. --key=@file:~/.ssh/mykey
676
+ * @path:PATH : [String] performs path expansion (prefix "~/" is replaced with the users home folder), e.g. --config-file=@path:~/sample_config.yml
677
+ * @env:ENVVAR : [String] read from a named env var, e.g.--password=@env:MYPASSVAR
678
+ * @stdin: : [String] read from stdin (no value on right)
679
+ * @preset:NAME : [Hash] get whole <%=opprst%> value by name
462
680
 
463
681
  In addition it is possible to decode a value, using one or multiple decoders :
464
682
 
465
- * @base64: decode a base64 encoded string
466
- * @json: decode JSON values (convenient to provide complex structures)
467
- * @zlib: uncompress data
468
- * @ruby: execute ruby code
469
- * @csvt: decode a titled CSV value
470
- * @lines: split a string in multiple lines and return an array
471
- * @list: split a string in multiple items taking first character as separator and return an array
472
- * @incps: include values of presets specified by key include_presets in hash
683
+ * @base64: [String] decode a base64 encoded string
684
+ * @json: [any] decode JSON values (convenient to provide complex structures)
685
+ * @zlib: [String] uncompress data
686
+ * @ruby: [any] execute ruby code
687
+ * @csvt: [Array] decode a titled CSV value
688
+ * @lines: [Array] split a string in multiple lines and return an array
689
+ * @list: [Array] split a string in multiple items taking first character as separator and return an array
690
+ * @incps: [Hash] include values of presets specified by key `incps` in input hash
473
691
 
474
692
  To display the result of an extended value, use the `config echo` command.
475
693
 
@@ -501,7 +719,7 @@ $ <%=cmd%> config echo @csvt:@file:test.csv
501
719
  :......:.....................:
502
720
  ```
503
721
 
504
- Example: create a hash and include values from preset named "config" of config file
722
+ Example: create a hash and include values from preset named "config" of config file in this hash
505
723
 
506
724
  ```
507
725
  $ <%=cmd%> config echo @incps:@json:'{"hello":true,"incps":["config"]}'
@@ -523,14 +741,28 @@ It is also possible to provide a _Structured Value_ in a file using `@json:@file
523
741
 
524
742
  ## <a name="conffolder"></a>Configuration and Persistency Folder
525
743
 
526
- <%=tool%> configuration and other runtime files (token cache, file lists, persistency files)
527
- are stored in folder `$HOME/.aspera/<%=cmd%>`. The folder can be displayed using :
744
+ <%=tool%> configuration and other runtime files (token cache, file lists, persistency files, SDK) are stored in folder `[User's home folder]/.aspera/<%=cmd%>`.
745
+
746
+ Note: `[User's home folder]` is found using ruby's `Dir.home` (`rb_w32_home_dir`).
747
+ It uses the `HOME` env var primarily, and on MS Windows it also looks at `%HOMEDRIVE%%HOMEPATH%` and `%USERPROFILE%`. <%=tool%> sets the env var `%HOME%` to the value of `%USERPROFILE%` if set and exists. So, on Windows `%USERPROFILE%` is used as it is more reliable than `%HOMEDRIVE%%HOMEPATH%`.
748
+
749
+ The main folder can be displayed using :
528
750
 
529
751
  ```
530
752
  $ <%=cmd%> config folder
531
753
  /Users/kenji/.aspera/<%=cmd%>
532
754
  ```
533
755
 
756
+ It can be overriden using the envinonment variable `<%=evp%>HOME`.
757
+
758
+ Example (Windows):
759
+
760
+ ```
761
+ $ set <%=evp%>HOME=C:\Users\Kenji\.aspera\<%=cmd%>
762
+ $ <%=cmd%> config folder
763
+ C:\Users\Kenji\.aspera\<%=cmd%>
764
+ ```
765
+
534
766
  ## <a name="configfile"></a>Configuration file
535
767
 
536
768
  On the first execution of <%=tool%>, an empty configuration file is created in the configuration folder.
@@ -563,7 +795,7 @@ $ <%=cmd%> config id <<%=opprst%>> set|delete|show|initialize|update
563
795
  The command `update` allows the easy creation of <%=prst%> by simply providing the options in their command line format, e.g. :
564
796
 
565
797
  ```
566
- $ <%=cmd%> config id demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=demoaspera --ts=@json:'{"precalculate_job_size":true}'
798
+ $ <%=cmd%> config id demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=_demo_pass_ --ts=@json:'{"precalculate_job_size":true}'
567
799
  ```
568
800
 
569
801
  * This creates a <%=prst%> `demo_server` with all provided options.
@@ -571,13 +803,13 @@ $ <%=cmd%> config id demo_server update --url=ssh://demo.asperasoft.com:33001 --
571
803
  The command `set` allows setting individual options in a <%=prst%>.
572
804
 
573
805
  ```
574
- $ <%=cmd%> config id demo_server set password demoaspera
806
+ $ <%=cmd%> config id demo_server set password _demo_pass_
575
807
  ```
576
808
 
577
809
  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)_.
578
810
 
579
811
  ```
580
- $ <%=cmd%> config id demo_server initialize @json:'{"url":"ssh://demo.asperasoft.com:33001","username":"asperaweb","password":"demoaspera","ts":{"precalculate_job_size":true}}'
812
+ $ <%=cmd%> config id demo_server initialize @json:'{"url":"ssh://demo.asperasoft.com:33001","username":"asperaweb","password":"_demo_pass_","ts":{"precalculate_job_size":true}}'
581
813
  ```
582
814
 
583
815
  A good practice is to not manually edit the configuration file and use modification commands instead.
@@ -614,11 +846,19 @@ Note that special plugin name: `config` can be associated with a preset that is
614
846
  Operations on this preset are done using regular `config` operations:
615
847
 
616
848
  ```
617
- $ <%=cmd%> config id default set _plugin_name_ _defauklt_preset_for_plugin_
849
+ $ <%=cmd%> config id default set _plugin_name_ _default_preset_for_plugin_
618
850
  $ <%=cmd%> config id default get _plugin_name_
619
- "_defauklt_preset_for_plugin_"
851
+ "_default_preset_for_plugin_"
620
852
  ```
621
853
 
854
+ ### <a name="lprtdef"></a>Special Plugin: config
855
+
856
+ Plugin `config` (not to be confused with <%=prstt%> config) is used to configure <%=tool%> but it also contains global options.
857
+
858
+ When <%=tool%> starts, it lookjs for the `default` <%=prstt%> and if there is a value for `config`, if so, it loads the option values for any plugin used.
859
+
860
+ If no global default is set by the user, the tool will use `global_common_defaults` when setting global parameters (e.g. `conf ascp use`)
861
+
622
862
  ### Format of file
623
863
 
624
864
  The configuration file is a hash in a YAML file. Example:
@@ -634,7 +874,7 @@ cli_default:
634
874
  demo_server:
635
875
  url: ssh://demo.asperasoft.com:33001
636
876
  username: asperaweb
637
- password: demoaspera
877
+ password: _demo_pass_
638
878
  ```
639
879
 
640
880
  We can see here:
@@ -703,7 +943,6 @@ A <%=prst%> value can be removed with `unset`:
703
943
  $ <%=cmd%> config id cli_default unset interactive
704
944
  ```
705
945
 
706
-
707
946
  ### Examples
708
947
 
709
948
  For Faspex, Shares, Node (including ATS, Aspera Transfer Service), Console,
@@ -767,6 +1006,8 @@ EOF
767
1006
 
768
1007
  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 `<%=evp%>LOG_LEVEL`.
769
1008
 
1009
+ It is also possible to activate traces before initialisation using env var `AS_LOG_LEVEL`.
1010
+
770
1011
  ## Learning Aspera Product APIs (REST)
771
1012
 
772
1013
  This CLI uses REST APIs.
@@ -821,21 +1062,42 @@ The `config` plugin also allows specification for the use of a local FASP client
821
1062
 
822
1063
  ```
823
1064
  $ <%=cmd%> config ascp show
824
- /Users/laurent/Applications/Aspera Connect.app/Contents/Resources/ascp
1065
+ /Users/laurent/.aspera/ascli/sdk/ascp
1066
+ $ <%=cmd%> config ascp info
1067
+ +--------------------+-----------------------------------------------------------+
1068
+ | key | value |
1069
+ +--------------------+-----------------------------------------------------------+
1070
+ | ascp | /Users/laurent/.aspera/ascli/sdk/ascp |
1071
+ ...
825
1072
  ```
826
1073
 
827
1074
  ### Selection of local `ascp`
828
1075
 
1076
+ By default, <%=tool%> uses any found local product with ascp, including SDK.
1077
+
829
1078
  To temporarily use an alternate ascp path use option `ascp_path` (`--ascp-path=`)
830
1079
 
831
- To permanently use another ascp:
1080
+ For a permanent change, the command `config ascp use` sets the same parameter for the global default.
1081
+
1082
+ Using a POSIX shell:
832
1083
 
833
1084
  ```
834
1085
  $ <%=cmd%> config ascp use '/Users/laurent/Applications/Aspera CLI/bin/ascp'
835
- saved to default global preset /Users/laurent/Applications/Aspera CLI/bin/ascp
1086
+ ascp version: 4.0.0.182279
1087
+ Updated: global_common_defaults: ascp_path <- /Users/laurent/Applications/Aspera CLI/bin/ascp
1088
+ Saved to default global preset global_common_defaults
1089
+ ```
1090
+
1091
+ Windows:
1092
+
1093
+ ```
1094
+ $ <%=cmd%> config ascp use C:\Users\admin\.aspera\ascli\sdk\ascp.exe
1095
+ ascp version: 4.0.0.182279
1096
+ Updated: global_common_defaults: ascp_path <- C:\Users\admin\.aspera\ascli\sdk\ascp.exe
1097
+ Saved to default global preset global_common_defaults
836
1098
  ```
837
1099
 
838
- This sets up a global default.
1100
+ If the path has spaces, read section: [Shell and Command line parsing](#parsing).
839
1101
 
840
1102
  ### List locally installed Aspera Transfer products
841
1103
 
@@ -922,7 +1184,7 @@ will effectively push files to the related server from the agent node.
922
1184
 
923
1185
  ### <a name="direct"></a>Direct (local ascp using FASPManager API)
924
1186
 
925
- By default the CLI will use a local FASP protocol, equivalent to specifying `--transfer=direct`.
1187
+ By default <%=tool%> uses a local ascp, equivalent to specifying `--transfer=direct`.
926
1188
  <%=tool%> will detect locally installed Aspera products.
927
1189
  Refer to section [FASP](#client).
928
1190
 
@@ -932,17 +1194,33 @@ To specify a FASP proxy (only supported with the `direct` agent), set the approp
932
1194
  * `EX_http_proxy_url` (proxy for legacy http fallback)
933
1195
  * `EX_ascp_args`
934
1196
 
935
- The `transfer-info` optionally provides the following auto resume parameters:
1197
+ The `transfer-info` accepts the following optional parameters:
1198
+
1199
+ <table>
1200
+ <tr><th>Name</th><th>Type</th><th>Default</th><th>Feature</th><th>Description</th></tr>
1201
+ <tr><td>spawn_timeout_sec</td><td>Float</td><td>3</td><td>Multi session</td><td>Verification time that ascp is running</td></tr>
1202
+ <tr><td>spawn_delay_sec</td><td>Float</td><td>2</td><td>Multi session</td><td>Delay between startup of sessions</td></tr>
1203
+ <tr><td>wss</td><td>Bool</td><td>false</td><td>Web Socket Session</td><td>Enable use of web socket session in case it is available</td></tr>
1204
+ <tr><td>resume</td><td>Hash</td><td>nil</td><td>Resumer parameters</td><td>See below</td></tr>
1205
+ </table>
1206
+
1207
+ Resume parameters:
936
1208
 
937
1209
  <table>
938
- <tr><th>Name</th><th>Default</th><th>Feature</th><th>Description</th></tr>
939
- <tr><td>iter_max</td>. <td>7</td><td>Resume</td><td>Max number of retry on error</td></tr>
940
- <tr><td>sleep_initial</td><td>2</td><td>Resume</td><td>First Sleep before retry</td></tr>
941
- <tr><td>sleep_factor</td> <td>2</td><td>Resume</td><td>Multiplier of Sleep</td></tr>
942
- <tr><td>sleep_max</td>. <td>60</td><td>Resume</td><td>Maximum sleep</td></tr>
943
- <tr><td>wss</td> <td>false</td><td>Web Socket Session</td><td>Enable use of web socket session in case it is available</td></tr>
1210
+ <tr><th>Name</th><th>Type</th><th>Default</th><th>Feature</th><th>Description</th></tr>
1211
+ <tr><td>iter_max</td><td>int</td><td>7</td><td>Resume</td><td>Max number of retry on error</td></tr>
1212
+ <tr><td>sleep_initial</td><td>int</td><td>2</td><td>Resume</td><td>First Sleep before retry</td></tr>
1213
+ <tr><td>sleep_factor</td><td>int</td><td>2</td><td>Resume</td><td>Multiplier of Sleep</td></tr>
1214
+ <tr><td>sleep_max</td><td>int</td><td>60</td><td>Resume</td><td>Maximum sleep</td></tr>
944
1215
  </table>
945
1216
 
1217
+ Examples:
1218
+
1219
+ ```
1220
+ $ <%=cmd%> ... --transfer-info=@json:'{"wss":true,"resume":{"iter_max":10}}'
1221
+ $ <%=cmd%> ... --transfer-info=@json:'{"spawn_delay_sec":2.5}'
1222
+ ```
1223
+
946
1224
  ### IBM Aspera Connect Client GUI
947
1225
 
948
1226
  By specifying option: `--transfer=connect`, <%=tool%> will start transfers
@@ -974,9 +1252,11 @@ If it possible to send using a HTTP gateway, in case FASP is not allowed.
974
1252
  Example:
975
1253
 
976
1254
  ```
977
- $ <%=cmd%> faspex package recv --id=323 --transfer=httpgw --transfer-info=@json:'{"url":"https://eudemo.asperademo.com:9443/aspera/http-gwy/v1"}'
1255
+ $ <%=cmd%> faspex package recv --id=323 --transfer=httpgw --transfer-info=@json:'{"url":"https://asperagw.example.com:9443/aspera/http-gwy/v1"}'
978
1256
  ```
979
1257
 
1258
+ Note that the gateway only supports transfers authorized with a token.
1259
+
980
1260
  ## <a name="transferspec"></a>Transfer Specification
981
1261
 
982
1262
  Some commands lead to file transfer (upload/download), all parameters necessary for this transfer
@@ -990,7 +1270,7 @@ is described in a _transfer-spec_ (Transfer Specification), such as:
990
1270
 
991
1271
  <%=tool%> builds a default _transfer-spec_ internally, so it is not necessary to provide additional parameters on the command line for this transfer.
992
1272
 
993
- 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.
1273
+ If needed, it is possible to modify or add any of the supported _transfer-spec_ parameter using the `ts` option. The `ts` option accepts a [Structured Value](#native) containing one or several _transfer-spec_ parameters. Multiple `ts` options on command line are cummulative.
994
1274
 
995
1275
  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.
996
1276
 
@@ -1023,8 +1303,8 @@ The option `to_folder` provides an equivalent and convenient way to change this
1023
1303
 
1024
1304
  ### List of files for transfers
1025
1305
 
1026
- When uploading, downloading or sending files, the user must specify
1027
- the list of files to transfer. Most of the time, the list of files to transfer will be simply specified on the command line:
1306
+ When uploading, downloading or sending files, the user must specify the list of files to transfer.
1307
+ Most of the time, the list of files to transfer will be simply specified on the command line:
1028
1308
 
1029
1309
  ```
1030
1310
  $ <%=cmd%> server upload ~/mysample.file secondfile
@@ -1038,7 +1318,8 @@ $ <%=cmd%> server upload --sources=@args ~/mysample.file secondfile
1038
1318
 
1039
1319
  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).
1040
1320
 
1041
- Note that this is different from the "ascp" command line. The paradigm used by <%=tool%> is: all transfer parameters are kept in [_transfer-spec_](#transferspec) so that execution of a transfer is independent of the transfer agent. Note that other IBM Aspera interfaces use this: connect, node, transfer sdk.
1321
+ Note that this is different from the "ascp" command line. The paradigm used by <%=tool%> is:
1322
+ all transfer parameters are kept in [_transfer-spec_](#transferspec) so that execution of a transfer is independent of the transfer agent. Note that other IBM Aspera interfaces use this: connect, node, transfer sdk.
1042
1323
 
1043
1324
  For ease of use and flexibility, the list of files to transfer is specified by the option `sources`. Accepted values are:
1044
1325
 
@@ -1281,7 +1562,7 @@ updated: my_aoc_org
1281
1562
  Define this <%=prst%> as default configuration for the `aspera` plugin:
1282
1563
 
1283
1564
  ```
1284
- $ <%=cmd%> config id default set aspera my_aoc_org
1565
+ $ <%=cmd%> config id default set aoc my_aoc_org
1285
1566
  ```
1286
1567
 
1287
1568
  Note: Default `auth` method is `web` and default `redirect_uri` is `http://localhost:12345`. Leave those default values.
@@ -1655,7 +1936,7 @@ Then, create two shared folders located in two regions, in your files home, in a
1655
1936
  Then, transfer between those:
1656
1937
 
1657
1938
  ```
1658
- $ <%=cmd%> -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}'
1939
+ $ <%=cmd%> -Paoc_show aoc files transfer --from-folder='IBM Cloud SJ' --to-folder='AWS Singapore' 100GB.file --ts=@json:'{"target_rate_kbps":"1000000","multi_session":10,"multi_session_threshold":1}'
1659
1940
  ```
1660
1941
 
1661
1942
  * create registration key to register a node
@@ -1703,17 +1984,27 @@ $ <%=cmd%> aoc admin res node --id=8669 v4 perm 82 show
1703
1984
  Send a package:
1704
1985
 
1705
1986
  ```
1706
- $ <%=cmd%> aoc 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
1987
+ $ <%=cmd%> aoc packages send --value=[package extended value] [other parameters such as file list and transfer parameters]
1707
1988
  ```
1708
1989
 
1709
1990
  Notes:
1710
1991
 
1711
- * the `value` parameter can contain any supported package creation parameter. Refer to the API, or display an existing package.
1712
- * to list recipients use fields: "recipients" and/or "bcc_recipients". <%=cmd%> 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
1992
+ * the `value` parameter can contain any supported package creation parameter. Refer to the AoC package creation API, or display an existing package to find attributes.
1993
+ * to provide the list of recipients, use fields: "recipients" and/or "bcc_recipients". <%=cmd%> will resolve the list of email addresses to expected user ids.
1994
+ * a recipîent can be a shared inbox, in this case just use the name of the shared inbox as recipient.
1995
+ * If a recipient is not already registered and the workspace allows external users, then the package is sent to an external user, and
1713
1996
  * 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.
1714
1997
  * if the option `new_user_option` is `@json:{}`, then external users are invited to join the workspace
1715
1998
 
1716
- ## <a name="aoccargo"></a>Receive only new packages
1999
+ Examples:
2000
+
2001
+ ```
2002
+ $ <%=cmd%> aoc package send --value=@json:'{"name":"my title","note":"my note","recipients":["laurent.martin.aspera@fr.ibm.com","other@example.com"]}' --sources=@args my_file.dat
2003
+ $ <%=cmd%> aoc package send --value=@json:'{"name":"my file in shared inbox","recipients":["The Shared Inbox"]}' my_file.dat --ts=@json:'{"target_rate_kbps":100000}'
2004
+ $ <%=cmd%> aoc package send --workspace=eudemo --value=@json:'{"name":"my pack title","recipients":["Shared Inbox Name"],"metadata":[{"input_type":"single-text","name":"Project Id","values":["123"]},{"input_type":"single-dropdown","name":"Type","values":["Opt2"]},{"input_type":"multiple-checkbox","name":"CheckThose","values":["Check1","Check2"]},{"input_type":"date","name":"Optional Date","values":["2021-01-13T15:02:00.000Z"]}]}' ~/Documents/Samples/200KB.1
2005
+ ```
2006
+
2007
+ ## <a name="aoccargo"></a>Receive new packages only
1717
2008
 
1718
2009
  It is possible to automatically download new packages, like using Aspera Cargo:
1719
2010
 
@@ -1725,10 +2016,10 @@ $ <%=cmd%> aoc packages recv --id=ALL --once-only=yes --lock-port=12345
1725
2016
  * `--once-only=yes` keeps memory of any downloaded package in persistency files located in the configuration folder.
1726
2017
  * `--lock-port=12345` ensures that only one instance is started at the same time, to avoid collisions
1727
2018
 
1728
- Typically, one would regularly execute this command on a regular basis, using the method oif your choice:
2019
+ Typically, one would regularly execute this command on a regular basis, using the method of your choice:
1729
2020
 
1730
- * Windows scheduler
1731
- * cron
2021
+ * Windows: [Task Scheduler](https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page)
2022
+ * Linux/Unix: [cron](https://www.man7.org/linux/man-pages/man5/crontab.5.html)
1732
2023
  * etc...
1733
2024
 
1734
2025
  ## Download Files
@@ -1948,7 +2239,7 @@ This can also be set as default using a preset
1948
2239
  One can test the "server" application using the well known demo server:
1949
2240
 
1950
2241
  ```
1951
- $ <%=cmd%> config id aspera_demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=demoaspera
2242
+ $ <%=cmd%> config id aspera_demo_server update --url=ssh://demo.asperasoft.com:33001 --username=asperaweb --password=_demo_pass_
1952
2243
  $ <%=cmd%> config id default set server aspera_demo_server
1953
2244
  $ <%=cmd%> server browse /aspera-test-dir-large
1954
2245
  $ <%=cmd%> server download /aspera-test-dir-large/200MB
@@ -2046,23 +2337,67 @@ $ <%=cmd%> node access_key create --value=@json:'{"id":"eudemo-sedemo","secret":
2046
2337
 
2047
2338
  # Plugin: IBM Aspera Faspex
2048
2339
 
2049
- Note that the command "v4" requires the use of APIv4, refer to the Faspex Admin manual on how to activate.
2340
+ Notes:
2050
2341
 
2051
- ## Sending a Package
2342
+ * the command "v4" requires the use of APIv4, refer to the Faspex Admin manual on how to activate.
2343
+ * for full details on Faspex API, refer to: [Reference on Developer Site](https://www.ibm.com/products/aspera/developer)
2344
+
2345
+ ## Faspex 5 Beta1
2346
+
2347
+ As the web UI does not yet allow adding API client yet, the way to use CLI is:
2348
+
2349
+ * open a browser
2350
+ * start developer mode
2351
+ * login to faspex 5
2352
+ * find the first API call with `Authorization` token, and copy it (kind of base64 long string)
2353
+
2354
+ Use it as password and use `--auth=boot`.
2052
2355
 
2053
- Provide delivery info in JSON, example:
2356
+ ```
2357
+ $ <%=cmd%> conf id f5boot update --url=https://localhost/aspera/faspex --auth=boot --password=ABC.DEF.GHI...
2358
+ ```
2359
+
2360
+ An JWT client can then be created with a private key:
2361
+
2362
+ ```
2363
+ $ jsonk=$(openssl rsa -in ~/.aspera/ascli/aspera_on_cloud_key -pubout 2> /dev/null | sed -e :a -e N -e '$!ba' -e 's/\n/\\n/g')
2364
+ $ <%=cmd%> faspex5 -Pf5boot auth_client create --value=@json:'{"name":"hello","client_type":"public","redirect_uris":["https://localhost:12345"],"allow_jwt_grant":true,"public_key":"'$jsonk'"}'
2365
+ ```
2366
+
2367
+ or deleted by name:
2054
2368
 
2055
2369
  ```
2056
- --delivery-info=@json:'{"title":"my title","recipients":["laurent.martin.aspera@fr.ibm.com"]}'
2370
+ $ id=$(<%=cmd%> faspex5 auth_client list --select=@json:'{"name":"hello"}' --fields=client_id --format=csv)
2371
+ $ <%=cmd%> faspex5 auth_client delete --id=$id
2057
2372
  ```
2058
2373
 
2059
- a note can be added: `"note":"Please ..."`
2374
+ Once the API client is created with a client_id and secret (result of create command), create a configuration:
2060
2375
 
2061
- metadata: `"metadata":{"Meta1":"Val1","Meta2":"Val2"}`
2376
+ ```
2377
+ $ <%=cmd%> conf id f5 update --url=https://localhost/aspera/faspex --auth=jwt --client-id=abcd --client-secret=def --username=pierre@example.com --private-key=@val:@file:~/.aspera/ascli/aspera_on_cloud_key
2378
+ $ <%=cmd%> conf id default set faspex5 f5
2379
+ ```
2062
2380
 
2381
+ Ready to use Faspex5 with CLI.
2063
2382
 
2064
- Note for full details, refer to:
2065
- [Reference on Developer Site](https://developer.asperasoft.com/web/faspex/sending)
2383
+ Once the graphical registration form exist, ther bootstrap method can be removed.
2384
+
2385
+ ## Sending a Package
2386
+
2387
+ The command is `faspex package send`. Package information (title, note, metadata, options) is provided in option `delivery_info`. (Refer to Faspex API).
2388
+
2389
+ Example:
2390
+
2391
+ ```
2392
+ $ <%=cmd%> faspex package send --delivery-info=@json:'{"title":"my title","recipients":["laurent.martin.aspera@fr.ibm.com"]}' --url=https://faspex.corp.com/aspera/faspex --username=foo --password=bar /tmp/file1 /home/bar/file2
2393
+ ```
2394
+
2395
+ If the recipient is a dropbox, just provide the name of the dropbox in `recipients`: `"recipients":["My Dropbox Name"]`
2396
+
2397
+ Additional optional parameters in `delivery_info`:
2398
+
2399
+ * Package Note: : `"note":"note this and that"`
2400
+ * Package Metadata: `"metadata":{"Meta1":"Val1","Meta2":"Val2"}`
2066
2401
 
2067
2402
  ## operation on dropboxes
2068
2403
 
@@ -2125,6 +2460,8 @@ $ for p in 1 2 3;do <%=cmd%> shares2 admin users list --value=@json:'{"page":'$p
2125
2460
  # Plugin: IBM Cloud Object Storage
2126
2461
 
2127
2462
  The IBM Cloud Object Storage provides the possibility to execute transfers using FASP.
2463
+ It uses the same transfer service as Aspera on Cloud.
2464
+ see [https://status.aspera.io](https://status.aspera.io)
2128
2465
 
2129
2466
  Required options are either:
2130
2467
 
@@ -2181,7 +2518,14 @@ Endpoints for regions can be found by querying the `endpoints` URL.
2181
2518
  For convenience, let us create a default configuration, for example:
2182
2519
 
2183
2520
  ```
2184
- $ <%=cmd%> conf id mycos update --service-credentials=@val:@json:@file:$HOME/service_creds.json --region=us-south --bucket=laurent
2521
+ $ <%=cmd%> conf id mycos update --bucket=laurent --service-credentials=@val:@json:@file:~/service_creds.json --region=us-south
2522
+ $ <%=cmd%> conf id default set cos mycos
2523
+ ```
2524
+
2525
+ or using direct parameters:
2526
+
2527
+ ```
2528
+ $ <%=cmd%> conf id mycos update --bucket=mybucket --endpoint=https://s3.us-east.cloud-object-storage.appdomain.cloud --apikey=abcdefgh --crn=crn:v1:bluemix:public:iam-identity::a/xxxxxxx
2185
2529
  $ <%=cmd%> conf id default set cos mycos
2186
2530
  ```
2187
2531
 
@@ -2199,7 +2543,7 @@ to start from ma configuration file, using <%=tool%> standard options.
2199
2543
 
2200
2544
  # Plugin: Preview
2201
2545
 
2202
- The `preview` generates "previews" of graphical files, i.e. thumbnails (office, images, video) and video previews on an Aspera HSTS for use primarily in the Aspera on Cloud application.
2546
+ The `preview` generates "previews" of graphical files, i.e. thumbnails (office, images, video) and video previews on storage for use primarily in the Aspera on Cloud application.
2203
2547
  This is based on the "node API" of Aspera HSTS when using Access Keys only inside it's "storage root".
2204
2548
  Several parameters can be used to tune several aspects:
2205
2549
 
@@ -2247,6 +2591,7 @@ The tool requires the following external tools available in the `PATH`:
2247
2591
  * OptiPNG : `optipng`
2248
2592
  * FFmpeg : `ffmpeg` `ffprobe`
2249
2593
  * Libreoffice : `libreoffice`
2594
+ * ruby gem `mimemagic`
2250
2595
 
2251
2596
  Here shown on Redhat/CentOS.
2252
2597
 
@@ -2258,6 +2603,26 @@ To check if all tools are found properly, execute:
2258
2603
  $ <%=cmd%> preview check
2259
2604
  ```
2260
2605
 
2606
+ ### mimemagic
2607
+
2608
+ To benefit from extra mime type detection install gem mimemagic:
2609
+
2610
+ ```
2611
+ # gem install mimemagic
2612
+ ```
2613
+
2614
+ or to install an earlier version if any problem:
2615
+
2616
+ ```
2617
+ # gem install mimemagic -v '~> 0.3.0'
2618
+ ```
2619
+
2620
+ To use it, set option `mimemagic` to `yes`: `--mimemagic=yes`
2621
+
2622
+ If not used, Mime type used for conversion is the one provided by the node API.
2623
+
2624
+ If used, it the `preview` command will first analyse the file content using mimemagic, and if no match, will try by extension.
2625
+
2261
2626
  ### Image: Imagemagick and optipng
2262
2627
 
2263
2628
  ```
@@ -2282,90 +2647,111 @@ The generation of preview in based on the use of `unoconv` and `libreoffice`
2282
2647
  # dnf install unoconv
2283
2648
  ```
2284
2649
 
2650
+ * Amazon Linux
2651
+
2652
+ ```
2653
+ # amazon-linux-extras enable libreoffice
2654
+ # yum clean metadata
2655
+ # yum install libreoffice-core libreoffice-calc libreoffice-opensymbol-fonts libreoffice-ure libreoffice-writer libreoffice-pyuno libreoffice-impress
2656
+ # wget https://raw.githubusercontent.com/unoconv/unoconv/master/unoconv
2657
+ # mv unoconv /usr/bin
2658
+ # chmod a+x /usr/bin/unoconv
2659
+ ```
2285
2660
 
2286
2661
  ## Configuration
2287
2662
 
2288
- Like any <%=tool%> commands, parameters can be passed on command line or using a configuration <%=prst%>. Note that if you use the <%=tool%> run as `xfer` user, like here, the configuration file must be created as the same user. Example using a <%=prst%> named `my_preset_name` (choose any name relevant to you, e.g. the AoC node name, and replace in the following lines):
2663
+ The preview generator is run as a user, preferably a regular user (not root). When using object storage, any user can be used, but when using local storage it is usually better to use the user `xfer`, as uploaded files are under this identity: this ensures proper access rights. (we will assume this)
2664
+
2665
+ Like any <%=tool%> commands, parameters can be passed on command line or using a configuration <%=prst%>. The configuration file must be created with the same user used to run so that it is properly used on runtime.
2666
+
2667
+ Note that the `xfer` user has a special protected shell: `aspshell`, so changing identity requires specification of alternate shell:
2289
2668
 
2290
2669
  ```
2291
2670
  # su -s /bin/bash - xfer
2292
- $ <%=cmd%> config id my_preset_name update --url=https://localhost:9092 --username=my_access_key --password=my_secret --skip-types=office --lock-port=12346
2293
- $ <%=cmd%> config id default set preview my_preset_name
2671
+ $ <%=cmd%> config id previewconf update --url=https://localhost:9092 --username=my_access_key --password=my_secret --skip-types=office --lock-port=12346
2672
+ $ <%=cmd%> config id default set preview previewconf
2294
2673
  ```
2295
2674
 
2296
- Here we assume that Office file generation is disabled, else remove the option. For the `lock_port` option refer to a previous section in thsi manual.
2675
+ Here we assume that Office file generation is disabled, else remove this option.
2676
+ `lock_port` prevents concurrent execution of generation when using a scheduler.
2297
2677
 
2298
- Once can check if the access key is well configured using:
2678
+ One can check if the access key is well configured using:
2299
2679
 
2300
2680
  ```
2301
- $ <%=cmd%> -Pmy_preset_name node browse /
2681
+ $ <%=cmd%> -Ppreviewconf node browse /
2302
2682
  ```
2303
2683
 
2304
2684
  This shall list the contents of the storage root of the access key.
2305
2685
 
2306
2686
  ## Execution
2307
2687
 
2308
- The tool intentionally supports only a "one shot" mode in order to avoid having a hanging process or using too many resources (calling REST api too quickly during the scan or event method).
2309
- It needs to be run regularly to create or update preview files. For that use your best
2688
+ The tool intentionally supports only a "one shot" mode (no infinite loop) in order to avoid having a hanging process or using too many resources (calling REST api too quickly during the scan or event method).
2689
+ It needs to be run on a regular basis to create or update preview files. For that use your best
2310
2690
  reliable scheduler. For instance use "CRON" on Linux or Task Scheduler on Windows.
2311
2691
 
2312
- Typically, for "Access key" access, the system/transfer is `xfer`. So, in order to be consiustent have generate the appropriate access rights, the generation process
2313
- should be run as user `xfer`.
2692
+ Typically, for "Access key" access, the system/transfer is `xfer`. So, in order to be consistent have generate the appropriate access rights, the generation process should be run as user `xfer`.
2314
2693
 
2315
2694
  Lets do a one shot test, using the configuration previously created:
2316
2695
 
2317
2696
  ```
2318
2697
  # su -s /bin/bash - xfer
2319
- $ <%=cmd%> preview scan --overwrite=always
2698
+ xfer$ <%=cmd%> preview scan --overwrite=always
2320
2699
  ```
2321
2700
 
2322
2701
  When the preview generator is first executed it will create a file: `.aspera_access_key`
2323
- which contains the access key used.
2702
+ in the previews folder which contains the access key used.
2324
2703
  On subsequent run it reads this file and check that previews are generated for the same access key, else it fails. This is to prevent clash of different access keys using the same root.
2325
2704
 
2326
2705
  ## Configuration for Execution in scheduler
2327
2706
 
2328
- Here is an example of configuration for use with cron on Linux. Adapt the scripts to your own preference.
2707
+ Here is an example of configuration for use with cron on Linux.
2708
+ Adapt the scripts to your own preference.
2329
2709
 
2330
2710
  We assume here that a configuration preset was created as shown previously.
2331
2711
 
2332
- Here the cronjob is created for `root`, and changes the user to `xfer`, also overriding the shell which should be `aspshell`. (adapt the command below, as it would override existing crontab). It is also up to you to use directly the `xfer` user's crontab. This is an example only.
2712
+ Lets first setup a script that will be used in the sceduler and sets up the environment.
2713
+
2714
+ Example of startup script `cron_<%=cmd%>`, which sets the Ruby environment and adds some timeout protection:
2715
+
2716
+ ```
2717
+ #!/bin/bash
2718
+ # set a timeout protection, just in case
2719
+ case "$*" in *trev*) tmout=10m ;; *) tmout=30m ;; esac
2720
+ . /etc/profile.d/rvm.sh
2721
+ rvm use 2.6 --quiet
2722
+ exec timeout ${tmout} <%=cmd%> "${@}"
2723
+ ```
2724
+
2725
+ Here the cronjob is created for user `xfer`.
2333
2726
 
2334
2727
  ```
2335
- # crontab<<EOF
2336
- 2-59 * * * * su -s /bin/bash - xfer -c 'nice +10 timeout 10m <%=cmd%> preview event --log-level=info --logger=syslog --iteration-file=/tmp/preview_restart.txt'
2337
- 0 * * * * su -s /bin/bash - xfer -c 'nice +10 timeout 30m <%=cmd%> preview scan --log-level=info --logger=syslog'
2728
+ xfer$ crontab<<EOF
2729
+ 0 * * * * /home/xfer/cron_<%=cmd%> preview scan --logger=syslog --display=error
2730
+ 2-59 * * * * /home/xfer/cron_<%=cmd%> preview trev --logger=syslog --display=error
2338
2731
  EOF
2339
2732
  ```
2340
2733
 
2341
- Nopte that the options here may be located in the config preset, but it was left on the command line to keep stdout for command line execution of preview.
2734
+ Note that the loging options are kept in the cronfile instead of conf file to allow execution on command line with output on command line.
2342
2735
 
2343
2736
  ## Candidate detection for creation or update (or deletion)
2344
2737
 
2345
- The tool will find candidates for preview generation using three commands:
2738
+ The tool generates preview files using those commands:
2346
2739
 
2347
2740
  * `trevents` : only recently uploaded files will be tested (transfer events)
2348
2741
  * `events` : only recently uploaded files will be tested (file events: not working)
2349
- * `scan` : deeply scan all files under the access key&apos;s "storage root"
2350
- * `folder` : same as `scan`, but only on the specified folder&apos;s "file identifier"
2351
- * `file` : for an individual file generation
2352
-
2353
- Note that for the `event`, the option `iteration_file` should be specified so that
2354
- successive calls only process new events. This file will hold an identifier
2355
- telling from where to get new events.
2356
-
2357
- It is also possible to test a local file, using the `test` command.
2742
+ * `scan` : recursively scan all files under the access key&apos;s "storage root"
2743
+ * `test` : test using a local file
2358
2744
 
2359
2745
  Once candidate are selected, once candidates are selected,
2360
2746
  a preview is always generated if it does not exist already,
2361
2747
  else if a preview already exist, it will be generated
2362
- using one of three overwrite method:
2748
+ using one of three values for the `overwrite` option:
2363
2749
 
2364
2750
  * `always` : preview is always generated, even if it already exists and is newer than original
2365
2751
  * `never` : preview is generated only if it does not exist already
2366
2752
  * `mtime` : preview is generated only if the original file is newer than the existing
2367
2753
 
2368
- Deletion of preview for deleted source files: not implemented yet.
2754
+ Deletion of preview for deleted source files: not implemented yet (TODO).
2369
2755
 
2370
2756
  If the `scan` or `events` detection method is used, then the option : `skip_folders` can be used to skip some folders. It expects a list of path relative to the storage root (docroot) starting with slash, use the `@json:` notation, example:
2371
2757
 
@@ -2375,6 +2761,14 @@ $ <%=cmd%> preview scan --skip-folders=@json:'["/not_here"]'
2375
2761
 
2376
2762
  The option `folder_reset_cache` forces the node service to refresh folder contents using various methods.
2377
2763
 
2764
+ When scanning the option `value` has the same behaviour as for the `node find` command.
2765
+
2766
+ For instance to filter out files beginning with `._` do:
2767
+
2768
+ ```
2769
+ ... --value='exec:!f["name"].start_with?("._") or f["name"].eql?(".DS_Store")'
2770
+ ```
2771
+
2378
2772
  ## Preview File types
2379
2773
 
2380
2774
  Two types of preview can be generated:
@@ -2512,7 +2906,7 @@ Note that in addition, many "EX_" [_transfer-spec_](#transferspec) parameters ar
2512
2906
  ## Simple session
2513
2907
 
2514
2908
  ```
2515
- MY_TSPEC='{"remote_host":"demo.asperasoft.com","remote_user":"asperaweb","ssh_port":33001,"remote_password":"demoaspera","direction":"receive","destination_root":"./test.dir","paths":[{"source":"/aspera-test-dir-tiny/200KB.1"}],"resume_level":"none"}'
2909
+ MY_TSPEC='{"remote_host":"demo.asperasoft.com","remote_user":"asperaweb","ssh_port":33001,"remote_password":"_demo_pass_","direction":"receive","destination_root":"./test.dir","paths":[{"source":"/aspera-test-dir-tiny/200KB.1"}],"resume_level":"none"}'
2516
2910
 
2517
2911
  echo "${MY_TSPEC}"|asession
2518
2912
  ```
@@ -2525,7 +2919,7 @@ This is particularly useful for a persistent session ( with the [_transfer-spec_
2525
2919
 
2526
2920
  ```
2527
2921
  $ asession
2528
- {"remote_host":"demo.asperasoft.com","ssh_port":33001,"remote_user":"asperaweb","remote_password":"demoaspera","direction":"receive","destination_root":".","keepalive":true,"resume_level":"none"}
2922
+ {"remote_host":"demo.asperasoft.com","ssh_port":33001,"remote_user":"asperaweb","remote_password":"_demo_pass_","direction":"receive","destination_root":".","keepalive":true,"resume_level":"none"}
2529
2923
  {"type":"START","source":"/aspera-test-dir-tiny/200KB.2"}
2530
2924
  {"type":"DONE"}
2531
2925
  ```
@@ -2599,6 +2993,34 @@ $ <%=cmd%> server upload source_hot --to-folder=/Upload/target_hot --lock-port=1
2599
2993
 
2600
2994
  The local (here, relative path: source_hot) is sent (upload) to basic fasp server, source files are deleted after transfer. growing files will be sent only once they dont grow anymore (based ona 8 second cooloff period). If a transfer takes more than the execution period, then the subsequent execution is skipped (lock-port).
2601
2995
 
2996
+ # Aspera Health check and Nagios
2997
+
2998
+ Each plugin provide a `health` command that will check the health status of the application. Example:
2999
+
3000
+ ```
3001
+ $ <%=cmd%> console health
3002
+ +--------+-------------+------------+
3003
+ | status | component | message |
3004
+ +--------+-------------+------------+
3005
+ | ok | console api | accessible |
3006
+ +--------+-------------+------------+
3007
+ ```
3008
+
3009
+ Typically, the health check uses the REST API of the application with the following exception: the `server` plugin allows checking health by:
3010
+
3011
+ * issuing a transfer to the server
3012
+ * checking web app status with `asctl all:status`
3013
+ * checking daemons process status
3014
+
3015
+ <%=tool%> can be called by Nagios to check the health status of an Aspera server. The output can be made compatible to Nagios with option `--format=nagios` :
3016
+
3017
+ ```
3018
+ $ <%=cmd%> server health transfer --to-folder=/Upload --format=nagios --progress=none
3019
+ OK - [transfer:ok]
3020
+ $ <%=cmd%> server health asctlstatus --cmd_prefix='sudo ' --format=nagios
3021
+ OK - [NP:running, MySQL:running, Mongrels:running, Background:running, DS:running, DB:running, Email:running, Apache:running]
3022
+ ```
3023
+
2602
3024
  # Module: `Aspera`
2603
3025
 
2604
3026
  Main components:
@@ -2618,6 +3040,16 @@ This sample code shows some example of use of the API as well as
2618
3040
  REST API.
2619
3041
  Note: although nice, it's probably a good idea to use RestClient for REST.
2620
3042
 
3043
+ Example of use of the API of Aspera on Cloud:
3044
+
3045
+ ```
3046
+ require 'aspera/aoc'
3047
+
3048
+ aoc=Aspera::AoC.new(url: 'https://sedemo.ibmaspera.com',auth: :jwt, scope: 'user:all', private_key: File.read(File.expand_path('~/.aspera/<%=cmd%>/aspera_on_cloud_key')),username: 'laurent.martin.aspera@fr.ibm.com',subpath: 'api/v1')
3049
+
3050
+ aoc.read('self')
3051
+ ```
3052
+
2621
3053
  # History
2622
3054
 
2623
3055
  When I joined Aspera, there was only one CLI: `ascp`, which is the implementation of the FASP protocol, but there was no CLI to access the various existing products (Server, Faspex, Shares). Once, Serban (founder) provided a shell script able to create a Faspex Package using Faspex REST API. Since all products relate to file transfers using FASP (ascp), I thought it would be interesting to have a unified CLI for transfers using FASP. Also, because there was already the `ascp` tool, I thought of an extended tool : `eascp.pl` which was accepting all `ascp` options for transfer but was also able to transfer to Faspex and Shares (destination was a kind of URI for the applications).
@@ -2634,11 +3066,38 @@ So, it evolved into <%=tool%>:
2634
3066
  * supports transfers with multiple [Transfer Agents](#agents), that&apos;s why transfer parameters moved from ascp command line to [_transfer-spec_](#transferspec) (more reliable , more standard)
2635
3067
  * `ruby` is consistent with other Aspera products
2636
3068
 
2637
-
2638
-
2639
- # Release Notes
2640
-
2641
- * 4.0.0.pre2
3069
+ # Changes (Release notes)
3070
+
3071
+ * <%= gemspec.version.to_s %>
3072
+
3073
+ * new: command `aoc remind` to receive organization membership by email
3074
+ * new: in `preview` option `value` to filter out on file name
3075
+ * new: `initdemo` to initialize for demo server
3076
+ * new: `direct` transfer agent options: `spawn_timeout_sec` and `spawn_delay_sec`
3077
+ * fix: on Windows `conf ascp use` expects ascp.exe
3078
+ * fix: (break) multi_session_threshold is Integer, not String
3079
+ * fix: `conf ascp install` renames sdk folder if it already exists (leftover shared lib may make fail)
3080
+ * fix: removed replace_illegal_chars from default aspera.conf causing "Error creating illegal char conversion table"
3081
+ * change: (break) `aoc apiinfo` is removed, use `aoc servers` to provide the list of cloud systems
3082
+ * change: (break) parameters for resume in `transfer-info` for `direct` are now in sub-key `"resume"`
3083
+
3084
+ * 4.1.0
3085
+
3086
+ * fix: remove keys from transfer spec and command line when not needed
3087
+ * fix: default to create_dir:true so that sending single file to a folder does not rename file if folder does not exist
3088
+ * new: update documentation with regard to offline and docker installation
3089
+ * new: renamed command `nagios_check` to `health`
3090
+ * new: agent `http_gw` now supports upload
3091
+ * new: added option `sdk_url` to install SDK from local file for offline install
3092
+ * new: check new gem version periodically
3093
+ * new: the --fields= option, support -_fieldname_ to remove a field from default fields
3094
+ * new: Oauth tokens are discarded automatically after 30 minutes (useful for COS delegated refresh tokens)
3095
+ * new: mimemagic is now optional, needs manual install for `preview`, compatible with version 0.4.x
3096
+ * new: AoC a password can be provided for a public link
3097
+ * new: `conf doc` take an optional parameter to go to a section
3098
+ * new: initial support for Faspex 5 Beta 1
3099
+
3100
+ * 4.0.0
2642
3101
 
2643
3102
  * now available as open source at [<%= gemspec.homepage %>](<%= gemspec.homepage %>) with general cleanup
2644
3103
  * changed default tool name from `mlia` to `ascli`
@@ -2766,7 +3225,7 @@ So, it evolved into <%=tool%>:
2766
3225
 
2767
3226
  * 0.10.6
2768
3227
 
2769
- * FaspManager: transfer spec `authentication` no more needed for local tranfer to use aspera public keys. public keys will be used if there is a token and no key or password is provided.
3228
+ * FaspManager: transfer spec `authentication` no more needed for local tranfer to use Aspera public keys. public keys will be used if there is a token and no key or password is provided.
2770
3229
  * gem version requirements made more open
2771
3230
 
2772
3231
  * 0.10.5
@@ -2993,11 +3452,15 @@ Breaking change:
2993
3452
 
2994
3453
  * Breaking change: "files" application renamed to "aspera" (for "Aspera on Cloud"). "repository" renamed to "files". Default is automatically reset, e.g. in config files and change key "files" to "aspera" in <%=prst%> "default".
2995
3454
 
2996
- # BUGS
3455
+ # BUGS, FEATURES, CONTRIBUTION
3456
+
3457
+ For issues or feature requests use the Github repository and issues.
2997
3458
 
2998
- * This is best effort code without official support, dont expect full capabilities. This code is not supported by IBM/Aspera. You can contact the author for bugs or features.
3459
+ You can also contribute to this open source project.
2999
3460
 
3000
- ## only one value for any option
3461
+ One can also create one's own command nplugin.
3462
+
3463
+ ## Only one value for any option
3001
3464
 
3002
3465
  Some commands and sub commands may ask for the same option name.
3003
3466
  Currently, since option definition is position independant (last one wins), it is not possible
@@ -3011,7 +3474,8 @@ This happens typically for the `node` sub command, e.g. identify the node by nam
3011
3474
 
3012
3475
  ## ED255519 key not supported
3013
3476
 
3014
- ED255519 keys are deactivated since version 0.9.24 so this type of key will just be ignored.
3477
+ ED25519 keys are deactivated since version 0.9.24 so this type of key will just be ignored.
3478
+
3015
3479
  Without this deactivation, if such key was present the following error was generated:
3016
3480
 
3017
3481
  ```
@@ -3021,7 +3485,17 @@ OpenSSH keys only supported if ED25519 is available
3021
3485
  Which meant that you do not have ruby support for ED25519 SSH keys.
3022
3486
  You may either install the suggested Gems, or remove your ed25519 key from your `.ssh` folder to solve the issue.
3023
3487
 
3024
- # TODO
3488
+ ## Error "Remote host is not who we expected"
3489
+
3490
+ `ascp` version 4.x changed the algorithm used to check the SSH server certificate. To ignore the certificate (SSH fingerprint) add option on client side:
3491
+
3492
+ ```
3493
+ --ts=@json:'{"sshfp":null}'
3494
+ ```
3495
+
3496
+ Refer to ES-1944 in release notes of 4.1 and to [HSTS admin manual section "Configuring Transfer Server Authentication With a Host-Key Fingerprint"](https://www.ibm.com/docs/en/ahts/4.2?topic=upgrades-configuring-ssh-server): if you have access to server side, basically disable other SSH host keys than RSA.
3497
+
3498
+ ## Miscelaneous
3025
3499
 
3026
3500
  * remove rest and oauth classes and use ruby standard gems:
3027
3501
 
@@ -3037,9 +3511,3 @@ You may either install the suggested Gems, or remove your ed25519 key from your
3037
3511
  * Going through proxy: use env var http_proxy and https_proxy, no_proxy
3038
3512
 
3039
3513
  * easier use with https://github.com/pmq20/ruby-packer
3040
-
3041
- # Contribution
3042
-
3043
- Send comments !
3044
-
3045
- Create your own plugin !