aspera-cli 4.18.0 → 4.18.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71adcb69e4f2f4bb9db31713c2a5b7f251ddb052418d3a11e6061e55bf4979ce
4
- data.tar.gz: af9cc1ab42b8b6f89d2e561becdb07e05e6ca0d6c2275e0834848ab3f2496eb6
3
+ metadata.gz: 98185fd9f823fc0d85ebf7183d5c88cf6e0aac7cafd8325802bfa0724c52ddf4
4
+ data.tar.gz: 848811c07aa60060cae1320cd0512e72a73bb78fee9e1837245ef856af3883de
5
5
  SHA512:
6
- metadata.gz: b48fab716de4e3d3c3a4175c8a5a4139f02d0ff29f2a8e9c1e57b12f1fe6e0bbb1aed85eeb04a894087da6b360675695e0017a97be1ee210b1ff9b3b70beeeff
7
- data.tar.gz: e31d43642a703b5b2a9b3f65ce712ed848b174b7dc122e7be760ef51849d292accc104f90acc02e4bc9c6eaae579246f6a68239b204ebb514a6d6783d0a82cb1
6
+ metadata.gz: ede08e6e6c6ce3ef33d0c402730ee1854b5d0364da3d47ef736f0e7680a9f8cc1098316fe5945c15aab98ed931c26dd625ea7fb9673e70068dfd2755bb7a053a
7
+ data.tar.gz: 1bf901163167844fbada435d0cbac759075b51e9f2da22f6f2b97e99be53c202d69e83ec38f0ee4cade3f937a29c502e22e75ac4452b5e0bb426b0fafa7d883c
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- �ّ���D�����,,KȪ��] ��Ntw1/�֕[�?O�r����ѹo��;J�Hn��V�Wa��n��s]���B�,$7���v�b㡇�X��y+Ъ)�ey�"A�~8�w����/��ݱ(��HN=s�ЄJc5�|�>��VeW��Ȓ�\��#�[��3/�r�p�I��K��^�����{ f
2
- / �W&����?�g��9�Y�^/�g�@DsywEttH6C�
1
+ 
2
+ ��� ��C��^����2���Bm�� Y��.{I} _��I�^�0<8#�׼�4���Fn��qu*�O9J�f:��rl�`��Ifفaߣ}8���� V"z��0JX���Ġ�Ad���6�?���b��� F��=@�*Ϩ�]Rc���z
3
+ �a��P�pXw�4ׅ��7�෣�C��������ӳU�0��vԟ�m���d��N�?�T2�����wxjn��oZGf�,�o��F�i1��Wޕ�=D�Y�IKc�j%އ�7x`O��Ąy�o.��{���VS!��a��nsN�|��}���n�c�V�Ά��x��pɗ>�`�� �Rl,[,Ϥ󦱡������.V�U#6.e|���<��dWdcַ�)n]� %G5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changes (Release notes)
2
2
 
3
+ * 4.18.1
4
+ * New Features:
5
+ * none
6
+ * Issues Fixed:
7
+ * **global**: #146 (@junkimu) Fix problem on Windows WRT terminal detection
8
+ * **global**: node gen4 (aoc) browsing through link now follows the link correctly
9
+ * `shares`: #147 Fix problem for `shares files mkdir`
10
+ * Breaking Changes:
11
+ * **global**: Removed option `id`, deprecated since 4.14.0
12
+
3
13
  * 4.18.0
4
14
 
5
15
  * New Features:
data/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## Introduction
12
12
 
13
- Version : 4.18.0
13
+ Version : 4.18.1
14
14
 
15
15
  Laurent/2016-2024
16
16
 
@@ -92,7 +92,7 @@ Once the gem is installed, `ascli` shall be accessible:
92
92
 
93
93
  ```console
94
94
  $ ascli --version
95
- 4.18.0
95
+ 4.18.1
96
96
  ```
97
97
 
98
98
  ### First use
@@ -300,52 +300,6 @@ Download the Ruby installer executable from <https://rubyinstaller.org/downloads
300
300
  rubyinstaller-devkit-3.2.2-1-x64.exe /silent /currentuser /noicons /dir=C:\aspera-cli
301
301
  ```
302
302
 
303
- Installation without network:
304
-
305
- It is essentially the same procedure, but instead of retrieving files from internet, copy the files from a machine with internet access, and then install from those archives:
306
-
307
- - Download the `exe` Ruby installer from <https://rubyinstaller.org/downloads/>
308
-
309
- ```bash
310
- v=$(curl -s https://rubyinstaller.org/downloads/|sed -nEe 's|.*(https://.*/releases/download/.*exe).*|\1|p'|head -n 1)
311
- curl -o ${v##*/} $v
312
- ```
313
-
314
- - Create an archive with necessary gems: <https://help.rubygems.org/kb/rubygems/installing-gems-with-no-network>
315
-
316
- ```bat
317
- gem install aspera-cli -N -i my_gems
318
- ```
319
-
320
- Zip the files `*.gem` from folder `repo/my_gems`
321
-
322
- - Download the SDK from: <https://ibm.biz/aspera_sdk>
323
-
324
- Create a Zip with all those files, and transfer to the target system.
325
-
326
- Then, on the target system:
327
-
328
- - Unzip the archive
329
- - Execute the installer:
330
-
331
- ```bat
332
- rubyinstaller-devkit-3.2.2-1-x64.exe /silent /currentuser /noicons /dir=C:\aspera-cli
333
- ```
334
-
335
- - Install the gems:
336
-
337
- ```bat
338
- gem install --force --local *.gem
339
- ```
340
-
341
- - Install the SDK
342
-
343
- ```bash
344
- ascli config ascp install --sdk-url=file:///sdk.zip
345
- ```
346
-
347
- > **Note:** An example of installation script is provided: [docs/install.bat](docs/install.bat)
348
-
349
303
  #### macOS: `brew`
350
304
 
351
305
  **macOS** come with Ruby.
@@ -410,6 +364,26 @@ One can remove all installed gems, for example to start fresh:
410
364
  gem uninstall -axI $(ls $(gem env gemdir)/gems/|sed -e 's/-[^-]*$//'|sort -u)
411
365
  ```
412
366
 
367
+ #### Linux as simple user
368
+
369
+ If you don't have root access, you can install Ruby in your home directory using `rbenv` see [rbenv-installer](https://github.com/rbenv/rbenv-installer#rbenv-installer):
370
+
371
+ ```bash
372
+ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
373
+ ```
374
+
375
+ Then open a new terminal, or "source" the shell initialization script:
376
+
377
+ ```bash
378
+ source ~/.bashrc
379
+ ```
380
+
381
+ Then install Ruby:
382
+
383
+ ```bash
384
+ rbenv install 3.2.2
385
+ ```
386
+
413
387
  #### Other Unixes (AIX)
414
388
 
415
389
  Ruby is sometimes made available as an installable package through third party providers.
@@ -544,7 +518,7 @@ ascli config ascp install
544
518
  If a local SDK installation is preferred instead of fetching from internet: one can specify the location of the SDK file:
545
519
 
546
520
  ```bash
547
- curl -Lso sdk.zip https://ibm.biz/aspera_sdk
521
+ curl -Lso sdk.zip https://ibm.biz/aspera_transfer_sdk
548
522
  ```
549
523
 
550
524
  ```bash
@@ -574,6 +548,18 @@ Refer to section: [Transfer Agents](#transfer-clients-agents)
574
548
 
575
549
  > **Note:** No pre-packaged version is provided yet.
576
550
 
551
+ #### Gem files and dependencies
552
+
553
+ The sample script: [examples/build_package.sh](examples/build_package.sh) can be used to download all necessary gems and dependencies in a tar gz.
554
+
555
+ ```console
556
+ $ ./build_package.sh aspera-cli 4.18.0
557
+
558
+ Archive: aspera-cli-4.18.0-gems.tgz
559
+ ```
560
+
561
+ #### Unix-like
562
+
577
563
  A method to build one is provided here:
578
564
 
579
565
  The procedure:
@@ -595,7 +581,7 @@ ascli --show-config --fields=sdk_url
595
581
  - Download the SDK archive from that URL
596
582
 
597
583
  ```bash
598
- curl -Lso sdk.zip https://ibm.biz/aspera_sdk
584
+ curl -Lso sdk.zip https://ibm.biz/aspera_transfer_sdk
599
585
  ```
600
586
 
601
587
  - Transfer those 2 files to the target system
@@ -618,12 +604,48 @@ ascli config ascp install --sdk-url=file:///sdk.zip
618
604
  source ~/.rvm/scripts/rvm
619
605
  ```
620
606
 
621
- > **Note:** Alternatively, to download all necessary gems in folder `my_gems`, execute:
607
+ #### Windows
608
+
609
+ Installation without network:
610
+
611
+ It is essentially the same procedure as installation for Windows with internet, but instead of retrieving files from internet, copy the files from a machine with internet access, and then install from those archives:
612
+
613
+ - Download the `exe` Ruby installer from <https://rubyinstaller.org/downloads/>
614
+
615
+ ```bash
616
+ v=$(curl -s https://rubyinstaller.org/downloads/|sed -nEe 's|.*(https://.*/releases/download/.*exe).*|\1|p'|head -n 1)
617
+ curl -o ${v##*/} $v
618
+ ```
619
+
620
+ - Create an archive with necessary gems like in previous section
621
+
622
+ - Download the SDK from: <https://ibm.biz/aspera_transfer_sdk>
623
+
624
+ - Create a Zip with all those files, and transfer to the target system.
625
+
626
+ Then, on the target system:
627
+
628
+ - Unzip the archive
629
+ - Execute the installer:
630
+
631
+ ```bat
632
+ rubyinstaller-devkit-3.2.2-1-x64.exe /silent /currentuser /noicons /dir=C:\aspera-cli
633
+ ```
634
+
635
+ - Install the gems: Extract the gem archive, and then:
636
+
637
+ ```bat
638
+ gem install --force --local *.gem
639
+ ```
640
+
641
+ - Install the SDK
622
642
 
623
643
  ```bash
624
- gem install aspera-cli -N -i my_gems
644
+ ascli config ascp install --sdk-url=file:///sdk.zip
625
645
  ```
626
646
 
647
+ > **Note:** An example of installation script is provided: [docs/install.bat](docs/install.bat)
648
+
627
649
  ### Container
628
650
 
629
651
  The container image is: [`docker.io/martinlaurent/ascli`](https://hub.docker.com/r/docker.io/martinlaurent/ascli).
@@ -684,7 +706,7 @@ ascli -v
684
706
  ```
685
707
 
686
708
  ```text
687
- 4.18.0
709
+ 4.18.1
688
710
  ```
689
711
 
690
712
  In order to keep persistency of configuration on the host, you should specify your user's configuration folder as a volume for the container.
@@ -1937,8 +1959,8 @@ genkey my_key 4096
1937
1959
  image https://eudemo.asperademo.com/wallpaper.jpg
1938
1960
  initdemo
1939
1961
  open
1940
- plugin create my_command
1941
- plugin list
1962
+ plugins create my_command
1963
+ plugins list
1942
1964
  preset delete conf_name
1943
1965
  preset initialize conf_name @json:'{"p1":"v1","p2":"v2"}'
1944
1966
  preset list
@@ -3032,7 +3054,7 @@ Columns:
3032
3054
  | fasp_port | int | Y | Y | Y | Y | Y | Specifies fasp (UDP) port.<br/>(-O {int}) |
3033
3055
  | fasp_url | string | &nbsp; | &nbsp; | &nbsp; | &nbsp; | &nbsp; | Only used in Faspex.<br/>(&lt;ignored&gt;) |
3034
3056
  | file_checksum | string | Y | Y | &nbsp; | &nbsp; | &nbsp; | Enable checksum reporting for transferred files by specifying the hash to use.<br/>Allowed values: sha-512, sha-384, sha-256, sha1, md5, none<br/>(&lt;ignored&gt;) |
3035
- | http_fallback | bool<br/>string | Y | Y | Y | Y | Y | When true(1), attempts to perform an HTTP transfer if a FASP transfer cannot be performed.<br/>(-y (conversion){bool}|{string}) |
3057
+ | http_fallback | bool<br/>string | Y | Y | Y | Y | Y | When true(1), attempts to perform an HTTP transfer if a FASP transfer cannot be performed.<br/>(-y (conversion){bool}\|{string}) |
3036
3058
  | http_fallback_port | int | Y | &nbsp; | &nbsp; | &nbsp; | &nbsp; | Specifies http port when no cipher is used<br/>(-t {int}) |
3037
3059
  | https_fallback_port | int | Y | Y | Y | Y | Y | Specifies https port when cipher is used<br/>(-t {int}) |
3038
3060
  | keepalive | bool | Y | &nbsp; | &nbsp; | &nbsp; | &nbsp; | The session is running in persistent session mode.<br/>(--keepalive) |
@@ -3539,7 +3561,7 @@ ascli server upload "faux:///mydir?file=testfile&count=1m&size=0&inc=2&seq=seque
3539
3561
  ```text
3540
3562
  ascli -h
3541
3563
  NAME
3542
- ascli -- a command line tool for Aspera Applications (v4.18.0)
3564
+ ascli -- a command line tool for Aspera Applications (v4.18.1)
3543
3565
 
3544
3566
  SYNOPSIS
3545
3567
  ascli COMMANDS [OPTIONS] [ARGS]
@@ -3570,6 +3592,7 @@ ARGS
3570
3592
  OPTIONS: global
3571
3593
  --interactive=ENUM Use interactive input of missing params: [no], yes
3572
3594
  --ask-options=ENUM Ask even optional options: [no], yes
3595
+ --struct-parser=ENUM Default parser when expected value is a struct: json, ruby
3573
3596
  --format=ENUM Output format: text, nagios, ruby, json, jsonpp, yaml, [table], csv, image
3574
3597
  --output=VALUE Destination for results (String)
3575
3598
  --display=ENUM Output only some information: [info], data, error
@@ -3604,7 +3627,6 @@ OPTIONS:
3604
3627
  --query=VALUE Additional filter for for some commands (list/delete) (Hash)
3605
3628
  --value=VALUE Value for create, update, list filter (Hash) (deprecated: (4.14) Use positional value for create/modify or option: query for list/delete)
3606
3629
  --property=VALUE Name of property to set (modify operation)
3607
- --id=VALUE Resource identifier (deprecated: (4.14) Use positional identifier after verb (modify,delete,show))
3608
3630
  --bulk=ENUM Bulk operation (only some): [no], yes
3609
3631
  --bfail=ENUM Bulk operation error handling: no, [yes]
3610
3632
  -N, --no-default Do not load default configuration for plugin
@@ -5019,6 +5041,9 @@ files browse /
5019
5041
  files browse / --url=my_private_link
5020
5042
  files browse / --url=my_public_link_folder_no_pass
5021
5043
  files browse / --url=my_public_link_folder_pass --password=my_public_link_password
5044
+ files browse my_remote_file
5045
+ files browse my_remote_folder
5046
+ files browse my_remote_folder/
5022
5047
  files delete /testsrc
5023
5048
  files download --transfer=alpha testdst/test_file.bin
5024
5049
  files download --transfer=connect testdst/test_file.bin
@@ -5389,7 +5414,7 @@ Example:
5389
5414
  - `ascli node browse /` : list files with **gen3/node user** API
5390
5415
  - `ascli node access_key do self browse /` : list files with **gen4/access key** API
5391
5416
 
5392
- ## Browse
5417
+ #### Browse
5393
5418
 
5394
5419
  Native API parameters can be placed in option `query`.
5395
5420
 
@@ -6337,6 +6362,14 @@ Then, the postprocessing script executed will be `script1.sh`.
6337
6362
 
6338
6363
  Environment variables at set to the values provided by the web hook which are the same as Faspex 4 postprocessing.
6339
6364
 
6365
+ ### Faspex 5: Missing commands
6366
+
6367
+ If a command is missing, then it is still possible to execute command by calling directly the API on the command line using `curl`:
6368
+
6369
+ ```bash
6370
+ curl -H "Authorization: $(ascli ascli bearer)" https://faspex5.example.com/aspera/faspex/api/v5/api_endpoint_here
6371
+ ```
6372
+
6340
6373
  ## Plugin: `faspex`: IBM Aspera Faspex v4
6341
6374
 
6342
6375
  > **Note:** For full details on Faspex API, refer to: [Reference on Developer Site](https://developer.ibm.com/apis/catalog/?search=faspex)
@@ -6573,9 +6606,11 @@ admin user ldap add the_name
6573
6606
  admin user local list
6574
6607
  admin user saml import @json:'{"id":"the_id","name_id":"the_name"}'
6575
6608
  files browse /
6609
+ files delete my_share1/new_folder
6576
6610
  files delete my_share1/test_file.bin
6577
6611
  files download --to-folder=. my_share1/test_file.bin
6578
6612
  files download --to-folder=. my_share1/test_file.bin --transfer=httpgw --transfer-info=@json:'{"url":"https://tst.example.com/path@"}'
6613
+ files mkdir my_share1/new_folder
6579
6614
  files upload --to-folder=https://shares.share1 'faux:///testfile?1m' --transfer=httpgw --transfer-info=@json:'{"url":"my_example.com/path@","synchronous":true,"api_version":"v1","upload_chunk_size":100000}'
6580
6615
  files upload --to-folder=my_share1 test_file.bin
6581
6616
  files upload --to-folder=my_share1 test_file.bin --transfer=httpgw --transfer-info=@json:'{"url":"https://tst.example.com/path@"}'
@@ -6749,6 +6784,8 @@ health
6749
6784
  > **Note:** Add `ascli faspio` in front of the commands:
6750
6785
 
6751
6786
  ```bash
6787
+ bridges create @json:'{"name":"test1","local":{"protocol":"tcp","tls_enabled":false,"port":"3000","bind_address":"127.0.0.1"},"forward":{"protocol":"fasp","tls_enabled":false,"port":"3994","bind_address":"127.0.0.1","host":["10.0.0.1"]}}'
6788
+ bridges delete --bulk=yes @json:@stdin:
6752
6789
  bridges list
6753
6790
  health
6754
6791
  ```
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+ # Usage: ./build_package.sh <gem_name> <gem_version>
3
+ # Example: ./build_package.sh aspera-cli 4.18.0
4
+ set -e
5
+ if [ "$#" -ne 2 ]; then
6
+ echo "Usage: $0 <gem_name> <gem_version>"
7
+ exit 1
8
+ fi
9
+ gem_name=$1
10
+ gem_version=$2
11
+ # on macOS, GNU tar is gtar
12
+ GNU_TAR=tar
13
+ if [ "$(uname)" == "Darwin" ]; then
14
+ GNU_TAR=gtar
15
+ fi
16
+ # temp folder to install gems
17
+ tmp_dir_install=.tmp_install
18
+ # clean, if there were left overs
19
+ rm -fr $tmp_dir_install
20
+ # retrieve list of necessary gems
21
+ echo "Getting gems $gem_name $gem_version"
22
+ # install gems in a temporary folder
23
+ gem install $gem_name:$gem_version --no-document --install-dir $tmp_dir_install
24
+ archive=$gem_name-$gem_version-gems.tgz
25
+ # .gem files are located in cache folder
26
+ $GNU_TAR -zcf $archive --directory=$tmp_dir_install/cache/. .
27
+ rm -fr $tmp_dir_install
28
+ echo "Archive: $archive"
@@ -4,7 +4,7 @@ require 'aspera/agent/base'
4
4
  require 'aspera/rest'
5
5
  require 'aspera/log'
6
6
  require 'aspera/json_rpc'
7
- require 'aspera/open_application'
7
+ require 'aspera/environment'
8
8
  require 'securerandom'
9
9
 
10
10
  module Aspera
@@ -22,7 +22,7 @@ module Aspera
22
22
  @application_id = SecureRandom.uuid
23
23
  @xfer_id = nil
24
24
  super(**base_options)
25
- raise 'Using client requires a graphical environment' if !OpenApplication.default_gui_mode.eql?(:graphical)
25
+ raise 'Using client requires a graphical environment' if !Environment.default_gui_mode.eql?(:graphical)
26
26
  method_index = 0
27
27
  begin
28
28
  # curl 'http://127.0.0.1:33024/' -X POST -H 'content-type: application/json' --data-raw '{"jsonrpc":"2.0","params":[],"id":999999,"method":"rpc.discover"}'
@@ -36,8 +36,8 @@ module Aspera
36
36
  method_index += 1
37
37
  raise StandardError, "Unable to start #{APP_NAME} #{method_index} times" if start_url.nil?
38
38
  Log.log.warn{"#{APP_NAME} is not started (#{e}). Trying to start it ##{method_index}..."}
39
- if !OpenApplication.uri_graphical(start_url)
40
- OpenApplication.uri_graphical('https://www.ibm.com/aspera/connect/')
39
+ if !Environment.open_uri_graphical(start_url)
40
+ Environment.open_uri_graphical('https://www.ibm.com/aspera/connect/')
41
41
  raise StandardError, "#{APP_NAME} is not installed"
42
42
  end
43
43
  sleep(SLEEP_SEC_BETWEEN_RETRY)
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'aspera/agent/base'
4
4
  require 'aspera/rest'
5
- require 'aspera/open_application'
6
5
  require 'securerandom'
7
6
 
8
7
  module Aspera
@@ -18,7 +17,7 @@ module Aspera
18
17
  @connect_settings = {
19
18
  'app_id' => SecureRandom.uuid
20
19
  }
21
- raise 'Using connect requires a graphical environment' if !OpenApplication.default_gui_mode.eql?(:graphical)
20
+ raise 'Using connect requires a graphical environment' if !Environment.default_gui_mode.eql?(:graphical)
22
21
  method_index = 0
23
22
  begin
24
23
  connect_url = Ascp::Products.connect_uri
@@ -34,8 +33,8 @@ module Aspera
34
33
  method_index += 1
35
34
  raise StandardError, "Unable to start connect #{method_index} times" if start_url.nil?
36
35
  Log.log.warn{"Aspera Connect is not started (#{e}). Trying to start it ##{method_index}..."}
37
- if !OpenApplication.uri_graphical(start_url)
38
- OpenApplication.uri_graphical('https://www.ibm.com/aspera/connect/')
36
+ if !Environment.open_uri_graphical(start_url)
37
+ Environment.open_uri_graphical('https://www.ibm.com/aspera/connect/')
39
38
  raise StandardError, 'Connect is not installed'
40
39
  end
41
40
  sleep(SLEEP_SEC_BETWEEN_RETRY)
@@ -50,7 +50,7 @@ module Aspera
50
50
  super(**base_options)
51
51
  @gw_api = Api::Httpgw.new(
52
52
  # remove /v1 from end of user-provided GW url: we need the base url only
53
- url: url.gsub(%r{/#{Api::Httpgw::API_V1}/*$}o, ''),
53
+ url: url,
54
54
  api_version: api_version,
55
55
  upload_chunk_size: upload_chunk_size,
56
56
  synchronous: synchronous,
@@ -310,11 +310,14 @@ module Aspera
310
310
  notify_cb: nil,
311
311
  **opts
312
312
  )
313
+ Log.log.debug{Log.dump(:gw_url, url)}
313
314
  # add scheme if missing
314
315
  url = "https://#{url}" unless url.match?(%r{^[a-z]{1,6}://})
315
316
  raise 'GW URL shall be with scheme https' unless url.start_with?('https://')
316
- # remove trailing slash and version if any
317
+ # remove trailing slash and version (o=only once) if present
318
+ # TODO: issue warning ?
317
319
  url = url.gsub(%r{/+$}, '').gsub(%r{/#{API_V1}$}o, '')
320
+ # assume GW is always under specific path (TODO: remove this ?)
318
321
  url = File.join(url, DEFAULT_BASE_PATH) unless url.end_with?(DEFAULT_BASE_PATH)
319
322
  @gw_root_url = url
320
323
  super(base_url: "#{@gw_root_url}/#{API_V1}", **opts)