aspera-cli 4.27.2 → 4.27.4

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 (145) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +133 -0
  4. data/CONTRIBUTING.md +5 -2
  5. data/bin/ascli +3 -1
  6. data/docs/README.md +1006 -766
  7. data/lib/aspera/agent/base.rb +7 -2
  8. data/lib/aspera/agent/connect.rb +6 -8
  9. data/lib/aspera/agent/desktop.rb +2 -6
  10. data/lib/aspera/agent/direct.rb +52 -22
  11. data/lib/aspera/agent/node.rb +9 -8
  12. data/lib/aspera/agent/transferd.rb +2 -2
  13. data/lib/aspera/api/alee.rb +1 -1
  14. data/lib/aspera/api/aoc.rb +14 -12
  15. data/lib/aspera/api/ats.rb +1 -1
  16. data/lib/aspera/api/cos_node.rb +2 -2
  17. data/lib/aspera/api/faspex.rb +11 -7
  18. data/lib/aspera/api/httpgw.rb +38 -35
  19. data/lib/aspera/api/node.rb +39 -34
  20. data/lib/aspera/ascmd.rb +3 -1
  21. data/lib/aspera/ascp/installation.rb +63 -28
  22. data/lib/aspera/ascp/management.rb +1 -0
  23. data/lib/aspera/assert.rb +4 -0
  24. data/lib/aspera/cli/ascp_actions.rb +20 -41
  25. data/lib/aspera/cli/async_transfer_store.rb +12 -11
  26. data/lib/aspera/cli/bootstrapper.rb +14 -16
  27. data/lib/aspera/cli/command_line.rb +252 -0
  28. data/lib/aspera/cli/command_registry.rb +215 -37
  29. data/lib/aspera/cli/command_spec.rb +104 -15
  30. data/lib/aspera/cli/completion/ascli.bash +12 -0
  31. data/lib/aspera/cli/completion/ascli.fish +16 -0
  32. data/lib/aspera/cli/completion/ascli.zsh +19 -0
  33. data/lib/aspera/cli/context.rb +3 -0
  34. data/lib/aspera/cli/deprecation.rb +37 -0
  35. data/lib/aspera/cli/extended_value.rb +6 -3
  36. data/lib/aspera/cli/formatter.rb +94 -80
  37. data/lib/aspera/cli/gem_checker.rb +1 -1
  38. data/lib/aspera/cli/hints.rb +7 -6
  39. data/lib/aspera/cli/http.rb +22 -34
  40. data/lib/aspera/cli/info.rb +3 -0
  41. data/lib/aspera/cli/mcp_tool.rb +47 -83
  42. data/lib/aspera/cli/option_declarator.rb +33 -42
  43. data/lib/aspera/cli/option_registry.rb +69 -0
  44. data/lib/aspera/cli/option_types.rb +105 -0
  45. data/lib/aspera/cli/option_value.rb +278 -0
  46. data/lib/aspera/cli/options.schema.yaml +124 -15
  47. data/lib/aspera/cli/parser.rb +333 -862
  48. data/lib/aspera/cli/plugins/alee.rb +7 -4
  49. data/lib/aspera/cli/plugins/aoc.rb +545 -518
  50. data/lib/aspera/cli/plugins/ats.rb +59 -80
  51. data/lib/aspera/cli/plugins/base.rb +221 -265
  52. data/lib/aspera/cli/plugins/basic_auth.rb +2 -10
  53. data/lib/aspera/cli/plugins/config.rb +263 -184
  54. data/lib/aspera/cli/plugins/console.rb +103 -39
  55. data/lib/aspera/cli/plugins/cos.rb +6 -23
  56. data/lib/aspera/cli/plugins/factory.rb +3 -0
  57. data/lib/aspera/cli/plugins/faspex5.rb +204 -182
  58. data/lib/aspera/cli/plugins/faspio.rb +6 -11
  59. data/lib/aspera/cli/plugins/httpgw.rb +8 -11
  60. data/lib/aspera/cli/plugins/mcp.rb +20 -55
  61. data/lib/aspera/cli/plugins/node.rb +300 -327
  62. data/lib/aspera/cli/plugins/orchestrator.rb +152 -110
  63. data/lib/aspera/cli/plugins/preview.rb +96 -105
  64. data/lib/aspera/cli/plugins/server.rb +78 -53
  65. data/lib/aspera/cli/plugins/shares.rb +80 -131
  66. data/lib/aspera/cli/preset_actions.rb +44 -27
  67. data/lib/aspera/cli/preset_manager.rb +44 -19
  68. data/lib/aspera/cli/prompt.rb +36 -0
  69. data/lib/aspera/cli/result.rb +42 -36
  70. data/lib/aspera/cli/runner.rb +32 -59
  71. data/lib/aspera/cli/special_values.rb +5 -0
  72. data/lib/aspera/cli/sync_actions.rb +51 -46
  73. data/lib/aspera/cli/terminal_formatter.rb +9 -3
  74. data/lib/aspera/cli/transfer_actions.rb +14 -9
  75. data/lib/aspera/cli/transfer_agent.rb +34 -38
  76. data/lib/aspera/cli/transfer_progress.rb +290 -55
  77. data/lib/aspera/cli/vault_manager.rb +0 -17
  78. data/lib/aspera/cli/version.rb +1 -1
  79. data/lib/aspera/cli/wizard.rb +5 -3
  80. data/lib/aspera/coverage.rb +1 -1
  81. data/lib/aspera/environment.rb +35 -5
  82. data/lib/aspera/faspex_gw.rb +2 -1
  83. data/lib/aspera/faspex_postproc.rb +1 -0
  84. data/lib/aspera/graphql.rb +5 -5
  85. data/lib/aspera/json_rpc/client.rb +5 -5
  86. data/lib/aspera/keychain/encrypted_hash.rb +2 -2
  87. data/lib/aspera/keychain/factory.rb +2 -1
  88. data/lib/aspera/keychain/one_password_api.rb +1 -1
  89. data/lib/aspera/link_header.rb +2 -2
  90. data/lib/aspera/log.rb +47 -27
  91. data/lib/aspera/markdown.rb +2 -0
  92. data/lib/aspera/mime.rb +25 -0
  93. data/lib/aspera/node_emulator.rb +759 -0
  94. data/lib/aspera/oauth/base.rb +37 -26
  95. data/lib/aspera/oauth/factory.rb +7 -3
  96. data/lib/aspera/oauth/generic.rb +1 -1
  97. data/lib/aspera/oauth/json_credentials.rb +34 -0
  98. data/lib/aspera/oauth/jwt.rb +4 -5
  99. data/lib/aspera/oauth/web.rb +9 -8
  100. data/lib/aspera/oauth.rb +1 -0
  101. data/lib/aspera/persistency_folder.rb +1 -3
  102. data/lib/aspera/preview/file_types.rb +4 -4
  103. data/lib/aspera/preview/generator.rb +11 -1
  104. data/lib/aspera/preview/options.schema.yaml +119 -0
  105. data/lib/aspera/preview/terminal.rb +4 -3
  106. data/lib/aspera/preview/utils.rb +9 -6
  107. data/lib/aspera/products/connect.rb +1 -1
  108. data/lib/aspera/rainbow.rb +7 -0
  109. data/lib/aspera/rest/aspera_errors.rb +72 -0
  110. data/lib/aspera/rest/call_error.rb +27 -0
  111. data/lib/aspera/rest/client.rb +523 -0
  112. data/lib/aspera/rest/error_analyzer.rb +113 -0
  113. data/lib/aspera/rest/list.rb +149 -0
  114. data/lib/aspera/rest/parameters.rb +55 -0
  115. data/lib/aspera/rest/util.rb +176 -0
  116. data/lib/aspera/rest.rb +7 -621
  117. data/lib/aspera/schema/IBM Aspera Console-enhanced.yaml +1125 -0
  118. data/lib/aspera/schema/IBM Aspera Faspex API-5.0-enhanced.yaml +0 -20
  119. data/lib/aspera/schema/IBM Aspera Orchestrator API-v1.yaml +1784 -0
  120. data/lib/aspera/schema/IBM Aspera on Cloud API-0.2.6-enhanced.yaml +1230 -137
  121. data/lib/aspera/schema/IBM Aspera on Cloud Automation API-1.0.5-enhanced.yaml +2395 -0
  122. data/lib/aspera/schema/IBM_Aspera_Shares.yaml +14 -13
  123. data/lib/aspera/schema/documentation.rb +13 -3
  124. data/lib/aspera/schema/reader.rb +12 -18
  125. data/lib/aspera/schema/registry.rb +23 -1
  126. data/lib/aspera/schema/validator.rb +92 -0
  127. data/lib/aspera/secret_hider.rb +36 -25
  128. data/lib/aspera/string_ext.rb +15 -0
  129. data/lib/aspera/temp_file_manager.rb +6 -5
  130. data/lib/aspera/transfer/parameters.rb +2 -0
  131. data/lib/aspera/transfer/spec.rb +1 -0
  132. data/lib/aspera/uri_reader.rb +11 -11
  133. data/lib/aspera/web_auth/index.html +147 -0
  134. data/lib/aspera/web_auth/server.rb +81 -0
  135. data.tar.gz.sig +0 -0
  136. metadata +43 -9
  137. metadata.gz.sig +0 -0
  138. data/lib/aspera/colors.rb +0 -79
  139. data/lib/aspera/node_simulator.rb +0 -344
  140. data/lib/aspera/preview/options.rb +0 -45
  141. data/lib/aspera/rest_call_error.rb +0 -25
  142. data/lib/aspera/rest_error_analyzer.rb +0 -111
  143. data/lib/aspera/rest_errors_aspera.rb +0 -58
  144. data/lib/aspera/rest_list.rb +0 -136
  145. data/lib/aspera/web_auth.rb +0 -211
