aspera-cli 4.2.2 → 4.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69d9db9ef64b0b49f9a0dc83949bc1dbff6934dc158132e4bce6b8fc12a8d0bd
4
- data.tar.gz: 60a1d6b8cbf0b0d2f7128f8131d31a94166a856eb17197db3578d3aa0e760dff
3
+ metadata.gz: 4f09023e74080acc5ac3370a944a210b371a0f1492cd3ad89a9816affc35cd8e
4
+ data.tar.gz: 808993db319171f042de4c6be8a81cdc609af02f9ff67bd1cea5f0d0070ace40
5
5
  SHA512:
6
- metadata.gz: 5a918f2f400041eff1655d97829ff5cf64d52a09e1223032823891205cbdeba8109619fd43f9b8ebc7d55022b6e0b72b0f935c357be4b58cfd3a85343431f830
7
- data.tar.gz: 4927dabefd461997ea0ff07a8a4c2034f767a5925bac6c88faa4370e34d62f1fbca31ba2e8a65ebf723a168da9974c8aacfa8da5662087151f32df1f9e71d4d7
6
+ metadata.gz: 9620be95b310ae3b2ab7537858b91f3a5ab8a60eca2cba61e31fc19d535314ea0f419b41537de4cb91a4346977365e94ea6d2d9065136fb38e813ce865c83333
7
+ data.tar.gz: 9ddf8860dcac5ce8c69afdedbd2b4a2b1f1242d04a3b416e6b9cf66ae7271c0b079dafc4200f8b450b34263a3f2385e701868959bcca9128f34464ab6ce07258
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [comment1]: # (Do not edit this README.md, edit docs/README.erb.md, for details, read docs/README.md)
2
- # `ascli` : Command Line Interface for IBM Aspera products
2
+ <font size="+12"><center>`ascli` : Command Line Interface for IBM Aspera products</center></font>
3
3
 
4
- Version : 4.2.2
4
+ Version : 4.3.0
5
5
 
6
6
  _Laurent/2016-2021_
7
7
 
