asperalm 0.9 → 0.9.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: 9f09af42c6df45bc6d62d92a61368675234181a253cbc2a0b718592b2f61c21a
4
- data.tar.gz: aec1729de528244d26527df19c123a0bf308019a4cef1e20d08a9a4fc0283740
3
+ metadata.gz: 0aa784cd62265d13ac1457b0c050b1c2854a169efc28605c3209bef461db6d79
4
+ data.tar.gz: 981fa6b88dede31ebc015c660ca04f822a5fc882758b50489aa45c4128b9df9f
5
5
  SHA512:
6
- metadata.gz: 16f58f1a2c713f1f3fa377592b9253892966da5af0152782fdf859e85d3ae1c1dfc3cf14ceb4a14db1eac3fe391defa658991a8455fa946194088b7401454d2c
7
- data.tar.gz: e46f5259f71880cb7010c65e6e2a9d3c36f34277dbac325d952e7bbb732787fc1e29a6b387b6bfdd71c603d6fb6f18cc41110459e4321f94709deacf8b0db88c
6
+ metadata.gz: be38ca40b8d44b23e74cde700a92e2ef7fc6e0eb0661104c02e0305109629c5b6b81c08c523de7d66b768c26d49cc204c0cc00d67a31c9481ab8ec733a79f050
7
+ data.tar.gz: 103aecae675e5bb7fffa0452d16b13d173b4b0e6506e43980819fe3a91c96c167ce01850138b0db22e2b29ae4ee4da1021f02b0b3349b9f0c3eccf4432ceaedf
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Asperalm - Laurent's IBM Aspera Command Line Interface and Ruby Library
2
2
 
3
- Version : 0.9
3
+ Version : 0.9.1
4
4
 
5
5
 
6
6
 
@@ -15,8 +15,7 @@ Disclaimers:
15
15
  * Aspera, FASP are owned by IBM
16
16
  * This GEM is not endorsed/supported by IBM/Aspera
17
17
  * Use at your risk (not in production environments)
18
- * This gem is provided as-is, and is not intended to be
19
- a complete CLI, or industry-grade product.
18
+ * This gem is provided as-is, and is not intended to be a complete CLI, or industry-grade product.
20
19
  * some features may not be fully validated
