aspera-cli 4.5.0 → 4.8.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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +1 -0
  3. data/README.md +1894 -1574
  4. data/bin/ascli +21 -1
  5. data/bin/asession +38 -34
  6. data/docs/test_env.conf +14 -3
  7. data/examples/aoc.rb +17 -15
  8. data/examples/dascli +26 -0
  9. data/examples/faspex4.rb +42 -35
  10. data/examples/proxy.pac +1 -1
  11. data/examples/transfer.rb +38 -37
  12. data/lib/aspera/aoc.rb +245 -205
  13. data/lib/aspera/ascmd.rb +111 -90
  14. data/lib/aspera/ats_api.rb +16 -14
  15. data/lib/aspera/cli/basic_auth_plugin.rb +19 -18
  16. data/lib/aspera/cli/extended_value.rb +50 -39
  17. data/lib/aspera/cli/formater.rb +161 -135
  18. data/lib/aspera/cli/info.rb +18 -0
  19. data/lib/aspera/cli/listener/line_dump.rb +4 -2
  20. data/lib/aspera/cli/listener/logger.rb +3 -1
  21. data/lib/aspera/cli/listener/progress.rb +20 -21
  22. data/lib/aspera/cli/listener/progress_multi.rb +29 -31
  23. data/lib/aspera/cli/main.rb +194 -183
  24. data/lib/aspera/cli/manager.rb +213 -206
  25. data/lib/aspera/cli/plugin.rb +71 -49
  26. data/lib/aspera/cli/plugins/alee.rb +8 -7
  27. data/lib/aspera/cli/plugins/aoc.rb +675 -558
  28. data/lib/aspera/cli/plugins/ats.rb +116 -109
  29. data/lib/aspera/cli/plugins/bss.rb +35 -34
  30. data/lib/aspera/cli/plugins/config.rb +722 -542
  31. data/lib/aspera/cli/plugins/console.rb +28 -22
  32. data/lib/aspera/cli/plugins/cos.rb +28 -37
  33. data/lib/aspera/cli/plugins/faspex.rb +281 -227
  34. data/lib/aspera/cli/plugins/faspex5.rb +129 -84
  35. data/lib/aspera/cli/plugins/node.rb +426 -232
  36. data/lib/aspera/cli/plugins/orchestrator.rb +106 -98
  37. data/lib/aspera/cli/plugins/preview.rb +196 -191
  38. data/lib/aspera/cli/plugins/server.rb +131 -126
  39. data/lib/aspera/cli/plugins/shares.rb +49 -36
  40. data/lib/aspera/cli/plugins/sync.rb +27 -28
  41. data/lib/aspera/cli/transfer_agent.rb +84 -79
  42. data/lib/aspera/cli/version.rb +3 -1
  43. data/lib/aspera/colors.rb +37 -28
  44. data/lib/aspera/command_line_builder.rb +84 -63
  45. data/lib/aspera/cos_node.rb +68 -34
  46. data/lib/aspera/data_repository.rb +4 -2
  47. data/lib/aspera/environment.rb +61 -46
  48. data/lib/aspera/fasp/agent_base.rb +36 -31
  49. data/lib/aspera/fasp/agent_connect.rb +44 -37
  50. data/lib/aspera/fasp/agent_direct.rb +101 -104
  51. data/lib/aspera/fasp/agent_httpgw.rb +91 -90
  52. data/lib/aspera/fasp/agent_node.rb +36 -33
  53. data/lib/aspera/fasp/agent_trsdk.rb +28 -31
  54. data/lib/aspera/fasp/error.rb +3 -1
  55. data/lib/aspera/fasp/error_info.rb +81 -54
  56. data/lib/aspera/fasp/installation.rb +171 -151
  57. data/lib/aspera/fasp/listener.rb +2 -0
  58. data/lib/aspera/fasp/parameters.rb +105 -111
  59. data/lib/aspera/fasp/parameters.yaml +305 -249
  60. data/lib/aspera/fasp/resume_policy.rb +20 -20
  61. data/lib/aspera/fasp/transfer_spec.rb +27 -0
  62. data/lib/aspera/fasp/uri.rb +31 -29
  63. data/lib/aspera/faspex_gw.rb +95 -118
  64. data/lib/aspera/hash_ext.rb +12 -13
  65. data/lib/aspera/id_generator.rb +11 -9
  66. data/lib/aspera/keychain/encrypted_hash.rb +73 -57
  67. data/lib/aspera/keychain/macos_security.rb +27 -29
  68. data/lib/aspera/log.rb +40 -39
  69. data/lib/aspera/nagios.rb +24 -22
  70. data/lib/aspera/node.rb +38 -30
  71. data/lib/aspera/oauth.rb +217 -248
  72. data/lib/aspera/open_application.rb +9 -7
  73. data/lib/aspera/persistency_action_once.rb +15 -14
  74. data/lib/aspera/persistency_folder.rb +15 -18
  75. data/lib/aspera/preview/file_types.rb +266 -270
  76. data/lib/aspera/preview/generator.rb +94 -92
  77. data/lib/aspera/preview/image_error.png +0 -0
  78. data/lib/aspera/preview/options.rb +20 -17
  79. data/lib/aspera/preview/utils.rb +99 -102
  80. data/lib/aspera/preview/video_error.png +0 -0
  81. data/lib/aspera/{proxy_auto_config.erb.js → proxy_auto_config.js} +23 -31
  82. data/lib/aspera/proxy_auto_config.rb +114 -21
  83. data/lib/aspera/rest.rb +144 -142
  84. data/lib/aspera/rest_call_error.rb +3 -2
  85. data/lib/aspera/rest_error_analyzer.rb +31 -31
  86. data/lib/aspera/rest_errors_aspera.rb +18 -16
  87. data/lib/aspera/secret_hider.rb +68 -0
  88. data/lib/aspera/ssh.rb +20 -16
  89. data/lib/aspera/sync.rb +57 -54
  90. data/lib/aspera/temp_file_manager.rb +20 -14
  91. data/lib/aspera/timer_limiter.rb +10 -8
  92. data/lib/aspera/uri_reader.rb +14 -15
  93. data/lib/aspera/web_auth.rb +85 -80
  94. data.tar.gz.sig +0 -0
  95. metadata +169 -40
  96. metadata.gz.sig +2 -0
  97. data/bin/dascli +0 -13
  98. data/docs/Makefile +0 -63
  99. data/docs/README.erb.md +0 -4221
  100. data/docs/README.md +0 -13
  101. data/docs/diagrams.txt +0 -49
  102. data/docs/doc_tools.rb +0 -58
  103. data/lib/aspera/cli/plugins/shares2.rb +0 -114
  104. data/lib/aspera/fasp/default.rb +0 -17