@@ -13,7 +13,7 @@ Ruby Gem: [https://rubygems.org/gems/aspera-cli](https://rubygems.org/gems/asper
13
13
 
14
14
  Ruby Doc: [https://www.rubydoc.info/gems/aspera-cli](https://www.rubydoc.info/gems/aspera-cli)
15
15
 
16
- Ruby version must be >= > 2.4
16
+ Required Ruby version: > 2.4
17
17
 
18
18
  # <a name="when_to_use"></a>When to use and when not to use
19
19
 
@@ -29,7 +29,8 @@ So it is designed for:
29
29
 
30
30
  `ascli` can be seen as a command line tool integrating:
31
31
 
32
- * a configuration file (config.yaml) and advanced command line options
32
+ * a configuration file (config.yaml)
33
+ * advanced command line options
33
34
  * cURL (for REST calls)
34
35
  * Aspera transfer (ascp)
35
36
 
@@ -81,7 +82,7 @@ Once the gem is installed, `ascli` shall be accessible:
81
82
 
82
83
  ```
83
84
  $ ascli --version
84
- 4.2.2
85
+ 4.3.0
85
86
  ```
86
87
 
87
88
  ## First use
@@ -151,7 +152,7 @@ It is possible to install *either* directly on the host operating system (Linux,
151
152
 
152
153
  The direct installation is recommended and consists in installing:
153
154
 
154
- * [Ruby](#ruby) version >= > 2.4
155
+ * [Ruby](#ruby) version > 2.4
155
156
  * [aspera-cli](#the_gem)
156
157
  * [Aspera SDK (ascp)](#fasp_prot)
157
158
 
@@ -199,7 +200,7 @@ Use this method to install on the native host.
199
200
 
200
201
  A ruby interpreter is required to run the tool or to use the gem and tool.
201
202
 
202
- Ruby minimum version: > 2.4. Ruby version 3 is also supported.
203
+ Required Ruby version: > 2.4. Ruby version 3 is also supported.
203
204
 
204
205
  *Ruby can be installed using any method* : rpm, yum, dnf, rvm, brew, windows installer, ... .
205
206
 
@@ -207,7 +208,7 @@ Refer to the following sections for a proposed method for specific operating sys
207
208
 
208
209
  The recommended installation method is `rvm` for systems with "bash-like" shell (Linux, Macos, Windows with cygwin, etc...).
209
210
  If the generic install is not suitable (e.g. Windows, no cygwin), you can use one of OS-specific install method.
210
- If you have a simpler better way to install Ruby version >= > 2.4 : use it !
211
+ If you have a simpler better way to install Ruby version > 2.4 : use it !
211
212
 
212
213
  ### Generic: RVM: single user installation (not root)
213
214
 
@@ -1185,11 +1186,19 @@ The `transfer-info` accepts the following optional parameters:
1185
1186
  <tr><td>spawn_timeout_sec</td><td>Float</td><td>3</td><td>Multi session</td><td>Verification time that ascp is running</td></tr>
1186
1187
  <tr><td>spawn_delay_sec</td><td>Float</td><td>2</td><td>Multi session</td><td>Delay between startup of sessions</td></tr>
1187
1188
  <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>
1189
+ <tr><td>multi_incr_udp</td><td>Bool</td><td>true</td><td>Multi Session</td><td>Increment UDP port on multi-session<br/>If true, each session will have a different UDP port starting at `fasp_port` (or default 33001)<br/>Else, each session will use `fasp_port` (or `ascp` default)</td></tr>
1188
1190
  <tr><td>resume</td><td>Hash</td><td>nil</td><td>Resumer parameters</td><td>See below</td></tr>
1189
1191
  </table>
1190
1192
 
1191
1193
  Resume parameters:
1192
1194
 
1195
+ In case of transfer interruption, the agent will resume a transfer up to `iter_max` time.
1196
+ Sleep between iteration is:
1197
+
1198
+ ```
1199
+ max( sleep_max , sleep_initial * sleep_factor ^ (iter_index-1) )
1200
+ ```
1201
+
1193
1202
  <table>
1194
1203
  <tr><th>Name</th><th>Type</th><th>Default</th><th>Feature</th><th>Description</th></tr>
1195
1204
  <tr><td>iter_max</td><td>int</td><td>7</td><td>Resume</td><td>Max number of retry on error</td></tr>
@@ -1202,7 +1211,7 @@ Examples:
1202
1211
 
1203
1212
  ```
1204
1213
  $ ascli ... --transfer-info=@json:'{"wss":true,"resume":{"iter_max":10}}'
1205
- $ ascli ... --transfer-info=@json:'{"spawn_delay_sec":2.5}'
1214
+ $ ascli ... --transfer-info=@json:'{"spawn_delay_sec":2.5,"multi_incr_udp":false}'
1206
1215
  ```
1207
1216
 
1208
1217
  ### IBM Aspera Connect Client GUI
@@ -1490,6 +1499,7 @@ ascli aoc automation workflow list --value=@json:'{"show_org_workflows":"true"}'
1490
1499
  ascli aoc bearer_token --display=data --scope=user:all
1491
1500
  ascli aoc faspex
1492
1501
  ascli aoc files bearer /
1502
+ ascli aoc files bearer_token_node /
1493
1503
  ascli aoc files browse /
1494
1504
  ascli aoc files browse / -N --link=my_aoc_publink_folder
1495
1505
  ascli aoc files delete /testsrc
@@ -1505,6 +1515,7 @@ ascli aoc files short_link list --value=@json:'{"purpose":"shared_folder_auth_li
1505
1515
  ascli aoc files transfer --from-folder=/testsrc --to-folder=/testdst testfile.bin
1506
1516
  ascli aoc files upload --to-folder=/testsrc testfile.bin
1507
1517
  ascli aoc files upload -N --to-folder=/ testfile.bin --link=my_aoc_publink_folder
1518
+ ascli aoc files upload Test.pdf --transfer=node --transfer-info=@json:@stdin:
1508
1519
  ascli aoc files v3 info
1509
1520
  ascli aoc org -N --link=my_aoc_publink_recv_from_aocuser
1510
1521
  ascli aoc organization
@@ -1669,7 +1680,7 @@ ascli sync start --parameters=@json:'{"sessions":[{"name":"test","reset":true,"r
1669
1680
  ```
1670
1681
  $ ascli -h
1671
1682
  NAME
1672
- ascli -- a command line tool for Aspera Applications (v4.2.2)
1683
+ ascli -- a command line tool for Aspera Applications (v4.3.0)
1673
1684
 
1674
1685
  SYNOPSIS
1675
1686
  ascli COMMANDS [OPTIONS] [ARGS]
@@ -2004,7 +2015,7 @@ For this, specify the option: `--use-generic-client=no`.
2004
2015
 
2005
2016
  This will guide you through the steps to create.
2006
2017
 
2007
- ## <a name="aocwizard"></a>Configuration: using manual setup
2018
+ ## <a name="aocmanual"></a>Configuration: using manual setup
2008
2019
 
2009
2020
  If you used the wizard (recommended): skip this section.
2010
2021
 
@@ -2268,10 +2279,10 @@ $ ascli aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,em
2268
2279
  : 98398 : dummyuser1@example.com :
2269
2280
  : 98399 : dummyuser2@example.com :
2270
2281
  :.......:........................:
2271
- $ thelist=$(echo $(ascli aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,email --field=id --format=csv)|tr ' ' ,)
2282
+ $ thelist=$(ascli aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id --format=json --display=data|jq -cr 'map(.id)')
2272
2283
  $ echo $thelist
2273
- 98398,98399
2274
- $ ascli aoc admin res user --bulk=yes --id=@json:[$thelist] delete
2284
+ ["113501","354061"]
2285
+ $ ascli aoc admin res user --bulk=yes --id=@json:"$thelist" delete
2275
2286
  :.......:.........:
2276
2287
  : id : status :
2277
2288
  :.......:.........:
@@ -2280,6 +2291,14 @@ $ ascli aoc admin res user --bulk=yes --id=@json:[$thelist] delete
2280
2291
  :.......:.........:
2281
2292
  ```
2282
2293
 
2294
+ * <a name="deactuser"></a>Find deactivated users since more than 2 years
2295
+
2296
+ ```
2297
+ ascli aoc admin res user list --query=@ruby:'{"deactivated"=>true,"q"=>"last_login_at:<#{(DateTime.now.to_time.utc-2*365*86400).iso8601}"}'
2298
+ ```
2299
+
2300
+ To delete them use the same method as before
2301
+
2283
2302
  * Display current user's workspaces
2284
2303
 
2285
2304
  ```
@@ -2675,7 +2694,37 @@ $ ascli ats api_key create
2675
2694
  +--------+----------------------------------------------+
2676
2695
  $ ascli config id my_ibm_ats update --ats-key=ats_XXXXXXXXXXXXXXXXXXXXXXXX --ats-secret=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
2677
2696
  ```
2697
+ ## Cross Organization transfers
2698
+
2699
+ It is possible to transfer files directly between organizations without having to first download locally and then upload...
2700
+
2701
+ Although optional, the creation of [option preset](#lprt) is recommended to avoid placing all parameters in the command line.
2678
2702
 
2703
+ Procedure to send a file from org1 to org2:
2704
+
2705
+ * Get access to Organization 1 and create a [option preset](#lprt): e.g. `org1`, for instance, use the [Wizard](#aocwizard)
2706
+ * Check that access works and locate the source file e.g. `mysourcefile`, e.g. using command `files browse`
2707
+ * Get access to Organization 2 and create a [option preset](#lprt): e.g. `org2`
2708
+ * Check that access works and locate the destination folder `mydestfolder`
2709
+ * execute the following:
2710
+
2711
+ ```
2712
+ $ ascli -Porg1 aoc files node_info /mydestfolder --format=json --display=data | ascli -Porg2 aoc files upload mysourcefile --transfer=node --transfer-info=@json:@stdin:
2713
+ ```
2714
+
2715
+ Explanation:
2716
+
2717
+ * `-Porg1 aoc` use Aspera on Cloud plugin and load credentials for `org1`
2718
+ * `files node_info /mydestfolder` generate transfer information including node api credential and root id, suitable for the next command
2719
+ * `--format=json` format the output in JSON (instead of default text table)
2720
+ * `--display=data` display only the result, and remove other information, such as workspace name
2721
+ * `|` the standard output of the first command is fed into the second one
2722
+ * `-Porg2 aoc` use Aspera on Cloud plugin and load credentials for `org2`
2723
+ * `files upload mysourcefile` upload the file named `mysourcefile` (located in `org1`)
2724
+ * `--transfer=node` use transfer agent type `node` instead of default `direct`
2725
+ * `--transfer-info=@json:@stdin:` provide `node` transfer agent information, i.e. node API credentials, those are expected in JSON format and read from standard input
2726
+
2727
+ Note that when using a POSIX shell, another possibility to write `cmd1 | cmd2 --transfer-info=@json:stdin:` is `cmd2 --transfer-info=@json:$(cmd1)` instead of ``
2679
2728
  ## Examples
2680
2729
 
2681
2730
  Example: create access key on softlayer:
@@ -2994,7 +3043,7 @@ $ ascli faspex v4 dropbox list
2994
3043
  $ ascli faspex v4 dropbox delete --id=36
2995
3044
  ```
2996
3045
 
2997
- ## remote sources
3046
+ ## Remote sources
2998
3047
 
2999
3048
  Faspex lacks an API to list the contents of a remote source (available in web UI). To workaround this,
3000
3049
  the node API is used, for this it is required to add a section ":storage" that links
@@ -3045,29 +3094,38 @@ $ for p in 1 2 3;do ascli shares2 admin users list --value=@json:'{"page":'$p'}'
3045
3094
  # Plugin: IBM Cloud Object Storage
3046
3095
 
3047
3096
  The IBM Cloud Object Storage provides the possibility to execute transfers using FASP.
3048
- It uses the same transfer service as Aspera on Cloud.
3049
- see [https://status.aspera.io](https://status.aspera.io)
3097
+ It uses the same transfer service as Aspera on Cloud, called Aspera Transfer Service (ATS).
3098
+ Available ATS regions: [https://status.aspera.io](https://status.aspera.io)
3099
+
3100
+ There are two possibilities to provide credentials. If you already have the endpoint, apikey and CRN, use the forst method. If you dont have credentials but have access to the IBM Cloud console, then use the second method.
3050
3101
 
3051
- Required options are either:
3102
+ ## Using endpoint, apikey and Ressource Instance ID (CRN)
3103
+
3104
+ If you have those parameters already, then following options shall be provided:
3052
3105
 
3053
3106
  * `bucket` bucket name
3054
3107
  * `endpoint` storage endpoint url, e.g. https://s3.hkg02.cloud-object-storage.appdomain.cloud
3055
3108
  * `apikey` API Key
3056
3109
  * `crn` resource instance id
3057
3110
 
3058
- or:
3111
+ For example, let us create a default configuration:
3059
3112
 
3060
- * `bucket` bucket name
3061
- * `region` bucket region, e.g. eu-de
3062
- * `service_credentials` see below
3113
+ ```
3114
+ $ ascli conf id mycos update --bucket=mybucket --endpoint=https://s3.us-east.cloud-object-storage.appdomain.cloud --apikey=abcdefgh --crn=crn:v1:bluemix:public:iam-identity::a/xxxxxxx
3115
+ $ ascli conf id default set cos mycos
3116
+ ```
3117
+
3118
+ Then, jump to the transfer example.
3119
+
3120
+ ## Using service credential file
3063
3121
 
3064
- Service credentials are directly created using the IBM cloud web ui. Navigate to:
3122
+ If you are the COS administrator and dont have yet the credential: Service credentials are directly created using the IBM cloud web ui. Navigate to:
3065
3123
 
3066
3124
  Navigation Menu &rarr; Resource List &rarr; Storage &rarr; Cloud Object Storage &rarr; Service Credentials &rarr; &lt;select or create credentials&gt; &rarr; view credentials &rarr; copy
3067
3125
 
3068
3126
  Then save the copied value to a file, e.g. : `$HOME/cos_service_creds.json`
3069
3127
 
3070
- or using the CLI:
3128
+ or using the IBM Cloud CLI:
3071
3129
 
3072
3130
  ```
3073
3131
  $ ibmcloud resource service-keys
@@ -3098,33 +3156,38 @@ The field `resource_instance_id` is for option `crn`
3098
3156
 
3099
3157
  The field `apikey` is for option `apikey`
3100
3158
 
3101
- Endpoints for regions can be found by querying the `endpoints` URL.
3159
+ (If needed: endpoints for regions can be found by querying the `endpoints` URL.)
3160
+
3161
+ The required options for this method are:
3162
+
3163
+ * `bucket` bucket name
3164
+ * `region` bucket region, e.g. eu-de
3165
+ * `service_credentials` see below
3102
3166
 
3103
- For convenience, let us create a default configuration, for example:
3167
+ For example, let us create a default configuration:
3104
3168
 
3105
3169
  ```
3106
3170
  $ ascli conf id mycos update --bucket=laurent --service-credentials=@val:@json:@file:~/service_creds.json --region=us-south
3107
3171
  $ ascli conf id default set cos mycos
3108
3172
  ```
3109
3173
 
3110
- or using direct parameters:
3174
+ ## Operations, transfers
3111
3175
 
3112
- ```
3113
- $ ascli conf id mycos update --bucket=mybucket --endpoint=https://s3.us-east.cloud-object-storage.appdomain.cloud --apikey=abcdefgh --crn=crn:v1:bluemix:public:iam-identity::a/xxxxxxx
3114
- $ ascli conf id default set cos mycos
3115
- ```
3176
+ Let's assume you created a default configuration from once of the two previous steps (else specify the access options on command lines).
3116
3177
 
3117
- Now, Ready to do operations, a subset of "node" plugin operations are supported, basically node API:
3178
+ A subset of `node` plugin operations are supported, basically node API:
3118
3179
 
3119
3180
  ```
3120
- $ ascli cos node browse /
3121
- $ ascli cos node upload myfile.txt
3181
+ $ ascli cos node info
3182
+ $ ascli cos node upload 'faux:///sample1G?1g'
3122
3183
  ```
3123
3184
 
3185
+ Note: we generate a dummy file `sample1G` if size 2GB using the `faux` PVCL (man ascp), but you can of course send a real file by specifying a real file instead.
3186
+
3124
3187
  # Plugin: IBM Aspera Sync
3125
3188
 
3126
- A basic plugin to start an "async" using `ascli`. The main advantage is the possibility
3127
- to start from ma configuration file, using `ascli` standard options.
3189
+ A basic plugin to start an "async" using `ascli`.
3190
+ The main advantage is the possibility to start from ma configuration file, using `ascli` standard options.
3128
3191
 
3129
3192
  # Plugin: Preview
3130
3193
 
@@ -3712,6 +3775,11 @@ So, it evolved into `ascli`:
3712
3775
 
3713
3776
  # Changes (Release notes)
3714
3777
 
3778
+ * 4.3.0
3779
+
3780
+ * new: parameter `multi_incr_udp` for option `transfer_info`: control if UDP port is incremented when multi-session is used on `direct` transfer agent.
3781
+ * new: command `aoc files node_info` to get node information for a given folder in the Files application of AoC. Allows cross-org or cross-workspace transfers.
3782
+
3715
3783
  * 4.2.2
3716
3784
 
3717
3785
  * new: `faspex package list` retrieves the whole list, not just first page
data/docs/README.erb.md CHANGED
@@ -1,24 +1,24 @@
1
1
  [comment1]: # (Do not edit this README.md, edit docs/README.erb.md, for details, read docs/README.md)
2
- <%
3
- # check that required env vars exist, and files
2
+ <% #```ruby
3
+ # check that required env vars exist, and files
4
4
  %w{EXENAME GEMSPEC INCL_USAGE INCL_COMMANDS INCL_ASESSION INCL_DIR_GEM}.each do |e|
5
5
  raise "missing env var #{e}" unless ENV.has_key?(e)
6
6
  raise "missing file #{ENV[e]}" unless File.exist?(ENV[e]) or !e.start_with?('INCL_') #_
7
7
  end
8
- cmd=ENV["EXENAME"] # just command name
8
+ cmd=ENV['EXENAME'] # just command name
9
9
  tool='`'+cmd+'`' # used in text with formatting of command
10
10
  evp=cmd.upcase+'_' # prefix for env vars
11
11
  opprst='option preset' # just the name for "option preset"
12
- prst='['+opprst+'](#lprt)'
13
- prsts='['+opprst+'s](#lprt)'
12
+ prst='['+opprst+'](#lprt)' # name with link
13
+ prsts='['+opprst+'s](#lprt)' # name with link (plural)
14
14
  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
  $LOAD_PATH.unshift(ENV["INCL_DIR_GEM"])
18
18
  require 'aspera/fasp/parameters'
19
19
  def spec_table
20
- r='<table><tr><th>Field</th><th>Type</th>'
21
- Aspera::Fasp::Parameters::SUPPORTED_AGENTS_SHORT.each do |c|
20
+ r='<table><tr><th>Field</th><th>Type</th>'
21
+ Aspera::Fasp::Parameters::SUPPORTED_AGENTS_SHORT.each do |c|
22
22
  r << '<th>'<<c.to_s.upcase<<'</th>'
23
23
  end
24
24
  r << '<th>Description</th></tr>'
@@ -36,9 +36,9 @@ def spec_table
36
36
  end
37
37
  r << '</table>'
38
38
  return r
39
- end
39
+ end #```
40
40
  -%>
41
- # <%=tool%> : Command Line Interface for IBM Aspera products
41
+ <font size="+12"><center><%=tool%> : Command Line Interface for IBM Aspera products</center></font>
42
42
 
43
43
  Version : <%= gemspec.version.to_s %>
44
44
 
@@ -52,7 +52,7 @@ Ruby Gem: [<%= gemspec.metadata['rubygems_uri'] %>](<%= gemspec.metadata['rubyge
52
52
 
53
53
  Ruby Doc: [<%= gemspec.metadata['documentation_uri'] %>](<%= gemspec.metadata['documentation_uri'] %>)
54
54
 
55
- Ruby version must be >= <%= gemspec.required_ruby_version %>
55
+ Required Ruby version: <%= gemspec.required_ruby_version %>
56
56
 
57
57
  # <a name="when_to_use"></a>When to use and when not to use
58
58
 
@@ -68,7 +68,8 @@ So it is designed for:
68
68
 
69
69
  <%=tool%> can be seen as a command line tool integrating:
70
70
 
71
- * a configuration file (config.yaml) and advanced command line options
71
+ * a configuration file (config.yaml)
72
+ * advanced command line options
72
73
  * cURL (for REST calls)
73
74
  * Aspera transfer (ascp)
74
75
 
@@ -190,7 +191,7 @@ It is possible to install *either* directly on the host operating system (Linux,
190
191
 
191
192
  The direct installation is recommended and consists in installing:
192
193
 
193
- * [Ruby](#ruby) version >= <%= gemspec.required_ruby_version %>
194
+ * [Ruby](#ruby) version <%= gemspec.required_ruby_version %>
194
195
  * [<%= gemspec.name %>](#the_gem)
195
196
  * [Aspera SDK (ascp)](#fasp_prot)
196
197
 
@@ -238,7 +239,7 @@ Use this method to install on the native host.
238
239
 
239
240
  A ruby interpreter is required to run the tool or to use the gem and tool.
240
241
 
241
- Ruby minimum version: <%= gemspec.required_ruby_version %>. Ruby version 3 is also supported.
242
+ Required Ruby version: <%= gemspec.required_ruby_version %>. Ruby version 3 is also supported.
242
243
 
243
244
  *Ruby can be installed using any method* : rpm, yum, dnf, rvm, brew, windows installer, ... .
244
245
 
@@ -246,7 +247,7 @@ Refer to the following sections for a proposed method for specific operating sys
246
247
 
247
248
  The recommended installation method is `rvm` for systems with "bash-like" shell (Linux, Macos, Windows with cygwin, etc...).
248
249
  If the generic install is not suitable (e.g. Windows, no cygwin), you can use one of OS-specific install method.
249
- If you have a simpler better way to install Ruby version >= <%= gemspec.required_ruby_version %> : use it !
250
+ If you have a simpler better way to install Ruby version <%= gemspec.required_ruby_version %> : use it !
250
251
 
251
252
  ### Generic: RVM: single user installation (not root)
252
253
 
@@ -1224,11 +1225,19 @@ The `transfer-info` accepts the following optional parameters:
1224
1225
  <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>
1225
1226
  <tr><td>spawn_delay_sec</td><td>Float</td><td>2</td><td>Multi session</td><td>Delay between startup of sessions</td></tr>
1226
1227
  <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>
1228
+ <tr><td>multi_incr_udp</td><td>Bool</td><td>true</td><td>Multi Session</td><td>Increment UDP port on multi-session<br/>If true, each session will have a different UDP port starting at `fasp_port` (or default 33001)<br/>Else, each session will use `fasp_port` (or `ascp` default)</td></tr>
1227
1229
  <tr><td>resume</td><td>Hash</td><td>nil</td><td>Resumer parameters</td><td>See below</td></tr>
1228
1230
  </table>
1229
1231
 
1230
1232
  Resume parameters:
1231
1233
 
1234
+ In case of transfer interruption, the agent will resume a transfer up to `iter_max` time.
1235
+ Sleep between iteration is:
1236
+
1237
+ ```
1238
+ max( sleep_max , sleep_initial * sleep_factor ^ (iter_index-1) )
1239
+ ```
1240
+
1232
1241
  <table>
1233
1242
  <tr><th>Name</th><th>Type</th><th>Default</th><th>Feature</th><th>Description</th></tr>
1234
1243
  <tr><td>iter_max</td><td>int</td><td>7</td><td>Resume</td><td>Max number of retry on error</td></tr>
@@ -1241,7 +1250,7 @@ Examples:
1241
1250
 
1242
1251
  ```
1243
1252
  $ <%=cmd%> ... --transfer-info=@json:'{"wss":true,"resume":{"iter_max":10}}'
1244
- $ <%=cmd%> ... --transfer-info=@json:'{"spawn_delay_sec":2.5}'
1253
+ $ <%=cmd%> ... --transfer-info=@json:'{"spawn_delay_sec":2.5,"multi_incr_udp":false}'
1245
1254
  ```
1246
1255
 
1247
1256
  ### IBM Aspera Connect Client GUI
@@ -1543,7 +1552,7 @@ For this, specify the option: `--use-generic-client=no`.
1543
1552
 
1544
1553
  This will guide you through the steps to create.
1545
1554
 
1546
- ## <a name="aocwizard"></a>Configuration: using manual setup
1555
+ ## <a name="aocmanual"></a>Configuration: using manual setup
1547
1556
 
1548
1557
  If you used the wizard (recommended): skip this section.
1549
1558
 
@@ -1807,10 +1816,10 @@ $ <%=cmd%> aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id
1807
1816
  : 98398 : dummyuser1@example.com :
1808
1817
  : 98399 : dummyuser2@example.com :
1809
1818
  :.......:........................:
1810
- $ thelist=$(echo $(<%=cmd%> aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id,email --field=id --format=csv)|tr ' ' ,)
1819
+ $ thelist=$(<%=cmd%> aoc admin res user list --query='@json:{"q":"dummyuser"}' --fields=id --format=json --display=data|jq -cr 'map(.id)')
1811
1820
  $ echo $thelist
1812
- 98398,98399
1813
- $ <%=cmd%> aoc admin res user --bulk=yes --id=@json:[$thelist] delete
1821
+ ["113501","354061"]
1822
+ $ <%=cmd%> aoc admin res user --bulk=yes --id=@json:"$thelist" delete
1814
1823
  :.......:.........:
1815
1824
  : id : status :
1816
1825
  :.......:.........:
@@ -1819,6 +1828,14 @@ $ <%=cmd%> aoc admin res user --bulk=yes --id=@json:[$thelist] delete
1819
1828
  :.......:.........:
1820
1829
  ```
1821
1830
 
1831
+ * <a name="deactuser"></a>Find deactivated users since more than 2 years
1832
+
1833
+ ```
1834
+ ascli aoc admin res user list --query=@ruby:'{"deactivated"=>true,"q"=>"last_login_at:<#{(DateTime.now.to_time.utc-2*365*86400).iso8601}"}'
1835
+ ```
1836
+
1837
+ To delete them use the same method as before
1838
+
1822
1839
  * Display current user's workspaces
1823
1840
 
1824
1841
  ```
@@ -2214,7 +2231,37 @@ $ <%=cmd%> ats api_key create
2214
2231
  +--------+----------------------------------------------+
2215
2232
  $ <%=cmd%> config id my_ibm_ats update --ats-key=ats_XXXXXXXXXXXXXXXXXXXXXXXX --ats-secret=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
2216
2233
  ```
2234
+ ## Cross Organization transfers
2235
+
2236
+ It is possible to transfer files directly between organizations without having to first download locally and then upload...
2217
2237
 
2238
+ Although optional, the creation of <%=prst%> is recommended to avoid placing all parameters in the command line.
2239
+
2240
+ Procedure to send a file from org1 to org2:
2241
+
2242
+ * Get access to Organization 1 and create a <%=prst%>: e.g. `org1`, for instance, use the [Wizard](#aocwizard)
2243
+ * Check that access works and locate the source file e.g. `mysourcefile`, e.g. using command `files browse`
2244
+ * Get access to Organization 2 and create a <%=prst%>: e.g. `org2`
2245
+ * Check that access works and locate the destination folder `mydestfolder`
2246
+ * execute the following:
2247
+
2248
+ ```
2249
+ $ <%=cmd%> -Porg1 aoc files node_info /mydestfolder --format=json --display=data | <%=cmd%> -Porg2 aoc files upload mysourcefile --transfer=node --transfer-info=@json:@stdin:
2250
+ ```
2251
+
2252
+ Explanation:
2253
+
2254
+ * `-Porg1 aoc` use Aspera on Cloud plugin and load credentials for `org1`
2255
+ * `files node_info /mydestfolder` generate transfer information including node api credential and root id, suitable for the next command
2256
+ * `--format=json` format the output in JSON (instead of default text table)
2257
+ * `--display=data` display only the result, and remove other information, such as workspace name
2258
+ * `|` the standard output of the first command is fed into the second one
2259
+ * `-Porg2 aoc` use Aspera on Cloud plugin and load credentials for `org2`
2260
+ * `files upload mysourcefile` upload the file named `mysourcefile` (located in `org1`)
2261
+ * `--transfer=node` use transfer agent type `node` instead of default `direct`
2262
+ * `--transfer-info=@json:@stdin:` provide `node` transfer agent information, i.e. node API credentials, those are expected in JSON format and read from standard input
2263
+
2264
+ Note that when using a POSIX shell, another possibility to write `cmd1 | cmd2 --transfer-info=@json:stdin:` is `cmd2 --transfer-info=@json:$(cmd1)` instead of ``
2218
2265
  ## Examples
2219
2266
 
2220
2267
  Example: create access key on softlayer:
@@ -2533,7 +2580,7 @@ $ <%=cmd%> faspex v4 dropbox list
2533
2580
  $ <%=cmd%> faspex v4 dropbox delete --id=36
2534
2581
  ```
2535
2582
 
2536
- ## remote sources
2583
+ ## Remote sources
2537
2584
 
2538
2585
  Faspex lacks an API to list the contents of a remote source (available in web UI). To workaround this,
2539
2586
  the node API is used, for this it is required to add a section ":storage" that links
@@ -2584,29 +2631,38 @@ $ for p in 1 2 3;do <%=cmd%> shares2 admin users list --value=@json:'{"page":'$p
2584
2631
  # Plugin: IBM Cloud Object Storage
2585
2632
 
2586
2633
  The IBM Cloud Object Storage provides the possibility to execute transfers using FASP.
2587
- It uses the same transfer service as Aspera on Cloud.
2588
- see [https://status.aspera.io](https://status.aspera.io)
2634
+ It uses the same transfer service as Aspera on Cloud, called Aspera Transfer Service (ATS).
2635
+ Available ATS regions: [https://status.aspera.io](https://status.aspera.io)
2636
+
2637
+ There are two possibilities to provide credentials. If you already have the endpoint, apikey and CRN, use the forst method. If you dont have credentials but have access to the IBM Cloud console, then use the second method.
2638
+
2639
+ ## Using endpoint, apikey and Ressource Instance ID (CRN)
2589
2640
 
2590
- Required options are either:
2641
+ If you have those parameters already, then following options shall be provided:
2591
2642
 
2592
2643
  * `bucket` bucket name
2593
2644
  * `endpoint` storage endpoint url, e.g. https://s3.hkg02.cloud-object-storage.appdomain.cloud
2594
2645
  * `apikey` API Key
2595
2646
  * `crn` resource instance id
2596
2647
 
2597
- or:
2648
+ For example, let us create a default configuration:
2598
2649
 
2599
- * `bucket` bucket name
2600
- * `region` bucket region, e.g. eu-de
2601
- * `service_credentials` see below
2650
+ ```
2651
+ $ <%=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
2652
+ $ <%=cmd%> conf id default set cos mycos
2653
+ ```
2654
+
2655
+ Then, jump to the transfer example.
2656
+
2657
+ ## Using service credential file
2602
2658
 
2603
- Service credentials are directly created using the IBM cloud web ui. Navigate to:
2659
+ If you are the COS administrator and dont have yet the credential: Service credentials are directly created using the IBM cloud web ui. Navigate to:
2604
2660
 
2605
2661
  Navigation Menu &rarr; Resource List &rarr; Storage &rarr; Cloud Object Storage &rarr; Service Credentials &rarr; &lt;select or create credentials&gt; &rarr; view credentials &rarr; copy
2606
2662
 
2607
2663
  Then save the copied value to a file, e.g. : `$HOME/cos_service_creds.json`
2608
2664
 
2609
- or using the CLI:
2665
+ or using the IBM Cloud CLI:
2610
2666
 
2611
2667
  ```
2612
2668
  $ ibmcloud resource service-keys
@@ -2637,33 +2693,38 @@ The field `resource_instance_id` is for option `crn`
2637
2693
 
2638
2694
  The field `apikey` is for option `apikey`
2639
2695
 
2640
- Endpoints for regions can be found by querying the `endpoints` URL.
2696
+ (If needed: endpoints for regions can be found by querying the `endpoints` URL.)
2641
2697
 
2642
- For convenience, let us create a default configuration, for example:
2698
+ The required options for this method are:
2699
+
2700
+ * `bucket` bucket name
2701
+ * `region` bucket region, e.g. eu-de
2702
+ * `service_credentials` see below
2703
+
2704
+ For example, let us create a default configuration:
2643
2705
 
2644
2706
  ```
2645
2707
  $ <%=cmd%> conf id mycos update --bucket=laurent --service-credentials=@val:@json:@file:~/service_creds.json --region=us-south
2646
2708
  $ <%=cmd%> conf id default set cos mycos
2647
2709
  ```
2648
2710
 
2649
- or using direct parameters:
2711
+ ## Operations, transfers
2650
2712
 
2651
- ```
2652
- $ <%=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
2653
- $ <%=cmd%> conf id default set cos mycos
2654
- ```
2713
+ Let's assume you created a default configuration from once of the two previous steps (else specify the access options on command lines).
2655
2714
 
2656
- Now, Ready to do operations, a subset of "node" plugin operations are supported, basically node API:
2715
+ A subset of `node` plugin operations are supported, basically node API:
2657
2716
 
2658
2717
  ```
2659
- $ <%=cmd%> cos node browse /
2660
- $ <%=cmd%> cos node upload myfile.txt
2718
+ $ <%=cmd%> cos node info
2719
+ $ <%=cmd%> cos node upload 'faux:///sample1G?1g'
2661
2720
  ```
2662
2721
 
2722
+ Note: we generate a dummy file `sample1G` if size 2GB using the `faux` PVCL (man ascp), but you can of course send a real file by specifying a real file instead.
2723
+
2663
2724
  # Plugin: IBM Aspera Sync
2664
2725
 
2665
- A basic plugin to start an "async" using <%=tool%>. The main advantage is the possibility
2666
- to start from ma configuration file, using <%=tool%> standard options.
2726
+ A basic plugin to start an "async" using <%=tool%>.
2727
+ The main advantage is the possibility to start from ma configuration file, using <%=tool%> standard options.
2667
2728
 
2668
2729
  # Plugin: Preview
2669
2730
 
@@ -3233,6 +3294,11 @@ So, it evolved into <%=tool%>:
3233
3294
 
3234
3295
  * <%= gemspec.version.to_s %>
3235
3296
 
3297
+ * new: parameter `multi_incr_udp` for option `transfer_info`: control if UDP port is incremented when multi-session is used on `direct` transfer agent.
3298
+ * new: command `aoc files node_info` to get node information for a given folder in the Files application of AoC. Allows cross-org or cross-workspace transfers.
3299
+
3300
+ * 4.2.2
3301
+
3236
3302
  * new: `faspex package list` retrieves the whole list, not just first page
3237
3303
  * new: support web based auth to aoc and faspex 5 using HTTPS, new dependency on gem `webrick`
3238
3304
  * new: the error "Remote host is not who we expected" displays a special remediation message
data/docs/test_env.conf CHANGED
@@ -156,4 +156,5 @@ misc:
156
156
  email_external: your value here
157
157
  aoc_org: your value here
158
158
  aoc_user_email: your value here
159
+ aoc_workspace2: your value here
159
160
  http_gw_fqdn_port: your value here