@@ -0,0 +1,278 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'aspera/cli/option_types'
4
+ require 'aspera/cli/extended_value'
5
+ require 'aspera/cli/deprecation'
6
+ require 'aspera/secret_hider'
7
+ require 'aspera/schema/registry'
8
+ require 'aspera/schema/validator'
9
+ require 'aspera/log'
10
+ require 'aspera/assert'
11
+
12
+ module Aspera
13
+ module Cli
14
+ # Declared option: type, value, and where the value is stored.
15
+ class OptionValue
16
+ # [Symbol] Name of option
17
+ attr_reader :option
18
+ # [Array<Class>, nil] List of allowed types, `nil` for no validation
19
+ attr_reader :types
20
+ # [Symbol] How values are converted: :flag, :boolean, :integer, :float, :enum, :enum_list, :string_list, :other
21
+ attr_reader :kind
22
+ # [Symbol, nil] `OptionSource` of current value, `nil` if never set
23
+ attr_reader :source
24
+ attr_reader :sensitive, :schema, :deprecation
25
+ # [Array] List of allowed values (Symbols and specific values)
26
+ attr_accessor :values
27
+ # [String] Help section group name (set by OptionRegistry)
28
+ attr_accessor :group
29
+ # [String, nil] Short option char (set by OptionRegistry)
30
+ attr_accessor :short
31
+ # [Proc, nil] Block to call for flag options
32
+ attr_accessor :block
33
+
34
+ # @param option [Symbol] Name of option
35
+ # @param description [String, nil] Description for help; if nil, derived from schema
36
+ # @param allowed [nil,Class,Array<Class>,Array<Symbol>] Allowed values
37
+ # @param on_set [#call, nil] Called with the new value each time the value is set
38
+ # @param shorthand [String, nil] For a `Hash` option: a `String` value is stored as `{shorthand => value}`
39
+ # @param deprecation [Hash, Deprecation, nil] Deprecation: `{last:, message:}`, see `Deprecation`
40
+ # @param schema [String] Declaration of schema
41
+ # `allowed`:
42
+ # - `nil` No validation, so just a string
43
+ # - `Class` The single allowed Class
44
+ # - `Array<Class>` Multiple allowed classes
45
+ # - `Array<Symbol>` List of allowed values
46
+ def initialize(option:, description: nil, allowed: Type::STRING, on_set: nil, shorthand: nil, deprecation: nil, schema: nil)
47
+ Log.log.trace1 { "option: #{option}, allowed: #{allowed}" }
48
+ @option = option
49
+ @description = description
50
+ @group = nil
51
+ @short = nil
52
+ @block = nil
53
+ # by default passwords and secrets are sensitive, else specify when declaring the option
54
+ @sensitive = SecretHider.instance.secret?(@option, '')
55
+ @deprecation = Deprecation.create(deprecation)
56
+ @schema = schema
57
+ @shorthand = shorthand
58
+ @source = nil
59
+ @value = nil
60
+ Aspera.assert(on_set.nil? || on_set.respond_to?(:call)) { "#{@option}: on_set callback must respond to call" }
61
+ @on_set = on_set
62
+ @types = nil
63
+ @values = nil
64
+ @kind = :other
65
+ allowed = infer_allowed_from_schema(schema, allowed) if schema
66
+ apply_allowed(allowed) unless allowed.nil?
67
+ end
68
+
69
+ # @return [String] description of the option: explicit one, or first line of schema description
70
+ def description
71
+ return @description unless @description.nil?
72
+ return if @schema.nil?
73
+ schema_node = Schema::Registry.instance.reader(@schema).current
74
+ first_line = (schema_node['title'] || schema_node['description'].to_s).lines.first.to_s.strip
75
+ first_line.end_with?('.') ? first_line[0..-2] : first_line
76
+ end
77
+
78
+ # @return [String, nil] allowed values, or expected types when not plain `String`, e.g. `Hash|String`
79
+ def allowed_info
80
+ return @values.join('|') if @values&.any?
81
+ types = @types&.reject { |t| t.eql?(NilClass) }
82
+ return if types.nil? || types.empty? || types.eql?(Type::STRING)
83
+ types.map(&:name).join('|')
84
+ end
85
+
86
+ # @return [Boolean] `true` if option takes no value
87
+ def flag? = @kind.eql?(:flag)
88
+
89
+ # @param value [Object] value given to option
90
+ # @return [Boolean] `true` if value asks for the schema of option
91
+ def schema_request?(value) = value.eql?(SchemaRequest::KEYWORD) && @types&.include?(Hash)
92
+
93
+ # Reset stored value to nil
94
+ # @return [nil]
95
+ def clear
96
+ store(nil, nil)
97
+ end
98
+
99
+ # Get current option value
100
+ # @param log [Boolean] whether to log the value retrieval
101
+ # @return [Object] current value
102
+ def value(log: true)
103
+ Log.log.trace1 { "#{@option} -> (#{@value.class})#{@value}" } if log
104
+ @value
105
+ end
106
+
107
+ # Assign value to option.
108
+ # Value can be a `String`, then evaluated with `ExtendedValue`, or directly a value.
109
+ # `Hash` and `Array` values are merged with current value.
110
+ # @param value [String, Object] Value to assign to option
111
+ # @param source [Symbol] `OptionSource` of value
112
+ # @param warn_deprecation [Boolean] Emit deprecation warning (false for internal transfers)
113
+ # @param merge [Boolean] Merge `Hash` and `Array` with current value (false: value is already complete)
114
+ # @return [nil]
115
+ # @raise [SchemaRequest] if value is `help` and schema is known
116
+ def assign_value(value, source:, warn_deprecation: true, merge: true)
117
+ # Value from a source with lower priority than current value: only fills containers
118
+ lower = !@source.nil? && OptionSource.priority(source) < OptionSource.priority(@source)
119
+ if lower && ![Hash, Array].include?(@types&.first)
120
+ Log.log.debug { "#{source}: #{@option}: ignored, already set from #{@source}" }
121
+ return
122
+ end
123
+ Aspera.assert(!@deprecation, type: :warn) { "Option #{@option} is #{@deprecation}" } if warn_deprecation
124
+ if schema_request?(value)
125
+ return if lower
126
+ raise SchemaRequest.new(:option, @option, @schema) unless @schema.nil?
127
+ # Schema depends on command: kept as-is, raised by Parser#get_option(schema:)
128
+ store(value, source)
129
+ return
130
+ end
131
+ new_value = coerce(ExtendedValue.instance.evaluate(value, context: "option: #{@option}", allowed: @types))
132
+ new_value = {@shorthand => new_value} if @shorthand && new_value.is_a?(String)
133
+ Log.log.trace1 { "#{source}: #{@option} <- (#{new_value.class})#{new_value}" }
134
+ Aspera.assert_type(new_value, *@types, type: BadArgument) { "Option #{@option}" } if @types
135
+ if merge && (new_value.is_a?(Hash) || new_value.is_a?(Array))
136
+ current_value = @value
137
+ mergeable = current_value.is_a?(new_value.is_a?(Hash) ? Hash : Array) && !current_value.empty?
138
+ if lower
139
+ # Current value has priority: merge new value under it, unless explicitly emptied
140
+ return unless mergeable
141
+ new_value, current_value = current_value, new_value
142
+ source = @source
143
+ end
144
+ new_value = new_value.is_a?(Hash) ? current_value.deep_merge(new_value) : current_value + new_value if mergeable
145
+ end
146
+ validate_schema(new_value) unless %i[code default].include?(source)
147
+ store(new_value, source)
148
+ nil
149
+ end
150
+
151
+ private
152
+
153
+ # Validate a structured value against the schema of the option.
154
+ # Value may be partial: completed by other sources or defaults, so `required` is not enforced.
155
+ # @param value [Object] value to validate
156
+ # @raise [BadArgument] if value does not match schema
157
+ def validate_schema(value)
158
+ return unless @schema && (value.is_a?(Hash) || value.is_a?(Array))
159
+ errors = Schema::Validator.instance.errors(value, @schema, partial: true)
160
+ raise BadArgument, "Option #{@option}: #{errors.join('; ')} (use --#{@option.to_s.tr('_', '-')}=#{SchemaRequest::KEYWORD} for schema)" unless errors.empty?
161
+ end
162
+
163
+ # Derive the `allowed:` value from the schema when not explicitly provided.
164
+ # Returns `allowed` unchanged when the schema provides no usable type information.
165
+ # @param schema [String] schema identifier
166
+ # @param allowed [Object] caller-supplied allowed value (may be nil or Type::STRING)
167
+ # @return [Object] resolved allowed (Hash, Array, or the original value)
168
+ def infer_allowed_from_schema(schema, allowed)
169
+ return allowed unless allowed.nil? || allowed.eql?(Type::STRING)
170
+
171
+ schema_reader = Schema::Registry.instance.reader(schema) rescue nil
172
+ schema_node = schema_reader&.current
173
+ return allowed unless schema_node
174
+
175
+ case schema_node['type']
176
+ when 'object' then return Hash
177
+ when 'array' then return Array
178
+ end
179
+ # No top-level type: inspect oneOf/anyOf branches; if all resolve to 'object', infer Hash
180
+ composite_key = (%w[oneOf anyOf] & schema_node.keys).first
181
+ return allowed unless composite_key
182
+
183
+ branch_types = schema_node[composite_key].map do |branch|
184
+ resolved = branch['$ref'] ? schema_reader.resolve_ref(branch['$ref']).current : branch
185
+ resolved['type']
186
+ end
187
+ if branch_types.all?('object')
188
+ Hash
189
+ else
190
+ Aspera.assert(
191
+ !allowed.nil? && !allowed.eql?(Type::STRING),
192
+ "option :#{@option}: schema '#{schema}' has mixed-type oneOf branches #{branch_types.uniq}: specify allowed: explicitly"
193
+ )
194
+ allowed
195
+ end
196
+ end
197
+
198
+ # Initialize @types, @values and @kind from the resolved `allowed` specifier.
199
+ # @param allowed [Class, Array<Class>, Array<Symbol>] resolved allowed value (never nil)
200
+ def apply_allowed(allowed)
201
+ allowed = [allowed] if allowed.is_a?(Class)
202
+ Aspera.assert_type(allowed, Array)
203
+ if allowed.eql?(Type::NONE)
204
+ @kind = :flag
205
+ @types = Type::NONE
206
+ elsif allowed.take(Type::SYMBOL_ARRAY.length) == Type::SYMBOL_ARRAY
207
+ # Array of defined symbol values
208
+ @kind = :enum_list
209
+ @types = Type::SYMBOL_ARRAY
210
+ @values = allowed[Type::SYMBOL_ARRAY.length..]
211
+ elsif allowed.all?(Symbol)
212
+ @kind = :enum
213
+ @types = Type::ENUM
214
+ @values = allowed
215
+ elsif allowed.all?(Class)
216
+ @types = allowed
217
+ @kind =
218
+ if allowed.sort_by(&:name).eql?(Type::BOOLEAN) then :boolean
219
+ elsif allowed.eql?(Type::INTEGER) then :integer
220
+ elsif allowed.eql?(Type::FLOAT) then :float
221
+ elsif allowed.eql?(Type::STRING_ARRAY) then :string_list
222
+ else :other
223
+ end
224
+ @values = BoolValue::ALL if @kind.eql?(:boolean)
225
+ else
226
+ Aspera.error_unexpected_value(allowed)
227
+ end
228
+ # Containers start empty, unless nil is allowed
229
+ default = {Array => [], Hash => {}}[@types.first]
230
+ store(default, :default) if !default.nil? && !@types.include?(NilClass) && @value.nil?
231
+ end
232
+
233
+ # Convert value from command line, env or preset (String) to the type of option
234
+ # @param value [Object] evaluated value
235
+ # @return [Object] converted value
236
+ def coerce(value)
237
+ case @kind
238
+ when :enum
239
+ # Boolean from dot-path value, e.g. `no` for `%i[no header read]`
240
+ value = (value ? BoolValue::YES_SYM : BoolValue::NO_SYM).to_s if BoolValue::TYPES.include?(value.class)
241
+ value.is_a?(String) ? Parser.get_from_list(value, @option, @values) : value
242
+ when :boolean
243
+ BoolValue.true?(value.is_a?(String) ? Parser.get_from_list(value, @option, BoolValue::ALL) : value)
244
+ when :integer
245
+ # Decimal, also with leading zeros (e.g. `08`)
246
+ if value.is_a?(String)
247
+ Integer(value, 10, exception: false).tap { |i| raise BadArgument, "Option #{@option}: invalid integer: #{value}" if i.nil? }
248
+ else
249
+ value.nil? ? value : Integer(value)
250
+ end
251
+ when :float
252
+ if value.is_a?(String)
253
+ Float(value, exception: false).tap { |f| raise BadArgument, "Option #{@option}: invalid number: #{value}" if f.nil? }
254
+ else
255
+ value.nil? ? value : Float(value)
256
+ end
257
+ when :string_list
258
+ value.is_a?(String) ? [value] : value
259
+ when :enum_list
260
+ value = [value] if value.is_a?(String)
261
+ Aspera.assert_array_all(value, String, type: BadArgument)
262
+ value.map { |v| Parser.get_from_list(v, @option, @values) }
263
+ else
264
+ # nil on a Hash/Array option resets to empty container
265
+ value.nil? && [Hash, Array].include?(@types&.first) ? @types.first.new : value
266
+ end
267
+ end
268
+
269
+ # @param new_value [Object] value to store
270
+ # @param source [Symbol, nil] `OptionSource` of value
271
+ def store(new_value, source)
272
+ @value = new_value
273
+ @source = source
274
+ @on_set&.call(new_value)
275
+ end
276
+ end
277
+ end
278
+ end
@@ -102,7 +102,10 @@ components:
102
102
  default: true