@@ -1,60 +1,87 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Aspera
2
4
  module Fasp
3
5
  # from https://www.google.com/search?q=FASP+error+codes
4
- # Note that the fact that an error is retryable is not internally defined by protocol, it's client responsibility
6
+ # Note that the fact that an error is retryable is not internally defined by protocol, it's client-side responsibility
5
7
  ERROR_INFO = {
6
- # id retryable mnemo message additional info
7
- 1 => { r: false , c: 'FASP_PROTO', m: 'Generic fasp(tm) protocol error', a: 'fasp(tm) error'},
8
- 2 => { r: false , c: 'ASCP', m: 'Generic SCP error', a: 'ASCP error'},
9
- 3 => { r: false , c: 'AMBIGUOUS_TARGET', m: 'Target incorrectly specified', a: 'Ambiguous target'},
10
- 4 => { r: false , c: 'NO_SUCH_FILE', m: 'No such file or directory', a: 'No such file or directory'},
11
- 5 => { r: false , c: 'NO_PERMS', m: 'Insufficient permission to read or write', a: 'Insufficient permissions'},
12
- 6 => { r: false , c: 'NOT_DIR', m: 'Target is not a directory', a: 'Target must be a directory'},
13
- 7 => { r: false , c: 'IS_DIR', m: 'File is a directory - expected regular file', a: 'Expected regular file'},
14
- 8 => { r: false , c: 'USAGE', m: 'Incorrect usage of scp command', a: 'Incorrect usage of Aspera scp command'},
15
- 9 => { r: false , c: 'LIC_DUP', m: 'Duplicate license', a: 'Duplicate license'},
16
- 10 => { r: false , c: 'LIC_RATE_EXCEEDED', m: 'Rate exceeds the cap imposed by license', a: 'Rate exceeds cap imposed by license'},
17
- 11 => { r: false , c: 'INTERNAL_ERROR', m: 'Internal error (unexpected error)', a: 'Internal error'},
18
- 12 => { r: true , c: 'TRANSFER_ERROR', m: 'Error establishing control connection', a: 'Error establishing SSH connection (check SSH port and firewall)'},
19
- 13 => { r: true , c: 'TRANSFER_TIMEOUT', m: 'Timeout establishing control connection', a: 'Timeout establishing SSH connection (check SSH port and firewall)'},
20
- 14 => { r: true , c: 'CONNECTION_ERROR', m: 'Error establishing data connection', a: 'Error establishing UDP connection (check UDP port and firewall)'},
21
- 15 => { r: true , c: 'CONNECTION_TIMEOUT', m: 'Timeout establishing data connection', a: 'Timeout establishing UDP connection (check UDP port and firewall)'},
22
- 16 => { r: true , c: 'CONNECTION_LOST', m: 'Connection lost', a: 'Connection lost'},
23
- 17 => { r: true , c: 'RCVR_SEND_ERROR', m: 'Receiver fails to send feedback', a: 'Network failure (receiver can\'t send feedback)'},
24
- 18 => { r: true , c: 'RCVR_RECV_ERROR', m: 'Receiver fails to receive data packets', a: 'Network failure (receiver can\'t receive UDP data)'},
25
- 19 => { r: false , c: 'AUTH', m: 'Authentication failure', a: 'Authentication failure'},
26
- 20 => { r: false , c: 'NOTHING', m: 'Nothing to transfer', a: 'Nothing to transfer'},
27
- 21 => { r: false , c: 'NOT_REGULAR', m: 'Not a regular file (special file)', a: 'Not a regular file'},
28
- 22 => { r: false , c: 'FILE_TABLE_OVR', m: 'File table overflow', a: 'File table overflow'},
29
- 23 => { r: true , c: 'TOO_MANY_FILES', m: 'Too many files open', a: 'Too many files open'},
30
- 24 => { r: false , c: 'FILE_TOO_BIG', m: 'File too big for file system', a: 'File too big for filesystem'},
31
- 25 => { r: false , c: 'NO_SPACE_LEFT', m: 'No space left on disk', a: 'No space left on disk'},
32
- 26 => { r: false , c: 'READ_ONLY_FS', m: 'Read only file system', a: 'Read only filesystem'},
33
- 27 => { r: false , c: 'SOME_FILE_ERRS', m: 'Some individual files failed', a: 'One or more files failed'},
34
- 28 => { r: false , c: 'USER_CANCEL', m: 'Cancelled by user', a: 'Cancelled by user'},
35
- 29 => { r: false , c: 'LIC_NOLIC', m: 'License not found or unable to access', a: 'Unable to access license info'},
36
- 30 => { r: false , c: 'LIC_EXPIRED', m: 'License expired', a: 'License expired'},
37
- 31 => { r: false , c: 'SOCK_SETUP', m: 'Unable to setup socket (create, bind, etc ...)', a: 'Unable to set up socket'},
38
- 32 => { r: true , c: 'OUT_OF_MEMORY', m: 'Out of memory, unable to allocate', a: 'Out of memory'},
39
- 33 => { r: true , c: 'THREAD_SPAWN', m: 'Can\'t spawn thread', a: 'Unable to spawn thread'},
40
- 34 => { r: false , c: 'UNAUTHORIZED', m: 'Unauthorized by external auth server', a: 'Unauthorized'},
41
- 35 => { r: true , c: 'DISK_READ', m: 'Error reading source file from disk', a: 'Disk read error'},
42
- 36 => { r: true , c: 'DISK_WRITE', m: 'Error writing to disk', a: 'Disk write error'},
43
- 37 => { r: true , c: 'AUTHORIZATION', m: 'Used interchangeably with ERR_UNAUTHORIZED', a: 'Authorization failure'},
44
- 38 => { r: false , c: 'LIC_ILLEGAL', m: 'Operation not permitted by license', a: 'Operation not permitted by license'},
45
- 39 => { r: true , c: 'PEER_ABORTED_SESSION', m: 'Remote peer terminated session', a: 'Peer aborted session'},
46
- 40 => { r: true , c: 'DATA_TRANSFER_TIMEOUT', m: 'Transfer stalled, timed out', a: 'Data transfer stalled, timed out'},
47
- 41 => { r: false , c: 'BAD_PATH', m: 'Path violates docroot containment', a: 'File location is outside \'docroot\' hierarchy'},
48
- 42 => { r: false , c: 'ALREADY_EXISTS', m: 'File or directory already exists', a: 'File or directory already exists'},
49
- 43 => { r: false , c: 'STAT_FAILS', m: 'Cannot stat file', a: 'Cannot collect details about file or directory'},
50
- 44 => { r: true , c: 'PMTU_BRTT_ERROR', m: 'UDP session initiation fatal error', a: 'UDP session initiation fatal error'},
51
- 45 => { r: true , c: 'BWMEAS_ERROR', m: 'Bandwidth measurement fatal error', a: 'Bandwidth measurement fatal error'},
52
- 46 => { r: false , c: 'VLINK_ERROR', m: 'Virtual link error', a: 'Virtual link error'},
53
- 47 => { r: false , c: 'CONNECTION_ERROR_HTTP', m: 'Error establishing HTTP connection', a: 'Error establishing HTTP connection (check HTTP port and firewall)'},
54
- 48 => { r: false , c: 'FILE_ENCRYPTION_ERROR', m: 'File encryption error, e.g. corrupt file', a: 'File encryption/decryption error, e.g. corrupt file'},
55
- 49 => { r: false , c: 'FILE_DECRYPTION_PASS', m: 'File encryption/decryption error, e.g. corrupt file', a: 'File decryption error, bad passphrase'},
56
- 50 => { r: false , c: 'BAD_CONFIGURATION', m: 'Aspera.conf contains invalid data and was rejected', a: 'Invalid configuration'},
57
- 51 => { r: false , c: 'UNDEFINED', m: 'Should never happen, report to Aspera', a: 'Undefined error'},
58
- }
8
+ # id retryable mnemo message additional info
9
+ 1 => { r: false, c: 'FASP_PROTO', m: 'Generic fasp(tm) protocol error', a: 'fasp(tm) error'},
10
+ 2 => { r: false, c: 'ASCP', m: 'Generic SCP error', a: 'ASCP error'},
11
+ 3 => { r: false, c: 'AMBIGUOUS_TARGET', m: 'Target incorrectly specified', a: 'Ambiguous target'},
12
+ 4 => { r: false, c: 'NO_SUCH_FILE', m: 'No such file or directory', a: 'No such file or directory'},
13
+ 5 => { r: false, c: 'NO_PERMS', m: 'Insufficient permission to read or write', a: 'Insufficient permissions'},
14
+ 6 => { r: false, c: 'NOT_DIR', m: 'Target is not a directory', a: 'Target must be a directory'},
15
+ 7 => { r: false, c: 'IS_DIR', m: 'File is a directory - expected regular file', a: 'Expected regular file'},
16
+ 8 => { r: false, c: 'USAGE', m: 'Incorrect usage of scp command', a: 'Incorrect usage of Aspera scp command'},
17
+ 9 => { r: false, c: 'LIC_DUP', m: 'Duplicate license', a: 'Duplicate license'},
18
+ 10 => { r: false, c: 'LIC_RATE_EXCEEDED', m: 'Rate exceeds the cap imposed by license', a: 'Rate exceeds cap imposed by license'},
19
+ 11 => { r: false, c: 'INTERNAL_ERROR', m: 'Internal error (unexpected error)', a: 'Internal error'},
20
+ 12 => { r: true, c: 'TRANSFER_ERROR', m: 'Error establishing control connection',
21
+ a: 'Error establishing SSH connection (check SSH port and firewall)'},
22
+ 13 => { r: true, c: 'TRANSFER_TIMEOUT', m: 'Timeout establishing control connection',
23
+ a: 'Timeout establishing SSH connection (check SSH port and firewall)'},
24
+ 14 => { r: true, c: 'CONNECTION_ERROR', m: 'Error establishing data connection',
25
+ a: 'Error establishing UDP connection (check UDP port and firewall)'},
26
+ 15 => { r: true, c: 'CONNECTION_TIMEOUT', m: 'Timeout establishing data connection',
27
+ a: 'Timeout establishing UDP connection (check UDP port and firewall)'},
28
+ 16 => { r: true, c: 'CONNECTION_LOST', m: 'Connection lost', a: 'Connection lost'},
29
+ 17 => { r: true, c: 'RCVR_SEND_ERROR', m: 'Receiver fails to send feedback', a: 'Network failure (receiver can\'t send feedback)'},
30
+ 18 => { r: true, c: 'RCVR_RECV_ERROR', m: 'Receiver fails to receive data packets', a: 'Network failure (receiver can\'t receive UDP data)'},
31
+ 19 => { r: false, c: 'AUTH', m: 'Authentication failure', a: 'Authentication failure'},
32
+ 20 => { r: false, c: 'NOTHING', m: 'Nothing to transfer', a: 'Nothing to transfer'},
33
+ 21 => { r: false, c: 'NOT_REGULAR', m: 'Not a regular file (special file)', a: 'Not a regular file'},
34
+ 22 => { r: false, c: 'FILE_TABLE_OVR', m: 'File table overflow', a: 'File table overflow'},
35
+ 23 => { r: true, c: 'TOO_MANY_FILES', m: 'Too many files open', a: 'Too many files open'},
36
+ 24 => { r: false, c: 'FILE_TOO_BIG', m: 'File too big for file system', a: 'File too big for filesystem'},
37
+ 25 => { r: false, c: 'NO_SPACE_LEFT', m: 'No space left on disk', a: 'No space left on disk'},
38
+ 26 => { r: false, c: 'READ_ONLY_FS', m: 'Read only file system', a: 'Read only filesystem'},
39
+ 27 => { r: false, c: 'SOME_FILE_ERRS', m: 'Some individual files failed', a: 'One or more files failed'},
40
+ 28 => { r: false, c: 'USER_CANCEL', m: 'Cancelled by user', a: 'Cancelled by user'},
41
+ 29 => { r: false, c: 'LIC_NOLIC', m: 'License not found or unable to access', a: 'Unable to access license info'},
42
+ 30 => { r: false, c: 'LIC_EXPIRED', m: 'License expired', a: 'License expired'},
43
+ 31 => { r: false, c: 'SOCK_SETUP', m: 'Unable to setup socket (create, bind, etc ...)', a: 'Unable to set up socket'},
44
+ 32 => { r: true, c: 'OUT_OF_MEMORY', m: 'Out of memory, unable to allocate', a: 'Out of memory'},
45
+ 33 => { r: true, c: 'THREAD_SPAWN', m: 'Can\'t spawn thread', a: 'Unable to spawn thread'},
46
+ 34 => { r: false, c: 'UNAUTHORIZED', m: 'Unauthorized by external auth server', a: 'Unauthorized'},
47
+ 35 => { r: true, c: 'DISK_READ', m: 'Error reading source file from disk', a: 'Disk read error'},
48
+ 36 => { r: true, c: 'DISK_WRITE', m: 'Error writing to disk', a: 'Disk write error'},
49
+ 37 => { r: true, c: 'AUTHORIZATION', m: 'Used interchangeably with ERR_UNAUTHORIZED', a: 'Authorization failure'},
50
+ 38 => { r: false, c: 'LIC_ILLEGAL', m: 'Operation not permitted by license', a: 'Operation not permitted by license'},
51
+ 39 => { r: true, c: 'PEER_ABORTED_SESSION', m: 'Remote peer terminated session', a: 'Peer aborted session'},
52
+ 40 => { r: true, c: 'DATA_TRANSFER_TIMEOUT', m: 'Transfer stalled, timed out', a: 'Data transfer stalled, timed out'},
53
+ 41 => { r: false, c: 'BAD_PATH', m: 'Path violates docroot containment', a: 'File location is outside \'docroot\' hierarchy'},
54
+ 42 => { r: false, c: 'ALREADY_EXISTS', m: 'File or directory already exists', a: 'File or directory already exists'},
55
+ 43 => { r: false, c: 'STAT_FAILS', m: 'Cannot stat file', a: 'Cannot collect details about file or directory'},
56
+ 44 => { r: true, c: 'PMTU_BRTT_ERROR', m: 'UDP session initiation fatal error', a: 'UDP session initiation fatal error'},
57
+ 45 => { r: true, c: 'BWMEAS_ERROR', m: 'Bandwidth measurement fatal error', a: 'Bandwidth measurement fatal error'},
58
+ 46 => { r: false, c: 'VLINK_ERROR', m: 'Virtual link error', a: 'Virtual link error'},
59
+ 47 => { r: false, c: 'CONNECTION_ERROR_HTTP', m: 'Error establishing HTTP connection',
60
+ a: 'Error establishing HTTP connection (check HTTP port and firewall)'},
61
+ 48 => { r: false, c: 'FILE_ENCRYPTION_ERROR', m: 'File encryption error, e.g. corrupt file',
62
+ a: 'File encryption/decryption error, e.g. corrupt file'},
63
+ 49 => { r: false, c: 'FILE_DECRYPTION_PASS', m: 'File encryption/decryption error, e.g. corrupt file', a: 'File decryption error, bad passphrase'},
64
+ 50 => { r: false, c: 'BAD_CONFIGURATION', m: 'Aspera.conf contains invalid data and was rejected', a: 'Invalid configuration'},
65
+ 51 => { r: false, c: 'INSECURE_CONNECTION', m: 'Remote-host key check failure', a: 'Remote host is not who we expected'},
66
+ 52 => { r: false, c: 'START_VALIDATION_FAILED', m: 'File start validation failed', a: 'File start validation failed'},
67
+ 53 => { r: false, c: 'STOP_VALIDATION_FAILED', m: 'File stop validation failed', a: 'File stop validation failed'},
68
+ 54 => { r: false, c: 'THRESHOLD_VALIDATION_FAILED', m: 'File threshold validation failed', a: 'File threshold validation failed'},
69
+ 55 => { r: false, c: 'FILEPATH_TOO_LONG', m: 'File path/name too long for underlying file system', a: 'File path exceeds underlying file system limit'},
70
+ 56 => { r: false, c: 'ILLEGAL_CHARS_IN_PATH', m: 'Windows path contains illegal characters',
71
+ a: 'Path being written to Windows file system contains illegal characters'},
72
+ 57 => { r: false, c: 'CHUNK_MUST_MATCH_ALIGNMENT', m: 'Chunk size/start must be aligned with storage', a: 'Chunk size/start must be aligned with storage'},
73
+ 58 => { r: false, c: 'VALIDATION_SESSION_ABORT', m: 'Session aborted to due to validation error', a: 'Session aborted to due validation error'},
74
+ 59 => { r: false, c: 'REMOTE_STORAGE_ERROR', m: 'Remote storage errored', a: 'Remote storage errored'},
75
+ 60 => { r: false, c: 'LUA_SCRIPT_ABORTED_SESSION', m: 'Session aborted due to Lua script abort', a: 'Session aborted due to Lua script abort'},
76
+ 61 => { r: true, c: 'SSEAR_RETRYABLE', m: 'Transfer failed because of a retryable Encryption at Rest error',
77
+ a: 'Transfer failed because of a retryable Encryption at Rest error'},
78
+ 62 => { r: false, c: 'SSEAR_FATAL', m: 'Transfer failed because of a fatal Encryption at Rest error',
79
+ a: 'Transfer failed because of a fatal Encryption at Rest error'},
80
+ 63 => { r: false, c: 'LINK_LOOP', m: 'Path refers to a symbolic link loop', a: 'Path refers to a symbolic link loop'},
81
+ 64 => { r: false, c: 'CANNOT_RENAME_PARTIAL_FILES', m: 'Can\'t rename a partial file', a: 'Can\'t rename a partial file.'},
82
+ 65 => { r: false, c: 'CIPHER_NON_COMPAT_FIPS', m: 'Can\'t use this cipher with FIPS mode enabled', a: 'Can\'t use this cipher with FIPS mode enabled'},
83
+ 66 => { r: false, c: 'PEER_REQUIRES_FIPS', m: 'Peer rejects cipher due to FIPS mode enabled on peer',
84
+ a: 'Peer rejects cipher due to FIPS mode enabled on peer'}
85
+ }.freeze
59
86
  end
60
87
  end