aspera-cli 4.0.0.pre2 → 4.0.0.pre3

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: 36a82a69216429313771832febaa8a3a84b02aa0c6f10c7ccdb5e637c768046e
4
- data.tar.gz: 73c2b08c40ed75fbe99164cbdbaf236309d82bd25bf8dd5ce92081ed09faecda
3
+ metadata.gz: 22041be5b72d2a1907350832239b7e3b96890e6b50cc36ab199ecdddf6fe3e89
4
+ data.tar.gz: b30116b52e35ffd5020a400fa07a519da847de1c078c2e09b91349488c95947a
5
5
  SHA512:
6
- metadata.gz: c04ef4969a3cac1435c85b7533b84756fbdf312ee692d79d249839d1cd0b7cd55a8f6f7436e01f8242414218321e81d350f8f1f446f7bb6c3de52f9771bb7612
7
- data.tar.gz: e036d3c9ebc46356b99f7fd4a56e7586d992485628add560360d4fda9bd58bd655ba26a4bc1a45b4157597d62e8d250e7da7d44c808644c3cfbf54d3512234f6
6
+ metadata.gz: d7992b721a8dc47334ad5706aa645534822ef7b9608055c1ef0c5908085c20e45dd2dc4b7a4210481b40af9f554f389fe408c8807cc7d2eb40c3e7b212f0c4f9
7
+ data.tar.gz: 16ee1fdb8ddfecac75a0674f2f4be902decc76543b3577e81a12284d899d74b4cd1c38b68f6bda126aebd1f9cddf045af0c7ef98fe0aa0aee0a2634b9a249a84
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
2
  # `ascli` : a Command Line for IBM Aspera products
3
3
 
4
- Version : 4.0.0.pre2
4
+ Version : 4.0.0.pre3
5
5
 
6
6
  _Laurent/2016-2021_
7
7
 
@@ -36,7 +36,7 @@ Once the gem is installed, `ascli` shall be accessible:
36
36
 
37
37
  ```
38
38
  $ ascli --version
39
- 4.0.0.pre2
39
+ 4.0.0.pre3
40
40
  ```
41
41
 
42
42
  ## First use
@@ -112,8 +112,9 @@ The following sections provide information on the installation.
112
112
  ## <a name="ruby"></a>Ruby
113
113
 
114
114
  A ruby interpreter is required to run the tool or to use the gem and tool.
115
- The Ruby version shall be > 2.4.
115
+ The Ruby version shall be at least > 2.4.
116
116
  Any type of Ruby installation can be used.
117
+ Ruby 3 is not yet tested.
117
118
 
118
119
  Refer to the following sections for a proposed method for specific operating systems.
119
120
 