103
103
  quiet:
104
104
  type: boolean
105
- description: Suppress the `ascp` progress bar display.
105
+ description: >-
106
+ Suppress the `ascp` progress bar display.
107
+
108
+ If `false`, the progress bar of option `progress_bar` is not displayed, unless that option is set.
106
109
  default: true
107
110
  file_list:
108
111
  type: boolean
@@ -323,7 +326,7 @@ components:
323
326
  HTTP/S connection parameters for REST calls (not `ascp` WSS).
324
327
 
325
328
  Keys are dispatched at startup to three targets:
326
- `RestParameters` (`user_agent`, `download_partial_suffix`, `retry_*`),
329
+ `Rest::Parameters` (`user_agent`, `download_partial_suffix`, `retry_*`),
327
330
  `SSL` (`ssl_options`), and `OAuth` (`token_cache_max_age`, `token_refresh_threshold`).
328
331
  Any remaining key is forwarded as a setter to the `Net::HTTP` session
329
332
  (e.g. `ca_file`, `verify_mode`) — the list below covers the common ones.
@@ -595,18 +598,20 @@ components:
595
598
  Token expiry timestamp in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`).
596
599
  Computed automatically from `_validity` when absent.
597
600
  example: "2030-01-01T00:00:00Z"
598
- NodeSimulatorOptions:
601
+ NodeEmulatorOptions:
599
602
  type: object
600
603
  description: >-
601
- Configuration for the embedded Node API simulator (`node simulator`).
602
- The simulator starts a local WEBrick server that answers `/ops/transfers`,
603
- `/ops/transfers/{id}`, `/files/browse`, and `/info` — sufficient to test
604
- CLI commands against a live Node API without a real HSTS instance.
604
+ Configuration for the embedded Node API emulator (`node emulator`), for testing without HSTS.
605
+ The emulator starts a local web server that answers a subset of the Node API:
606
+ `/info`, `/ops/transfers` (list, start), `/ops/transfers/{id}` (show, modify, cancel) and `/files/browse`.
607
+ Transfers are executed by the Transfer Daemon (`transferd`), started by the emulator.
608
+ Clients authenticate with HTTP Basic when `username` and `password` are set.
609
+ additionalProperties: false
605
610
  properties:
606
611
  url:
607
612
  type: string
608
613
  description: >-
609
- Address and port the simulator listens on.
614
+ Address and port the emulator listens on.
610
615
  Use `https://` with `cert`/`key` for TLS.