21
20
  * IBM provides an officially supported Aspera CLI: [http://downloads.asperasoft.com/en/downloads/62](http://downloads.asperasoft.com/en/downloads/62) .
22
21
 
@@ -24,7 +23,7 @@ That being said, `mlia` is very powerful and gets things done, it's also a
24
23
 
25
24
  This manual addresses three parts:
26
25
 
27
- * `mlia` : ("Amelia") command line interface to Aspera
26
+ * `mlia` : ("Amelia") The Multi Layer IBM Aspera tool
28
27
  * `asession` : starting a FASP Session with JSON parameters
29
28
  * `Asperalm` : includes a Ruby "FASPManager"
30
29
 
@@ -38,7 +37,7 @@ Once the gem is installed, `mlia` shall be accessible:
38
37
 
39
38
  ```bash
40
39
  $ mlia --version
41
- 0.9
40
+ 0.9.1
42
41
  ```
43
42
 
44
43
  ## First use
@@ -184,10 +183,10 @@ The `asperalm` Gem provides a command line interface (CLI) which interacts with
184
183
  `mlia` provides the following features:
185
184
 
186
185
  * Supports most Aspera server products (on-premise and SaaS)
187
- * Options can be provided on command line, in configuration file, in env var, in files (products URL, credentials or any option)
188
- * Commands, Option values and Parameters can be provided in short format (must be unique)
189
- * FASP [Transfer Agents](#agents) can be: FaspManager (local ascp), or Connect Client, or a transfer node
190
- * Transfer parameters can be altered by modification of transferspec, this includes requiring multi-session
186
+ * Any command line options (products URL, credentials or any option) can be provided on command line, in configuration file, in env var, in files
187
+ * Supports Commands, Option values and Parameters shortcuts
188
+ * FASP [Transfer Agents](#agents) can be: FaspManager (local ascp), or Connect Client, or any transfer node
189
+ * Transfer parameters can be altered by modification of _transfer-spec_, this includes requiring multi-session
191
190
  * Allows transfers from products to products, essentially at node level (using the node transfer agent)
192
191
  * Supports FaspStream creation (using Node API)
193
192
  * Supports Watchfolder creation (using Node API)
@@ -659,13 +658,91 @@ The use of a _transfer-spec_ instead of `ascp` parameters has the advantage of:
659
658
 
660
659
  A [_transfer-spec_](#transferspec) is a Hash table, so it is described on the command line with the [Extended Value Syntax](#extended).
661
660
 
662
- <a name="transferparams"></a>
663
- _transfer-spec_ parameters are described in this document: [Transfer Parameters](docs/transfer_spec.html).
661
+ ## <a name="transferparams"></a>Transfer Parameters
664
662
 
665
663
  All standard _transfer-spec_ parameters can be overloaded. To display parameters,
666
664
  run in debug mode (--log-level=debug). [_transfer-spec_](#transferspec) can
667
665
  also be saved/overridden in the config file.
668
666
 
667
+
668
+ <p>
669
+ Columns:
670
+ <ul>
671
+ <li>F=Fasp Manager(local FASP execution)</li>
672
+ <li>N=remote node(node API)</li>
673
+ <li>C=Connect Client(web plugin)</li>
674
+ </ul>
675
+ </p>
676
+ <p>
677
+ Req/Def : Required or default value (- means emty)
678
+ </p>
679
+ <p>
680
+ Fields with EX_ prefix are specific extensions to local mode.
681
+ </p>
682
+ <p>
683
+ arg: related ascp argument or env var suffix (PASS for ASPERA_SCP_PASS)
684
+ </p>
685
+ <p>
686
+ (UNDER CONSTRUCTION <a href="https://developer.asperasoft.com/web/node/ops-transfers">ref</a>)
687
+ </p>
688
+
689
+ <table>
690
+ <tr><th>Field</th><th>Req/Def</th><th>Type</th><th>F</th><th>N</th><th>C</th><th>arg</th><th>Description</th></tr>
691
+ <tr><td>direction</td><td>Required</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--mode</td><td>Direction: "send" or "receive"</td></tr>
692
+ <tr><td>remote_host</td><td>Required</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--host</td><td>IP or fully qualified domain name of the remote server</td></tr>
693
+ <tr><td>remote_user</td><td>Required</td><td>string</td></td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--user</td><td>Remote user. Default value is "xfer" on node or connect.</td></tr>
694
+ <tr><td>destination_root</td><td>Required</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>last arg</td><td>Destination root directory.</td></tr>
695
+ <tr><td>title</td><td>-</td><td>string</td><td class="no">N</td><td class="yes">Y</td><td class="yes">Y</td><td>-</td><td>Title of the transfer</td></tr>
696
+ <tr><td>tags</td><td>-</td><td>hash</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--tags<br>--tags64</td><td>Metadata for transfer</td></tr>
697
+ <tr><td>token</td><td>-</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>TOKEN<br/>-W</td><td>Authorization token: Bearer, Basic or ATM</td></tr>
698
+ <tr><td>cookie</td><td>-</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>COOKIE</td><td>Metadata for transfer (older,string)</td></tr>
699
+ <tr><td>remote_access_key</td><td>TODO</td><td>string</td><td></td><td></td><td></td><td>?</td><td>Node only?</td></tr>
700
+ <tr><td>source_root</td><td>-</td><td>string</td><td></td><td></td><td></td><td>--source-prefix<br/>--source-prefix64</td><td>Source root directory.(TODO: verify option)</td></tr>
701
+ <tr><td>fasp_port</td><td>33001</td><td>integer</td></td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-O</td><td>Specifies fasp (UDP) port.</td></tr>
702
+ <tr><td>ssh_port</td><td>22 or 33001</td><td>integer</td></td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-P</td><td>Specifies ssh (TCP) port.</td></tr>
703
+ <tr><td>rate_policy</td><td>server config</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--policy</td><td>Valid literals include "low","fair","high" and "fixed".</td></tr>
704
+ <tr><td>symlink_policy</td><td>follow</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--symbolic-links</td><td>copy, follow, copy+force, skip. Default is follow. Handle source side symbolic links by following the link (follow), copying the link itself (copy), skipping (skip), or forcibly copying the link itself (copy+force).</td></tr>
705
+ <tr><td>target_rate_kbps</td><td>-</td><td>integer</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-l</td><td>Specifies desired speed for the transfer.</td></tr>
706
+ <tr><td>min_rate_kbps</td><td>0</td><td>integer</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-m</td><td>Set the minimum transfer rate in kilobits per second.</td></tr>
707
+ <tr><td>cipher</td><td>none</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-c</td><td>in transit encryption type.<br/>none, aes-128, aes-256</td></tr>
708
+ <tr><td>content_protection</td><td>encrypt<br/>decrypt</td><td>string</td><td></td><td></td><td></td><td>--file-crypt=</td><td>encryption at rest</td></tr>
709
+ <tr><td>content_protection_password</td><td>-</td><td>string</td><td></td><td></td><td></td><td>PASS</td><td>Specifies a string password.</td></tr>
710
+ <tr><td>overwrite</td><td>diff</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--overwrite</td><td>Overwrite destination files with the source files of the same name.<br/>never, always, diff, older, or diff+older</td></tr>
711
+ <tr><td>retry_duration</td><td></td><td>string</td><td></td><td></td><td></td><td>TODO</td><td>Specifies how long to wait before retrying transfer. (e.g. "5min")</td></tr>
712
+ <tr><td>http_fallback</td><td></td><td>bool (node), integer</td><td></td><td></td><td></td><td>-y<br/>TODO</td><td>When true(1), attempts to perform an HTTP transfer if a fasp transfer cannot be performed.</td></tr>
713
+ <tr><td>create_dir</td><td></td><td>boolean</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-d</td><td>Specifies whether to create new directories.</td></tr>
714
+ <tr><td>precalculate_job_size</td><td>srv. def.</td><td>boolean</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>--precalculate-job-size</td><td>Specifies whether to precalculate the job size.</td></tr>
715
+ <tr><td>delete_source</td><td></td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>?</td><td>?</td></tr>
716
+ <tr><td>remove_after_transfer</td><td></td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>?</td><td>Specifies whether to remove file after transfer.</td></tr>
717
+ <tr><td>remove_empty_directories</td><td></td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>?</td><td>Specifies whether to remove empty directories.</td></tr>
718
+ <tr><td>multi_session</td><td>1</td><td>integer</td><td class="no">N</td><td class="yes">Y</td><td class="no">N</td><td>-C</td><td>Specifies how many parts the transfer is in.</td></tr>
719
+ <tr><td>multi_session_threshold</td><td>null</td><td>integer</td><td class="no">N</td><td class="yes">Y</td><td class="no">N</td><td>-</td><td>in bytes</td></tr>
720
+ <tr><td>dgram_size</td><td></td><td>integer</td><td class="yes">Y</td><td></td><td></td><td>-Z</td><td>in bytes</td></tr>
721
+ <tr><td>compression</td><td></td><td>integer</td><td></td><td></td><td></td><td></td><td>ascp4 only, 0 / 1?</td></tr>
722
+ <tr><td>read_threads</td><td></td><td>integer</td><td></td><td></td><td></td><td>-</td><td>ascp4 only</td></tr>
723
+ <tr><td>write_threads</td><td></td><td>integer</td><td></td><td></td><td></td><td>-</td><td>ascp4 only</td></tr>
724
+ <tr><td>use_ascp4</td><td>false</td><td>boolean</td><td></td><td class="yes">Y</td><td></td><td>-</td><td>specify version of protocol</td></tr>
725
+ <tr><td>paths</td><td>source files (dest)</td><td>array</td><td></td><td></td><td></td><td>positional<br/>--file-list<br/>--file-pair-list</td><td>Contains a path to the source (required) and a path to the destination.</td></tr>
726
+ <tr><td>http_fallback_port</td><td></td><td>integer</td><td class="yes">Y</td><td></td><td></td><td>-t</td><td>Specifies http port.</td></tr>
727
+ <tr><td>https_fallback_port</td><td></td><td>integer</td><td></td><td></td><td></td><td>todo</td><td>Specifies https port.</td></tr>
728
+ <tr><td>cipher_allowed</td><td></td><td>string</td><td></td><td></td><td></td><td>-</td><td>returned by node API. Valid literals include "aes-128" and "none".</td></tr>
729
+ <tr><td>target_rate_cap_kbps</td><td></td><td></td><td class="no">N</td><td class="no">?</td><td class="yes">?</td><td>-</td><td>Returned by upload/download_setup node api.</td></tr>
730
+ <tr><td>rate_policy_allowed</td><td></td><td></td><td></td><td></td><td></td><td>-</td><td>returned by node API. Specifies most aggressive rate policy that is allowed. Valid literals include "low", "fair","high" and "fixed".</td></tr>
731
+ <tr><td>ssh_private_key</td><td></td><td>string</td><td></td><td></td><td></td><td>-</td><td>todo</td></tr>
732
+ <tr><td>remote_password</td><td>-</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>PASS</td><td>SSH session password</td></tr>
733
+ <tr><td>resume_policy</td><td>faspmgr:<br/>none<br/>other:<br/>sparse_csum</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="yes">Y</td><td>-k</td><td>none,attrs,sparse_csum,full_csum</td></tr>
734
+ <tr><td>authentication</td><td>faspmgr:<br/>none<br/>other:<br/>sparse_csum</td><td>string</td><td class="yes">Y</td><td class="yes">Y</td><td class="no">N</td><td>-</td><td>token: Aspera web keys are provided to allow transparent web based session initiation. on connect: password is not asked. Else, password is asked, and keys are not provided.</td></tr>
735
+ <tr><td>EX_ssh_key_value</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>KEY</td><td>Private key used for SSH authentication</td></tr>
736
+ <tr><td>EX_ssh_key_paths</td><td>-</td><td>array</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-i</td><td>Use public key authentication and specify the private key file</td></tr>
737
+ <tr><td>EX_at_rest_password</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>FILEPASS</td><td>Passphrase used for at rest encryption or decryption</td></tr>
738
+ <tr><td>EX_proxy_password</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>PROXY_PASS</td><td>TODO</td></tr>
739
+ <tr><td>EX_fasp_proxy_url</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>--proxy</td><td>Specify the address of the Aspera high-speed proxy server</td></tr>
740
+ <tr><td>EX_http_proxy_url</td><td>-</td><td>string</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-x</td><td>Specify the proxy server address used by HTTP Fallback</td></tr>
741
+ <tr><td>EX_ascp_args</td><td>-</td><td>array</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>same</td><td>Add command line arguments to ascp</td></tr>
742
+ <tr><td>EX_http_transfer_jpeg</td><td>0</td><td>integer</td><td class="yes">Y</td><td class="no">N</td><td class="no">N</td><td>-j</td><td>HTTP transfers as JPEG file</td></tr>
743
+ </table>
744
+
745
+
669
746
  ### Destination folder for transfers
670
747
 
671
748
  The destination folder is set by `mlia` by default to:
@@ -811,7 +888,7 @@ mlia console transfer current list
811
888
  mlia faspex package list
812
889
  mlia faspex package list --fields=delivery_id --format=csv --box=sent|tail -n 1) --box=sent
813
890
  mlia faspex package send --load-params=reset --url=my_url_here --username=my_username_here --password=my_password_here --insecure=yes --note="my note" --title="my title" --recipient="laurent.martin.aspera@fr.ibm.com" ~/200KB.1
814
- mlia faspex package send sample_file.bin --note="my note" --title="my title" --recipient="laurent.martin.aspera@fr.ibm.com"
891
+ mlia faspex package send sample_file.bin --delivery-info=@json:'{"title":"my title","recipients":["laurent.martin.aspera@fr.ibm.com"]}'
815
892
  mlia faspex recv_publink 'https://faspex.mycompany.com/aspera/faspex/external_deliveries/78780?passcode=a003aaf2f53e3869126b908525084db6bebc7031' --insecure=yes
816
893
  mlia node async --id=1 counters
817
894
  mlia node async --id=1 summary
@@ -872,7 +949,7 @@ mlia sync start --parameters=@json:'{"sessions":[{"name":"test","reset":true,"re
872
949
  ```bash
873
950
  $ mlia -h
874
951
  NAME
875
- mlia -- a command line tool for Aspera Applications (v0.9)
952
+ mlia -- a command line tool for Aspera Applications (v0.9.1)
876
953
 
877
954
  SYNOPSIS
878
955
  mlia COMMANDS [OPTIONS] [ARGS]
@@ -906,7 +983,7 @@ OPTIONS: global
906
983
  --config-file=VALUE read parameters from file in YAML format, current=/Users/laurent/.aspera/mlia/config.yaml
907
984
  -N, --no-default do not load default configuration for plugin
908
985
  --ui=ENUM method to start browser: text, graphical
909
- --log-level=ENUM Log level: info, warn, error, fatal, unknown, debug
986
+ --log-level=ENUM Log level: debug, info, warn, error, fatal, unknown
910
987
  --logger=ENUM log method: stderr, stdout, syslog
911
988
  --format=ENUM output format: table, ruby, json, jsonpp, yaml, csv
912
989
  -P, --presetVALUE load the named option preset from current config file
@@ -924,6 +1001,8 @@ OPTIONS: global
924
1001
  --to-folder=VALUE destination folder for downloaded files
925
1002
  --transfer=ENUM type of transfer: direct, connect, node
926
1003
  --transfer-node=VALUE name of configuration used to transfer when using --transfer=node
1004
+ --value=VALUE extended value for create, update, list filter
1005
+ --id=VALUE resource identifier (modify,delete,show)
927
1006
 
928
1007
  COMMAND: config
929
1008
  SUBCOMMANDS: todo
@@ -944,9 +1023,7 @@ OPTIONS:
944
1023
  --url=VALUE URL of application, e.g. https://org.asperafiles.com
945
1024
  --username=VALUE username to log in
946
1025
  --password=VALUE user's password
947
- --value=VALUE extended value for create, update, list filter
948
1026
  --validator=VALUE identifier of validator (optional for central)
949
- --id=VALUE entity identifier for update, show, and modify
950
1027
  --asperabrowserurl=VALUE URL for simple aspera web ui
951
1028
 
952
1029
  COMMAND: orchestrator
@@ -957,7 +1034,6 @@ OPTIONS:
957
1034
  --password=VALUE user's password
958
1035
  --params=VALUE parameters hash table, use @json:{"param":"value"}
959
1036
  --result=VALUE specify result value as: 'work step:parameter'
960
- --id=VALUE workflow identifier
961
1037
  --synchronous=ENUM work step:parameter expected as result: yes, no
962
1038
 
963
1039
  COMMAND: aspera
@@ -982,12 +1058,10 @@ OPTIONS:
982
1058
  --title=VALUE package title
983
1059
  --note=VALUE package note
984
1060
  --secret=VALUE access key secret for node
985
- --id=VALUE resource identifier
986
1061
  --eid=VALUE identifier
987
1062
  --name=VALUE resource name
988
1063
  --link=VALUE link to shared resource
989
1064
  --public-token=VALUE token value of public link
990
- --value=VALUE extended value for create, update, list filter
991
1065
 
992
1066
  COMMAND: xnode
993
1067
  SUBCOMMANDS: postprocess, cleanup, forward
@@ -1002,7 +1076,6 @@ OPTIONS:
1002
1076
  COMMAND: ats
1003
1077
  SUBCOMMANDS: cluster, access_key
1004
1078
  OPTIONS:
1005
- --id=VALUE Access key identifier, or server id, or api key id
1006
1079
  --secret=VALUE Access key secret
1007
1080
  --ats-id=VALUE ATS key identifier (ats_xxx)
1008
1081
  --params=VALUE Parameters access key creation (@json:)
@@ -1014,15 +1087,12 @@ SUBCOMMANDS: current, available, connect
1014
1087
  OPTIONS:
1015
1088
 
1016
1089
  COMMAND: faspex
1017
- SUBCOMMANDS: admin, package, dropbox, recv_publink, source, me
1090
+ SUBCOMMANDS: package, source, me, dropbox, recv_publink, v4
1018
1091
  OPTIONS:
1019
1092
  --url=VALUE URL of application, e.g. https://org.asperafiles.com
1020
1093
  --username=VALUE username to log in
1021
1094
  --password=VALUE user's password
1022
- --recipient=VALUE package recipient
1023
- --title=VALUE package title
1024
- --note=VALUE package note
1025
- --metadata=VALUE package metadata hash value (use @json:)
1095
+ --delivery-info=VALUE package delivery information (extended value)
1026
1096
  --source-name=VALUE create package from remote source (by name)
1027
1097
  --storage=VALUE Faspex local storage definition
1028
1098
  --box=ENUM package box: inbox, sent, archive
@@ -1036,7 +1106,6 @@ OPTIONS:
1036
1106
  --organization=VALUE organization
1037
1107
  --project=VALUE project
1038
1108
  --share=VALUE share
1039
- --id=VALUE entity identifier
1040
1109
 
1041
1110
  COMMAND: preview
1042
1111
  SUBCOMMANDS: scan, events, folder, check, test
@@ -1634,13 +1703,42 @@ This creates a option preset "aspera_demo_server" and set it as default for appl
1634
1703
 
1635
1704
  ## IBM Aspera Faspex
1636
1705
 
1637
- Send and receive packages.
1706
+ Note that the command "v4" requires the use of APIv4, refer to the Faspex Admin manual on how to activate.
1707
+
1708
+ ### Sending a Package
1709
+
1710
+ Provide delivery info in JSON, example:
1711
+
1712
+ ```
1713
+ --delivery-info=@json:'{"title":"my title","recipients":["laurent.martin.aspera@fr.ibm.com"]}'
1714
+ ```
1715
+
1716
+ a note can be added: `"note":"Please ..."`
1717
+
1718
+ metadata: `"metadata":{"Meta1":"Val1","Meta2":"Val2"}`
1719
+
1720
+
1721
+ Note for full details, refer to:
1722
+ [Reference on Developer Site](https://developer.asperasoft.com/web/faspex/sending)
1723
+
1724
+ ### operation on dropboxes
1725
+
1726
+ Example:
1727
+
1728
+ ```
1729
+ $ mlia faspex v4 dropbox create --value=@json:'{"dropbox":{"e_wg_name":"test1","e_wg_desc":"test1"}}'
1730
+ $ mlia faspex v4 dropbox list
1731
+ $ mlia faspex v4 dropbox delete --id=36
1732
+ ```
1638
1733
 
1639
1734
  ### remote sources
1640
1735
 
1641
1736
  Faspex lacks an API to list the contents of a remote source (available in web UI). To workaround this,
1642
1737
  the node API is used, for this it is required to add a section ":storage" that links
1643
- a storage name to a node config and sub path. Example:
1738
+ a storage name to a node config and sub path.
1739
+
1740
+ Example:
1741
+
1644
1742
  ```yaml
1645
1743
  my_faspex_conf:
1646
1744
  url: https://10.25.0.3/aspera/faspex
@@ -1660,6 +1758,8 @@ In this example, a faspex storage named "testlaurent" exists in Faspex, and is l
1660
1758
  under the docroot in "/myfiles" (this must be the same as configured in Faspex).
1661
1759
  The node configuration name is "my_faspex_node" here.
1662
1760
 
1761
+ Note: the v4 API provide an API for nodes and shares.
1762
+
1663
1763
  ## IBM Aspera Shares
1664
1764
 
1665
1765
  Aspera Shares supports the "node API" for the file transfer part. (Shares 1 and 2)
@@ -2051,9 +2151,14 @@ This means that you do not have ruby support for ED25519 SSH keys. You may eithe
2051
2151
  Gems, or remove your ed25519 key from your `.ssh` folder to solve the issue.
2052
2152
 
2053
2153
  # Release Notes
2154
+
2155
+ * version 0.9.1
2156
+
2157
+ * Breaking change: changed faspex package creation to match API, see Faspex section
2158
+
2054
2159
  * version 0.9
2055
2160
 
2056
- * Renamed the CLI from aslmcli to $ mlia ("Amelia", Multi-Layer IBM Aspera command line interface)
2161
+ * Renamed the CLI from aslmcli to $ mlia
2057
2162
  * Automatic rename and conversion of former config folder from aslmcli to $ mlia
2058
2163
 
2059
2164
  * version 0.7.6
@@ -1 +1 @@
1
- 0.9
1
+ 0.9.1
@@ -497,6 +497,8 @@ module Asperalm
497
497
  @opt_mgr.parse_options!
498
498
  # find plugins, shall be after parse! ?
499
499
  add_plugins_from_lookup_folders
500
+ # declare generic options
501
+ Plugin.declare_options
500
502
  # help requested without command ? (plugins must be known here)
501
503
  exit_with_usage(true) if @option_help and @opt_mgr.command_or_arg_empty?
502
504
  # load global default options and process
@@ -13,6 +13,11 @@ module Asperalm
13
13
  INSTANCE_OPS=[:modify,:delete,:show]
14
14
  ALL_OPS=[GLOBAL_OPS,INSTANCE_OPS].flatten
15
15
 
16
+ def self.declare_options
17
+ Main.instance.options.add_opt_simple(:value,"extended value for create, update, list filter")
18
+ Main.instance.options.add_opt_simple(:id,"resource identifier (#{INSTANCE_OPS.join(",")})")
19
+ end
20
+
16
21
  # implement generic rest operations on given resource path
17
22
  def self.entity_action(rest_api,res_class_path,display_fields,id_symb)
18
23
  res_name=res_class_path.gsub(%r{.*/},'').gsub(%r{^s$},'').gsub('_',' ')
@@ -32,12 +32,10 @@ module Asperalm
32
32
  Main.instance.options.add_opt_simple(:title,"package title")
33
33
  Main.instance.options.add_opt_simple(:note,"package note")
34
34
  Main.instance.options.add_opt_simple(:secret,"access key secret for node")
35
- Main.instance.options.add_opt_simple(:id,"resource identifier")
36
35
  Main.instance.options.add_opt_simple(:eid,"identifier")
37
36
  Main.instance.options.add_opt_simple(:name,"resource name")
38
37
  Main.instance.options.add_opt_simple(:link,"link to shared resource")
39
38
  Main.instance.options.add_opt_simple(:public_token,"token value of public link")
40
- Main.instance.options.add_opt_simple(:value,"extended value for create, update, list filter")
41
39
  Main.instance.options.set_option(:download_mode,:fasp)
42
40
  Main.instance.options.set_option(:bulk,:no)
43
41
  #Main.instance.options.set_option(:long,:no)
@@ -166,7 +166,6 @@ module Asperalm
166
166
 
167
167
  def declare_options(skip_common=false)
168
168
  unless skip_common
169
- Main.instance.options.add_opt_simple(:id,"Access key identifier, or server id, or api key id")
170
169
  Main.instance.options.add_opt_simple(:secret,"Access key secret")
171
170
  end
172
171
  Main.instance.options.add_opt_simple(:ats_id,"ATS key identifier (ats_xxx)")
@@ -15,10 +15,7 @@ module Asperalm
15
15
  alias super_declare_options declare_options
16
16
  def declare_options
17
17
  super_declare_options
18
- Main.instance.options.add_opt_simple(:recipient,"package recipient")
19
- Main.instance.options.add_opt_simple(:title,"package title")
20
- Main.instance.options.add_opt_simple(:note,"package note")
21
- Main.instance.options.add_opt_simple(:metadata,"package metadata hash value (use @json:)")
18
+ Main.instance.options.add_opt_simple(:delivery_info,"package delivery information (extended value)")
22
19
  Main.instance.options.add_opt_simple(:source_name,"create package from remote source (by name)")
23
20
  Main.instance.options.add_opt_simple(:storage,"Faspex local storage definition")
24
21
  Main.instance.options.add_opt_list(:box,[:inbox,:sent,:archive],"package box")
@@ -102,7 +99,7 @@ module Asperalm
102
99
  return @api_v4
103
100
  end
104
101
 
105
- def action_list; [ :admin, :package, :dropbox, :recv_publink, :source, :me ];end
102
+ def action_list; [ :package, :source, :me, :dropbox, :recv_publink, :v4 ];end
106
103
 
107
104
  # we match recv command on atom feed on this field
108
105
  PACKAGE_MATCH_FIELD='delivery_id'
@@ -120,31 +117,19 @@ module Asperalm
120
117
  return Main.result_empty unless all_inbox_data.has_key?('entry')
121
118
  return {:data=>all_inbox_data['entry'],:type=>:object_list,:fields=>[PACKAGE_MATCH_FIELD,'title','items'], :textify => lambda { |table_data| Faspex.textify_package_list(table_data)} }
122
119
  when :send
123
- filelist = Main.instance.options.get_next_argument("file list",:multiple)
124
- package_create_params={
125
- "delivery"=>{
126
- "title" =>Main.instance.options.get_option(:title,:mandatory),
127
- "note" =>Main.instance.options.get_option(:note,:mandatory),
128
- "recipients" =>Main.instance.options.get_option(:recipient,:mandatory).split(','),
129
- "send_upload_result" =>true,
130
- "notify_on_upload" => false,
131
- "notifiable_on_upload" => "",
132
- "notify_on_download" => false,
133
- "notifiable_on_download"=> "",
134
- "use_encryption_at_rest"=>false,
135
- "sources" =>[{"paths"=>filelist}]
136
- }
137
- }
120
+ delivery_info=Main.instance.options.get_option(:delivery_info,:mandatory)
121
+ raise CliBadArgument,"delivery_info must be hash, refer to doc" unless delivery_info.is_a?(Hash)
122
+ delivery_info['sources']||=[{'paths'=>[]}]
123
+ first_source=delivery_info['sources'].first
124
+ filelist = Main.instance.options.get_next_argument('file list',:multiple)
125
+ first_source['paths'].push(*filelist)
138
126
  source_name=Main.instance.options.get_option(:source_name,:optional)
139
127
  if !source_name.nil?
140
128
  source_list=api_v3.call({:operation=>'GET',:subpath=>"source_shares",:headers=>{'Accept'=>'application/json'}})[:data]['items']
141
129
  source_id=self.class.get_source_id(source_list,source_name)
142
- package_create_params['delivery']['sources'].first['id']=source_id
143
- end
144
- metadata=Main.instance.options.get_option(:metadata,:optional)
145
- if !metadata.nil?
146
- package_create_params['delivery']['metadata']=metadata
130
+ first_source['id']=source_id
147
131
  end
132
+ package_create_params={'delivery'=>delivery_info}
148
133
  send_result=api_v3.call({:operation=>'POST',:subpath=>'send',:json_params=>package_create_params,:headers=>{'Accept'=>'application/json'}})[:data]
149
134
  if send_result.has_key?('error')
150
135
  raise CliBadArgument,"#{send_result['error']['user_message']}: #{send_result['error']['internal_message']}"
@@ -232,11 +217,13 @@ module Asperalm
232
217
  my_info=api_v3.call({:operation=>'GET',:subpath=>"me",:headers=>{'Accept'=>'application/json'}})[:data]
233
218
  return {:data=>my_info, :type=>:single_object}
234
219
  when :dropbox
235
- command_pkg=Main.instance.options.get_next_argument('command',[ :list ])
220
+ command_pkg=Main.instance.options.get_next_argument('command',[ :list, :create ])
236
221
  case command_pkg
237
222
  when :list
238
223
  dropbox_list=api_v3.call({:operation=>'GET',:subpath=>"/aspera/faspex/dropboxes",:headers=>{'Accept'=>'application/json'}})[:data]
239
224
  return {:data=>dropbox_list['items'], :type=>:object_list, :fields=>['name','id','description','can_read','can_write']}
225
+ # when :create
226
+ #
240
227
  end
241
228
  when :recv_publink
242
229
  thelink=Main.instance.options.get_next_argument("Faspex public URL for a package")
@@ -253,9 +240,22 @@ module Asperalm
253
240
  transfer_spec=Fasp::Uri.new(transfer_uri).transfer_spec
254
241
  transfer_spec['direction']='receive'
255
242
  return Main.instance.start_transfer_wait_result(transfer_spec,:node_gen3)
256
- when :admin
257
- resource=Main.instance.options.get_next_argument('command',[ :user ])
258
- return Plugin.entity_action(api_v4,resource.to_s+'s',['id','name','first_name','last_name'],:id)
243
+ when :v4
244
+ command=Main.instance.options.get_next_argument('command',[:dropbox, :dmembership, :workgroup,:wmembership,:user,:metadata_profile])
245
+ case command
246
+ when :dropbox
247
+ return Plugin.entity_action(api_v4,'admin/dropboxes',['id','e_wg_name','e_wg_desc','created_at'],:id)
248
+ when :dmembership
249
+ return Plugin.entity_action(api_v4,'dropbox_memberships',nil,:id)
250
+ when :workgroup
251
+ return Plugin.entity_action(api_v4,'admin/workgroups',['id','e_wg_name','e_wg_desc','created_at'],:id)
252
+ when :wmembership
253
+ return Plugin.entity_action(api_v4,'workgroup_memberships',nil,:id)
254
+ when :user
255
+ return Plugin.entity_action(api_v4,'users',['id','name','first_name','last_name'],:id)
256
+ when :metadata_profile
257
+ return Plugin.entity_action(api_v4,'metadata_profiles',nil,:id)
258
+ end
259
259
  end # command
260
260
  end
261
261
  end
@@ -11,9 +11,7 @@ module Asperalm
11
11
  alias super_declare_options declare_options
12
12
  def declare_options
13
13
  super_declare_options
14
- Main.instance.options.add_opt_simple(:value,"extended value for create, update, list filter")
15
14
  Main.instance.options.add_opt_simple(:validator,"identifier of validator (optional for central)")
16
- Main.instance.options.add_opt_simple(:id,"entity identifier for update, show, and modify")
17
15
  Main.instance.options.add_opt_simple(:asperabrowserurl,"URL for simple aspera web ui")
18
16
  #Main.instance.options.set_option(:value,'@json:{"active_only":false}')
19
17
  Main.instance.options.set_option(:asperabrowserurl,'https://asperabrowser.mybluemix.net')
@@ -13,7 +13,6 @@ module Asperalm
13
13
  super_declare_options
14
14
  Main.instance.options.add_opt_simple(:params,"parameters hash table, use @json:{\"param\":\"value\"}")
15
15
  Main.instance.options.add_opt_simple(:result,"specify result value as: 'work step:parameter'")
16
- Main.instance.options.add_opt_simple(:id,"workflow identifier")
17
16
  Main.instance.options.add_opt_boolean(:synchronous,"work step:parameter expected as result")
18
17
  Main.instance.options.set_option(:params,{})
19
18
  Main.instance.options.set_option(:synchronous,:no)
@@ -13,7 +13,6 @@ module Asperalm
13
13
  Main.instance.options.add_opt_simple(:organization,"organization")
14
14
  Main.instance.options.add_opt_simple(:project,"project")
15
15
  Main.instance.options.add_opt_simple(:share,"share")
16
- Main.instance.options.add_opt_simple(:id,"entity identifier")
17
16
  end
18
17
 
19
18
  def action_list; [ :repository,:organization,:project,:team,:share,:appinfo,:userinfo,:admin];end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asperalm
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-04 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-simple