aspera-cli 4.25.4 → 4.26.0.pre
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +21 -6
- data/CONTRIBUTING.md +28 -22
- data/README.md +9 -7
- data/lib/aspera/agent/direct.rb +10 -8
- data/lib/aspera/agent/factory.rb +3 -3
- data/lib/aspera/agent/node.rb +1 -1
- data/lib/aspera/api/alee.rb +1 -0
- data/lib/aspera/api/aoc.rb +8 -4
- data/lib/aspera/api/ats.rb +1 -1
- data/lib/aspera/api/cos_node.rb +1 -0
- data/lib/aspera/api/faspex.rb +5 -1
- data/lib/aspera/api/httpgw.rb +2 -0
- data/lib/aspera/api/node.rb +3 -2
- data/lib/aspera/ascp/installation.rb +9 -10
- data/lib/aspera/cli/error.rb +8 -0
- data/lib/aspera/cli/info.rb +2 -1
- data/lib/aspera/cli/main.rb +30 -12
- data/lib/aspera/cli/manager.rb +31 -28
- data/lib/aspera/cli/plugins/aoc.rb +2 -2
- data/lib/aspera/cli/plugins/base.rb +2 -79
- data/lib/aspera/cli/plugins/faspex.rb +1 -1
- data/lib/aspera/cli/plugins/faspex5.rb +28 -40
- data/lib/aspera/cli/plugins/node.rb +2 -4
- data/lib/aspera/cli/plugins/shares.rb +4 -2
- data/lib/aspera/cli/transfer_agent.rb +3 -0
- data/lib/aspera/cli/version.rb +1 -1
- data/lib/aspera/dot_container.rb +10 -10
- data/lib/aspera/log.rb +1 -1
- data/lib/aspera/markdown.rb +1 -1
- data/lib/aspera/persistency_folder.rb +1 -1
- data/lib/aspera/rest.rb +3 -31
- data/lib/aspera/rest_list.rb +116 -0
- data/lib/aspera/sync/operations.rb +1 -1
- data/lib/aspera/transfer/parameters.rb +8 -8
- data/lib/aspera/yaml.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc6adc843448ed8b76da0786b419be39fe4531daa0da0254f8cdb7503a131f4f
|
|
4
|
+
data.tar.gz: 217a266117e6a2ac2f0512016d71a7fa4e9a1b67924e3e73ca5b7a29cc54a76a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8977f967425a7a53c585d64902619366c197b6897231515ec84dd1b76e4a70eb767da6ce5cbe32f0f3005e70d222e1dc5d65fcf3bfe2c8044d4cf7349396e692
|
|
7
|
+
data.tar.gz: 7ac9b790563f1f8d11c1156f337ed4fb81313c64b11e1dc7b85909b91c87f06d0a6024176352a01c51397626d75ec20a66c9311dd8a5f88042cff7b0a23fdc44
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- markdownlint-configure-file { "no-duplicate-heading": { "siblings_only": true } } -->
|
|
4
4
|
|
|
5
|
+
## 4.26.0.pre
|
|
6
|
+
|
|
7
|
+
Released: [Place date of release here]
|
|
8
|
+
|
|
9
|
+
### New Features
|
|
10
|
+
|
|
11
|
+
* `faspex5`: When sending a package, recipients specified in fields `private_recipients`, `notified_on_upload`, `notified_on_download` and `notified_on_receipt` are now also expanded like field `recipients`.
|
|
12
|
+
|
|
13
|
+
### Issues Fixed
|
|
14
|
+
|
|
15
|
+
* `sync`: #251 in `admin` command: Fixed database path on Windows: Use `~private-asp` instead of `.private-asp`.
|
|
16
|
+
* `config`: Fixed `preset update` with dot-path options.
|
|
17
|
+
|
|
18
|
+
### Breaking Changes
|
|
19
|
+
|
|
5
20
|
## 4.25.4
|
|
6
21
|
|
|
7
22
|
Released: 2026-03-04
|
|
@@ -301,7 +316,7 @@ Released: 2025-01-21
|
|
|
301
316
|
|
|
302
317
|
* Internal: Basic REST calls now return data directly. (no more `data` key). For advanced calls, use `call`.
|
|
303
318
|
* Internal: Transfer SDK download is now a 2-step procedure: First get the YAML file from GitHub with URLs for the various platforms and versions, and then download the archive from the official IBM repository.
|
|
304
|
-
**global**: Option `format=multi` is replaced with option `multi_table=yes`.
|
|
319
|
+
* **global**: Option `format=multi` is replaced with option `multi_table=yes`.
|
|
305
320
|
* `faspex5`: Removed deprecated option `value` replaced with positional parameter.
|
|
306
321
|
|
|
307
322
|
## 4.19.0
|
|
@@ -1065,7 +1080,7 @@ Released: 2021-02-03
|
|
|
1065
1080
|
|
|
1066
1081
|
### New Features
|
|
1067
1082
|
|
|
1068
|
-
* The option `value` of command `find
|
|
1083
|
+
* The option `value` of command `find` to filter on name is mandatory.
|
|
1069
1084
|
* `find` now also reports all types (file, folder, link).
|
|
1070
1085
|
* `find` now is able to report all fields (type, size, etc...).
|
|
1071
1086
|
|
|
@@ -1095,7 +1110,7 @@ Released: 2021-02-03
|
|
|
1095
1110
|
### New Features
|
|
1096
1111
|
|
|
1097
1112
|
* Improved wizard (prepare for AoC global client id).
|
|
1098
|
-
* Preview generator: Added option :
|
|
1113
|
+
* Preview generator: Added option : `skip_format` with values `png`, `mp4`.
|
|
1099
1114
|
* Removed outdated pictures from this doc.
|
|
1100
1115
|
|
|
1101
1116
|
## 0.9.19
|
|
@@ -1163,7 +1178,7 @@ Released: 2021-02-03
|
|
|
1163
1178
|
|
|
1164
1179
|
### New Features
|
|
1165
1180
|
|
|
1166
|
-
* `faspex`: Use option `once_only` set to `yes` to enable cargo like function. id=NEW deprecated.
|
|
1181
|
+
* `faspex`: Use option `once_only` set to `yes` to enable cargo like function. `id=NEW` deprecated.
|
|
1167
1182
|
* `aoc`: Share to share transfer with command `transfer`.
|
|
1168
1183
|
|
|
1169
1184
|
## 0.9.7
|
|
@@ -1172,8 +1187,8 @@ Released: 2021-02-03
|
|
|
1172
1187
|
|
|
1173
1188
|
* Homogeneous transfer spec for `node` and [`direct`](README.md#agt_direct) transfer agents.
|
|
1174
1189
|
* Preview persistency goes to unique file by default.
|
|
1175
|
-
* Catch mxf extension in preview as video.
|
|
1176
|
-
* Faspex: Possibility to download all packages by specifying id=ALL
|
|
1190
|
+
* Catch `mxf` extension in preview as video.
|
|
1191
|
+
* Faspex: Possibility to download all packages by specifying `id=ALL`.
|
|
1177
1192
|
* Faspex: To come: Cargo-like function to download only new packages with id=NEW.
|
|
1178
1193
|
|
|
1179
1194
|
## 0.9.6
|
data/CONTRIBUTING.md
CHANGED
|
@@ -12,7 +12,7 @@ To help us diagnose and resolve the issue efficiently, please include the follow
|
|
|
12
12
|
|
|
13
13
|
- The `ascli` version you are using:
|
|
14
14
|
|
|
15
|
-
```
|
|
15
|
+
```shell
|
|
16
16
|
ascli -v
|
|
17
17
|
```
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ To help us diagnose and resolve the issue efficiently, please include the follow
|
|
|
20
20
|
|
|
21
21
|
- **Your Ruby environment details**:
|
|
22
22
|
|
|
23
|
-
```
|
|
23
|
+
```shell
|
|
24
24
|
ruby -v
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ We welcome contributions to improve the `aspera-cli` project!
|
|
|
32
32
|
|
|
33
33
|
Clone the repository to initialize the development environment:
|
|
34
34
|
|
|
35
|
-
```
|
|
35
|
+
```shell
|
|
36
36
|
git clone https://github.com/IBM/aspera-cli.git
|
|
37
37
|
cd aspera-cli
|
|
38
38
|
bundle install
|
|
@@ -91,7 +91,7 @@ You can manage your Ruby installation using your preferred tool (e.g., `rbenv`,
|
|
|
91
91
|
|
|
92
92
|
To start with a clean state and remove all installed gems:
|
|
93
93
|
|
|
94
|
-
```
|
|
94
|
+
```shell
|
|
95
95
|
bundle exec rake tools:clean_gems
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -109,9 +109,9 @@ The following environment variables and macros control specific build behaviors:
|
|
|
109
109
|
| Environment variable | Contents | Description |
|
|
110
110
|
|-----------------------------|------------| -------------------------------------------------------------|
|
|
111
111
|
| `ASPERA_CLI_TEST_CONF_URL` | URL | URL for the configuration file containing secrets for tests. |
|
|
112
|
-
| `ASPERA_CLI_DOC_CHECK_LINKS`| yes
|
|
113
|
-
| `LOG_SECRETS` | yes
|
|
114
|
-
| `LOG_LEVEL` | debug
|
|
112
|
+
| `ASPERA_CLI_DOC_CHECK_LINKS`| `yes`/`no` | Validates that links exist during documentation generation. |
|
|
113
|
+
| `LOG_SECRETS` | `yes`/`no` | Toggles the logging of secrets in `rake` tasks. |
|
|
114
|
+
| `LOG_LEVEL` | `debug`, ... | Sets the logging verbosity for `rake` tasks. |
|
|
115
115
|
| `ENABLE_COVERAGE` | set/unset | Enables test coverage analysis when defined. |
|
|
116
116
|
| `SIGNING_KEY` | File path | Path to the signing key used for building the gem file. |
|
|
117
117
|
| `SIGNING_KEY_PEM` | PEM Value | The PEM content of the signing key. |
|
|
@@ -121,11 +121,11 @@ These values can be set as standard environment variables or passed directly to
|
|
|
121
121
|
Setting `SIGNING_KEY_PEM` automatically generates a file at `$HOME/.gem/signing_key.pem` and sets the `SIGNING_KEY` variable accordingly.
|
|
122
122
|
|
|
123
123
|
> [!NOTE]
|
|
124
|
-
> `
|
|
124
|
+
> `ASPERA_CLI_TEST_CONF_URL` is typically defined in your shell profile for development, while others are usually for ad-hoc command-line use.
|
|
125
125
|
|
|
126
126
|
To run the CLI directly from your source directory, add the following to your shell profile (adjust the path as necessary):
|
|
127
127
|
|
|
128
|
-
```
|
|
128
|
+
```shell
|
|
129
129
|
dev_ascli=$HOME/github/aspera-cli
|
|
130
130
|
export PATH=$dev_ascli/bin:$PATH
|
|
131
131
|
export RUBYLIB=$dev_ascli/lib:$RUBYLIB
|
|
@@ -140,24 +140,24 @@ Installation instructions can be found at [IBM Plex](https://www.ibm.com/plex/).
|
|
|
140
140
|
|
|
141
141
|
On macOS, install `lualatex` and required packages via Homebrew:
|
|
142
142
|
|
|
143
|
-
```
|
|
143
|
+
```shell
|
|
144
144
|
brew install texlive
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
If using an alternative installation method, ensure the following packages are present:
|
|
148
148
|
|
|
149
|
-
```
|
|
149
|
+
```shell
|
|
150
150
|
tlmgr update --self
|
|
151
151
|
tlmgr install fvextra selnolig lualatex-math
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
-
|
|
154
|
+
- Validate URLs during generation: `ASPERA_CLI_DOC_CHECK_LINKS=yes`.
|
|
155
155
|
|
|
156
|
-
-
|
|
156
|
+
- Debug the generation process: `ASPERA_CLI_DOC_DEBUG=debug`.
|
|
157
157
|
|
|
158
|
-
-
|
|
158
|
+
- Build the documentation:
|
|
159
159
|
|
|
160
|
-
```
|
|
160
|
+
```shell
|
|
161
161
|
rake doc:build
|
|
162
162
|
```
|
|
163
163
|
|
|
@@ -169,14 +169,14 @@ Detailed testing information can be found in <tests/README.md>.
|
|
|
169
169
|
|
|
170
170
|
To build an unsigned gem:
|
|
171
171
|
|
|
172
|
-
```
|
|
172
|
+
```shell
|
|
173
173
|
bundle install
|
|
174
174
|
bundle exec rake unsigned
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
To exclude optional gems from the installation:
|
|
178
178
|
|
|
179
|
-
```
|
|
179
|
+
```shell
|
|
180
180
|
bundle config set without optional
|
|
181
181
|
```
|
|
182
182
|
|
|
@@ -185,7 +185,7 @@ bundle config set without optional
|
|
|
185
185
|
Generating a signed gem requires a **private key**, specified via the `SIGNING_KEY` environment variable.
|
|
186
186
|
The gem is signed using the public certificate in `certs` and the **private key**.
|
|
187
187
|
|
|
188
|
-
```
|
|
188
|
+
```shell
|
|
189
189
|
bundle exec rake SIGNING_KEY=/path/to/vault/gem-private_key.pem
|
|
190
190
|
```
|
|
191
191
|
|
|
@@ -195,7 +195,7 @@ For more details, see <certs/README.md>.
|
|
|
195
195
|
|
|
196
196
|
To update the stubs:
|
|
197
197
|
|
|
198
|
-
```
|
|
198
|
+
```shell
|
|
199
199
|
bundle exec rake tools:grpc
|
|
200
200
|
```
|
|
201
201
|
|
|
@@ -211,7 +211,7 @@ Refer to the [Executable build guide](build/binary/README.md).
|
|
|
211
211
|
|
|
212
212
|
To list related `rake` tasks:
|
|
213
213
|
|
|
214
|
-
```
|
|
214
|
+
```shell
|
|
215
215
|
bundle exec rake -T ^binary:
|
|
216
216
|
```
|
|
217
217
|
|
|
@@ -234,17 +234,23 @@ Before a new release, ensure the following:
|
|
|
234
234
|
|
|
235
235
|
- **Pass all tests**:
|
|
236
236
|
|
|
237
|
-
```
|
|
237
|
+
```shell
|
|
238
238
|
bundle exec rake test:run
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
- **Verify container builds** (using the local gem):
|
|
242
242
|
|
|
243
|
-
```
|
|
243
|
+
```shell
|
|
244
244
|
bundle exec rake container:build'[local]'
|
|
245
245
|
bundle exec rake container:test
|
|
246
246
|
```
|
|
247
247
|
|
|
248
|
+
- **Check documentation links**:
|
|
249
|
+
|
|
250
|
+
```shell
|
|
251
|
+
bundle exec rake doc:build ASPERA_CLI_DOC_CHECK_LINKS=yes
|
|
252
|
+
```
|
|
253
|
+
|
|
248
254
|
### Automated Release Process
|
|
249
255
|
|
|
250
256
|
Releases are managed through the GitHub Actions UI via the **New Release on GitHub** workflow (`.github/workflows/release.yml`).
|
data/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
[](https://bestpractices.coreinfrastructure.org/projects/5861)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
+

|
|
9
|
+
|
|
8
10
|
**`ascli`** is the command-line interface for IBM Aspera products.
|
|
9
11
|
Use it from the terminal or in scripts to:
|
|
10
12
|
|
|
@@ -18,8 +20,8 @@ Choose what best suits you:
|
|
|
18
20
|
|
|
19
21
|
| Resource | Link |
|
|
20
22
|
| -------- | ---- |
|
|
21
|
-
| **Online manual** | [docs/README.md](docs/README.md) |
|
|
22
|
-
| **PDF manual** | In [
|
|
23
|
+
| **Online manual** | [GitHub docs/README.md](https://github.com/IBM/aspera-cli/blob/main/docs/README.md) |
|
|
24
|
+
| **PDF manual** | In [GitHub Releases](https://github.com/IBM/aspera-cli/releases) |
|
|
23
25
|
| **RubyGems** | [rubygems.org/gems/aspera-cli](https://rubygems.org/gems/aspera-cli) |
|
|
24
26
|
| **RubyDoc** | [rubydoc.info/gems/aspera-cli](https://www.rubydoc.info/gems/aspera-cli) |
|
|
25
27
|
| **Docsify** | [online](https://docsify-this.net/?basePath=https://raw.githubusercontent.com/IBM/aspera-cli/main/docs&homepage=README.md&sidebar=true&browser-tab-title=Aspera%20CLI%20Manual&hide-credits=true&maxLevel=4&externalLinkTarget=_blank&image-captions=true&dark-mode=auto) |
|
|
@@ -34,7 +36,7 @@ ascli config transferd install
|
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
The second command installs the **FASP** transfer engine (`ascp`).
|
|
37
|
-
For other install methods (single executable, Docker, Chocolatey, Homebrew), see the [user manual](docs/README.md#installation).
|
|
39
|
+
For other install methods (single executable, Docker, Chocolatey, Homebrew), see the [user manual](https://github.com/IBM/aspera-cli/blob/main/docs/README.md#installation).
|
|
38
40
|
|
|
39
41
|
**Quick check:**
|
|
40
42
|
|
|
@@ -44,13 +46,13 @@ ascli -v
|
|
|
44
46
|
|
|
45
47
|
## Contributing
|
|
46
48
|
|
|
47
|
-
- **Bugs & features:** [BUGS.md](BUGS.md)
|
|
48
|
-
- **How to contribute:** [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
49
|
-
- **Release notes:** [CHANGELOG.md](CHANGELOG.md)
|
|
49
|
+
- **Bugs & features:** [BUGS.md](https://github.com/IBM/aspera-cli/blob/main/BUGS.md)
|
|
50
|
+
- **How to contribute:** [CONTRIBUTING.md](https://github.com/IBM/aspera-cli/blob/main/CONTRIBUTING.md)
|
|
51
|
+
- **Release notes:** [CHANGELOG.md](https://github.com/IBM/aspera-cli/blob/main/CHANGELOG.md)
|
|
50
52
|
|
|
51
53
|
Commands map to Aspera REST APIs; see the manual for options.
|
|
52
54
|
For debugging, use `--log-level=debug`.
|
|
53
55
|
|
|
54
56
|
## License
|
|
55
57
|
|
|
56
|
-
[Apache-2.0](LICENSE)
|
|
58
|
+
[Apache-2.0](https://github.com/IBM/aspera-cli/blob/main/LICENSE)
|
data/lib/aspera/agent/direct.rb
CHANGED
|
@@ -25,25 +25,27 @@ module Aspera
|
|
|
25
25
|
private_constant :LISTEN_LOCAL_ADDRESS, :SELECT_AVAILABLE_PORT
|
|
26
26
|
|
|
27
27
|
# Options: same as values in option `transfer_info`
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# @param
|
|
31
|
-
# @param
|
|
32
|
-
# @param
|
|
33
|
-
# @param client_ssh_key [String] (
|
|
34
|
-
# @param
|
|
28
|
+
# (Args) : Options that influence `ascp` arguments.
|
|
29
|
+
#
|
|
30
|
+
# @param ascp_args [Array] (Args) Optional Additional arguments to ascp
|
|
31
|
+
# @param wss [Boolean] (Args) `true`: if both SSH and wss in ts: prefer wss
|
|
32
|
+
# @param quiet [Boolean] (Args) By default no native `ascp` progress bar
|
|
33
|
+
# @param client_ssh_key [String] (Args) Client SSH key option (from CLIENT_SSH_KEY_OPTIONS)
|
|
34
|
+
# @param trusted_certs [Array<String>] (Args) (WSS) Optional list of files with trusted certificates (stores)
|
|
35
|
+
# @param check_ignore_cb [Proc] (Args) (WSS) Callback with host,port to check if WSS connection shall ignore certificate validity
|
|
35
36
|
# @param spawn_timeout_sec [Integer] Timeout for ascp spawn
|
|
36
37
|
# @param spawn_delay_sec [Integer] Optional delay to start between sessions
|
|
37
38
|
# @param multi_incr_udp [Boolean] Optional `true`: increment UDP port for each session
|
|
38
39
|
# @param resume [Hash] Optional Resume policy
|
|
40
|
+
# @param monitor [Boolean] Set to `false` to eliminate management port
|
|
39
41
|
# @param management_cb [Proc] callback for management events
|
|
40
42
|
# @param base_options [Hash] other options for base class
|
|
41
43
|
def initialize(
|
|
42
44
|
ascp_args: nil,
|
|
43
45
|
wss: true,
|
|
44
46
|
quiet: true,
|
|
45
|
-
trusted_certs: nil,
|
|
46
47
|
client_ssh_key: nil,
|
|
48
|
+
trusted_certs: nil,
|
|
47
49
|
check_ignore_cb: nil,
|
|
48
50
|
spawn_timeout_sec: 2,
|
|
49
51
|
spawn_delay_sec: 2,
|
data/lib/aspera/agent/factory.rb
CHANGED
|
@@ -22,11 +22,11 @@ module Aspera
|
|
|
22
22
|
Dir.children(File.dirname(File.expand_path(__FILE__)))
|
|
23
23
|
.select{ |file| file.end_with?(Environment::RB_EXT)}
|
|
24
24
|
.map{ |file| File.basename(file, Environment::RB_EXT).to_sym}
|
|
25
|
-
.reject{ |item| IGNORED_ITEMS.include?(item)}.
|
|
26
|
-
|
|
25
|
+
.reject{ |item| IGNORED_ITEMS.include?(item)}.to_h do |agent_sym|
|
|
26
|
+
[agent_sym, {
|
|
27
27
|
long: agent_sym.to_s.capitalize,
|
|
28
28
|
short: agent_sym.eql?(:direct) ? :a : agent_sym.to_s[0].to_sym
|
|
29
|
-
}.freeze
|
|
29
|
+
}.freeze]
|
|
30
30
|
end.freeze
|
|
31
31
|
private_constant :IGNORED_ITEMS
|
|
32
32
|
end
|
data/lib/aspera/agent/node.rb
CHANGED
|
@@ -59,7 +59,7 @@ module Aspera
|
|
|
59
59
|
ts_tags = transfer_spec['tags']
|
|
60
60
|
ts_tags[Transfer::Spec::TAG_RESERVED]['xfer_retry'] ||= 150 if ts_tags.is_a?(Hash) && ts_tags[Transfer::Spec::TAG_RESERVED].is_a?(Hash)
|
|
61
61
|
# Optimization in case of sending to the same node
|
|
62
|
-
# TODO: probably remove this, as /etc/hosts shall be used for that
|
|
62
|
+
# TODO: probably remove this, as /etc/hosts shall be used for that on server side.
|
|
63
63
|
transfer_spec['remote_host'] = '127.0.0.1' if !transfer_spec['wss_enabled'] && transfer_spec['remote_host'].eql?(URI.parse(node_api_.base_url).host)
|
|
64
64
|
resp = node_api_.create('ops/transfers', transfer_spec)
|
|
65
65
|
@transfer_id = resp['id']
|
data/lib/aspera/api/alee.rb
CHANGED
data/lib/aspera/api/aoc.rb
CHANGED
|
@@ -7,11 +7,15 @@ require 'aspera/hash_ext'
|
|
|
7
7
|
require 'aspera/data_repository'
|
|
8
8
|
require 'aspera/transfer/spec'
|
|
9
9
|
require 'aspera/api/node'
|
|
10
|
+
require 'aspera/rest_list'
|
|
10
11
|
require 'base64'
|
|
11
12
|
|
|
12
13
|
module Aspera
|
|
13
14
|
module Api
|
|
15
|
+
# Aspera on Cloud API client
|
|
14
16
|
class AoC < Rest
|
|
17
|
+
include RestList
|
|
18
|
+
|
|
15
19
|
PRODUCT_NAME = 'Aspera on Cloud'
|
|
16
20
|
# use default workspace if it is set, else none
|
|
17
21
|
DEFAULT_WORKSPACE = ''
|
|
@@ -144,7 +148,7 @@ module Aspera
|
|
|
144
148
|
|
|
145
149
|
# Call `block` with same query using paging and response information.
|
|
146
150
|
# Block must return a 2 element `Array` with data and http response
|
|
147
|
-
# @param query [Hash]
|
|
151
|
+
# @param query [Hash] Additional query parameters
|
|
148
152
|
# @return [Hash] Items and total number of items
|
|
149
153
|
# @option return [Array<Hash>] :items The list of items
|
|
150
154
|
# @option return [Integer] :total The total number of items
|
|
@@ -209,7 +213,7 @@ module Aspera
|
|
|
209
213
|
when 'upload' then %w[mkdir write]
|
|
210
214
|
when Array
|
|
211
215
|
Aspera.assert_array_all(levels, String){'access_levels'}
|
|
212
|
-
levels.each{ |level| Aspera.
|
|
216
|
+
levels.each{ |level| Aspera.assert_values(level, Node::ACCESS_LEVELS){'access_level'}}
|
|
213
217
|
levels
|
|
214
218
|
else Aspera.error_unexpected_value(levels){"access_levels must be a list of #{Node::ACCESS_LEVELS.join(', ')} or one of edit, preview, download, upload"}
|
|
215
219
|
end
|
|
@@ -492,7 +496,7 @@ module Aspera
|
|
|
492
496
|
# in that case, the name is resolved and replaced with {type: , id: }
|
|
493
497
|
# @param package_data [Hash] The whole package creation payload
|
|
494
498
|
# @param rcpt_lst_field [String] The field in structure, i.e. recipients or bcc_recipients
|
|
495
|
-
# @param new_user_option [Hash]
|
|
499
|
+
# @param new_user_option [Hash] Additional fields for contact creation
|
|
496
500
|
# @return nil, `package_data` is modified
|
|
497
501
|
def resolve_package_recipients(package_data, rcpt_lst_field, new_user_option)
|
|
498
502
|
return unless package_data.key?(rcpt_lst_field)
|
|
@@ -510,7 +514,7 @@ module Aspera
|
|
|
510
514
|
# email: user, else dropbox
|
|
511
515
|
entity_type = short_recipient_info.include?('@') ? 'contacts' : 'dropboxes'
|
|
512
516
|
begin
|
|
513
|
-
full_recipient_info = lookup_by_name(entity_type, short_recipient_info, query: {'
|
|
517
|
+
full_recipient_info = lookup_by_name(entity_type, short_recipient_info, query: {'workspace_id' => ws_id})
|
|
514
518
|
rescue EntityNotFound
|
|
515
519
|
# dropboxes cannot be created on the fly
|
|
516
520
|
Aspera.assert_values(entity_type, 'contacts', type: Error){"No such shared inbox in workspace #{ws_id}"}
|
data/lib/aspera/api/ats.rb
CHANGED
data/lib/aspera/api/cos_node.rb
CHANGED
data/lib/aspera/api/faspex.rb
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
require 'aspera/rest'
|
|
4
4
|
require 'aspera/oauth/base'
|
|
5
|
+
require 'aspera/rest_list'
|
|
5
6
|
require 'digest'
|
|
6
7
|
|
|
7
8
|
module Aspera
|
|
8
|
-
#
|
|
9
|
+
# OAuth for Faspex public link
|
|
9
10
|
class FaspexPubLink < OAuth::Base
|
|
10
11
|
class << self
|
|
11
12
|
attr_accessor :additional_info
|
|
@@ -55,7 +56,10 @@ module Aspera
|
|
|
55
56
|
end
|
|
56
57
|
OAuth::Factory.instance.register_token_creator(FaspexPubLink)
|
|
57
58
|
module Api
|
|
59
|
+
# Aspera Faspex 5 API Client
|
|
58
60
|
class Faspex < Aspera::Rest
|
|
61
|
+
include RestList
|
|
62
|
+
|
|
59
63
|
# endpoint for authentication API
|
|
60
64
|
PATH_AUTH = 'auth'
|
|
61
65
|
PATH_API_V5 = 'api/v5'
|
data/lib/aspera/api/httpgw.rb
CHANGED
|
@@ -4,6 +4,7 @@ require 'aspera/log'
|
|
|
4
4
|
require 'aspera/rest'
|
|
5
5
|
require 'aspera/transfer/faux_file'
|
|
6
6
|
require 'aspera/assert'
|
|
7
|
+
require 'net/protocol'
|
|
7
8
|
require 'securerandom'
|
|
8
9
|
require 'websocket'
|
|
9
10
|
require 'base64'
|
|
@@ -11,6 +12,7 @@ require 'json'
|
|
|
11
12
|
|
|
12
13
|
module Aspera
|
|
13
14
|
module Api
|
|
15
|
+
# Aspera HTTP Gateway API client
|
|
14
16
|
# Start a transfer using Aspera HTTP Gateway, using web socket secure for uploads
|
|
15
17
|
# ref: https://api.ibm.com/explorer/catalog/aspera/product/ibm-aspera/api/http-gateway-api/doc/guides-toc
|
|
16
18
|
# https://developer.ibm.com/apis/catalog?search=%22aspera%20http%22
|
data/lib/aspera/api/node.rb
CHANGED
|
@@ -14,7 +14,8 @@ require 'net/ssh/buffer'
|
|
|
14
14
|
|
|
15
15
|
module Aspera
|
|
16
16
|
module Api
|
|
17
|
-
#
|
|
17
|
+
# Aspera Node API client
|
|
18
|
+
# with gen4 extensions (access keys)
|
|
18
19
|
class Node < Rest
|
|
19
20
|
# Format of node scope : node.<access key>:<scope>
|
|
20
21
|
module Scope
|
|
@@ -508,7 +509,7 @@ module Aspera
|
|
|
508
509
|
# Get the transfer user from info on access key
|
|
509
510
|
transfer_spec['remote_user'] = info['transfer_user'] if info['transfer_user']
|
|
510
511
|
# Get settings from name.value array to hash key.value
|
|
511
|
-
settings = info['settings']&.
|
|
512
|
+
settings = info['settings']&.to_h{ |i| [i['name'], i['value']]}
|
|
512
513
|
# Check WSS ports
|
|
513
514
|
Transfer::Spec::WSS_FIELDS.each do |i|
|
|
514
515
|
transfer_spec[i] = settings[i] if settings.key?(i)
|
|
@@ -83,16 +83,15 @@ module Aspera
|
|
|
83
83
|
|
|
84
84
|
# @return [Hash] with key = file name (String), and value = path to file
|
|
85
85
|
def file_paths
|
|
86
|
-
return SDK_FILES.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
end
|
|
86
|
+
return SDK_FILES.to_h do |v|
|
|
87
|
+
[v.to_s, begin
|
|
88
|
+
path(v)
|
|
89
|
+
rescue Errno::ENOENT => e
|
|
90
|
+
e.message.gsub(/.*assertion failed: /, '').gsub(/\): .*/, ')')
|
|
91
|
+
rescue => e
|
|
92
|
+
e.message
|
|
93
|
+
end]
|
|
94
|
+
end
|
|
96
95
|
end
|
|
97
96
|
|
|
98
97
|
# TODO: if using another product than SDK, should use files from there
|
data/lib/aspera/cli/error.rb
CHANGED
|
@@ -9,7 +9,15 @@ module Aspera
|
|
|
9
9
|
class MissingArgument < Error; end
|
|
10
10
|
class NoSuchElement < Error; end
|
|
11
11
|
|
|
12
|
+
# Raised when a lookup for a specific entity fails to return exactly one result.
|
|
13
|
+
#
|
|
14
|
+
# Provides a formatted message indicating whether the entity was missing
|
|
15
|
+
# or if multiple matches were found (ambiguity).
|
|
12
16
|
class BadIdentifier < Error
|
|
17
|
+
# @param res_type [String] The type of entity being looked up (e.g., 'user').
|
|
18
|
+
# @param res_id [String] The value of the identifier that failed.
|
|
19
|
+
# @param field [String] The name of the field used for lookup (defaults to 'identifier').
|
|
20
|
+
# @param count [Integer] The number of matches found (0 for not found, >1 for ambiguous).
|
|
13
21
|
def initialize(res_type, res_id, field: 'identifier', count: 0)
|
|
14
22
|
msg = count.eql?(0) ? 'not found' : "found #{count}"
|
|
15
23
|
super("#{res_type} with #{field}=#{res_id}: #{msg}")
|
data/lib/aspera/cli/info.rb
CHANGED
|
@@ -7,7 +7,8 @@ module Aspera
|
|
|
7
7
|
CMD_NAME = 'ascli'
|
|
8
8
|
# Name of the containing gem, same as in <gem name>.gemspec
|
|
9
9
|
GEM_NAME = 'aspera-cli'
|
|
10
|
-
DOC_URL =
|
|
10
|
+
DOC_URL = 'https://ibm.biz/ascli-doc'
|
|
11
|
+
RUBYDOC_URL = "https://www.rubydoc.info/gems/#{GEM_NAME}"
|
|
11
12
|
GEM_URL = "https://rubygems.org/gems/#{GEM_NAME}"
|
|
12
13
|
SRC_URL = 'https://github.com/IBM/aspera-cli'
|
|
13
14
|
CONTAINER = 'docker.io/martinlaurent/ascli'
|