611
616
  default: http://localhost:8080
612
617
  cert:
@@ -624,13 +629,29 @@ components:
624
629
  type: string
625
630
  description: Path to the PEM certificate chain file (appended as extra chain certificates).
626
631
  example: /path/to/chain.pem
627
- browse_root:
632
+ docroot:
628
633
  type: string
629
634
  description: >-
630
- Root directory the simulator is allowed to expose via `/files/browse`.
631
- Requests for paths outside this directory are rejected.
635
+ Local folder of the node files.
636
+ Paths of `/files/browse` and local paths of transfers (sources of `send`, destination of `receive`) are relative to it, and confined in it.
632
637
  Defaults to the current working directory.
633
638
  example: /data/aspera
639
+ retention_sec:
640
+ type: integer
641
+ minimum: 1
642
+ description: Time in seconds a transfer stays in the list of transfers after it ended (completed, failed or canceled, and no more retried).
643
+ default: 86400
644
+ username:
645
+ type: string
646
+ description: >-
647
+ Username expected from clients in HTTP Basic authentication.
648
+ Set together with `password`.
649
+ When not set, requests are accepted without authentication.
650
+ example: node_user
651
+ password:
652
+ type: string
653
+ description: Password expected from clients in HTTP Basic authentication, for the above `username`.
654
+ example: my_password
634
655
  NodeTelemetryOptions:
