aspera-cli 4.0.0.pre1 → 4.0.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +213 -255
- data/docs/Makefile +19 -13
- data/docs/README.erb.md +109 -76
- data/docs/test_env.conf +37 -14
- data/examples/aoc.rb +2 -2
- data/examples/transfer.rb +23 -14
- data/lib/aspera/{on_cloud.rb → aoc.rb} +24 -15
- data/lib/aspera/cli/main.rb +1 -0
- data/lib/aspera/cli/plugins/alee.rb +2 -2
- data/lib/aspera/cli/plugins/{oncloud.rb → aoc.rb} +34 -34
- data/lib/aspera/cli/plugins/ats.rb +1 -1
- data/lib/aspera/cli/plugins/config.rb +31 -17
- data/lib/aspera/cli/plugins/cos.rb +9 -49
- data/lib/aspera/cli/version.rb +1 -1
- data/lib/aspera/cos_node.rb +50 -0
- data/lib/aspera/data/1 +0 -0
- data/lib/aspera/data/2 +0 -0
- data/lib/aspera/data/3 +1 -0
- data/lib/aspera/data/4 +2 -0
- data/lib/aspera/data/5 +1 -0
- data/lib/aspera/data/6 +2 -0
- data/lib/aspera/data/7 +0 -0
- data/lib/aspera/data_repository.rb +13 -0
- data/lib/aspera/environment.rb +55 -0
- data/lib/aspera/fasp/aoc.rb +6 -6
- data/lib/aspera/fasp/installation.rb +112 -56
- data/lib/aspera/fasp/local.rb +2 -3
- data/lib/aspera/faspex_gw.rb +2 -2
- data/lib/aspera/open_application.rb +11 -24
- data/lib/aspera/preview/generator.rb +1 -5
- data/lib/aspera/rest.rb +56 -48
- data/lib/aspera/rest_error_analyzer.rb +5 -4
- data/lib/aspera/temp_file_manager.rb +1 -1
- metadata +52 -26
- data/docs/secrets.make +0 -38
- data/lib/aspera/cli/plugins/xnode.rb +0 -115
data/docs/Makefile
CHANGED
@@ -3,27 +3,29 @@
|
|
3
3
|
|
4
4
|
DIR_TOP=../
|
5
5
|
include $(DIR_TOP)common.make
|
6
|
+
# "make" shall be executed inside the folder containing this makefile
|
6
7
|
DIR_DOC=
|
7
8
|
|
8
9
|
# files generated to be included in README.md
|
9
10
|
INCL_USAGE=$(DIR_TMP)$(EXENAME)_usage.txt
|
10
11
|
INCL_COMMANDS=$(DIR_TMP)$(EXENAME)_commands.txt
|
11
12
|
INCL_ASESSION=$(DIR_TMP)asession_usage.txt
|
13
|
+
INCL_TRSPEC=$(DIR_DOC)transfer_spec.html
|
14
|
+
# env var used in README.erb.md
|
15
|
+
export EXENAME GEMSPEC INCL_USAGE INCL_COMMANDS INCL_ASESSION INCL_TRSPEC
|
16
|
+
|
12
17
|
TMPL_TEST_CONF=$(DIR_DOC)$(TEST_CONF_FILE_BASE)
|
13
|
-
TMPL_SECRETS=$(DIR_DOC)$(SECRETS_FILE_NAME)
|
14
18
|
|
15
19
|
MANUAL_BASE=$(DIR_DOC)Manual_$(EXENAME)_$(GEMVERSION)
|
16
20
|
MANUAL_PDF=$(MANUAL_BASE).pdf
|
17
21
|
MANUAL_HTML=$(MANUAL_BASE).html
|
18
22
|
|
19
23
|
# main target to build doc
|
20
|
-
all:: $(MANUAL_PDF) $(
|
24
|
+
all:: $(MANUAL_PDF) $(TMPL_TEST_CONF)
|
21
25
|
|
22
26
|
doc: all
|
23
27
|
|
24
|
-
# generate template configuration
|
25
|
-
$(TMPL_SECRETS): $(SECRETS_FILE_PATH)
|
26
|
-
sed 's/=.*/=_value_here_/' < $(SECRETS_FILE_PATH) > $(TMPL_SECRETS)
|
28
|
+
# generate template configuration file for tests, remove own secrets
|
27
29
|
$(TMPL_TEST_CONF): $(TEST_CONF_FILE_PATH)
|
28
30
|
ruby -e 'require "yaml";n={};c=YAML.load_file("$(TEST_CONF_FILE_PATH)").each{|k,v| n[k]=["config","default"].include?(k)?v:v.keys.inject({}){|m,i|m[i]="your value here";m}};File.write("$(TMPL_TEST_CONF)",n.to_yaml)'
|
29
31
|
|
@@ -31,21 +33,25 @@ $(MANUAL_PDF): $(DIR_TOP)README.md
|
|
31
33
|
pandoc --number-sections --resource-path=. --toc -o $(MANUAL_HTML) $(DIR_TOP)README.md
|
32
34
|
wkhtmltopdf toc $(MANUAL_HTML) $(MANUAL_PDF)
|
33
35
|
|
34
|
-
$(DIR_TOP)README.md: $(DIR_DOC)README.erb.md $(INCL_COMMANDS) $(INCL_USAGE) $(INCL_ASESSION)
|
35
|
-
|
36
|
+
$(DIR_TOP)README.md: $(DIR_DOC)README.erb.md $(DIR_DOC)transfer_spec.html $(INCL_COMMANDS) $(INCL_USAGE) $(INCL_ASESSION)
|
37
|
+
erb -T - --encoding UTF-8:UTF-8 $(DIR_DOC)README.erb.md > $(DIR_TOP)README.md
|
36
38
|
|
37
39
|
$(INCL_COMMANDS): $(DIR_TMP).exists $(TEST_MAKEFILE)
|
38
40
|
sed -nEe 's/.*\$$\(EXE_MAN.?\)/$(EXENAME)/p' $(TEST_MAKEFILE) > $(DIR_TMP)usg1.txt
|
39
|
-
sed -i.bak -Ee 's
|
41
|
+
sed -i.bak -Ee 's/\$$\$$\{([a-z_]+)\}/my_\1/g' $(DIR_TMP)usg1.txt
|
40
42
|
sed -i.bak -Ee 's/\$$\(([^)]+)\)/\1/g' $(DIR_TMP)usg1.txt
|
41
|
-
sed -i.bak -Ee 's/CF_([0-9A-Z_]*)/MY_\1/g' $(DIR_TMP)usg1.txt
|
42
43
|
sed -i.bak -Ee 's/\$$(\$$)/\1/g' $(DIR_TMP)usg1.txt
|
43
|
-
sed -i.bak -Ee 's/
|
44
|
-
sed -i.bak -Ee 's/="\$${([a-z_]+)}"/="my_\1"/g' $(DIR_TMP)usg1.txt
|
45
|
-
sed -i.bak -Ee 's/\$$@/xyz/g' $(DIR_TMP)usg1.txt
|
46
|
-
sed -i.bak -Ee 's/"'"'"'"/"/g' $(DIR_TMP)usg1.txt
|
44
|
+
sed -i.bak -Ee 's/\$$@/test/g' $(DIR_TMP)usg1.txt
|
47
45
|
sed -i.bak -Ee 's/"'"'"'/"/g' $(DIR_TMP)usg1.txt
|
48
46
|
sed -i.bak -Ee 's/'"'"'"/"/g' $(DIR_TMP)usg1.txt
|
47
|
+
sed -i.bak -Ee 's/""/"/g' $(DIR_TMP)usg1.txt
|
48
|
+
sed -i.bak -Ee 's/CF_//g' $(DIR_TMP)usg1.txt
|
49
|
+
sed -i.bak -Ee 's/DIR_[A-Z]+//g' $(DIR_TMP)usg1.txt
|
50
|
+
sed -i.bak -Ee 's/LOCAL_SAMPLE_FILE(NAME|PATH)/testfile.bin/g' $(DIR_TMP)usg1.txt
|
51
|
+
sed -i.bak -Ee 's/HSTS_FOLDER_UPLOAD/folder_1/g' $(DIR_TMP)usg1.txt
|
52
|
+
sed -i.bak -Ee 's/PKG_TEST_TITLE/Important files delivery/g' $(DIR_TMP)usg1.txt
|
53
|
+
sed -i.bak -Ee 's/AOC_EXTERNAL_EMAIL/external.user@example.com/g' $(DIR_TMP)usg1.txt
|
54
|
+
sed -i.bak -Ee 's/EMAIL_ADDR/internal.user@example.com/g' $(DIR_TMP)usg1.txt
|
49
55
|
sort -u < $(DIR_TMP)usg1.txt > $(INCL_COMMANDS)
|
50
56
|
# generated help of tools depends on all sources, so regenerate always
|
51
57
|
.PHONY: $(INCL_USAGE)
|
data/docs/README.erb.md
CHANGED
@@ -1,16 +1,30 @@
|
|
1
1
|
[comment1]: # (Do not edit this README.md, edit docs/README.erb.md, for details, read docs/README.md)
|
2
|
-
<%
|
3
|
-
|
2
|
+
<%
|
3
|
+
# check that required env vars exist, and files
|
4
|
+
%w{EXENAME GEMSPEC INCL_USAGE INCL_COMMANDS INCL_ASESSION INCL_TRSPEC}.each do |e|
|
5
|
+
raise "missing env var #{e}" unless ENV.has_key?(e)
|
6
|
+
raise "missing file #{ENV[e]}" unless File.exist?(ENV[e]) or !e.start_with?('INCL_') #_
|
7
|
+
end
|
8
|
+
cmd=ENV["EXENAME"] # just command name
|
9
|
+
tool='`'+cmd+'`' # used in text with formatting of command
|
10
|
+
evp=cmd.upcase+'_' # prefix for env vars
|
11
|
+
opprst='option preset' # just the name for "option preset"
|
12
|
+
prst='['+opprst+'](#lprt)'
|
13
|
+
prsts='['+opprst+'s](#lprt)'
|
14
|
+
prstt=opprst.capitalize # in title
|
15
|
+
gemspec=Gem::Specification::load(ENV["GEMSPEC"]) or raise "error loading #{ENV["GEMSPEC"]}"
|
16
|
+
geminstadd=gemspec.version.to_s.match(/\.[^0-9]/)?' --pre':''
|
17
|
+
-%>
|
4
18
|
# <%=tool%> : a Command Line for IBM Aspera products
|
5
19
|
|
6
|
-
Version : <%=
|
20
|
+
Version : <%= gemspec.version.to_s %>
|
7
21
|
|
8
22
|
_Laurent/2016-<%=Time.new.year%>_
|
9
23
|
|
10
24
|
This gem provides a command line interface to Aspera Applications.
|
11
25
|
|
12
26
|
Location (once released):
|
13
|
-
[
|
27
|
+
[<%= gemspec.metadata['rubygems_uri'] %>](<%= gemspec.metadata['rubygems_uri'] %>)
|
14
28
|
|
15
29
|
Disclaimers:
|
16
30
|
|
@@ -38,7 +52,7 @@ Once the gem is installed, <%=tool%> shall be accessible:
|
|
38
52
|
|
39
53
|
```
|
40
54
|
$ <%=cmd%> --version
|
41
|
-
<%=
|
55
|
+
<%= gemspec.version.to_s %>
|
42
56
|
```
|
43
57
|
|
44
58
|
## First use
|
@@ -106,7 +120,7 @@ Then, follow the section relative to the product you want to interact with ( Asp
|
|
106
120
|
In order to use the tool or the gem, it is necessary to install those components:
|
107
121
|
|
108
122
|
* [Ruby](#ruby)
|
109
|
-
* [
|
123
|
+
* [<%= gemspec.name %>](#the_gem)
|
110
124
|
* [FASP](#fasp_prot)
|
111
125
|
|
112
126
|
The following sections provide information on the installation.
|
@@ -114,8 +128,7 @@ The following sections provide information on the installation.
|
|
114
128
|
## <a name="ruby"></a>Ruby
|
115
129
|
|
116
130
|
A ruby interpreter is required to run the tool or to use the gem and tool.
|
117
|
-
|
118
|
-
Ruby 2.5+ is prefered, but it should also work with 2.1+.
|
131
|
+
The Ruby version shall be <%= gemspec.required_ruby_version %>.
|
119
132
|
Any type of Ruby installation can be used.
|
120
133
|
|
121
134
|
Refer to the following sections for a proposed method for specific operating systems.
|
@@ -123,10 +136,10 @@ Refer to the following sections for a proposed method for specific operating sys
|
|
123
136
|
### macOS
|
124
137
|
|
125
138
|
|
126
|
-
MacOS 10.13+ (High Sierra) comes with a recent Ruby, so you can use it directly, you will need to install
|
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` :
|
127
140
|
|
128
141
|
```
|
129
|
-
$ sudo gem install
|
142
|
+
$ sudo gem install <%= gemspec.name %><%=geminstadd%>
|
130
143
|
```
|
131
144
|
|
132
145
|
Alternatively, if you use [Homebrew](https://brew.sh/) already you can install Ruby with it:
|
@@ -200,18 +213,18 @@ For instance to build from source, and install in `/opt/ruby` :
|
|
200
213
|
# make install
|
201
214
|
```
|
202
215
|
|
203
|
-
## <a name="the_gem"></a
|
216
|
+
## <a name="the_gem"></a>`<%= gemspec.name %>` gem
|
204
217
|
|
205
218
|
Once you have Ruby and rights to install gems: Install the gem and its dependencies:
|
206
219
|
|
207
220
|
```
|
208
|
-
# gem install
|
221
|
+
# gem install <%= gemspec.name %><%=geminstadd%>
|
209
222
|
```
|
210
223
|
|
211
224
|
To upgrade to the latest version:
|
212
225
|
|
213
226
|
```
|
214
|
-
# gem update
|
227
|
+
# gem update <%= gemspec.name %>
|
215
228
|
```
|
216
229
|
|
217
230
|
## <a name="fasp_prot"></a>FASP Protocol
|
@@ -222,7 +235,13 @@ an Aspera Transfer:
|
|
222
235
|
* ascp
|
223
236
|
* aspera-license (in same folder, or ../etc)
|
224
237
|
|
225
|
-
|
238
|
+
This can be installed directly with
|
239
|
+
|
240
|
+
```
|
241
|
+
$ <%=cmd%> conf ascp install
|
242
|
+
```
|
243
|
+
|
244
|
+
Those can be found in one of IBM Aspera transfer server or client with its license file (some are free):
|
226
245
|
|
227
246
|
* IBM Aspera Connect Client (Free)
|
228
247
|
* IBM Aspera Desktop Client (Free)
|
@@ -241,7 +260,7 @@ other methods are available. Refer to section: [Transfer Agents](#agents)
|
|
241
260
|
|
242
261
|
# <a name="cli"></a>Command Line Interface: <%=tool%>
|
243
262
|
|
244
|
-
The
|
263
|
+
The `<%= gemspec.name %>` Gem provides a command line interface (CLI) which interacts with Aspera Products (mostly using REST APIs):
|
245
264
|
|
246
265
|
* IBM Aspera High Speed Transfer Server (FASP and Node)
|
247
266
|
* IBM Aspera on Cloud (including ATS)
|
@@ -385,7 +404,7 @@ The style of output can be set using the `format` parameter, supporting:
|
|
385
404
|
Table output can be filtered using the `select` parameter. Example:
|
386
405
|
|
387
406
|
```
|
388
|
-
$ <%=cmd%>
|
407
|
+
$ <%=cmd%> aoc admin res user list --fields=name,email,ats_admin --query=@json:'{"per_page":1000,"page":1,"sort":"name"}' --select=@json:'{"ats_admin":true}'
|
389
408
|
:...............................:..................................:...........:
|
390
409
|
: name : email : ats_admin :
|
391
410
|
:...............................:..................................:...........:
|
@@ -988,7 +1007,7 @@ All standard _transfer-spec_ parameters can be overloaded. To display parameters
|
|
988
1007
|
run in debug mode (--log-level=debug). [_transfer-spec_](#transferspec) can
|
989
1008
|
also be saved/overridden in the config file.
|
990
1009
|
|
991
|
-
<%= File.read(
|
1010
|
+
<%= File.read(ENV['INCL_TRSPEC']).gsub(/.*<body>(.*)<\/body>.*/m,'\1') %>
|
992
1011
|
|
993
1012
|
### Destination folder for transfers
|
994
1013
|
|
@@ -1134,7 +1153,7 @@ Usually the OS native scheduler shall already provide some sort of such protecti
|
|
1134
1153
|
A non complete list of commands used in unit tests:
|
1135
1154
|
|
1136
1155
|
```
|
1137
|
-
<%= File.read(ENV["
|
1156
|
+
<%= File.read(ENV["INCL_COMMANDS"]) %>
|
1138
1157
|
...and more
|
1139
1158
|
```
|
1140
1159
|
|
@@ -1142,7 +1161,7 @@ A non complete list of commands used in unit tests:
|
|
1142
1161
|
|
1143
1162
|
```
|
1144
1163
|
$ <%=cmd%> -h
|
1145
|
-
<%= File.read(ENV["
|
1164
|
+
<%= File.read(ENV["INCL_USAGE"]) %>
|
1146
1165
|
|
1147
1166
|
```
|
1148
1167
|
|
@@ -1182,7 +1201,7 @@ Preparing preset: aoc_myorg
|
|
1182
1201
|
Please provide path to your private RSA key, or empty to generate one:
|
1183
1202
|
option: pkeypath>
|
1184
1203
|
using existing key:
|
1185
|
-
/Users/myself/.aspera/<%=cmd%>/
|
1204
|
+
/Users/myself/.aspera/<%=cmd%>/aspera_aoc_key
|
1186
1205
|
Using global client_id.
|
1187
1206
|
option: username> john@example.com
|
1188
1207
|
Updating profile with new key
|
@@ -1191,7 +1210,7 @@ Setting config preset as default for aspera
|
|
1191
1210
|
saving config file
|
1192
1211
|
Done.
|
1193
1212
|
You can test with:
|
1194
|
-
$ <%=cmd%>
|
1213
|
+
$ <%=cmd%> aoc user info show
|
1195
1214
|
```
|
1196
1215
|
|
1197
1216
|
Optionally, it is possible to create a new organization-specific "integration".
|
@@ -1319,13 +1338,13 @@ If you are not using the built-in client_id and secret, JWT needs to be authoriz
|
|
1319
1338
|
* Using command line
|
1320
1339
|
|
1321
1340
|
```
|
1322
|
-
$ <%=cmd%>
|
1341
|
+
$ <%=cmd%> aoc admin res client list
|
1323
1342
|
:............:.........:
|
1324
1343
|
: id : name :
|
1325
1344
|
:............:.........:
|
1326
1345
|
: BJLPObQiFw : <%=cmd%> :
|
1327
1346
|
:............:.........:
|
1328
|
-
$ <%=cmd%>
|
1347
|
+
$ <%=cmd%> aoc admin res client --id=BJLPObQiFw modify @json:'{"jwt_grant_enabled":true,"explicit_authorization_required":false}'
|
1329
1348
|
modified
|
1330
1349
|
```
|
1331
1350
|
|
@@ -1346,14 +1365,14 @@ open the previously generated public key located here: `$HOME/.aspera/<%=cmd%>/a
|
|
1346
1365
|
* Using command line
|
1347
1366
|
|
1348
1367
|
```
|
1349
|
-
$ <%=cmd%>
|
1368
|
+
$ <%=cmd%> aoc admin res user list
|
1350
1369
|
:........:................:
|
1351
1370
|
: id : name :
|
1352
1371
|
:........:................:
|
1353
1372
|
: 109952 : Tech Support :
|
1354
1373
|
: 109951 : LAURENT MARTIN :
|
1355
1374
|
:........:................:
|
1356
|
-
$ <%=cmd%>
|
1375
|
+
$ <%=cmd%> aoc user info modify @ruby:'{"public_key"=>File.read(File.expand_path("~/.aspera/<%=cmd%>/aocapikey.pub"))}'
|
1357
1376
|
modified
|
1358
1377
|
```
|
1359
1378
|
|
@@ -1383,7 +1402,7 @@ After this last step, commands do not require web login anymore.
|
|
1383
1402
|
Once client has been registered and <%=prst%> created: <%=tool%> can be used:
|
1384
1403
|
|
1385
1404
|
```
|
1386
|
-
$ <%=cmd%>
|
1405
|
+
$ <%=cmd%> aoc files br /
|
1387
1406
|
Current Workspace: Default Workspace (default)
|
1388
1407
|
empty
|
1389
1408
|
```
|
@@ -1417,7 +1436,7 @@ In order to access some administrative actions on "nodes" (in fact, access keys)
|
|
1417
1436
|
secret is required, it is usually provided using the `secret` option. For example in a command like:
|
1418
1437
|
|
1419
1438
|
```
|
1420
|
-
$ <%=cmd%>
|
1439
|
+
$ <%=cmd%> aoc admin res node --id="access_key1" --secret="secret1" v3 info
|
1421
1440
|
```
|
1422
1441
|
|
1423
1442
|
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.
|
@@ -1444,7 +1463,7 @@ A secret repository can always be selected at runtime using `--secrets=@preset:x
|
|
1444
1463
|
* Bulk creation
|
1445
1464
|
|
1446
1465
|
```
|
1447
|
-
$ <%=cmd%>
|
1466
|
+
$ <%=cmd%> aoc admin res user create --bulk=yes @json:'[{"email":"dummyuser1@example.com"},{"email":"dummyuser2@example.com"}]'
|
1448
1467
|
:.......:.........:
|
1449
1468
|
: id : status :
|
1450
1469
|
:.......:.........:
|
@@ -1456,17 +1475,17 @@ $ <%=cmd%> aspera admin res user create --bulk=yes @json:'[{"email":"dummyuser1@
|
|
1456
1475
|
* Find with filter and delete
|
1457
1476
|
|
1458
1477
|
```
|
1459
|
-
$ <%=cmd%>
|
1478
|
+
$ <%=cmd%> aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,email
|
1460
1479
|
:.......:........................:
|
1461
1480
|
: id : email :
|
1462
1481
|
:.......:........................:
|
1463
1482
|
: 98398 : dummyuser1@example.com :
|
1464
1483
|
: 98399 : dummyuser2@example.com :
|
1465
1484
|
:.......:........................:
|
1466
|
-
$ thelist=$(echo $(<%=cmd%>
|
1485
|
+
$ thelist=$(echo $(<%=cmd%> aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,email --field=id --format=csv)|tr ' ' ,)
|
1467
1486
|
$ echo $thelist
|
1468
1487
|
98398,98399
|
1469
|
-
$ <%=cmd%>
|
1488
|
+
$ <%=cmd%> aoc admin res user --bulk=yes --id=@json:[$thelist] delete
|
1470
1489
|
:.......:.........:
|
1471
1490
|
: id : status :
|
1472
1491
|
:.......:.........:
|
@@ -1478,7 +1497,7 @@ $ <%=cmd%> aspera admin res user --bulk=yes --id=@json:[$thelist] delete
|
|
1478
1497
|
* Display current user's workspaces
|
1479
1498
|
|
1480
1499
|
```
|
1481
|
-
$ <%=cmd%>
|
1500
|
+
$ <%=cmd%> aoc user workspaces
|
1482
1501
|
:......:............................:
|
1483
1502
|
: id : name :
|
1484
1503
|
:......:............................:
|
@@ -1493,13 +1512,13 @@ $ <%=cmd%> aspera user workspaces
|
|
1493
1512
|
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)
|
1494
1513
|
|
1495
1514
|
```
|
1496
|
-
$ <%=cmd%>
|
1515
|
+
$ <%=cmd%> aoc admin resource node --name=_node_name_ --secret=_secret_ v4 access_key create --value=@json:'{"storage":{"path":"/folder1"}}'
|
1497
1516
|
```
|
1498
1517
|
|
1499
1518
|
* Display transfer events (ops/transfer)
|
1500
1519
|
|
1501
1520
|
```
|
1502
|
-
$ <%=cmd%>
|
1521
|
+
$ <%=cmd%> aoc admin res node --secret=_secret_ v3 transfer list --value=@json:'[["q","*"],["count",5]]'
|
1503
1522
|
```
|
1504
1523
|
|
1505
1524
|
# 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
|
@@ -1517,13 +1536,13 @@ $ <%=cmd%> aspera admin res node --secret=_secret_ v3 transfer list --value=@jso
|
|
1517
1536
|
* Display node events (events)
|
1518
1537
|
|
1519
1538
|
```
|
1520
|
-
$ <%=cmd%>
|
1539
|
+
$ <%=cmd%> aoc admin res node --secret=_secret_ v3 events
|
1521
1540
|
```
|
1522
1541
|
|
1523
1542
|
* display members of a workspace
|
1524
1543
|
|
1525
1544
|
```
|
1526
|
-
$ <%=cmd%>
|
1545
|
+
$ <%=cmd%> aoc 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"}'
|
1527
1546
|
:.............:.........:..................................:
|
1528
1547
|
: member_type : manager : member.email :
|
1529
1548
|
:.............:.........:..................................:
|
@@ -1548,20 +1567,20 @@ a- get id of first workspace
|
|
1548
1567
|
|
1549
1568
|
```
|
1550
1569
|
WS1='First Workspace'
|
1551
|
-
WS1ID=$(<%=cmd%>
|
1570
|
+
WS1ID=$(<%=cmd%> aoc admin res workspace list --query=@json:'{"q":"'"$WS1"'"}' --select=@json:'{"name":"'"$WS1"'"}' --fields=id --format=csv)
|
1552
1571
|
```
|
1553
1572
|
|
1554
1573
|
b- get id of second workspace
|
1555
1574
|
|
1556
1575
|
```
|
1557
1576
|
WS2='Second Workspace'
|
1558
|
-
WS2ID=$(<%=cmd%>
|
1577
|
+
WS2ID=$(<%=cmd%> aoc admin res workspace list --query=@json:'{"q":"'"$WS2"'"}' --select=@json:'{"name":"'"$WS2"'"}' --fields=id --format=csv)
|
1559
1578
|
```
|
1560
1579
|
|
1561
1580
|
c- extract membership information and change workspace id
|
1562
1581
|
|
1563
1582
|
```
|
1564
|
-
$ <%=cmd%>
|
1583
|
+
$ <%=cmd%> aoc 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
|
1565
1584
|
```
|
1566
1585
|
|
1567
1586
|
d- convert to creation data for second workspace:
|
@@ -1579,13 +1598,13 @@ jq '[.[] | {member_type,member_id,workspace_id,manager,workspace_id:"'"$WS2ID"'"
|
|
1579
1598
|
e- add members to second workspace
|
1580
1599
|
|
1581
1600
|
```
|
1582
|
-
$ <%=cmd%>
|
1601
|
+
$ <%=cmd%> aoc admin res workspace_membership create --bulk=yes @json:@file:ws2_members.json
|
1583
1602
|
```
|
1584
1603
|
|
1585
1604
|
* get users who did not log since a date
|
1586
1605
|
|
1587
1606
|
```
|
1588
|
-
$ <%=cmd%>
|
1607
|
+
$ <%=cmd%> aoc admin res user list --fields=email --query=@json:'{"per_page":10000,"q":"last_login_at:<2018-05-28"}'
|
1589
1608
|
:...............................:
|
1590
1609
|
: email :
|
1591
1610
|
:...............................:
|
@@ -1597,7 +1616,7 @@ $ <%=cmd%> aspera admin res user list --fields=email --query=@json:'{"per_page":
|
|
1597
1616
|
* list "Limited" users
|
1598
1617
|
|
1599
1618
|
```
|
1600
|
-
$ <%=cmd%>
|
1619
|
+
$ <%=cmd%> aoc admin res user list --fields=email --query=@json:'{"per_page":10000}' --select=@json:'{"member_of_any_workspace":false}'
|
1601
1620
|
```
|
1602
1621
|
|
1603
1622
|
* Perform a multi Gbps transfer between two remote shared folders
|
@@ -1611,7 +1630,7 @@ $ <%=cmd%> conf wizard --url=https://sedemo.ibmaspera.com --username=laurent.mar
|
|
1611
1630
|
Detected: Aspera on Cloud
|
1612
1631
|
Preparing preset: aoc_sedemo
|
1613
1632
|
Using existing key:
|
1614
|
-
/Users/laurent/.aspera/<%=cmd%>/
|
1633
|
+
/Users/laurent/.aspera/<%=cmd%>/aspera_aoc_key
|
1615
1634
|
Using global client_id.
|
1616
1635
|
Please Login to your Aspera on Cloud instance.
|
1617
1636
|
Navigate to your "Account Settings"
|
@@ -1626,7 +1645,7 @@ Setting config preset as default for aspera
|
|
1626
1645
|
saving config file
|
1627
1646
|
Done.
|
1628
1647
|
You can test with:
|
1629
|
-
$ <%=cmd%>
|
1648
|
+
$ <%=cmd%> aoc user info show
|
1630
1649
|
```
|
1631
1650
|
|
1632
1651
|
This creates the option preset "aoc_<org name>" to allow seamless command line access and sets it as default for aspera on cloud.
|
@@ -1641,14 +1660,14 @@ $ <%=cmd%> -Paoc_show aspera files transfer --from-folder='IBM Cloud SJ' --to-fo
|
|
1641
1660
|
|
1642
1661
|
* create registration key to register a node
|
1643
1662
|
```
|
1644
|
-
$ <%=cmd%>
|
1663
|
+
$ <%=cmd%> aoc admin res admin/client create @json:'{"data":{"name":"laurentnode","client_subject_scopes":["alee","aejd"],"client_subject_enabled":true}}' --fields=token --format=csv
|
1645
1664
|
jfqslfdjlfdjfhdjklqfhdkl
|
1646
1665
|
```
|
1647
1666
|
|
1648
1667
|
* delete all registration keys
|
1649
1668
|
|
1650
1669
|
```
|
1651
|
-
$ <%=cmd%>
|
1670
|
+
$ <%=cmd%> aoc admin res admin/client list --fields=id --format=csv|<%=cmd%> aoc admin res admin/client delete --bulk=yes --id=@lines:@stdin:
|
1652
1671
|
+-----+---------+
|
1653
1672
|
| id | status |
|
1654
1673
|
+-----+---------+
|
@@ -1664,19 +1683,19 @@ $ <%=cmd%> aspera admin res admin/client list --fields=id --format=csv|<%=cmd%>
|
|
1664
1683
|
* list shared folders in node
|
1665
1684
|
|
1666
1685
|
```
|
1667
|
-
$ <%=cmd%>
|
1686
|
+
$ <%=cmd%> aoc admin res node --id=8669 shared_folders
|
1668
1687
|
```
|
1669
1688
|
|
1670
1689
|
* list shared folders in workspace
|
1671
1690
|
|
1672
1691
|
```
|
1673
|
-
$ <%=cmd%>
|
1692
|
+
$ <%=cmd%> aoc admin res workspace --id=10818 shared_folders
|
1674
1693
|
```
|
1675
1694
|
|
1676
1695
|
* list members of shared folder
|
1677
1696
|
|
1678
1697
|
```
|
1679
|
-
$ <%=cmd%>
|
1698
|
+
$ <%=cmd%> aoc admin res node --id=8669 v4 perm 82 show
|
1680
1699
|
```
|
1681
1700
|
|
1682
1701
|
## Send a Package
|
@@ -1684,7 +1703,7 @@ $ <%=cmd%> aspera admin res node --id=8669 v4 perm 82 show
|
|
1684
1703
|
Send a package:
|
1685
1704
|
|
1686
1705
|
```
|
1687
|
-
$ <%=cmd%>
|
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
|
1688
1707
|
```
|
1689
1708
|
|
1690
1709
|
Notes:
|
@@ -1699,7 +1718,7 @@ Notes:
|
|
1699
1718
|
It is possible to automatically download new packages, like using Aspera Cargo:
|
1700
1719
|
|
1701
1720
|
```
|
1702
|
-
$ <%=cmd%>
|
1721
|
+
$ <%=cmd%> aoc packages recv --id=ALL --once-only=yes --lock-port=12345
|
1703
1722
|
```
|
1704
1723
|
|
1705
1724
|
* `--id=ALL` (case sensitive) will download all packages
|
@@ -1743,19 +1762,19 @@ f["type"].eql?("file") and (DateTime.now-DateTime.parse(f["modified_time"]))<100
|
|
1743
1762
|
* expression to find files older than 1 year on a given node and store in file list
|
1744
1763
|
|
1745
1764
|
```
|
1746
|
-
$ <%=cmd%>
|
1765
|
+
$ <%=cmd%> aoc admin res node --name='my node name' --secret='my secret' v4 find / --fields=path --value='exec:f["type"].eql?("file") and (DateTime.now-DateTime.parse(f["modified_time"]))<100' --format=csv > my_file_list.txt
|
1747
1766
|
```
|
1748
1767
|
|
1749
1768
|
* delete the files, one by one
|
1750
1769
|
|
1751
1770
|
```
|
1752
|
-
$ cat my_file_list.txt|while read path;do echo <%=cmd%>
|
1771
|
+
$ cat my_file_list.txt|while read path;do echo <%=cmd%> aoc admin res node --name='my node name' --secret='my secret' v4 delete "$path" ;done
|
1753
1772
|
```
|
1754
1773
|
|
1755
1774
|
* delete the files in bulk
|
1756
1775
|
|
1757
1776
|
```
|
1758
|
-
cat my_file_list.txt | <%=cmd%>
|
1777
|
+
cat my_file_list.txt | <%=cmd%> aoc admin res node --name='my node name' --secret='my secret' v3 delete @lines:@stdin:
|
1759
1778
|
```
|
1760
1779
|
|
1761
1780
|
## Activity
|
@@ -1763,13 +1782,13 @@ cat my_file_list.txt | <%=cmd%> aspera admin res node --name='my node name' --se
|
|
1763
1782
|
The activity app can be queried with:
|
1764
1783
|
|
1765
1784
|
```
|
1766
|
-
$ <%=cmd%>
|
1785
|
+
$ <%=cmd%> aoc admin analytics transfers
|
1767
1786
|
```
|
1768
1787
|
|
1769
1788
|
It can also support filters and send notification email with a template:
|
1770
1789
|
|
1771
1790
|
```
|
1772
|
-
$ <%=cmd%>
|
1791
|
+
$ <%=cmd%> aoc admin analytics transfers --once-only=yes --lock-port=123455 \
|
1773
1792
|
--query=@json:'{"status":"completed","direction":"receive"}' \
|
1774
1793
|
--notify=@json:'{"to":"<''%=transfer[:user_email.to_s]%>","subject":"<''%=transfer[:files_completed.to_s]%> files received","body":"Dear <''%=transfer[:user_email.to_s]%>\nWe received <''%=transfer[:files_completed.to_s]%> files for a total of <''%=transfer[:transferred_bytes.to_s]%> bytes, starting with file:\n<''%=transfer[:content.to_s]%>\n\nThank you."}'
|
1775
1794
|
```
|
@@ -1789,9 +1808,9 @@ By default transfer nodes are expected to use ports TCP/UDP 33001. The web UI en
|
|
1789
1808
|
|
1790
1809
|
ATS is usable either :
|
1791
1810
|
|
1792
|
-
* from an AoC subscription : <%=cmd%>
|
1811
|
+
* from an AoC subscription : <%=cmd%> aoc admin ats : use AoC authentication
|
1793
1812
|
|
1794
|
-
* or from an IBM Cloud subscription : <%=cmd%> ats
|
1813
|
+
* or from an IBM Cloud subscription : <%=cmd%> ats : use IBM Cloud API key authentication
|
1795
1814
|
|
1796
1815
|
## IBM Cloud ATS : creation of api key
|
1797
1816
|
|
@@ -1895,21 +1914,35 @@ $ <%=cmd%> server --ssh-keys=@list:,~/.ssh/id_rsa
|
|
1895
1914
|
$ <%=cmd%> server --ssh-keys=@json:'["~/.ssh/id_rsa"]'
|
1896
1915
|
```
|
1897
1916
|
|
1898
|
-
The underlying ssh library `net::ssh` provides several options that may be used
|
1899
|
-
|
1917
|
+
The underlying ssh library `net::ssh` provides several options that may be used depending on environment. By default the ssh library expect that an ssh-agent is running.
|
1918
|
+
|
1919
|
+
If you get an error message such as:
|
1900
1920
|
|
1901
1921
|
```
|
1922
|
+
[Linux]
|
1902
1923
|
ERROR -- net.ssh.authentication.agent: could not connect to ssh-agent: Agent not configured
|
1903
1924
|
```
|
1904
1925
|
|
1905
|
-
|
1926
|
+
or
|
1927
|
+
|
1928
|
+
```
|
1929
|
+
[Windows]
|
1930
|
+
ERROR -- net.ssh.authentication.agent: could not connect to ssh-agent: pageant process not running
|
1931
|
+
```
|
1932
|
+
|
1933
|
+
This means that you dont have such an ssh agent running:
|
1906
1934
|
|
1907
|
-
|
1935
|
+
* check env var: `SSH_AGENT_SOCK`
|
1936
|
+
* check if the key is protected with a passphrase
|
1937
|
+
* [check the manual](https://net-ssh.github.io/ssh/v1/chapter-2.html#s2)
|
1938
|
+
* To diable use of `ssh-agent`, use the option `ssh_option` like this (or set in preset):
|
1908
1939
|
|
1909
1940
|
```
|
1910
1941
|
$ <%=cmd%> server --ssh-options=@ruby:'{use_agent: false}' ...
|
1911
1942
|
```
|
1912
1943
|
|
1944
|
+
This can also be set as default using a preset
|
1945
|
+
|
1913
1946
|
## Example
|
1914
1947
|
|
1915
1948
|
One can test the "server" application using the well known demo server:
|
@@ -2204,7 +2237,7 @@ To change this parameter in `aspera.conf`, use `asconfigurator`. To display the
|
|
2204
2237
|
|
2205
2238
|
If you use a value different than 16777216, then specify it using option `max_size`.
|
2206
2239
|
|
2207
|
-
Note: the HSTS parameter (max_request_file_create_size_kb) is in
|
2240
|
+
Note: the HSTS parameter (max_request_file_create_size_kb) is in *kiloBytes* while the generator parameter is in *Bytes* (factor of 1024).
|
2208
2241
|
|
2209
2242
|
## <a name="prev_ext"></a>External tools: Linux
|
2210
2243
|
|
@@ -2334,8 +2367,7 @@ using one of three overwrite method:
|
|
2334
2367
|
|
2335
2368
|
Deletion of preview for deleted source files: not implemented yet.
|
2336
2369
|
|
2337
|
-
If the `scan` or `events` detection method is used, then the option : `skip_folders` can be used
|
2338
|
-
to skip some folders. It expects a list of path starting with slash, use the `@json:` notation, example:
|
2370
|
+
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:
|
2339
2371
|
|
2340
2372
|
```
|
2341
2373
|
$ <%=cmd%> preview scan --skip-folders=@json:'["/not_here"]'
|
@@ -2343,14 +2375,14 @@ $ <%=cmd%> preview scan --skip-folders=@json:'["/not_here"]'
|
|
2343
2375
|
|
2344
2376
|
The option `folder_reset_cache` forces the node service to refresh folder contents using various methods.
|
2345
2377
|
|
2346
|
-
##
|
2378
|
+
## Preview File types
|
2347
2379
|
|
2348
2380
|
Two types of preview can be generated:
|
2349
2381
|
|
2350
2382
|
* png: thumbnail
|
2351
2383
|
* mp4: video preview (only for video)
|
2352
2384
|
|
2353
|
-
|
2385
|
+
Use option `skip_format` to skip generation of a format.
|
2354
2386
|
|
2355
2387
|
## Supported input Files types
|
2356
2388
|
|
@@ -2508,7 +2540,7 @@ Nodejs: [https://www.npmjs.com/package/aspera](https://www.npmjs.com/package/asp
|
|
2508
2540
|
|
2509
2541
|
```
|
2510
2542
|
$ asession -h
|
2511
|
-
<%= File.read(ENV["
|
2543
|
+
<%= File.read(ENV["INCL_ASESSION"]) %>
|
2512
2544
|
```
|
2513
2545
|
|
2514
2546
|
# Hot folder
|
@@ -2606,15 +2638,16 @@ So, it evolved into <%=tool%>:
|
|
2606
2638
|
|
2607
2639
|
# Release Notes
|
2608
2640
|
|
2609
|
-
* 4.0.0.
|
2641
|
+
* 4.0.0.pre2
|
2610
2642
|
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2643
|
+
* now available as open source at [<%= gemspec.homepage %>](<%= gemspec.homepage %>) with general cleanup
|
2644
|
+
* changed default tool name from `mlia` to `ascli`
|
2645
|
+
* changed `aspera` command to `aoc`
|
2646
|
+
* changed gem name from `asperalm` to `aspera-cli`
|
2647
|
+
* changed module name from `Asperalm` to `Aspera`
|
2648
|
+
* removed command `folder` in `preview`, merged to `scan`
|
2649
|
+
* persistency files go to sub folder instead of main folder
|
2650
|
+
* added possibility to install SDK: `config ascp install`
|
2618
2651
|
|
2619
2652
|
* 0.11.8
|
2620
2653
|
|