daytona_toolbox_api_client 0.0.0.pre.dev
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 +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +92 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +12 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_toolbox_api_client.gemspec +39 -0
- data/fix-gemspec.sh +13 -0
- data/lib/daytona_toolbox_api_client/api/computer_use_api.rb +1463 -0
- data/lib/daytona_toolbox_api_client/api/file_system_api.rb +893 -0
- data/lib/daytona_toolbox_api_client/api/git_api.rb +744 -0
- data/lib/daytona_toolbox_api_client/api/info_api.rb +193 -0
- data/lib/daytona_toolbox_api_client/api/interpreter_api.rb +267 -0
- data/lib/daytona_toolbox_api_client/api/lsp_api.rb +510 -0
- data/lib/daytona_toolbox_api_client/api/port_api.rb +142 -0
- data/lib/daytona_toolbox_api_client/api/process_api.rb +938 -0
- data/lib/daytona_toolbox_api_client/api_client.rb +392 -0
- data/lib/daytona_toolbox_api_client/api_error.rb +58 -0
- data/lib/daytona_toolbox_api_client/configuration.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/command.rb +270 -0
- data/lib/daytona_toolbox_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_toolbox_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_toolbox_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_start_response.rb +229 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_status_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_stop_response.rb +229 -0
- data/lib/daytona_toolbox_api_client/models/create_context_request.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/create_session_request.rb +235 -0
- data/lib/daytona_toolbox_api_client/models/display_info.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/display_info_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_toolbox_api_client/models/execute_response.rb +244 -0
- data/lib/daytona_toolbox_api_client/models/file_info.rb +417 -0
- data/lib/daytona_toolbox_api_client/models/file_status.rb +335 -0
- data/lib/daytona_toolbox_api_client/models/files_download_request.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_toolbox_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_request.rb +322 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_toolbox_api_client/models/git_git_delete_branch_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_toolbox_api_client/models/git_status.rb +290 -0
- data/lib/daytona_toolbox_api_client/models/interpreter_context.rb +339 -0
- data/lib/daytona_toolbox_api_client/models/is_port_in_use_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_hotkey_request.rb +219 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_press_request.rb +230 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_type_request.rb +228 -0
- data/lib/daytona_toolbox_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/list_contexts_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/lsp_completion_params.rb +322 -0
- data/lib/daytona_toolbox_api_client/models/lsp_document_request.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_position.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_range.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_server_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/match.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/mouse_click_request.rb +246 -0
- data/lib/daytona_toolbox_api_client/models/mouse_click_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_drag_request.rb +254 -0
- data/lib/daytona_toolbox_api_client/models/mouse_drag_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_move_request.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_position_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_scroll_request.rb +246 -0
- data/lib/daytona_toolbox_api_client/models/port_list.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/position.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_errors_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_logs_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_restart_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_status.rb +245 -0
- data/lib/daytona_toolbox_api_client/models/process_status_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/pty_create_request.rb +266 -0
- data/lib/daytona_toolbox_api_client/models/pty_create_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/pty_list_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/pty_resize_request.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/pty_session_info.rb +284 -0
- data/lib/daytona_toolbox_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_toolbox_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/screenshot_response.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/scroll_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/session.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/session_execute_request.rb +253 -0
- data/lib/daytona_toolbox_api_client/models/session_execute_response.rb +254 -0
- data/lib/daytona_toolbox_api_client/models/status.rb +46 -0
- data/lib/daytona_toolbox_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/window_info.rb +272 -0
- data/lib/daytona_toolbox_api_client/models/windows_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/version.rb +15 -0
- data/lib/daytona_toolbox_api_client.rb +120 -0
- data/project.json +65 -0
- metadata +178 -0
|
@@ -0,0 +1,938 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona Daemon API
|
|
3
|
+
|
|
4
|
+
#Daytona Daemon API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v0.0.0-dev
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaToolboxApiClient
|
|
16
|
+
class ProcessApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Connect to PTY session via WebSocket
|
|
23
|
+
# Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
24
|
+
# @param session_id [String] PTY session ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def connect_pty_session(session_id, opts = {})
|
|
28
|
+
connect_pty_session_with_http_info(session_id, opts)
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Connect to PTY session via WebSocket
|
|
33
|
+
# Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
34
|
+
# @param session_id [String] PTY session ID
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def connect_pty_session_with_http_info(session_id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.connect_pty_session ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'session_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.connect_pty_session"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/process/pty/{sessionId}/connect'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body]
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type]
|
|
62
|
+
|
|
63
|
+
# auth_names
|
|
64
|
+
auth_names = opts[:debug_auth_names] || []
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"ProcessApi.connect_pty_session",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: ProcessApi#connect_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Create a new PTY session
|
|
84
|
+
# Create a new pseudo-terminal session with specified configuration
|
|
85
|
+
# @param request [PtyCreateRequest] PTY session creation request
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [PtyCreateResponse]
|
|
88
|
+
def create_pty_session(request, opts = {})
|
|
89
|
+
data, _status_code, _headers = create_pty_session_with_http_info(request, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Create a new PTY session
|
|
94
|
+
# Create a new pseudo-terminal session with specified configuration
|
|
95
|
+
# @param request [PtyCreateRequest] PTY session creation request
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(PtyCreateResponse, Integer, Hash)>] PtyCreateResponse data, response status code and response headers
|
|
98
|
+
def create_pty_session_with_http_info(request, opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.create_pty_session ...'
|
|
101
|
+
end
|
|
102
|
+
# verify the required parameter 'request' is set
|
|
103
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.create_pty_session"
|
|
105
|
+
end
|
|
106
|
+
# resource path
|
|
107
|
+
local_var_path = '/process/pty'
|
|
108
|
+
|
|
109
|
+
# query parameters
|
|
110
|
+
query_params = opts[:query_params] || {}
|
|
111
|
+
|
|
112
|
+
# header parameters
|
|
113
|
+
header_params = opts[:header_params] || {}
|
|
114
|
+
# HTTP header 'Accept' (if needed)
|
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
116
|
+
# HTTP header 'Content-Type'
|
|
117
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
118
|
+
if !content_type.nil?
|
|
119
|
+
header_params['Content-Type'] = content_type
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type] || 'PtyCreateResponse'
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || []
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"ProcessApi.create_pty_session",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: ProcessApi#create_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Create a new session
|
|
152
|
+
# Create a new shell session for command execution
|
|
153
|
+
# @param request [CreateSessionRequest] Session creation request
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [nil]
|
|
156
|
+
def create_session(request, opts = {})
|
|
157
|
+
create_session_with_http_info(request, opts)
|
|
158
|
+
nil
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Create a new session
|
|
162
|
+
# Create a new shell session for command execution
|
|
163
|
+
# @param request [CreateSessionRequest] Session creation request
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
166
|
+
def create_session_with_http_info(request, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.create_session ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'request' is set
|
|
171
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.create_session"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/process/session'
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Content-Type'
|
|
183
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
184
|
+
if !content_type.nil?
|
|
185
|
+
header_params['Content-Type'] = content_type
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# form parameters
|
|
189
|
+
form_params = opts[:form_params] || {}
|
|
190
|
+
|
|
191
|
+
# http body (model)
|
|
192
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
193
|
+
|
|
194
|
+
# return_type
|
|
195
|
+
return_type = opts[:debug_return_type]
|
|
196
|
+
|
|
197
|
+
# auth_names
|
|
198
|
+
auth_names = opts[:debug_auth_names] || []
|
|
199
|
+
|
|
200
|
+
new_options = opts.merge(
|
|
201
|
+
:operation => :"ProcessApi.create_session",
|
|
202
|
+
:header_params => header_params,
|
|
203
|
+
:query_params => query_params,
|
|
204
|
+
:form_params => form_params,
|
|
205
|
+
:body => post_body,
|
|
206
|
+
:auth_names => auth_names,
|
|
207
|
+
:return_type => return_type
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "API called: ProcessApi#create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
+
end
|
|
214
|
+
return data, status_code, headers
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Delete a PTY session
|
|
218
|
+
# Delete a pseudo-terminal session and terminate its process
|
|
219
|
+
# @param session_id [String] PTY session ID
|
|
220
|
+
# @param [Hash] opts the optional parameters
|
|
221
|
+
# @return [Hash<String, Object>]
|
|
222
|
+
def delete_pty_session(session_id, opts = {})
|
|
223
|
+
data, _status_code, _headers = delete_pty_session_with_http_info(session_id, opts)
|
|
224
|
+
data
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Delete a PTY session
|
|
228
|
+
# Delete a pseudo-terminal session and terminate its process
|
|
229
|
+
# @param session_id [String] PTY session ID
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
232
|
+
def delete_pty_session_with_http_info(session_id, opts = {})
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.delete_pty_session ...'
|
|
235
|
+
end
|
|
236
|
+
# verify the required parameter 'session_id' is set
|
|
237
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
238
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.delete_pty_session"
|
|
239
|
+
end
|
|
240
|
+
# resource path
|
|
241
|
+
local_var_path = '/process/pty/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
242
|
+
|
|
243
|
+
# query parameters
|
|
244
|
+
query_params = opts[:query_params] || {}
|
|
245
|
+
|
|
246
|
+
# header parameters
|
|
247
|
+
header_params = opts[:header_params] || {}
|
|
248
|
+
# HTTP header 'Accept' (if needed)
|
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
250
|
+
|
|
251
|
+
# form parameters
|
|
252
|
+
form_params = opts[:form_params] || {}
|
|
253
|
+
|
|
254
|
+
# http body (model)
|
|
255
|
+
post_body = opts[:debug_body]
|
|
256
|
+
|
|
257
|
+
# return_type
|
|
258
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
259
|
+
|
|
260
|
+
# auth_names
|
|
261
|
+
auth_names = opts[:debug_auth_names] || []
|
|
262
|
+
|
|
263
|
+
new_options = opts.merge(
|
|
264
|
+
:operation => :"ProcessApi.delete_pty_session",
|
|
265
|
+
:header_params => header_params,
|
|
266
|
+
:query_params => query_params,
|
|
267
|
+
:form_params => form_params,
|
|
268
|
+
:body => post_body,
|
|
269
|
+
:auth_names => auth_names,
|
|
270
|
+
:return_type => return_type
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
274
|
+
if @api_client.config.debugging
|
|
275
|
+
@api_client.config.logger.debug "API called: ProcessApi#delete_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
276
|
+
end
|
|
277
|
+
return data, status_code, headers
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Delete a session
|
|
281
|
+
# Delete an existing shell session
|
|
282
|
+
# @param session_id [String] Session ID
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @return [nil]
|
|
285
|
+
def delete_session(session_id, opts = {})
|
|
286
|
+
delete_session_with_http_info(session_id, opts)
|
|
287
|
+
nil
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Delete a session
|
|
291
|
+
# Delete an existing shell session
|
|
292
|
+
# @param session_id [String] Session ID
|
|
293
|
+
# @param [Hash] opts the optional parameters
|
|
294
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
295
|
+
def delete_session_with_http_info(session_id, opts = {})
|
|
296
|
+
if @api_client.config.debugging
|
|
297
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.delete_session ...'
|
|
298
|
+
end
|
|
299
|
+
# verify the required parameter 'session_id' is set
|
|
300
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
301
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.delete_session"
|
|
302
|
+
end
|
|
303
|
+
# resource path
|
|
304
|
+
local_var_path = '/process/session/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
305
|
+
|
|
306
|
+
# query parameters
|
|
307
|
+
query_params = opts[:query_params] || {}
|
|
308
|
+
|
|
309
|
+
# header parameters
|
|
310
|
+
header_params = opts[:header_params] || {}
|
|
311
|
+
|
|
312
|
+
# form parameters
|
|
313
|
+
form_params = opts[:form_params] || {}
|
|
314
|
+
|
|
315
|
+
# http body (model)
|
|
316
|
+
post_body = opts[:debug_body]
|
|
317
|
+
|
|
318
|
+
# return_type
|
|
319
|
+
return_type = opts[:debug_return_type]
|
|
320
|
+
|
|
321
|
+
# auth_names
|
|
322
|
+
auth_names = opts[:debug_auth_names] || []
|
|
323
|
+
|
|
324
|
+
new_options = opts.merge(
|
|
325
|
+
:operation => :"ProcessApi.delete_session",
|
|
326
|
+
:header_params => header_params,
|
|
327
|
+
:query_params => query_params,
|
|
328
|
+
:form_params => form_params,
|
|
329
|
+
:body => post_body,
|
|
330
|
+
:auth_names => auth_names,
|
|
331
|
+
:return_type => return_type
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
335
|
+
if @api_client.config.debugging
|
|
336
|
+
@api_client.config.logger.debug "API called: ProcessApi#delete_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
337
|
+
end
|
|
338
|
+
return data, status_code, headers
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Execute a command
|
|
342
|
+
# Execute a shell command and return the output and exit code
|
|
343
|
+
# @param request [ExecuteRequest] Command execution request
|
|
344
|
+
# @param [Hash] opts the optional parameters
|
|
345
|
+
# @return [ExecuteResponse]
|
|
346
|
+
def execute_command(request, opts = {})
|
|
347
|
+
data, _status_code, _headers = execute_command_with_http_info(request, opts)
|
|
348
|
+
data
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Execute a command
|
|
352
|
+
# Execute a shell command and return the output and exit code
|
|
353
|
+
# @param request [ExecuteRequest] Command execution request
|
|
354
|
+
# @param [Hash] opts the optional parameters
|
|
355
|
+
# @return [Array<(ExecuteResponse, Integer, Hash)>] ExecuteResponse data, response status code and response headers
|
|
356
|
+
def execute_command_with_http_info(request, opts = {})
|
|
357
|
+
if @api_client.config.debugging
|
|
358
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.execute_command ...'
|
|
359
|
+
end
|
|
360
|
+
# verify the required parameter 'request' is set
|
|
361
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
362
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.execute_command"
|
|
363
|
+
end
|
|
364
|
+
# resource path
|
|
365
|
+
local_var_path = '/process/execute'
|
|
366
|
+
|
|
367
|
+
# query parameters
|
|
368
|
+
query_params = opts[:query_params] || {}
|
|
369
|
+
|
|
370
|
+
# header parameters
|
|
371
|
+
header_params = opts[:header_params] || {}
|
|
372
|
+
# HTTP header 'Accept' (if needed)
|
|
373
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
374
|
+
# HTTP header 'Content-Type'
|
|
375
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
376
|
+
if !content_type.nil?
|
|
377
|
+
header_params['Content-Type'] = content_type
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# form parameters
|
|
381
|
+
form_params = opts[:form_params] || {}
|
|
382
|
+
|
|
383
|
+
# http body (model)
|
|
384
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
385
|
+
|
|
386
|
+
# return_type
|
|
387
|
+
return_type = opts[:debug_return_type] || 'ExecuteResponse'
|
|
388
|
+
|
|
389
|
+
# auth_names
|
|
390
|
+
auth_names = opts[:debug_auth_names] || []
|
|
391
|
+
|
|
392
|
+
new_options = opts.merge(
|
|
393
|
+
:operation => :"ProcessApi.execute_command",
|
|
394
|
+
:header_params => header_params,
|
|
395
|
+
:query_params => query_params,
|
|
396
|
+
:form_params => form_params,
|
|
397
|
+
:body => post_body,
|
|
398
|
+
:auth_names => auth_names,
|
|
399
|
+
:return_type => return_type
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
403
|
+
if @api_client.config.debugging
|
|
404
|
+
@api_client.config.logger.debug "API called: ProcessApi#execute_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
405
|
+
end
|
|
406
|
+
return data, status_code, headers
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Get PTY session information
|
|
410
|
+
# Get detailed information about a specific pseudo-terminal session
|
|
411
|
+
# @param session_id [String] PTY session ID
|
|
412
|
+
# @param [Hash] opts the optional parameters
|
|
413
|
+
# @return [PtySessionInfo]
|
|
414
|
+
def get_pty_session(session_id, opts = {})
|
|
415
|
+
data, _status_code, _headers = get_pty_session_with_http_info(session_id, opts)
|
|
416
|
+
data
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Get PTY session information
|
|
420
|
+
# Get detailed information about a specific pseudo-terminal session
|
|
421
|
+
# @param session_id [String] PTY session ID
|
|
422
|
+
# @param [Hash] opts the optional parameters
|
|
423
|
+
# @return [Array<(PtySessionInfo, Integer, Hash)>] PtySessionInfo data, response status code and response headers
|
|
424
|
+
def get_pty_session_with_http_info(session_id, opts = {})
|
|
425
|
+
if @api_client.config.debugging
|
|
426
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_pty_session ...'
|
|
427
|
+
end
|
|
428
|
+
# verify the required parameter 'session_id' is set
|
|
429
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
430
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_pty_session"
|
|
431
|
+
end
|
|
432
|
+
# resource path
|
|
433
|
+
local_var_path = '/process/pty/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
434
|
+
|
|
435
|
+
# query parameters
|
|
436
|
+
query_params = opts[:query_params] || {}
|
|
437
|
+
|
|
438
|
+
# header parameters
|
|
439
|
+
header_params = opts[:header_params] || {}
|
|
440
|
+
# HTTP header 'Accept' (if needed)
|
|
441
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
442
|
+
|
|
443
|
+
# form parameters
|
|
444
|
+
form_params = opts[:form_params] || {}
|
|
445
|
+
|
|
446
|
+
# http body (model)
|
|
447
|
+
post_body = opts[:debug_body]
|
|
448
|
+
|
|
449
|
+
# return_type
|
|
450
|
+
return_type = opts[:debug_return_type] || 'PtySessionInfo'
|
|
451
|
+
|
|
452
|
+
# auth_names
|
|
453
|
+
auth_names = opts[:debug_auth_names] || []
|
|
454
|
+
|
|
455
|
+
new_options = opts.merge(
|
|
456
|
+
:operation => :"ProcessApi.get_pty_session",
|
|
457
|
+
:header_params => header_params,
|
|
458
|
+
:query_params => query_params,
|
|
459
|
+
:form_params => form_params,
|
|
460
|
+
:body => post_body,
|
|
461
|
+
:auth_names => auth_names,
|
|
462
|
+
:return_type => return_type
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
466
|
+
if @api_client.config.debugging
|
|
467
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
468
|
+
end
|
|
469
|
+
return data, status_code, headers
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# Get session details
|
|
473
|
+
# Get details of a specific session including its commands
|
|
474
|
+
# @param session_id [String] Session ID
|
|
475
|
+
# @param [Hash] opts the optional parameters
|
|
476
|
+
# @return [Session]
|
|
477
|
+
def get_session(session_id, opts = {})
|
|
478
|
+
data, _status_code, _headers = get_session_with_http_info(session_id, opts)
|
|
479
|
+
data
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# Get session details
|
|
483
|
+
# Get details of a specific session including its commands
|
|
484
|
+
# @param session_id [String] Session ID
|
|
485
|
+
# @param [Hash] opts the optional parameters
|
|
486
|
+
# @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
|
|
487
|
+
def get_session_with_http_info(session_id, opts = {})
|
|
488
|
+
if @api_client.config.debugging
|
|
489
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_session ...'
|
|
490
|
+
end
|
|
491
|
+
# verify the required parameter 'session_id' is set
|
|
492
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
493
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_session"
|
|
494
|
+
end
|
|
495
|
+
# resource path
|
|
496
|
+
local_var_path = '/process/session/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
497
|
+
|
|
498
|
+
# query parameters
|
|
499
|
+
query_params = opts[:query_params] || {}
|
|
500
|
+
|
|
501
|
+
# header parameters
|
|
502
|
+
header_params = opts[:header_params] || {}
|
|
503
|
+
# HTTP header 'Accept' (if needed)
|
|
504
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
505
|
+
|
|
506
|
+
# form parameters
|
|
507
|
+
form_params = opts[:form_params] || {}
|
|
508
|
+
|
|
509
|
+
# http body (model)
|
|
510
|
+
post_body = opts[:debug_body]
|
|
511
|
+
|
|
512
|
+
# return_type
|
|
513
|
+
return_type = opts[:debug_return_type] || 'Session'
|
|
514
|
+
|
|
515
|
+
# auth_names
|
|
516
|
+
auth_names = opts[:debug_auth_names] || []
|
|
517
|
+
|
|
518
|
+
new_options = opts.merge(
|
|
519
|
+
:operation => :"ProcessApi.get_session",
|
|
520
|
+
:header_params => header_params,
|
|
521
|
+
:query_params => query_params,
|
|
522
|
+
:form_params => form_params,
|
|
523
|
+
:body => post_body,
|
|
524
|
+
:auth_names => auth_names,
|
|
525
|
+
:return_type => return_type
|
|
526
|
+
)
|
|
527
|
+
|
|
528
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
529
|
+
if @api_client.config.debugging
|
|
530
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
531
|
+
end
|
|
532
|
+
return data, status_code, headers
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
# Get session command details
|
|
536
|
+
# Get details of a specific command within a session
|
|
537
|
+
# @param session_id [String] Session ID
|
|
538
|
+
# @param command_id [String] Command ID
|
|
539
|
+
# @param [Hash] opts the optional parameters
|
|
540
|
+
# @return [Command]
|
|
541
|
+
def get_session_command(session_id, command_id, opts = {})
|
|
542
|
+
data, _status_code, _headers = get_session_command_with_http_info(session_id, command_id, opts)
|
|
543
|
+
data
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# Get session command details
|
|
547
|
+
# Get details of a specific command within a session
|
|
548
|
+
# @param session_id [String] Session ID
|
|
549
|
+
# @param command_id [String] Command ID
|
|
550
|
+
# @param [Hash] opts the optional parameters
|
|
551
|
+
# @return [Array<(Command, Integer, Hash)>] Command data, response status code and response headers
|
|
552
|
+
def get_session_command_with_http_info(session_id, command_id, opts = {})
|
|
553
|
+
if @api_client.config.debugging
|
|
554
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_session_command ...'
|
|
555
|
+
end
|
|
556
|
+
# verify the required parameter 'session_id' is set
|
|
557
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
558
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_session_command"
|
|
559
|
+
end
|
|
560
|
+
# verify the required parameter 'command_id' is set
|
|
561
|
+
if @api_client.config.client_side_validation && command_id.nil?
|
|
562
|
+
fail ArgumentError, "Missing the required parameter 'command_id' when calling ProcessApi.get_session_command"
|
|
563
|
+
end
|
|
564
|
+
# resource path
|
|
565
|
+
local_var_path = '/process/session/{sessionId}/command/{commandId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'commandId' + '}', CGI.escape(command_id.to_s))
|
|
566
|
+
|
|
567
|
+
# query parameters
|
|
568
|
+
query_params = opts[:query_params] || {}
|
|
569
|
+
|
|
570
|
+
# header parameters
|
|
571
|
+
header_params = opts[:header_params] || {}
|
|
572
|
+
# HTTP header 'Accept' (if needed)
|
|
573
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
574
|
+
|
|
575
|
+
# form parameters
|
|
576
|
+
form_params = opts[:form_params] || {}
|
|
577
|
+
|
|
578
|
+
# http body (model)
|
|
579
|
+
post_body = opts[:debug_body]
|
|
580
|
+
|
|
581
|
+
# return_type
|
|
582
|
+
return_type = opts[:debug_return_type] || 'Command'
|
|
583
|
+
|
|
584
|
+
# auth_names
|
|
585
|
+
auth_names = opts[:debug_auth_names] || []
|
|
586
|
+
|
|
587
|
+
new_options = opts.merge(
|
|
588
|
+
:operation => :"ProcessApi.get_session_command",
|
|
589
|
+
:header_params => header_params,
|
|
590
|
+
:query_params => query_params,
|
|
591
|
+
:form_params => form_params,
|
|
592
|
+
:body => post_body,
|
|
593
|
+
:auth_names => auth_names,
|
|
594
|
+
:return_type => return_type
|
|
595
|
+
)
|
|
596
|
+
|
|
597
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
598
|
+
if @api_client.config.debugging
|
|
599
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_session_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
600
|
+
end
|
|
601
|
+
return data, status_code, headers
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
# Get session command logs
|
|
605
|
+
# Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
606
|
+
# @param session_id [String] Session ID
|
|
607
|
+
# @param command_id [String] Command ID
|
|
608
|
+
# @param [Hash] opts the optional parameters
|
|
609
|
+
# @option opts [Boolean] :follow Follow logs in real-time (WebSocket only)
|
|
610
|
+
# @return [String]
|
|
611
|
+
def get_session_command_logs(session_id, command_id, opts = {})
|
|
612
|
+
data, _status_code, _headers = get_session_command_logs_with_http_info(session_id, command_id, opts)
|
|
613
|
+
data
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
# Get session command logs
|
|
617
|
+
# Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
618
|
+
# @param session_id [String] Session ID
|
|
619
|
+
# @param command_id [String] Command ID
|
|
620
|
+
# @param [Hash] opts the optional parameters
|
|
621
|
+
# @option opts [Boolean] :follow Follow logs in real-time (WebSocket only)
|
|
622
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
623
|
+
def get_session_command_logs_with_http_info(session_id, command_id, opts = {})
|
|
624
|
+
if @api_client.config.debugging
|
|
625
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_session_command_logs ...'
|
|
626
|
+
end
|
|
627
|
+
# verify the required parameter 'session_id' is set
|
|
628
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
629
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_session_command_logs"
|
|
630
|
+
end
|
|
631
|
+
# verify the required parameter 'command_id' is set
|
|
632
|
+
if @api_client.config.client_side_validation && command_id.nil?
|
|
633
|
+
fail ArgumentError, "Missing the required parameter 'command_id' when calling ProcessApi.get_session_command_logs"
|
|
634
|
+
end
|
|
635
|
+
# resource path
|
|
636
|
+
local_var_path = '/process/session/{sessionId}/command/{commandId}/logs'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'commandId' + '}', CGI.escape(command_id.to_s))
|
|
637
|
+
|
|
638
|
+
# query parameters
|
|
639
|
+
query_params = opts[:query_params] || {}
|
|
640
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
641
|
+
|
|
642
|
+
# header parameters
|
|
643
|
+
header_params = opts[:header_params] || {}
|
|
644
|
+
# HTTP header 'Accept' (if needed)
|
|
645
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain']) unless header_params['Accept']
|
|
646
|
+
|
|
647
|
+
# form parameters
|
|
648
|
+
form_params = opts[:form_params] || {}
|
|
649
|
+
|
|
650
|
+
# http body (model)
|
|
651
|
+
post_body = opts[:debug_body]
|
|
652
|
+
|
|
653
|
+
# return_type
|
|
654
|
+
return_type = opts[:debug_return_type] || 'String'
|
|
655
|
+
|
|
656
|
+
# auth_names
|
|
657
|
+
auth_names = opts[:debug_auth_names] || []
|
|
658
|
+
|
|
659
|
+
new_options = opts.merge(
|
|
660
|
+
:operation => :"ProcessApi.get_session_command_logs",
|
|
661
|
+
:header_params => header_params,
|
|
662
|
+
:query_params => query_params,
|
|
663
|
+
:form_params => form_params,
|
|
664
|
+
:body => post_body,
|
|
665
|
+
:auth_names => auth_names,
|
|
666
|
+
:return_type => return_type
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
670
|
+
if @api_client.config.debugging
|
|
671
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_session_command_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
672
|
+
end
|
|
673
|
+
return data, status_code, headers
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
# List all PTY sessions
|
|
677
|
+
# Get a list of all active pseudo-terminal sessions
|
|
678
|
+
# @param [Hash] opts the optional parameters
|
|
679
|
+
# @return [PtyListResponse]
|
|
680
|
+
def list_pty_sessions(opts = {})
|
|
681
|
+
data, _status_code, _headers = list_pty_sessions_with_http_info(opts)
|
|
682
|
+
data
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# List all PTY sessions
|
|
686
|
+
# Get a list of all active pseudo-terminal sessions
|
|
687
|
+
# @param [Hash] opts the optional parameters
|
|
688
|
+
# @return [Array<(PtyListResponse, Integer, Hash)>] PtyListResponse data, response status code and response headers
|
|
689
|
+
def list_pty_sessions_with_http_info(opts = {})
|
|
690
|
+
if @api_client.config.debugging
|
|
691
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.list_pty_sessions ...'
|
|
692
|
+
end
|
|
693
|
+
# resource path
|
|
694
|
+
local_var_path = '/process/pty'
|
|
695
|
+
|
|
696
|
+
# query parameters
|
|
697
|
+
query_params = opts[:query_params] || {}
|
|
698
|
+
|
|
699
|
+
# header parameters
|
|
700
|
+
header_params = opts[:header_params] || {}
|
|
701
|
+
# HTTP header 'Accept' (if needed)
|
|
702
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
703
|
+
|
|
704
|
+
# form parameters
|
|
705
|
+
form_params = opts[:form_params] || {}
|
|
706
|
+
|
|
707
|
+
# http body (model)
|
|
708
|
+
post_body = opts[:debug_body]
|
|
709
|
+
|
|
710
|
+
# return_type
|
|
711
|
+
return_type = opts[:debug_return_type] || 'PtyListResponse'
|
|
712
|
+
|
|
713
|
+
# auth_names
|
|
714
|
+
auth_names = opts[:debug_auth_names] || []
|
|
715
|
+
|
|
716
|
+
new_options = opts.merge(
|
|
717
|
+
:operation => :"ProcessApi.list_pty_sessions",
|
|
718
|
+
:header_params => header_params,
|
|
719
|
+
:query_params => query_params,
|
|
720
|
+
:form_params => form_params,
|
|
721
|
+
:body => post_body,
|
|
722
|
+
:auth_names => auth_names,
|
|
723
|
+
:return_type => return_type
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
727
|
+
if @api_client.config.debugging
|
|
728
|
+
@api_client.config.logger.debug "API called: ProcessApi#list_pty_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
729
|
+
end
|
|
730
|
+
return data, status_code, headers
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# List all sessions
|
|
734
|
+
# Get a list of all active shell sessions
|
|
735
|
+
# @param [Hash] opts the optional parameters
|
|
736
|
+
# @return [Array<Session>]
|
|
737
|
+
def list_sessions(opts = {})
|
|
738
|
+
data, _status_code, _headers = list_sessions_with_http_info(opts)
|
|
739
|
+
data
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
# List all sessions
|
|
743
|
+
# Get a list of all active shell sessions
|
|
744
|
+
# @param [Hash] opts the optional parameters
|
|
745
|
+
# @return [Array<(Array<Session>, Integer, Hash)>] Array<Session> data, response status code and response headers
|
|
746
|
+
def list_sessions_with_http_info(opts = {})
|
|
747
|
+
if @api_client.config.debugging
|
|
748
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.list_sessions ...'
|
|
749
|
+
end
|
|
750
|
+
# resource path
|
|
751
|
+
local_var_path = '/process/session'
|
|
752
|
+
|
|
753
|
+
# query parameters
|
|
754
|
+
query_params = opts[:query_params] || {}
|
|
755
|
+
|
|
756
|
+
# header parameters
|
|
757
|
+
header_params = opts[:header_params] || {}
|
|
758
|
+
# HTTP header 'Accept' (if needed)
|
|
759
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
760
|
+
|
|
761
|
+
# form parameters
|
|
762
|
+
form_params = opts[:form_params] || {}
|
|
763
|
+
|
|
764
|
+
# http body (model)
|
|
765
|
+
post_body = opts[:debug_body]
|
|
766
|
+
|
|
767
|
+
# return_type
|
|
768
|
+
return_type = opts[:debug_return_type] || 'Array<Session>'
|
|
769
|
+
|
|
770
|
+
# auth_names
|
|
771
|
+
auth_names = opts[:debug_auth_names] || []
|
|
772
|
+
|
|
773
|
+
new_options = opts.merge(
|
|
774
|
+
:operation => :"ProcessApi.list_sessions",
|
|
775
|
+
:header_params => header_params,
|
|
776
|
+
:query_params => query_params,
|
|
777
|
+
:form_params => form_params,
|
|
778
|
+
:body => post_body,
|
|
779
|
+
:auth_names => auth_names,
|
|
780
|
+
:return_type => return_type
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
784
|
+
if @api_client.config.debugging
|
|
785
|
+
@api_client.config.logger.debug "API called: ProcessApi#list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
786
|
+
end
|
|
787
|
+
return data, status_code, headers
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
# Resize a PTY session
|
|
791
|
+
# Resize the terminal dimensions of a pseudo-terminal session
|
|
792
|
+
# @param session_id [String] PTY session ID
|
|
793
|
+
# @param request [PtyResizeRequest] Resize request with new dimensions
|
|
794
|
+
# @param [Hash] opts the optional parameters
|
|
795
|
+
# @return [PtySessionInfo]
|
|
796
|
+
def resize_pty_session(session_id, request, opts = {})
|
|
797
|
+
data, _status_code, _headers = resize_pty_session_with_http_info(session_id, request, opts)
|
|
798
|
+
data
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
# Resize a PTY session
|
|
802
|
+
# Resize the terminal dimensions of a pseudo-terminal session
|
|
803
|
+
# @param session_id [String] PTY session ID
|
|
804
|
+
# @param request [PtyResizeRequest] Resize request with new dimensions
|
|
805
|
+
# @param [Hash] opts the optional parameters
|
|
806
|
+
# @return [Array<(PtySessionInfo, Integer, Hash)>] PtySessionInfo data, response status code and response headers
|
|
807
|
+
def resize_pty_session_with_http_info(session_id, request, opts = {})
|
|
808
|
+
if @api_client.config.debugging
|
|
809
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.resize_pty_session ...'
|
|
810
|
+
end
|
|
811
|
+
# verify the required parameter 'session_id' is set
|
|
812
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
813
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.resize_pty_session"
|
|
814
|
+
end
|
|
815
|
+
# verify the required parameter 'request' is set
|
|
816
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
817
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.resize_pty_session"
|
|
818
|
+
end
|
|
819
|
+
# resource path
|
|
820
|
+
local_var_path = '/process/pty/{sessionId}/resize'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
821
|
+
|
|
822
|
+
# query parameters
|
|
823
|
+
query_params = opts[:query_params] || {}
|
|
824
|
+
|
|
825
|
+
# header parameters
|
|
826
|
+
header_params = opts[:header_params] || {}
|
|
827
|
+
# HTTP header 'Accept' (if needed)
|
|
828
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
829
|
+
# HTTP header 'Content-Type'
|
|
830
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
831
|
+
if !content_type.nil?
|
|
832
|
+
header_params['Content-Type'] = content_type
|
|
833
|
+
end
|
|
834
|
+
|
|
835
|
+
# form parameters
|
|
836
|
+
form_params = opts[:form_params] || {}
|
|
837
|
+
|
|
838
|
+
# http body (model)
|
|
839
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
840
|
+
|
|
841
|
+
# return_type
|
|
842
|
+
return_type = opts[:debug_return_type] || 'PtySessionInfo'
|
|
843
|
+
|
|
844
|
+
# auth_names
|
|
845
|
+
auth_names = opts[:debug_auth_names] || []
|
|
846
|
+
|
|
847
|
+
new_options = opts.merge(
|
|
848
|
+
:operation => :"ProcessApi.resize_pty_session",
|
|
849
|
+
:header_params => header_params,
|
|
850
|
+
:query_params => query_params,
|
|
851
|
+
:form_params => form_params,
|
|
852
|
+
:body => post_body,
|
|
853
|
+
:auth_names => auth_names,
|
|
854
|
+
:return_type => return_type
|
|
855
|
+
)
|
|
856
|
+
|
|
857
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
858
|
+
if @api_client.config.debugging
|
|
859
|
+
@api_client.config.logger.debug "API called: ProcessApi#resize_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
860
|
+
end
|
|
861
|
+
return data, status_code, headers
|
|
862
|
+
end
|
|
863
|
+
|
|
864
|
+
# Execute command in session
|
|
865
|
+
# Execute a command within an existing shell session
|
|
866
|
+
# @param session_id [String] Session ID
|
|
867
|
+
# @param request [SessionExecuteRequest] Command execution request
|
|
868
|
+
# @param [Hash] opts the optional parameters
|
|
869
|
+
# @return [SessionExecuteResponse]
|
|
870
|
+
def session_execute_command(session_id, request, opts = {})
|
|
871
|
+
data, _status_code, _headers = session_execute_command_with_http_info(session_id, request, opts)
|
|
872
|
+
data
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
# Execute command in session
|
|
876
|
+
# Execute a command within an existing shell session
|
|
877
|
+
# @param session_id [String] Session ID
|
|
878
|
+
# @param request [SessionExecuteRequest] Command execution request
|
|
879
|
+
# @param [Hash] opts the optional parameters
|
|
880
|
+
# @return [Array<(SessionExecuteResponse, Integer, Hash)>] SessionExecuteResponse data, response status code and response headers
|
|
881
|
+
def session_execute_command_with_http_info(session_id, request, opts = {})
|
|
882
|
+
if @api_client.config.debugging
|
|
883
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.session_execute_command ...'
|
|
884
|
+
end
|
|
885
|
+
# verify the required parameter 'session_id' is set
|
|
886
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
887
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.session_execute_command"
|
|
888
|
+
end
|
|
889
|
+
# verify the required parameter 'request' is set
|
|
890
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
891
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.session_execute_command"
|
|
892
|
+
end
|
|
893
|
+
# resource path
|
|
894
|
+
local_var_path = '/process/session/{sessionId}/exec'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
895
|
+
|
|
896
|
+
# query parameters
|
|
897
|
+
query_params = opts[:query_params] || {}
|
|
898
|
+
|
|
899
|
+
# header parameters
|
|
900
|
+
header_params = opts[:header_params] || {}
|
|
901
|
+
# HTTP header 'Accept' (if needed)
|
|
902
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
903
|
+
# HTTP header 'Content-Type'
|
|
904
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
905
|
+
if !content_type.nil?
|
|
906
|
+
header_params['Content-Type'] = content_type
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
# form parameters
|
|
910
|
+
form_params = opts[:form_params] || {}
|
|
911
|
+
|
|
912
|
+
# http body (model)
|
|
913
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
914
|
+
|
|
915
|
+
# return_type
|
|
916
|
+
return_type = opts[:debug_return_type] || 'SessionExecuteResponse'
|
|
917
|
+
|
|
918
|
+
# auth_names
|
|
919
|
+
auth_names = opts[:debug_auth_names] || []
|
|
920
|
+
|
|
921
|
+
new_options = opts.merge(
|
|
922
|
+
:operation => :"ProcessApi.session_execute_command",
|
|
923
|
+
:header_params => header_params,
|
|
924
|
+
:query_params => query_params,
|
|
925
|
+
:form_params => form_params,
|
|
926
|
+
:body => post_body,
|
|
927
|
+
:auth_names => auth_names,
|
|
928
|
+
:return_type => return_type
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
932
|
+
if @api_client.config.debugging
|
|
933
|
+
@api_client.config.logger.debug "API called: ProcessApi#session_execute_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
934
|
+
end
|
|
935
|
+
return data, status_code, headers
|
|
936
|
+
end
|
|
937
|
+
end
|
|
938
|
+
end
|