aspera-cli 4.22.0 → 4.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +405 -364
- data/CONTRIBUTING.md +86 -29
- data/README.md +1856 -961
- data/bin/ascli +2 -1
- data/bin/asession +4 -4
- data/lib/aspera/agent/base.rb +4 -0
- data/lib/aspera/agent/connect.rb +20 -18
- data/lib/aspera/agent/desktop.rb +14 -11
- data/lib/aspera/agent/direct.rb +39 -31
- data/lib/aspera/agent/httpgw.rb +2 -2
- data/lib/aspera/agent/node.rb +9 -11
- data/lib/aspera/agent/transferd.rb +18 -11
- data/lib/aspera/api/aoc.rb +53 -43
- data/lib/aspera/api/cos_node.rb +7 -5
- data/lib/aspera/api/httpgw.rb +23 -22
- data/lib/aspera/api/node.rb +104 -22
- data/lib/aspera/ascmd.rb +35 -21
- data/lib/aspera/ascp/installation.rb +43 -43
- data/lib/aspera/ascp/management.rb +5 -4
- data/lib/aspera/assert.rb +55 -24
- data/lib/aspera/cli/basic_auth_plugin.rb +8 -7
- data/lib/aspera/cli/error.rb +1 -1
- data/lib/aspera/cli/extended_value.rb +28 -29
- data/lib/aspera/cli/formatter.rb +191 -168
- data/lib/aspera/cli/hints.rb +38 -4
- data/lib/aspera/cli/main.rb +139 -108
- data/lib/aspera/cli/manager.rb +51 -31
- data/lib/aspera/cli/plugin.rb +149 -78
- data/lib/aspera/cli/plugin_factory.rb +2 -2
- data/lib/aspera/cli/plugins/aoc.rb +217 -88
- data/lib/aspera/cli/plugins/ats.rb +15 -13
- data/lib/aspera/cli/plugins/config.rb +105 -227
- data/lib/aspera/cli/plugins/console.rb +49 -18
- data/lib/aspera/cli/plugins/cos.rb +4 -4
- data/lib/aspera/cli/plugins/faspex.rb +45 -51
- data/lib/aspera/cli/plugins/faspex5.rb +162 -163
- data/lib/aspera/cli/plugins/faspio.rb +6 -5
- data/lib/aspera/cli/plugins/httpgw.rb +2 -2
- data/lib/aspera/cli/plugins/node.rb +233 -247
- data/lib/aspera/cli/plugins/orchestrator.rb +10 -14
- data/lib/aspera/cli/plugins/preview.rb +26 -29
- data/lib/aspera/cli/plugins/server.rb +29 -28
- data/lib/aspera/cli/plugins/shares.rb +40 -28
- data/lib/aspera/cli/sync_actions.rb +101 -80
- data/lib/aspera/cli/transfer_agent.rb +55 -58
- data/lib/aspera/cli/transfer_progress.rb +29 -20
- data/lib/aspera/cli/version.rb +1 -1
- data/lib/aspera/cli/wizard.rb +160 -0
- data/lib/aspera/colors.rb +13 -8
- data/lib/aspera/command_line_builder.rb +28 -22
- data/lib/aspera/command_line_converter.rb +31 -0
- data/lib/aspera/data_repository.rb +1 -0
- data/lib/aspera/environment.rb +144 -100
- data/lib/aspera/faspex_gw.rb +1 -1
- data/lib/aspera/faspex_postproc.rb +3 -2
- data/lib/aspera/hash_ext.rb +1 -1
- data/lib/aspera/id_generator.rb +10 -10
- data/lib/aspera/keychain/base.rb +18 -0
- data/lib/aspera/keychain/encrypted_hash.rb +6 -12
- data/lib/aspera/keychain/factory.rb +9 -3
- data/lib/aspera/keychain/hashicorp_vault.rb +9 -6
- data/lib/aspera/keychain/macos_security.rb +13 -13
- data/lib/aspera/log.rb +70 -20
- data/lib/aspera/nagios.rb +5 -6
- data/lib/aspera/node_simulator.rb +12 -7
- data/lib/aspera/oauth/base.rb +6 -2
- data/lib/aspera/oauth/factory.rb +25 -18
- data/lib/aspera/oauth/jwt.rb +13 -1
- data/lib/aspera/oauth/url_json.rb +3 -3
- data/lib/aspera/oauth/web.rb +5 -3
- data/lib/aspera/persistency_folder.rb +2 -2
- data/lib/aspera/preview/file_types.rb +43 -35
- data/lib/aspera/preview/generator.rb +26 -13
- data/lib/aspera/preview/terminal.rb +10 -7
- data/lib/aspera/preview/utils.rb +11 -9
- data/lib/aspera/products/connect.rb +2 -1
- data/lib/aspera/products/desktop.rb +1 -1
- data/lib/aspera/products/other.rb +2 -2
- data/lib/aspera/products/transferd.rb +8 -6
- data/lib/aspera/proxy_auto_config.rb +1 -1
- data/lib/aspera/rest.rb +46 -28
- data/lib/aspera/rest_call_error.rb +1 -1
- data/lib/aspera/rest_error_analyzer.rb +1 -0
- data/lib/aspera/resumer.rb +1 -1
- data/lib/aspera/secret_hider.rb +46 -40
- data/lib/aspera/ssh.rb +14 -4
- data/lib/aspera/sync/args.schema.yaml +102 -0
- data/lib/aspera/sync/conf.schema.yaml +701 -0
- data/lib/aspera/sync/database.rb +83 -0
- data/lib/aspera/{transfer/sync.rb → sync/operations.rb} +145 -68
- data/lib/aspera/temp_file_manager.rb +4 -2
- data/lib/aspera/timer_limiter.rb +7 -5
- data/lib/aspera/transfer/error.rb +1 -1
- data/lib/aspera/transfer/error_info.rb +1 -2
- data/lib/aspera/transfer/faux_file.rb +11 -10
- data/lib/aspera/transfer/parameters.rb +6 -5
- data/lib/aspera/transfer/spec.rb +15 -1
- data/lib/aspera/transfer/spec.schema.yaml +316 -293
- data/lib/aspera/transfer/spec_doc.rb +34 -16
- data/lib/aspera/transfer/uri.rb +5 -5
- data/lib/aspera/uri_reader.rb +14 -10
- data/lib/aspera/web_auth.rb +2 -2
- data/lib/aspera/web_server_simple.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +15 -15
- metadata.gz.sig +0 -0
- data/examples/dascli +0 -30
- data/examples/get_proto_file.rb +0 -8
- data/examples/proxy.pac +0 -60
- data/lib/aspera/transfer/convert.rb +0 -29
- data/lib/aspera/transfer/sync_instance.schema.yaml +0 -13
- data/lib/aspera/transfer/sync_session.schema.yaml +0 -79
@@ -12,51 +12,69 @@ module Aspera
|
|
12
12
|
agent_sym.to_sym.eql?(:direct) ? :a : agent_sym.to_s[0].to_sym
|
13
13
|
end
|
14
14
|
|
15
|
-
# @
|
16
|
-
# @
|
17
|
-
# @return a table suitable to display in manual
|
18
|
-
def man_table(formatter,
|
15
|
+
# @param formatter [Cli::Formatter] Formatter to use, methods: special_format, check_row
|
16
|
+
# @param include_option [Boolean] true : include CLI options
|
17
|
+
# @return [Array] a table suitable to display in manual
|
18
|
+
def man_table(formatter, include_option: false, agent_columns: true)
|
19
19
|
col_local = agent_to_short(:direct)
|
20
|
-
|
20
|
+
cols = agent_columns ? %i[name type] + AGENT_LIST.map(&:last) + %i[description] : %i[name type description]
|
21
|
+
rows = Spec::SCHEMA['properties'].filter_map do |name, properties|
|
21
22
|
# manual table
|
22
23
|
columns = {
|
23
24
|
name: name,
|
24
25
|
type: properties['type'],
|
25
26
|
description: []
|
26
27
|
}
|
27
|
-
# replace "back solidus" HTML entity with its text value
|
28
|
-
|
28
|
+
# replace "back solidus" HTML entity with its text value
|
29
|
+
#
|
30
|
+
# split lines
|
31
|
+
columns[:description] =
|
32
|
+
properties['description']
|
33
|
+
.gsub('\', '\\')
|
34
|
+
.gsub(/`([a-z0-9_.+-]+)`/){formatter.keyword_highlight(Regexp.last_match(1))}
|
35
|
+
.split("\n") if properties.key?('description')
|
29
36
|
columns[:description].unshift("DEPRECATED: #{properties['x-deprecation']}") if properties.key?('x-deprecation')
|
30
37
|
# add flags for supported agents in doc
|
38
|
+
agents = []
|
31
39
|
AGENT_LIST.each do |agent_info|
|
32
|
-
|
40
|
+
agents.push(agent_info.last) if properties['x-agents'].nil? || properties['x-agents'].include?(agent_info.first.to_s)
|
41
|
+
end
|
42
|
+
agents.push(col_local) if properties['x-cli-option'] && !agents.include?(col_local)
|
43
|
+
if agent_columns
|
44
|
+
AGENT_LIST.each do |agent_info|
|
45
|
+
columns[agent_info.last] = formatter.tick(agents.include?(agent_info.last))
|
46
|
+
end
|
47
|
+
else
|
48
|
+
columns[:description].push("(#{agents.map(&:upcase).join(', ')})") unless agents.length.eql?(AGENT_LIST.length)
|
33
49
|
end
|
34
|
-
columns[col_local] = Cli::Formatter.tick(true) if properties['x-cli-option']
|
35
50
|
# only keep lines that are usable in supported agents
|
36
|
-
next false if
|
37
|
-
columns[:description].push("Allowed values: #{properties['enum'].join(', ')}") if properties.key?('enum')
|
51
|
+
next false if agents.empty?
|
52
|
+
columns[:description].push("Allowed values: #{properties['enum'].map{ |v| formatter.keyword_highlight(v)}.join(', ')}") if properties.key?('enum')
|
53
|
+
envvar = ''
|
38
54
|
cli_option =
|
39
|
-
if properties
|
55
|
+
if properties.key?('x-cli-envvar')
|
56
|
+
envvar = 'env:'
|
57
|
+
properties['x-cli-envvar']
|
58
|
+
elsif properties['x-cli-switch']
|
40
59
|
properties['x-cli-option']
|
41
60
|
elsif properties['x-cli-special']
|
42
|
-
|
61
|
+
''
|
43
62
|
elsif properties['x-cli-option']
|
44
63
|
arg_type = properties.key?('enum') ? '{enum}' : "{#{[properties['type']].flatten.join('|')}}"
|
45
64
|
conversion_tag = properties.key?('x-cli-convert') ? '(conversion)' : ''
|
46
65
|
sep = properties['x-cli-option'].start_with?('--') ? '=' : ' '
|
47
66
|
"#{properties['x-cli-option']}#{sep}#{conversion_tag}#{arg_type}"
|
48
67
|
end
|
49
|
-
cli_option
|
50
|
-
columns[:description].push("(#{cli_option})") if cli && !cli_option.to_s.empty?
|
68
|
+
columns[:description].push("(#{envvar}#{formatter.keyword_highlight(cli_option)})") if include_option && !cli_option.to_s.empty?
|
51
69
|
formatter.check_row(columns)
|
52
70
|
end.sort_by{ |i| i[:name]}
|
71
|
+
[cols, rows]
|
53
72
|
end
|
54
73
|
end
|
55
74
|
# Agents shown in manual for parameters (sub list)
|
56
75
|
AGENT_LIST = Agent::Base.agent_list.map do |agent_sym|
|
57
76
|
[agent_sym, agent_sym.to_s.capitalize, agent_to_short(agent_sym)]
|
58
77
|
end.sort_by(&:last).freeze
|
59
|
-
TABLE_COLUMNS = (%i[name type] + AGENT_LIST.map(&:last) + %i[description]).freeze
|
60
78
|
end
|
61
79
|
end
|
62
80
|
end
|
data/lib/aspera/transfer/uri.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
require 'aspera/log'
|
6
6
|
require 'aspera/rest'
|
7
|
-
require 'aspera/
|
7
|
+
require 'aspera/command_line_converter'
|
8
8
|
|
9
9
|
module Aspera
|
10
10
|
module Transfer
|
@@ -39,10 +39,10 @@ module Aspera
|
|
39
39
|
when 'bwcap' then result_ts['target_rate_cap_kbps'] = value.to_i
|
40
40
|
when 'enc' then result_ts['cipher'] = value.gsub(/^aes/, 'aes-').gsub(/cfb$/, '-cfb').gsub(/gcm$/, '-gcm').gsub('--', '-')
|
41
41
|
when 'tags64' then result_ts['tags'] = JSON.parse(Base64.strict_decode64(value))
|
42
|
-
when 'createpath' then result_ts['create_dir'] =
|
43
|
-
when 'fallback' then result_ts['http_fallback'] =
|
44
|
-
when 'lockpolicy' then result_ts['lock_rate_policy'] =
|
45
|
-
when 'lockminrate' then result_ts['lock_min_rate'] =
|
42
|
+
when 'createpath' then result_ts['create_dir'] = CommandLineConverter.yes_to_true(value)
|
43
|
+
when 'fallback' then result_ts['http_fallback'] = CommandLineConverter.yes_to_true(value)
|
44
|
+
when 'lockpolicy' then result_ts['lock_rate_policy'] = CommandLineConverter.yes_to_true(value)
|
45
|
+
when 'lockminrate' then result_ts['lock_min_rate'] = CommandLineConverter.yes_to_true(value)
|
46
46
|
when 'auth' then Log.log.debug{"ignoring #{name}=#{value}"} # Not used (yes/no)
|
47
47
|
when 'v' then Log.log.debug{"ignoring #{name}=#{value}"} # rubocop:disable Lint/DuplicateBranch -- Not used (shall be 2)
|
48
48
|
when 'protect' then Log.log.debug{"ignoring #{name}=#{value}"} # rubocop:disable Lint/DuplicateBranch -- TODO: what is this ?
|
data/lib/aspera/uri_reader.rb
CHANGED
@@ -6,33 +6,37 @@ require 'aspera/rest'
|
|
6
6
|
require 'aspera/temp_file_manager'
|
7
7
|
|
8
8
|
module Aspera
|
9
|
-
#
|
9
|
+
# Read some content from some URI, support file: , http: and https: schemes
|
10
10
|
module UriReader
|
11
|
-
|
12
|
-
|
11
|
+
SCHEME_FILE = 'file'
|
12
|
+
SCHEME_FILE_PFX1 = "#{SCHEME_FILE}:"
|
13
|
+
SCHEME_FILE_PFX2 = "#{SCHEME_FILE_PFX1}///"
|
14
|
+
private_constant :SCHEME_FILE, :SCHEME_FILE_PFX1, :SCHEME_FILE_PFX2
|
13
15
|
class << self
|
14
|
-
#
|
16
|
+
# Read some content from some URI, support file: , http: and https: schemes
|
15
17
|
def read(uri_to_read)
|
16
18
|
uri = URI.parse(uri_to_read)
|
17
19
|
case uri.scheme
|
18
20
|
when 'http', 'https'
|
19
21
|
return Rest.new(base_url: uri_to_read, redirect_max: 5).call(operation: 'GET', headers: {'Accept' => '*/*'})[:data]
|
20
|
-
when
|
22
|
+
when SCHEME_FILE, NilClass
|
21
23
|
local_file_path = uri.path
|
22
|
-
raise 'URL shall have a path, check syntax' if local_file_path.nil?
|
24
|
+
raise Error, 'URL shall have a path, check syntax' if local_file_path.nil?
|
23
25
|
local_file_path = File.expand_path(local_file_path.gsub(%r{^/}, '')) if %r{^/(~|.|..)/}.match?(local_file_path)
|
24
26
|
return File.read(local_file_path)
|
25
27
|
else Aspera.error_unexpected_value(uri.scheme){"scheme for [#{uri_to_read}]"}
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
29
|
-
# @return
|
31
|
+
# @return Path to file with content at URL
|
30
32
|
def read_as_file(url)
|
31
|
-
if url.start_with?(
|
33
|
+
if url.start_with?(SCHEME_FILE_PFX1)
|
34
|
+
# for file scheme, return directly the path
|
32
35
|
# require specific file scheme: the path part is "relative", or absolute if there are 4 slash
|
33
|
-
raise "use format: #{
|
34
|
-
return File.expand_path(url[
|
36
|
+
raise "use format: #{SCHEME_FILE_PFX2}<path>" unless url.start_with?(SCHEME_FILE_PFX2)
|
37
|
+
return File.expand_path(url[SCHEME_FILE_PFX2.length..-1])
|
35
38
|
else
|
39
|
+
# download to temp file
|
36
40
|
# autodelete on exit
|
37
41
|
sdk_archive_path = TempFileManager.instance.new_file_path_global(suffix: File.basename(url))
|
38
42
|
Aspera::Rest.new(base_url: url, redirect_max: 3).call(operation: 'GET', save_to_file: sdk_archive_path)
|
data/lib/aspera/web_auth.rb
CHANGED
@@ -16,7 +16,7 @@ module Aspera
|
|
16
16
|
|
17
17
|
def service(request, response)
|
18
18
|
Log.log.debug{"received request from browser #{request.request_method} #{request.path}"}
|
19
|
-
Aspera.assert_values(request.request_method, ['GET'],
|
19
|
+
Aspera.assert_values(request.request_method, ['GET'], type: WEBrick::HTTPStatus::MethodNotAllowed){'HTTP verb'}
|
20
20
|
additionnal_info = @web_auth.signal_request(request)
|
21
21
|
response.status = 200
|
22
22
|
response.content_type = 'text/html'
|
@@ -161,7 +161,7 @@ module Aspera
|
|
161
161
|
</html>
|
162
162
|
HTML
|
163
163
|
|
164
|
-
return
|
164
|
+
return
|
165
165
|
end
|
166
166
|
end
|
167
167
|
|
@@ -72,7 +72,7 @@ module Aspera
|
|
72
72
|
elsif cert && PKCS12_EXT.include?(File.extname(cert).downcase)
|
73
73
|
# PKCS12
|
74
74
|
Log.log.debug('Using PKCS12 certificate')
|
75
|
-
raise 'PKCS12 requires a key (password)' if key.nil?
|
75
|
+
raise Error, 'PKCS12 requires a key (password)' if key.nil?
|
76
76
|
pkcs12 = OpenSSL::PKCS12.new(File.read(cert), key)
|
77
77
|
webrick_options[:SSLCertificate] = pkcs12.certificate
|
78
78
|
webrick_options[:SSLPrivateKey] = pkcs12.key
|
@@ -90,7 +90,7 @@ module Aspera
|
|
90
90
|
OpenSSL::X509::Certificate.new(File.read(cert))
|
91
91
|
end
|
92
92
|
webrick_options[:SSLExtraChainCert] = read_chain_file(chain) unless chain.nil?
|
93
|
-
raise 'key and cert do not match' unless webrick_options[:SSLCertificate].public_key.to_der == webrick_options[:SSLPrivateKey].public_key.to_der
|
93
|
+
raise Error, 'key and cert do not match' unless webrick_options[:SSLCertificate].public_key.to_der == webrick_options[:SSLPrivateKey].public_key.to_der
|
94
94
|
end
|
95
95
|
end
|
96
96
|
# call constructor of parent class, but capture STDERR
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspera-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laurent Martin
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
eTf9kxhVM40wGQOECVNA8UsEEZHD48eF+csUYZtAJOF5oxTI8UyV9T/o6CgO0c9/
|
38
38
|
Gzz+Qm5ULOUcPiJLjSpaiTrkiIVYiDGnqNSr6R1Hb1c=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2025-
|
40
|
+
date: 2025-09-30 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: blankslate
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '3.0'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
97
|
+
version: '3.0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: mime-types
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,28 +157,28 @@ dependencies:
|
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: '
|
160
|
+
version: '3.1'
|
161
161
|
type: :runtime
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: '
|
167
|
+
version: '3.1'
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: terminal-table
|
170
170
|
requirement: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
172
|
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
174
|
+
version: '4.0'
|
175
175
|
type: :runtime
|
176
176
|
prerelease: false
|
177
177
|
version_requirements: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
179
|
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
181
|
+
version: '4.0'
|
182
182
|
- !ruby/object:Gem::Dependency
|
183
183
|
name: tty-spinner
|
184
184
|
requirement: !ruby/object:Gem::Requirement
|
@@ -278,9 +278,6 @@ files:
|
|
278
278
|
- README.md
|
279
279
|
- bin/ascli
|
280
280
|
- bin/asession
|
281
|
-
- examples/dascli
|
282
|
-
- examples/get_proto_file.rb
|
283
|
-
- examples/proxy.pac
|
284
281
|
- lib/aspera/agent/base.rb
|
285
282
|
- lib/aspera/agent/connect.rb
|
286
283
|
- lib/aspera/agent/desktop.rb
|
@@ -328,8 +325,10 @@ files:
|
|
328
325
|
- lib/aspera/cli/transfer_agent.rb
|
329
326
|
- lib/aspera/cli/transfer_progress.rb
|
330
327
|
- lib/aspera/cli/version.rb
|
328
|
+
- lib/aspera/cli/wizard.rb
|
331
329
|
- lib/aspera/colors.rb
|
332
330
|
- lib/aspera/command_line_builder.rb
|
331
|
+
- lib/aspera/command_line_converter.rb
|
333
332
|
- lib/aspera/coverage.rb
|
334
333
|
- lib/aspera/data/1
|
335
334
|
- lib/aspera/data/2
|
@@ -344,6 +343,7 @@ files:
|
|
344
343
|
- lib/aspera/hash_ext.rb
|
345
344
|
- lib/aspera/id_generator.rb
|
346
345
|
- lib/aspera/json_rpc.rb
|
346
|
+
- lib/aspera/keychain/base.rb
|
347
347
|
- lib/aspera/keychain/encrypted_hash.rb
|
348
348
|
- lib/aspera/keychain/factory.rb
|
349
349
|
- lib/aspera/keychain/hashicorp_vault.rb
|
@@ -381,9 +381,12 @@ files:
|
|
381
381
|
- lib/aspera/resumer.rb
|
382
382
|
- lib/aspera/secret_hider.rb
|
383
383
|
- lib/aspera/ssh.rb
|
384
|
+
- lib/aspera/sync/args.schema.yaml
|
385
|
+
- lib/aspera/sync/conf.schema.yaml
|
386
|
+
- lib/aspera/sync/database.rb
|
387
|
+
- lib/aspera/sync/operations.rb
|
384
388
|
- lib/aspera/temp_file_manager.rb
|
385
389
|
- lib/aspera/timer_limiter.rb
|
386
|
-
- lib/aspera/transfer/convert.rb
|
387
390
|
- lib/aspera/transfer/error.rb
|
388
391
|
- lib/aspera/transfer/error_info.rb
|
389
392
|
- lib/aspera/transfer/faux_file.rb
|
@@ -391,9 +394,6 @@ files:
|
|
391
394
|
- lib/aspera/transfer/spec.rb
|
392
395
|
- lib/aspera/transfer/spec.schema.yaml
|
393
396
|
- lib/aspera/transfer/spec_doc.rb
|
394
|
-
- lib/aspera/transfer/sync.rb
|
395
|
-
- lib/aspera/transfer/sync_instance.schema.yaml
|
396
|
-
- lib/aspera/transfer/sync_session.schema.yaml
|
397
397
|
- lib/aspera/transfer/uri.rb
|
398
398
|
- lib/aspera/uri_reader.rb
|
399
399
|
- lib/aspera/web_auth.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/examples/dascli
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
# set env var image to specify another docker image
|
3
|
-
: "${image:=docker.io/martinlaurent/ascli}"
|
4
|
-
# set env var version to specify another image version (default: latest version)
|
5
|
-
: "${version:=latest}"
|
6
|
-
# set env var imgtag to specify a specific image/version
|
7
|
-
: "${imgtag=$image:$version}"
|
8
|
-
# set env var `docker` to podman, to use podman
|
9
|
-
: "${docker:=docker}"
|
10
|
-
# set env var `docker_args` to add options to docker run (then, transform this var into array) # spellcheck disable=SC2086
|
11
|
-
read -a add_dock_args <<< $docker_args
|
12
|
-
# set env var ASCLI_HOME to set the config folder on host
|
13
|
-
: "${ASCLI_HOME:=$HOME/.aspera/ascli}"
|
14
|
-
# main config folder for ascli in container (same value as in `Dockerfile`)
|
15
|
-
ascli_home_container=/home/cliuser/.aspera/ascli
|
16
|
-
if test ! -d "$ASCLI_HOME";then
|
17
|
-
echo "creating folder: $ASCLI_HOME"
|
18
|
-
# create it if necessary to allow mounting the volume in container
|
19
|
-
mkdir -p "$ASCLI_HOME"
|
20
|
-
fi
|
21
|
-
exec $docker run \
|
22
|
-
--rm \
|
23
|
-
--tty \
|
24
|
-
--interactive \
|
25
|
-
--user root \
|
26
|
-
--env ASCLI_HOME="$ascli_home_container" \
|
27
|
-
--volume "$ASCLI_HOME:$ascli_home_container:z" \
|
28
|
-
"${add_dock_args[@]}" \
|
29
|
-
"$imgtag" \
|
30
|
-
"$@"
|
data/examples/get_proto_file.rb
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'aspera/ascp/installation'
|
5
|
-
require 'aspera/cli/transfer_progress'
|
6
|
-
Aspera::RestParameters.instance.progress_bar = Aspera::Cli::TransferProgress.new
|
7
|
-
# Retrieve `transfer.proto` from the web
|
8
|
-
Aspera::Ascp::Installation.instance.install_sdk(folder: ARGV.first, backup: false, with_exe: false){ |name| name.end_with?('.proto') ? '/' : nil}
|
data/examples/proxy.pac
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
/* demo proxy pac for `ascli` */
|
2
|
-
function FindProxyForURL(url, host) {
|
3
|
-
/* Normalize the URL for pattern matching */
|
4
|
-
url = url.toLowerCase();
|
5
|
-
host = host.toLowerCase();
|
6
|
-
|
7
|
-
/* Don't proxy local host names */
|
8
|
-
if (isPlainHostName(host)) {
|
9
|
-
return 'DIRECT';
|
10
|
-
}
|
11
|
-
|
12
|
-
/* Don't proxy local domains */
|
13
|
-
if (dnsDomainIs(host, ".example1.com") || (host == "example1.com")
|
14
|
-
|| dnsDomainIs(host, ".example2.com") || (host == "example2.com")
|
15
|
-
|| dnsDomainIs(host, ".example3.com") || (host == "example3.com")) {
|
16
|
-
return 'DIRECT';
|
17
|
-
}
|
18
|
-
|
19
|
-
/* Don't proxy Windows Update */
|
20
|
-
if ((host == "download.microsoft.com")
|
21
|
-
|| (host == "ntservicepack.microsoft.com")
|
22
|
-
|| (host == "cdm.microsoft.com") || (host == "wustat.windows.com")
|
23
|
-
|| (host == "windowsupdate.microsoft.com")
|
24
|
-
|| (dnsDomainIs(host, ".windowsupdate.microsoft.com"))
|
25
|
-
|| (host == "update.microsoft.com")
|
26
|
-
|| (dnsDomainIs(host, ".update.microsoft.com"))
|
27
|
-
|| (dnsDomainIs(host, ".windowsupdate.com"))) {
|
28
|
-
return 'DIRECT';
|
29
|
-
}
|
30
|
-
|
31
|
-
if (isResolvable(host)) {
|
32
|
-
var hostIP = dnsResolve(host);
|
33
|
-
|
34
|
-
/* Don't proxy private addresses (RFC 3330) */
|
35
|
-
if (isInNet(hostIP, '0.0.0.0', '255.0.0.0')
|
36
|
-
|| isInNet(hostIP, '10.0.0.0', '255.0.0.0')
|
37
|
-
|| isInNet(hostIP, '127.0.0.0', '255.0.0.0')
|
38
|
-
|| isInNet(hostIP, '169.254.0.0', '255.255.0.0')
|
39
|
-
|| isInNet(hostIP, '172.16.0.0', '255.240.0.0')
|
40
|
-
|| isInNet(hostIP, '192.0.2.0', '255.255.255.0')
|
41
|
-
|| isInNet(hostIP, '192.88.99.0', '255.255.255.0')
|
42
|
-
|| isInNet(hostIP, '192.168.0.0', '255.255.0.0')
|
43
|
-
|| isInNet(hostIP, '198.18.0.0', '255.254.0.0')
|
44
|
-
|| isInNet(hostIP, '224.0.0.0', '240.0.0.0')
|
45
|
-
|| isInNet(hostIP, '240.0.0.0', '240.0.0.0')) {
|
46
|
-
return 'DIRECT';
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
if (url.substring(0, 5) == 'http:' || url.substring(0, 6) == 'https:'
|
51
|
-
|| url.substring(0, 4) == 'ftp:') {
|
52
|
-
return 'PROXY proxy.example.com:8080';
|
53
|
-
}
|
54
|
-
|
55
|
-
if (url.substring(0, 4) == 'ssh:') {
|
56
|
-
return 'PROXY proxy.aspera.com:9092';
|
57
|
-
}
|
58
|
-
|
59
|
-
return 'DIRECT';
|
60
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'aspera/assert'
|
4
|
-
module Aspera
|
5
|
-
module Transfer
|
6
|
-
# concertion class for transfert spec values to CLI values (ascp)
|
7
|
-
class Convert
|
8
|
-
class << self
|
9
|
-
# special encoding methods used in YAML (key: convert)
|
10
|
-
def remove_hyphen(value); value.tr('-', ''); end
|
11
|
-
|
12
|
-
# special encoding methods used in YAML (key: convert)
|
13
|
-
def json64(value); Base64.strict_encode64(JSON.generate(value)); end
|
14
|
-
|
15
|
-
# special encoding methods used in YAML (key: convert)
|
16
|
-
def base64(value); Base64.strict_encode64(value); end
|
17
|
-
|
18
|
-
# transform yes/no to true/false
|
19
|
-
def yes_to_true(value)
|
20
|
-
case value
|
21
|
-
when 'yes' then return true
|
22
|
-
when 'no' then return false
|
23
|
-
else Aspera.error_unexpected_value(value){'only: yes or no: '}
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
title: SyncSessionSpec
|
2
|
-
type: object
|
3
|
-
properties:
|
4
|
-
name:
|
5
|
-
type: string
|
6
|
-
local_dir:
|
7
|
-
type: string
|
8
|
-
remote_dir:
|
9
|
-
type: string
|
10
|
-
local_db_dir:
|
11
|
-
type: string
|
12
|
-
remote_db_dir:
|
13
|
-
type: string
|
14
|
-
host:
|
15
|
-
type: string
|
16
|
-
x-tspec: remote_host
|
17
|
-
user:
|
18
|
-
type: string
|
19
|
-
x-tspec: remote_user
|
20
|
-
private_key_paths:
|
21
|
-
type: array
|
22
|
-
x-cli-option: "--private-key-path"
|
23
|
-
direction:
|
24
|
-
type: string
|
25
|
-
checksum:
|
26
|
-
type: string
|
27
|
-
tags:
|
28
|
-
type: object
|
29
|
-
x-cli-option: "--tags64"
|
30
|
-
x-cli-convert: json64
|
31
|
-
x-tspec: true
|
32
|
-
tcp_port:
|
33
|
-
type: integer
|
34
|
-
x-tspec: ssh_port
|
35
|
-
rate_policy:
|
36
|
-
type: string
|
37
|
-
target_rate:
|
38
|
-
type: string
|
39
|
-
cooloff:
|
40
|
-
type: integer
|
41
|
-
pending_max:
|
42
|
-
type: integer
|
43
|
-
scan_intensity:
|
44
|
-
type: string
|
45
|
-
cipher:
|
46
|
-
type: string
|
47
|
-
x-cli-convert: remove_hyphen
|
48
|
-
x-tspec: true
|
49
|
-
transfer_threads:
|
50
|
-
type: integer
|
51
|
-
preserve_time:
|
52
|
-
x-cli-switch: true
|
53
|
-
x-tspec: preserve_times
|
54
|
-
preserve_access_time:
|
55
|
-
x-cli-switch: true
|
56
|
-
preserve_modification_time:
|
57
|
-
x-cli-switch: true
|
58
|
-
preserve_uid:
|
59
|
-
x-cli-switch: true
|
60
|
-
x-tspec: preserve_file_owner_uid
|
61
|
-
preserve_gid:
|
62
|
-
x-cli-switch: true
|
63
|
-
x-tspec: preserve_file_owner_gid
|
64
|
-
create_dir:
|
65
|
-
x-cli-switch: true
|
66
|
-
x-tspec: true
|
67
|
-
reset:
|
68
|
-
x-cli-switch: true
|
69
|
-
remote_password:
|
70
|
-
x-cli-envvar: ASPERA_SCP_PASS
|
71
|
-
x-tspec: true
|
72
|
-
cookie:
|
73
|
-
x-cli-envvar: ASPERA_SCP_COOKIE
|
74
|
-
x-tspec: true
|
75
|
-
token:
|
76
|
-
x-cli-envvar: ASPERA_SCP_TOKEN
|
77
|
-
x-tspec: true
|
78
|
-
license:
|
79
|
-
x-cli-envvar: ASPERA_SCP_LICENSE
|