635
656
  type: object
636
657
  description: >-
@@ -661,15 +682,93 @@ components:
661
682
  Value sent in the `x-instana-host` header.
662
683
  Defaults to the local machine's hostname.
663
684
  example: hsts-prod-01
685
+ OrchestratorWorkflowStart:
686
+ type: object
687
+ description: >-
688
+ Execution of the work order created by `orchestrator workflows start`.
689
+ By default, the call is asynchronous and returns the work order information.
690
+ A synchronous call returns the value of the output variable, if specified.
691
+ additionalProperties: false
692
+ properties:
693
+ synchronous:
694
+ type: boolean
695
+ description: Wait for completion of the work order.
696
+ default: false
697
+ step:
698
+ type: string
699
+ description: >-
700
+ Name of the work step providing the result.
701
+ Requires `variable`, and implies `synchronous`.
702
+ example: ResultStep
703
+ variable:
704
+ type: string
705
+ description: >-
706
+ Name of the output variable of `step` returned as result.
707
+ Requires `step`, and implies `synchronous`.
708
+ example: Complete_status_message
709
+ OrchestratorInitiateParameters:
710
+ type: object
711
+ description: >-
712
+ Input parameters for the workflow (key-value pairs).
713
+ Valid keys are defined by the workflow's input specification.
714
+ Use `orchestrator workflows inputs WORKFLOW_ID` to discover required parameters.
715
+ additionalProperties: true
716
+ OrchestratorImportWorkflow:
717
+ type: object
718
+ description: Workflow definition to import into Orchestrator.
719
+ required:
720
+ - name
721
+ properties:
722
+ name:
723
+ type: string
724
+ description: Workflow name.
725
+ example: My Workflow
726
+ description:
727
+ type: string
728
+ description: Workflow description.
729
+ example: This is a sample workflow
730
+ workflow_data:
731
+ type: object
732
+ description: Complete workflow definition.
733
+ OrchestratorImportWithConstraints:
734
+ type: object
735
+ description: Workflow definition to import with constraint resolution mappings.
736
+ required:
737
+ - workflow_data
738
+ - constraints
739
+ properties:
740
+ workflow_data:
741
+ type: object
742
+ description: Complete workflow definition to import.
743
+ constraints:
744
+ type: object
745
+ description: Constraint resolution mappings for conflicting resources.
746
+ example:
747
+ resource_pools: {}
748
+ queues: {}
749
+ monitors: {}
750
+ OrchestratorReloadPluginSet:
751
+ type: object
752
+ description: Set of plugins to reload.
753
+ required:
754
+ - plugin_names
755
+ properties:
756
+ plugin_names:
757
+ type: array
758
+ description: List of plugin names to reload.
759
+ items:
760
+ type: string
761
+ example:
762
+ - soap_requests
763
+ - frameio_operations
664
764
  TableOptions:
665
765
  type: object
666
766
  description: Terminal table rendering options.
667
767
  properties:
668
768
  pivot:
669
- type: string
670
- description: Control how an object list is displayed (no/yes/single).
671
- enum: ['no', 'yes', 'single']
672
- default: 'no'
769
+ description: Control how an object list is displayed (false/true/single).
770
+ enum: [false, true, single]
771
+ default: false
673
772
  OutOptions:
674
773
  type: object
675
774
  description: Output rendering options (dot-notation sub-properties).
@@ -705,5 +804,15 @@ components:
705
804
  type: boolean
706
805
  description: Show secrets in command output.
707
806
  default: false
807
+ colors:
808
+ type: boolean
809
+ description: >-
810
+ Use ANSI colors and styles in terminal output and logs.
811
+ Default is auto-detected: enabled if both stdout and stderr are terminals and `TERM` is not `dumb`, or if `CLICOLOR_FORCE=1`.
812
+ utf8:
813
+ type: boolean
814
+ description: >-
815
+ Use Unicode characters in terminal output (e.g. table borders, check marks).
816
+ Default is auto-detected: enabled if stdout is a terminal and the locale is UTF-8.
708
817
  img:
709
818
  $ref: "#/components/schemas/ImageOptions"