@@ -138,13 +139,13 @@ Install Latest stable Ruby using [https://rubyinstaller.org/](https://rubyinstal
138
139
 
139
140
  Go to "Downloads".
140
141
 
141
- Select the version "without devkit", x64 corresponding to the one recommended "with devkit".
142
+ Select the Ruby 2 version "without devkit", x64 corresponding to the one recommended "with devkit". Devkit is not needed.
142
143
 
143
- During installation, skip the installation of "MSys2".
144
+ At the end of the installer uncheck the box to skip the installation of "MSys2".
144
145
 
145
146
  ### Linux
146
147
 
147
- Install Latest Ruby using "rvm" [https://rvm.io/](https://rvm.io/) .
148
+ Install Latest Ruby 2 using "rvm" [https://rvm.io/](https://rvm.io/) .
148
149
  It installs by default in /usr/local/rvm , but you can install in another location:
149
150
 
150
151
  ```
@@ -507,14 +508,28 @@ It is also possible to provide a _Structured Value_ in a file using `@json:@file
507
508
 
508
509
  ## <a name="conffolder"></a>Configuration and Persistency Folder
509
510
 
510
- `ascli` configuration and other runtime files (token cache, file lists, persistency files)
511
- are stored in folder `$HOME/.aspera/ascli`. The folder can be displayed using :
511
+ `ascli` configuration and other runtime files (token cache, file lists, persistency files, SDK) are stored in folder `[User's home folder]/.aspera/ascli`.
512
+
513
+ Note: `[User's home folder]` is found using ruby's `Dir.home` (`rb_w32_home_dir`).
514
+ It uses the `HOME` env var primarily, and on MS Windows it also looks at `%HOMEDRIVE%%HOMEPATH%` and `%USERPROFILE%`. `ascli` 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%`.
515
+
516
+ The main folder can be displayed using :
512
517
 
513
518
  ```
514
519
  $ ascli config folder
515
520
  /Users/kenji/.aspera/ascli
516
521
  ```
517
522
 
523
+ It can be overriden using the envinonment variable `ASCLI_HOME`.
524
+
525
+ Example (Windows):
526
+
527
+ ```
528
+ $ set ASCLI_HOME=C:\Users\Kenji\.aspera\ascli
529
+ $ ascli config folder
530
+ C:\Users\Kenji\.aspera\ascli
531
+ ```
532
+
518
533
  ## <a name="configfile"></a>Configuration file
519
534
 
520
535
  On the first execution of `ascli`, an empty configuration file is created in the configuration folder.
@@ -751,6 +766,8 @@ EOF
751
766
 
752
767
  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 `ASCLI_LOG_LEVEL`.
753
768
 
769
+ It is also possible to activate traces before initialisation using env var `AS_LOG_LEVEL`.
770
+
754
771
  ## Learning Aspera Product APIs (REST)
755
772
 
756
773
  This CLI uses REST APIs.
@@ -1424,7 +1441,7 @@ ascli sync start --parameters=@json:'{"sessions":[{"name":"test","reset":true,"r
1424
1441
  ```
1425
1442
  $ ascli -h
1426
1443
  NAME
1427
- ascli -- a command line tool for Aspera Applications (v4.0.0.pre2)
1444
+ ascli -- a command line tool for Aspera Applications (v4.0.0.pre3)
1428
1445
 
1429
1446
  SYNOPSIS
1430
1447
  ascli COMMANDS [OPTIONS] [ARGS]
@@ -1448,27 +1465,27 @@ ARGS
1448
1465
  Some commands require mandatory arguments, e.g. a path.
1449
1466
 
1450
1467
  OPTIONS: global
1451
- --interactive=ENUM use interactive input of missing params: yes, no
1452
- --ask-options=ENUM ask even optional options: yes, no
1468
+ --interactive=ENUM use interactive input of missing params: yes, no
1469
+ --ask-options=ENUM ask even optional options: yes, no
1453
1470
  --format=ENUM output format: table, ruby, json, jsonpp, yaml, csv, nagios
1454
1471
  --display=ENUM output only some information: info, data, error
1455
1472
  --fields=VALUE comma separated list of fields, or ALL, or DEF
1456
1473
  --select=VALUE select only some items in lists, extended value: hash (column, value)
1457
1474
  --table-style=VALUE table display style
1458
- --flat-hash=ENUM display hash values as additional keys: yes, no
1475
+ --flat-hash=ENUM display hash values as additional keys: yes, no
1459
1476
  -h, --help Show this message.
1460
1477
  --bash-comp generate bash completion for command
1461
1478
  --show-config Display parameters used for the provided action.
1462
1479
  -r, --rest-debug more debug for HTTP calls
1463
1480
  -v, --version display version
1464
1481
  -w, --warnings check for language warnings
1465
- --ui=ENUM method to start browser: text, graphical
1466
- --log-level=ENUM Log level: info, warn, error, fatal, unknown, debug
1467
- --logger=ENUM log method: stderr, stdout, syslog
1482
+ --ui=ENUM method to start browser: text, graphical
1483
+ --log-level=ENUM Log level: debug, info, error, warn, fatal, unknown
1484
+ --logger=ENUM log method: stderr, stdout, syslog
1468
1485
  --lock-port=VALUE prevent dual execution of a command, e.g. in cron
1469
1486
  --query=VALUE additional filter for API calls (extended value) (some commands)
1470
- --insecure=ENUM do not validate HTTPS certificate: yes, no
1471
- --once-only=ENUM process only new items (some commands): yes, no
1487
+ --insecure=ENUM do not validate HTTPS certificate: yes, no
1488
+ --once-only=ENUM process only new items (some commands): yes, no
1472
1489
 
1473
1490
  COMMAND: config
1474
1491
  SUBCOMMANDS: gem_path genkey plugins flush_tokens list overview open echo id documentation wizard export_to_cli detect coffee ascp email_test smtp_settings proxy_check folder file
@@ -1476,10 +1493,10 @@ OPTIONS:
1476
1493
  --value=VALUE extended value for create, update, list filter
1477
1494
  --property=VALUE name of property to set
1478
1495
  --id=VALUE resource identifier (modify,delete,show)
1479
- --config-file=VALUE read parameters from file in YAML format, current=/Users/dwosk/.aspera/ascli/config.yaml
1480
- --override=ENUM override existing value: yes, no
1496
+ --config-file=VALUE read parameters from file in YAML format, current=/Users/FooBar/.aspera/ascli/config.yaml
1497
+ --override=ENUM override existing value: yes, no
1481
1498
  -N, --no-default do not load default configuration for plugin
1482
- --use-generic-client=ENUM wizard: AoC: use global or org specific jwt client id: yes, no
1499
+ --use-generic-client=ENUM wizard: AoC: use global or org specific jwt client id: yes, no
1483
1500
  --pkeypath=VALUE path to private key for JWT (wizard)
1484
1501
  --ascp-path=VALUE path to ascp
1485
1502
  --use-product=VALUE use ascp from specified product
@@ -1489,7 +1506,7 @@ OPTIONS:
1489
1506
  --default=VALUE set as default configuration for specified plugin
1490
1507
  --secret=VALUE access key secret for node
1491
1508
  --secrets=VALUE access key secret for node
1492
- --test-mode=ENUM skip user validation in wizard mode: yes, no
1509
+ --test-mode=ENUM skip user validation in wizard mode: yes, no
1493
1510
  --ts=VALUE override transfer spec values (Hash, use @json: prefix), current={}
1494
1511
  --local-resume=VALUE set resume policy (Hash, use @json: prefix), current=
1495
1512
  --to-folder=VALUE destination folder for downloaded files
@@ -1528,7 +1545,7 @@ OPTIONS:
1528
1545
  --password=VALUE user's password
1529
1546
  --params=VALUE parameters hash table, use @json:{"param":"value"}
1530
1547
  --result=VALUE specify result value as: 'work step:parameter'
1531
- --synchronous=ENUM work step:parameter expected as result: yes, no
1548
+ --synchronous=ENUM work step:parameter expected as result: yes, no
1532
1549
  --ret-style=ENUM how return type is requested in api: header, arg, ext
1533
1550
  --auth-style=ENUM authentication type: arg_pass, head_basic, apikey
1534
1551
 
@@ -1611,7 +1628,7 @@ OPTIONS:
1611
1628
  --username=VALUE username to log in
1612
1629
  --password=VALUE user's password
1613
1630
  --skip-format=ENUM skip this preview format (multiple possible): png, mp4
1614
- --folder-reset-cache=ENUM force detection of generated preview by refresh cache: no, header, read
1631
+ --folder-reset-cache=ENUM force detection of generated preview by refresh cache: no, header, read
1615
1632
  --skip-types=VALUE skip types in comma separated list
1616
1633
  --previews-folder=VALUE preview folder in storage root
1617
1634
  --temp-folder=VALUE path to temp folder
@@ -1619,14 +1636,14 @@ OPTIONS:
1619
1636
  --case=VALUE basename of output for for test
1620
1637
  --scan-path=VALUE subpath in folder id to start scan in (default=/)
1621
1638
  --scan-id=VALUE forder id in storage to start scan in, default is access key main folder id
1622
- --overwrite=ENUM when to overwrite result file: always, never, mtime
1623
- --file-access=ENUM how to read and write files in repository: local, remote
1639
+ --overwrite=ENUM when to overwrite result file: always, never, mtime
1640
+ --file-access=ENUM how to read and write files in repository: local, remote
1624
1641
  --max-size=VALUE maximum size (in bytes) of preview file
1625
1642
  --thumb-vid-scale=VALUE png: video: size (ffmpeg scale argument)
1626
1643
  --thumb-vid-fraction=VALUE png: video: position of snapshot
1627
1644
  --thumb-img-size=VALUE png: non-video: height (and width)
1628
- --video-conversion=ENUM mp4: method for preview generation: reencode, blend, clips
1629
- --video-png-conv=ENUM mp4: method for thumbnail generation: fixed, animated
1645
+ --video-conversion=ENUM mp4: method for preview generation: reencode, blend, clips
1646
+ --video-png-conv=ENUM mp4: method for thumbnail generation: fixed, animated
1630
1647
  --video-start-sec=VALUE mp4: start offset (seconds) of video preview
1631
1648
  --video-scale=VALUE mp4: video scale (ffmpeg)
1632
1649
  --blend-keyframes=VALUE mp4: blend: # key frames
@@ -1642,10 +1659,62 @@ SUBCOMMANDS: start admin
1642
1659
  OPTIONS:
1643
1660
  --parameters=VALUE extended value for session set definition
1644
1661
  --session-name=VALUE name of session to use for admin commands, by default first one
1645
- ERROR: Other: uninitialized constant Aspera::Cli::Plugins::Aoc
1646
- Did you mean? Aspera::AoC
1647
- ERROR: Argument: unprocessed options: ["-Cnone"]
1648
- Use '--log-level=debug' to get more details.
1662
+
1663
+
1664
+ COMMAND: aoc
1665
+ SUBCOMMANDS: apiinfo bearer_token organization tier_restrictions user workspace packages files gateway admin automation servers
1666
+ OPTIONS:
1667
+ --url=VALUE URL of application, e.g. https://org.asperafiles.com
1668
+ --username=VALUE username to log in
1669
+ --password=VALUE user's password
1670
+
1671
+ COMMAND: ats
1672
+ SUBCOMMANDS: cluster access_key api_key aws_trust_policy
1673
+ OPTIONS:
1674
+ --ibm-api-key=VALUE IBM API key, see https://cloud.ibm.com/iam/apikeys
1675
+ --instance=VALUE ATS instance in ibm cloud
1676
+ --ats-key=VALUE ATS key identifier (ats_xxx)
1677
+ --ats-secret=VALUE ATS key secret
1678
+ --params=VALUE Parameters access key creation (@json:)
1679
+ --cloud=VALUE Cloud provider
1680
+ --region=VALUE Cloud region
1681
+ --auth=ENUM type of Oauth authentication: body_userpass, header_userpass, web, jwt, url_token, ibm_apikey
1682
+ --operation=ENUM client operation for transfers: push, pull
1683
+ --client-id=VALUE API client identifier in application
1684
+ --client-secret=VALUE API client passcode
1685
+ --redirect-uri=VALUE API client redirect URI
1686
+ --private-key=VALUE RSA private key PEM value for JWT (prefix file path with @val:@file:)
1687
+ --workspace=VALUE name of workspace
1688
+ --eid=VALUE identifier
1689
+ --name=VALUE resource name
1690
+ --link=VALUE public link to shared resource
1691
+ --new-user-option=VALUE new user creation option
1692
+ --from-folder=VALUE share to share source folder
1693
+ --scope=VALUE scope for AoC API calls
1694
+ --notify=VALUE notify users that file was received
1695
+ --bulk=ENUM bulk operation: yes, no
1696
+ --default-ports=ENUM use standard FASP ports or get from node api: yes, no
1697
+
1698
+
1699
+ COMMAND: server
1700
+ SUBCOMMANDS: nagios nodeadmin userdata configurator ctl download upload browse delete rename ls rm mv du info mkdir cp df md5sum
1701
+ OPTIONS:
1702
+ --url=VALUE URL of application, e.g. https://org.asperafiles.com
1703
+ --username=VALUE username to log in
1704
+ --password=VALUE user's password
1705
+ --ssh-keys=VALUE ssh key path list (Array or single)
1706
+ --ssh-options=VALUE ssh options (Hash)
1707
+ --cmd-prefix=VALUE prefix to add for as cmd execution, e.g. sudo or /opt/aspera/bin
1708
+
1709
+
1710
+ COMMAND: console
1711
+ SUBCOMMANDS: transfer nagios_check
1712
+ OPTIONS:
1713
+ --url=VALUE URL of application, e.g. https://org.asperafiles.com
1714
+ --username=VALUE username to log in
1715
+ --password=VALUE user's password
1716
+ --filter-from=DATE only after date
1717
+ --filter-to=DATE only before date
1649
1718
 
1650
1719
 
1651
1720
  ```
@@ -2188,17 +2257,26 @@ $ ascli aoc admin res node --id=8669 v4 perm 82 show
2188
2257
  Send a package:
2189
2258
 
2190
2259
  ```
2191
- $ ascli 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
2260
+ $ ascli aoc packages send --value=[package extended value] [other parameters such as file list and transfer parameters]
2192
2261
  ```
2193
2262
 
2194
2263
  Notes:
2195
2264
 
2196
- * the `value` parameter can contain any supported package creation parameter. Refer to the API, or display an existing package.
2197
- * to list recipients use fields: "recipients" and/or "bcc_recipients". ascli 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
2265
+ * 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.
2266
+ * to provide the list of recipients, use fields: "recipients" and/or "bcc_recipients". ascli will resolve the list of email addresses to expected user ids.
2267
+ * a recipîent can be a shared inbox, in this case just use the name of the shared inbox as recipient.
2268
+ * If a recipient is not already registered and the workspace allows external users, then the package is sent to an external user, and
2198
2269
  * 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.
2199
2270
  * if the option `new_user_option` is `@json:{}`, then external users are invited to join the workspace
2200
2271
 
2201
- ## <a name="aoccargo"></a>Receive only new packages
2272
+ Examples:
2273
+
2274
+ ```
2275
+ $ ascli 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
2276
+ $ ascli aoc packages send --value=@json:'{"name":"my file in shared inbox","recipients":["The Shared Inbox"]}' my_file.dat --ts=@json:'{"target_rate_kbps":100000}'
2277
+ ```
2278
+
2279
+ ## <a name="aoccargo"></a>Receive new packages only
2202
2280
 
2203
2281
  It is possible to automatically download new packages, like using Aspera Cargo:
2204
2282
 
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
@@ -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
@@ -128,8 +128,9 @@ The following sections provide information on the installation.
128
128
  ## <a name="ruby"></a>Ruby
129
129
 
130
130
  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 %>.
131
+ The Ruby version shall be at least <%= gemspec.required_ruby_version %>.
132
132
  Any type of Ruby installation can be used.
133
+ Ruby 3 is not yet tested.
133
134
 
134
135
  Refer to the following sections for a proposed method for specific operating systems.
135
136
 
@@ -154,13 +155,13 @@ Install Latest stable Ruby using [https://rubyinstaller.org/](https://rubyinstal
154
155
 
155
156
  Go to "Downloads".
156
157
 
157
- Select the version "without devkit", x64 corresponding to the one recommended "with devkit".
158
+ Select the Ruby 2 version "without devkit", x64 corresponding to the one recommended "with devkit". Devkit is not needed.
158
159
 
159
- During installation, skip the installation of "MSys2".
160
+ At the end of the installer uncheck the box to skip the installation of "MSys2".
160
161
 
161
162
  ### Linux
162
163
 
163
- Install Latest Ruby using "rvm" [https://rvm.io/](https://rvm.io/) .
164
+ Install Latest Ruby 2 using "rvm" [https://rvm.io/](https://rvm.io/) .
164
165
  It installs by default in /usr/local/rvm , but you can install in another location:
165
166
 
166
167
  ```
@@ -523,14 +524,28 @@ It is also possible to provide a _Structured Value_ in a file using `@json:@file
523
524
 
524
525
  ## <a name="conffolder"></a>Configuration and Persistency Folder
525
526
 
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 :
527
+ <%=tool%> configuration and other runtime files (token cache, file lists, persistency files, SDK) are stored in folder `[User's home folder]/.aspera/<%=cmd%>`.
528
+
529
+ Note: `[User's home folder]` is found using ruby's `Dir.home` (`rb_w32_home_dir`).
530
+ 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%`.
531
+
532
+ The main folder can be displayed using :
528
533
 
529
534
  ```
530
535
  $ <%=cmd%> config folder
531
536
  /Users/kenji/.aspera/<%=cmd%>
532
537
  ```
533
538
 
539
+ It can be overriden using the envinonment variable `<%=evp%>HOME`.
540
+
541
+ Example (Windows):
542
+
543
+ ```
544
+ $ set <%=evp%>HOME=C:\Users\Kenji\.aspera\ascli
545
+ $ <%=cmd%> config folder
546
+ C:\Users\Kenji\.aspera\ascli
547
+ ```
548
+
534
549
  ## <a name="configfile"></a>Configuration file
535
550
 
536
551
  On the first execution of <%=tool%>, an empty configuration file is created in the configuration folder.
@@ -767,6 +782,8 @@ EOF
767
782
 
768
783
  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
784
 
785
+ It is also possible to activate traces before initialisation using env var `AS_LOG_LEVEL`.
786
+
770
787
  ## Learning Aspera Product APIs (REST)
771
788
 
772
789
  This CLI uses REST APIs.
@@ -1703,17 +1720,26 @@ $ <%=cmd%> aoc admin res node --id=8669 v4 perm 82 show
1703
1720
  Send a package:
1704
1721
 
1705
1722
  ```
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
1723
+ $ <%=cmd%> aoc packages send --value=[package extended value] [other parameters such as file list and transfer parameters]
1707
1724
  ```
1708
1725
 
1709
1726
  Notes:
1710
1727
 
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
1728
+ * 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.
1729
+ * 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.
1730
+ * a recipîent can be a shared inbox, in this case just use the name of the shared inbox as recipient.
1731
+ * If a recipient is not already registered and the workspace allows external users, then the package is sent to an external user, and
1713
1732
  * 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
1733
  * if the option `new_user_option` is `@json:{}`, then external users are invited to join the workspace
1715
1734
 
1716
- ## <a name="aoccargo"></a>Receive only new packages
1735
+ Examples:
1736
+
1737
+ ```
1738
+ $ <%=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
1739
+ $ <%=cmd%> aoc packages send --value=@json:'{"name":"my file in shared inbox","recipients":["The Shared Inbox"]}' my_file.dat --ts=@json:'{"target_rate_kbps":100000}'
1740
+ ```
1741
+
1742
+ ## <a name="aoccargo"></a>Receive new packages only
1717
1743
 
1718
1744
  It is possible to automatically download new packages, like using Aspera Cargo:
1719
1745
 
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  config:
3
- version: 4.0.0.pre1
3
+ version: 4.0.0
4
4
  default:
5
5
  config: cli_default
6
- aoc: tst_aoc
6
+ aoc: tst_aoc1
7
7
  faspex: tst_faspex
8
8
  faspex5: tst_faspex5
9
9
  shares: tst_shares
10
10
  shares2: tst_shares2
11
11
  node: tst_node
12
12
  server: tst_server
13
- orchestrator: orch_eudemo
13
+ orchestrator: tst_orch
14
14
  console: tst_console
15
15
  preview: tst_ak_preview
16
16
  ats: tst_ats
@@ -31,7 +31,7 @@ smtp_config:
31
31
  from_name: your value here
32
32
  username: your value here
33
33
  password: your value here
34
- tst_aoc:
34
+ tst_aoc1:
35
35
  url: your value here
36
36
  username: your value here
37
37
  auth: your value here
@@ -79,7 +79,7 @@ tst_server:
79
79
  tst_server_bykey:
80
80
  url: your value here
81
81
  username: your value here
82
- orch_eudemo:
82
+ tst_orch:
83
83
  url: your value here
84
84
  username: your value here
85
85
  password: your value here
@@ -21,18 +21,9 @@ module Aspera
21
21
  # name of application, also foldername where config is stored
22
22
  PROGRAM_NAME = 'ascli'
23
23
  GEM_NAME = 'aspera-cli'
24
- # Container module of current class : Aspera::Cli
25
- CLI_MODULE=Module.nesting[1].to_s
26
- # Path to Plugin classes: Aspera::Cli::Plugins
27
- PLUGINS_MODULE=CLI_MODULE+'::Plugins'
28
24
  VERBOSE_LEVELS=[:normal,:minimal,:quiet]
29
25
 
30
- private_constant :PROGRAM_NAME,:GEM_NAME,:CLI_MODULE,:PLUGINS_MODULE,:VERBOSE_LEVELS
31
-
32
- # find the root folder of gem where this class is
33
- def self.gem_root
34
- File.expand_path(CLI_MODULE.to_s.gsub('::','/').gsub(%r([^/]+),'..'),File.dirname(__FILE__))
35
- end
26
+ private_constant :PROGRAM_NAME,:GEM_NAME,:VERBOSE_LEVELS
36
27
 
37
28
  # =============================================================
38
29
  # Parameter handlers
@@ -140,7 +131,7 @@ module Aspera
140
131
  require @plugin_env[:config].plugins[plugin_name_sym][:require_stanza]
141
132
  # load default params only if no param already loaded before plugin instanciation
142
133
  env[:config].add_plugin_default_preset(plugin_name_sym)
143
- command_plugin=Object::const_get(PLUGINS_MODULE+'::'+plugin_name_sym.to_s.capitalize).new(env)
134
+ command_plugin=Plugins::Config.plugin_new(plugin_name_sym,env)
144
135
  Log.log.debug("got #{command_plugin.class}")
145
136
  # TODO: check that ancestor is Plugin?
146
137
  return command_plugin