daytona_toolbox_api_client 0.103.0rc2__py3-none-any.whl → 0.108.0rc1__py3-none-any.whl
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.
Potentially problematic release.
This version of daytona_toolbox_api_client might be problematic. Click here for more details.
- daytona_toolbox_api_client/__init__.py +8 -1
- daytona_toolbox_api_client/api/file_system_api.py +274 -0
- daytona_toolbox_api_client/api/info_api.py +266 -20
- daytona_toolbox_api_client/api/process_api.py +1849 -265
- daytona_toolbox_api_client/models/__init__.py +8 -1
- daytona_toolbox_api_client/models/file_download_request.py +100 -0
- daytona_toolbox_api_client/models/files_download_request.py +100 -0
- daytona_toolbox_api_client/models/pty_create_request.py +110 -0
- daytona_toolbox_api_client/models/pty_create_response.py +100 -0
- daytona_toolbox_api_client/models/pty_list_response.py +108 -0
- daytona_toolbox_api_client/models/pty_resize_request.py +103 -0
- daytona_toolbox_api_client/models/pty_session_info.py +114 -0
- daytona_toolbox_api_client/models/user_home_dir_response.py +100 -0
- daytona_toolbox_api_client/models/work_dir_response.py +100 -0
- {daytona_toolbox_api_client-0.103.0rc2.dist-info → daytona_toolbox_api_client-0.108.0rc1.dist-info}/METADATA +1 -1
- {daytona_toolbox_api_client-0.103.0rc2.dist-info → daytona_toolbox_api_client-0.108.0rc1.dist-info}/RECORD +19 -10
- {daytona_toolbox_api_client-0.103.0rc2.dist-info → daytona_toolbox_api_client-0.108.0rc1.dist-info}/WHEEL +0 -0
- {daytona_toolbox_api_client-0.103.0rc2.dist-info → daytona_toolbox_api_client-0.108.0rc1.dist-info}/licenses/LICENSE +0 -0
- {daytona_toolbox_api_client-0.103.0rc2.dist-info → daytona_toolbox_api_client-0.108.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -17,12 +17,17 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
19
|
from pydantic import Field, StrictBool, StrictStr
|
|
20
|
-
from typing import List, Optional
|
|
20
|
+
from typing import Any, Dict, List, Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from daytona_toolbox_api_client.models.command import Command
|
|
23
23
|
from daytona_toolbox_api_client.models.create_session_request import CreateSessionRequest
|
|
24
24
|
from daytona_toolbox_api_client.models.execute_request import ExecuteRequest
|
|
25
25
|
from daytona_toolbox_api_client.models.execute_response import ExecuteResponse
|
|
26
|
+
from daytona_toolbox_api_client.models.pty_create_request import PtyCreateRequest
|
|
27
|
+
from daytona_toolbox_api_client.models.pty_create_response import PtyCreateResponse
|
|
28
|
+
from daytona_toolbox_api_client.models.pty_list_response import PtyListResponse
|
|
29
|
+
from daytona_toolbox_api_client.models.pty_resize_request import PtyResizeRequest
|
|
30
|
+
from daytona_toolbox_api_client.models.pty_session_info import PtySessionInfo
|
|
26
31
|
from daytona_toolbox_api_client.models.session import Session
|
|
27
32
|
from daytona_toolbox_api_client.models.session_execute_request import SessionExecuteRequest
|
|
28
33
|
from daytona_toolbox_api_client.models.session_execute_response import SessionExecuteResponse
|
|
@@ -46,9 +51,9 @@ class ProcessApi:
|
|
|
46
51
|
|
|
47
52
|
|
|
48
53
|
@validate_call
|
|
49
|
-
def
|
|
54
|
+
def connect_pty_session(
|
|
50
55
|
self,
|
|
51
|
-
|
|
56
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
52
57
|
_request_timeout: Union[
|
|
53
58
|
None,
|
|
54
59
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -62,12 +67,12 @@ class ProcessApi:
|
|
|
62
67
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
68
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
69
|
) -> None:
|
|
65
|
-
"""
|
|
70
|
+
"""Connect to PTY session via WebSocket
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
68
73
|
|
|
69
|
-
:param
|
|
70
|
-
:type
|
|
74
|
+
:param session_id: PTY session ID (required)
|
|
75
|
+
:type session_id: str
|
|
71
76
|
:param _request_timeout: timeout setting for this request. If one
|
|
72
77
|
number provided, it will be total request
|
|
73
78
|
timeout. It can also be a pair (tuple) of
|
|
@@ -90,8 +95,8 @@ class ProcessApi:
|
|
|
90
95
|
:return: Returns the result object.
|
|
91
96
|
""" # noqa: E501
|
|
92
97
|
|
|
93
|
-
_param = self.
|
|
94
|
-
|
|
98
|
+
_param = self._connect_pty_session_serialize(
|
|
99
|
+
session_id=session_id,
|
|
95
100
|
_request_auth=_request_auth,
|
|
96
101
|
_content_type=_content_type,
|
|
97
102
|
_headers=_headers,
|
|
@@ -99,7 +104,7 @@ class ProcessApi:
|
|
|
99
104
|
)
|
|
100
105
|
|
|
101
106
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
-
'
|
|
107
|
+
'101': None,
|
|
103
108
|
}
|
|
104
109
|
response_data = self.api_client.call_api(
|
|
105
110
|
*_param,
|
|
@@ -113,9 +118,9 @@ class ProcessApi:
|
|
|
113
118
|
|
|
114
119
|
|
|
115
120
|
@validate_call
|
|
116
|
-
def
|
|
121
|
+
def connect_pty_session_with_http_info(
|
|
117
122
|
self,
|
|
118
|
-
|
|
123
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
119
124
|
_request_timeout: Union[
|
|
120
125
|
None,
|
|
121
126
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -129,12 +134,12 @@ class ProcessApi:
|
|
|
129
134
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
135
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
136
|
) -> ApiResponse[None]:
|
|
132
|
-
"""
|
|
137
|
+
"""Connect to PTY session via WebSocket
|
|
133
138
|
|
|
134
|
-
|
|
139
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
135
140
|
|
|
136
|
-
:param
|
|
137
|
-
:type
|
|
141
|
+
:param session_id: PTY session ID (required)
|
|
142
|
+
:type session_id: str
|
|
138
143
|
:param _request_timeout: timeout setting for this request. If one
|
|
139
144
|
number provided, it will be total request
|
|
140
145
|
timeout. It can also be a pair (tuple) of
|
|
@@ -157,8 +162,8 @@ class ProcessApi:
|
|
|
157
162
|
:return: Returns the result object.
|
|
158
163
|
""" # noqa: E501
|
|
159
164
|
|
|
160
|
-
_param = self.
|
|
161
|
-
|
|
165
|
+
_param = self._connect_pty_session_serialize(
|
|
166
|
+
session_id=session_id,
|
|
162
167
|
_request_auth=_request_auth,
|
|
163
168
|
_content_type=_content_type,
|
|
164
169
|
_headers=_headers,
|
|
@@ -166,7 +171,7 @@ class ProcessApi:
|
|
|
166
171
|
)
|
|
167
172
|
|
|
168
173
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
169
|
-
'
|
|
174
|
+
'101': None,
|
|
170
175
|
}
|
|
171
176
|
response_data = self.api_client.call_api(
|
|
172
177
|
*_param,
|
|
@@ -180,9 +185,9 @@ class ProcessApi:
|
|
|
180
185
|
|
|
181
186
|
|
|
182
187
|
@validate_call
|
|
183
|
-
def
|
|
188
|
+
def connect_pty_session_without_preload_content(
|
|
184
189
|
self,
|
|
185
|
-
|
|
190
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
186
191
|
_request_timeout: Union[
|
|
187
192
|
None,
|
|
188
193
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -196,12 +201,12 @@ class ProcessApi:
|
|
|
196
201
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
197
202
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
198
203
|
) -> RESTResponseType:
|
|
199
|
-
"""
|
|
204
|
+
"""Connect to PTY session via WebSocket
|
|
200
205
|
|
|
201
|
-
|
|
206
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
202
207
|
|
|
203
|
-
:param
|
|
204
|
-
:type
|
|
208
|
+
:param session_id: PTY session ID (required)
|
|
209
|
+
:type session_id: str
|
|
205
210
|
:param _request_timeout: timeout setting for this request. If one
|
|
206
211
|
number provided, it will be total request
|
|
207
212
|
timeout. It can also be a pair (tuple) of
|
|
@@ -224,8 +229,8 @@ class ProcessApi:
|
|
|
224
229
|
:return: Returns the result object.
|
|
225
230
|
""" # noqa: E501
|
|
226
231
|
|
|
227
|
-
_param = self.
|
|
228
|
-
|
|
232
|
+
_param = self._connect_pty_session_serialize(
|
|
233
|
+
session_id=session_id,
|
|
229
234
|
_request_auth=_request_auth,
|
|
230
235
|
_content_type=_content_type,
|
|
231
236
|
_headers=_headers,
|
|
@@ -233,7 +238,7 @@ class ProcessApi:
|
|
|
233
238
|
)
|
|
234
239
|
|
|
235
240
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
236
|
-
'
|
|
241
|
+
'101': None,
|
|
237
242
|
}
|
|
238
243
|
response_data = self.api_client.call_api(
|
|
239
244
|
*_param,
|
|
@@ -242,9 +247,9 @@ class ProcessApi:
|
|
|
242
247
|
return response_data.response
|
|
243
248
|
|
|
244
249
|
|
|
245
|
-
def
|
|
250
|
+
def _connect_pty_session_serialize(
|
|
246
251
|
self,
|
|
247
|
-
|
|
252
|
+
session_id,
|
|
248
253
|
_request_auth,
|
|
249
254
|
_content_type,
|
|
250
255
|
_headers,
|
|
@@ -266,36 +271,23 @@ class ProcessApi:
|
|
|
266
271
|
_body_params: Optional[bytes] = None
|
|
267
272
|
|
|
268
273
|
# process the path parameters
|
|
274
|
+
if session_id is not None:
|
|
275
|
+
_path_params['sessionId'] = session_id
|
|
269
276
|
# process the query parameters
|
|
270
277
|
# process the header parameters
|
|
271
278
|
# process the form parameters
|
|
272
279
|
# process the body parameter
|
|
273
|
-
if request is not None:
|
|
274
|
-
_body_params = request
|
|
275
280
|
|
|
276
281
|
|
|
277
282
|
|
|
278
|
-
# set the HTTP header `Content-Type`
|
|
279
|
-
if _content_type:
|
|
280
|
-
_header_params['Content-Type'] = _content_type
|
|
281
|
-
else:
|
|
282
|
-
_default_content_type = (
|
|
283
|
-
self.api_client.select_header_content_type(
|
|
284
|
-
[
|
|
285
|
-
'application/json'
|
|
286
|
-
]
|
|
287
|
-
)
|
|
288
|
-
)
|
|
289
|
-
if _default_content_type is not None:
|
|
290
|
-
_header_params['Content-Type'] = _default_content_type
|
|
291
283
|
|
|
292
284
|
# authentication setting
|
|
293
285
|
_auth_settings: List[str] = [
|
|
294
286
|
]
|
|
295
287
|
|
|
296
288
|
return self.api_client.param_serialize(
|
|
297
|
-
method='
|
|
298
|
-
resource_path='/process/
|
|
289
|
+
method='GET',
|
|
290
|
+
resource_path='/process/pty/{sessionId}/connect',
|
|
299
291
|
path_params=_path_params,
|
|
300
292
|
query_params=_query_params,
|
|
301
293
|
header_params=_header_params,
|
|
@@ -312,9 +304,9 @@ class ProcessApi:
|
|
|
312
304
|
|
|
313
305
|
|
|
314
306
|
@validate_call
|
|
315
|
-
def
|
|
307
|
+
def create_pty_session(
|
|
316
308
|
self,
|
|
317
|
-
|
|
309
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
318
310
|
_request_timeout: Union[
|
|
319
311
|
None,
|
|
320
312
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -327,13 +319,13 @@ class ProcessApi:
|
|
|
327
319
|
_content_type: Optional[StrictStr] = None,
|
|
328
320
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
329
321
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
330
|
-
) ->
|
|
331
|
-
"""
|
|
322
|
+
) -> PtyCreateResponse:
|
|
323
|
+
"""Create a new PTY session
|
|
332
324
|
|
|
333
|
-
|
|
325
|
+
Create a new pseudo-terminal session with specified configuration
|
|
334
326
|
|
|
335
|
-
:param
|
|
336
|
-
:type
|
|
327
|
+
:param request: PTY session creation request (required)
|
|
328
|
+
:type request: PtyCreateRequest
|
|
337
329
|
:param _request_timeout: timeout setting for this request. If one
|
|
338
330
|
number provided, it will be total request
|
|
339
331
|
timeout. It can also be a pair (tuple) of
|
|
@@ -356,8 +348,8 @@ class ProcessApi:
|
|
|
356
348
|
:return: Returns the result object.
|
|
357
349
|
""" # noqa: E501
|
|
358
350
|
|
|
359
|
-
_param = self.
|
|
360
|
-
|
|
351
|
+
_param = self._create_pty_session_serialize(
|
|
352
|
+
request=request,
|
|
361
353
|
_request_auth=_request_auth,
|
|
362
354
|
_content_type=_content_type,
|
|
363
355
|
_headers=_headers,
|
|
@@ -365,7 +357,7 @@ class ProcessApi:
|
|
|
365
357
|
)
|
|
366
358
|
|
|
367
359
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
368
|
-
'
|
|
360
|
+
'201': "PtyCreateResponse",
|
|
369
361
|
}
|
|
370
362
|
response_data = self.api_client.call_api(
|
|
371
363
|
*_param,
|
|
@@ -379,9 +371,9 @@ class ProcessApi:
|
|
|
379
371
|
|
|
380
372
|
|
|
381
373
|
@validate_call
|
|
382
|
-
def
|
|
374
|
+
def create_pty_session_with_http_info(
|
|
383
375
|
self,
|
|
384
|
-
|
|
376
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
385
377
|
_request_timeout: Union[
|
|
386
378
|
None,
|
|
387
379
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -394,13 +386,13 @@ class ProcessApi:
|
|
|
394
386
|
_content_type: Optional[StrictStr] = None,
|
|
395
387
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
396
388
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
397
|
-
) -> ApiResponse[
|
|
398
|
-
"""
|
|
389
|
+
) -> ApiResponse[PtyCreateResponse]:
|
|
390
|
+
"""Create a new PTY session
|
|
399
391
|
|
|
400
|
-
|
|
392
|
+
Create a new pseudo-terminal session with specified configuration
|
|
401
393
|
|
|
402
|
-
:param
|
|
403
|
-
:type
|
|
394
|
+
:param request: PTY session creation request (required)
|
|
395
|
+
:type request: PtyCreateRequest
|
|
404
396
|
:param _request_timeout: timeout setting for this request. If one
|
|
405
397
|
number provided, it will be total request
|
|
406
398
|
timeout. It can also be a pair (tuple) of
|
|
@@ -423,8 +415,8 @@ class ProcessApi:
|
|
|
423
415
|
:return: Returns the result object.
|
|
424
416
|
""" # noqa: E501
|
|
425
417
|
|
|
426
|
-
_param = self.
|
|
427
|
-
|
|
418
|
+
_param = self._create_pty_session_serialize(
|
|
419
|
+
request=request,
|
|
428
420
|
_request_auth=_request_auth,
|
|
429
421
|
_content_type=_content_type,
|
|
430
422
|
_headers=_headers,
|
|
@@ -432,7 +424,7 @@ class ProcessApi:
|
|
|
432
424
|
)
|
|
433
425
|
|
|
434
426
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
435
|
-
'
|
|
427
|
+
'201': "PtyCreateResponse",
|
|
436
428
|
}
|
|
437
429
|
response_data = self.api_client.call_api(
|
|
438
430
|
*_param,
|
|
@@ -446,9 +438,9 @@ class ProcessApi:
|
|
|
446
438
|
|
|
447
439
|
|
|
448
440
|
@validate_call
|
|
449
|
-
def
|
|
441
|
+
def create_pty_session_without_preload_content(
|
|
450
442
|
self,
|
|
451
|
-
|
|
443
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
452
444
|
_request_timeout: Union[
|
|
453
445
|
None,
|
|
454
446
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -462,12 +454,12 @@ class ProcessApi:
|
|
|
462
454
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
463
455
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
464
456
|
) -> RESTResponseType:
|
|
465
|
-
"""
|
|
457
|
+
"""Create a new PTY session
|
|
466
458
|
|
|
467
|
-
|
|
459
|
+
Create a new pseudo-terminal session with specified configuration
|
|
468
460
|
|
|
469
|
-
:param
|
|
470
|
-
:type
|
|
461
|
+
:param request: PTY session creation request (required)
|
|
462
|
+
:type request: PtyCreateRequest
|
|
471
463
|
:param _request_timeout: timeout setting for this request. If one
|
|
472
464
|
number provided, it will be total request
|
|
473
465
|
timeout. It can also be a pair (tuple) of
|
|
@@ -490,8 +482,8 @@ class ProcessApi:
|
|
|
490
482
|
:return: Returns the result object.
|
|
491
483
|
""" # noqa: E501
|
|
492
484
|
|
|
493
|
-
_param = self.
|
|
494
|
-
|
|
485
|
+
_param = self._create_pty_session_serialize(
|
|
486
|
+
request=request,
|
|
495
487
|
_request_auth=_request_auth,
|
|
496
488
|
_content_type=_content_type,
|
|
497
489
|
_headers=_headers,
|
|
@@ -499,7 +491,7 @@ class ProcessApi:
|
|
|
499
491
|
)
|
|
500
492
|
|
|
501
493
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
502
|
-
'
|
|
494
|
+
'201': "PtyCreateResponse",
|
|
503
495
|
}
|
|
504
496
|
response_data = self.api_client.call_api(
|
|
505
497
|
*_param,
|
|
@@ -508,9 +500,9 @@ class ProcessApi:
|
|
|
508
500
|
return response_data.response
|
|
509
501
|
|
|
510
502
|
|
|
511
|
-
def
|
|
503
|
+
def _create_pty_session_serialize(
|
|
512
504
|
self,
|
|
513
|
-
|
|
505
|
+
request,
|
|
514
506
|
_request_auth,
|
|
515
507
|
_content_type,
|
|
516
508
|
_headers,
|
|
@@ -532,23 +524,43 @@ class ProcessApi:
|
|
|
532
524
|
_body_params: Optional[bytes] = None
|
|
533
525
|
|
|
534
526
|
# process the path parameters
|
|
535
|
-
if session_id is not None:
|
|
536
|
-
_path_params['sessionId'] = session_id
|
|
537
527
|
# process the query parameters
|
|
538
528
|
# process the header parameters
|
|
539
529
|
# process the form parameters
|
|
540
530
|
# process the body parameter
|
|
531
|
+
if request is not None:
|
|
532
|
+
_body_params = request
|
|
541
533
|
|
|
542
534
|
|
|
535
|
+
# set the HTTP header `Accept`
|
|
536
|
+
if 'Accept' not in _header_params:
|
|
537
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
538
|
+
[
|
|
539
|
+
'application/json'
|
|
540
|
+
]
|
|
541
|
+
)
|
|
543
542
|
|
|
543
|
+
# set the HTTP header `Content-Type`
|
|
544
|
+
if _content_type:
|
|
545
|
+
_header_params['Content-Type'] = _content_type
|
|
546
|
+
else:
|
|
547
|
+
_default_content_type = (
|
|
548
|
+
self.api_client.select_header_content_type(
|
|
549
|
+
[
|
|
550
|
+
'application/json'
|
|
551
|
+
]
|
|
552
|
+
)
|
|
553
|
+
)
|
|
554
|
+
if _default_content_type is not None:
|
|
555
|
+
_header_params['Content-Type'] = _default_content_type
|
|
544
556
|
|
|
545
557
|
# authentication setting
|
|
546
558
|
_auth_settings: List[str] = [
|
|
547
559
|
]
|
|
548
560
|
|
|
549
561
|
return self.api_client.param_serialize(
|
|
550
|
-
method='
|
|
551
|
-
resource_path='/process/
|
|
562
|
+
method='POST',
|
|
563
|
+
resource_path='/process/pty',
|
|
552
564
|
path_params=_path_params,
|
|
553
565
|
query_params=_query_params,
|
|
554
566
|
header_params=_header_params,
|
|
@@ -565,9 +577,9 @@ class ProcessApi:
|
|
|
565
577
|
|
|
566
578
|
|
|
567
579
|
@validate_call
|
|
568
|
-
def
|
|
580
|
+
def create_session(
|
|
569
581
|
self,
|
|
570
|
-
request: Annotated[
|
|
582
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
571
583
|
_request_timeout: Union[
|
|
572
584
|
None,
|
|
573
585
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -580,13 +592,13 @@ class ProcessApi:
|
|
|
580
592
|
_content_type: Optional[StrictStr] = None,
|
|
581
593
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
582
594
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
583
|
-
) ->
|
|
584
|
-
"""
|
|
595
|
+
) -> None:
|
|
596
|
+
"""Create a new session
|
|
585
597
|
|
|
586
|
-
|
|
598
|
+
Create a new shell session for command execution
|
|
587
599
|
|
|
588
|
-
:param request:
|
|
589
|
-
:type request:
|
|
600
|
+
:param request: Session creation request (required)
|
|
601
|
+
:type request: CreateSessionRequest
|
|
590
602
|
:param _request_timeout: timeout setting for this request. If one
|
|
591
603
|
number provided, it will be total request
|
|
592
604
|
timeout. It can also be a pair (tuple) of
|
|
@@ -609,7 +621,7 @@ class ProcessApi:
|
|
|
609
621
|
:return: Returns the result object.
|
|
610
622
|
""" # noqa: E501
|
|
611
623
|
|
|
612
|
-
_param = self.
|
|
624
|
+
_param = self._create_session_serialize(
|
|
613
625
|
request=request,
|
|
614
626
|
_request_auth=_request_auth,
|
|
615
627
|
_content_type=_content_type,
|
|
@@ -618,7 +630,7 @@ class ProcessApi:
|
|
|
618
630
|
)
|
|
619
631
|
|
|
620
632
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
621
|
-
'
|
|
633
|
+
'201': None,
|
|
622
634
|
}
|
|
623
635
|
response_data = self.api_client.call_api(
|
|
624
636
|
*_param,
|
|
@@ -632,9 +644,9 @@ class ProcessApi:
|
|
|
632
644
|
|
|
633
645
|
|
|
634
646
|
@validate_call
|
|
635
|
-
def
|
|
647
|
+
def create_session_with_http_info(
|
|
636
648
|
self,
|
|
637
|
-
request: Annotated[
|
|
649
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
638
650
|
_request_timeout: Union[
|
|
639
651
|
None,
|
|
640
652
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -647,13 +659,13 @@ class ProcessApi:
|
|
|
647
659
|
_content_type: Optional[StrictStr] = None,
|
|
648
660
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
649
661
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
650
|
-
) -> ApiResponse[
|
|
651
|
-
"""
|
|
662
|
+
) -> ApiResponse[None]:
|
|
663
|
+
"""Create a new session
|
|
652
664
|
|
|
653
|
-
|
|
665
|
+
Create a new shell session for command execution
|
|
654
666
|
|
|
655
|
-
:param request:
|
|
656
|
-
:type request:
|
|
667
|
+
:param request: Session creation request (required)
|
|
668
|
+
:type request: CreateSessionRequest
|
|
657
669
|
:param _request_timeout: timeout setting for this request. If one
|
|
658
670
|
number provided, it will be total request
|
|
659
671
|
timeout. It can also be a pair (tuple) of
|
|
@@ -676,7 +688,7 @@ class ProcessApi:
|
|
|
676
688
|
:return: Returns the result object.
|
|
677
689
|
""" # noqa: E501
|
|
678
690
|
|
|
679
|
-
_param = self.
|
|
691
|
+
_param = self._create_session_serialize(
|
|
680
692
|
request=request,
|
|
681
693
|
_request_auth=_request_auth,
|
|
682
694
|
_content_type=_content_type,
|
|
@@ -685,7 +697,7 @@ class ProcessApi:
|
|
|
685
697
|
)
|
|
686
698
|
|
|
687
699
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
688
|
-
'
|
|
700
|
+
'201': None,
|
|
689
701
|
}
|
|
690
702
|
response_data = self.api_client.call_api(
|
|
691
703
|
*_param,
|
|
@@ -699,9 +711,9 @@ class ProcessApi:
|
|
|
699
711
|
|
|
700
712
|
|
|
701
713
|
@validate_call
|
|
702
|
-
def
|
|
714
|
+
def create_session_without_preload_content(
|
|
703
715
|
self,
|
|
704
|
-
request: Annotated[
|
|
716
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
705
717
|
_request_timeout: Union[
|
|
706
718
|
None,
|
|
707
719
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -715,12 +727,12 @@ class ProcessApi:
|
|
|
715
727
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
716
728
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
717
729
|
) -> RESTResponseType:
|
|
718
|
-
"""
|
|
730
|
+
"""Create a new session
|
|
719
731
|
|
|
720
|
-
|
|
732
|
+
Create a new shell session for command execution
|
|
721
733
|
|
|
722
|
-
:param request:
|
|
723
|
-
:type request:
|
|
734
|
+
:param request: Session creation request (required)
|
|
735
|
+
:type request: CreateSessionRequest
|
|
724
736
|
:param _request_timeout: timeout setting for this request. If one
|
|
725
737
|
number provided, it will be total request
|
|
726
738
|
timeout. It can also be a pair (tuple) of
|
|
@@ -743,7 +755,7 @@ class ProcessApi:
|
|
|
743
755
|
:return: Returns the result object.
|
|
744
756
|
""" # noqa: E501
|
|
745
757
|
|
|
746
|
-
_param = self.
|
|
758
|
+
_param = self._create_session_serialize(
|
|
747
759
|
request=request,
|
|
748
760
|
_request_auth=_request_auth,
|
|
749
761
|
_content_type=_content_type,
|
|
@@ -752,7 +764,7 @@ class ProcessApi:
|
|
|
752
764
|
)
|
|
753
765
|
|
|
754
766
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
755
|
-
'
|
|
767
|
+
'201': None,
|
|
756
768
|
}
|
|
757
769
|
response_data = self.api_client.call_api(
|
|
758
770
|
*_param,
|
|
@@ -761,7 +773,7 @@ class ProcessApi:
|
|
|
761
773
|
return response_data.response
|
|
762
774
|
|
|
763
775
|
|
|
764
|
-
def
|
|
776
|
+
def _create_session_serialize(
|
|
765
777
|
self,
|
|
766
778
|
request,
|
|
767
779
|
_request_auth,
|
|
@@ -793,13 +805,6 @@ class ProcessApi:
|
|
|
793
805
|
_body_params = request
|
|
794
806
|
|
|
795
807
|
|
|
796
|
-
# set the HTTP header `Accept`
|
|
797
|
-
if 'Accept' not in _header_params:
|
|
798
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
799
|
-
[
|
|
800
|
-
'application/json'
|
|
801
|
-
]
|
|
802
|
-
)
|
|
803
808
|
|
|
804
809
|
# set the HTTP header `Content-Type`
|
|
805
810
|
if _content_type:
|
|
@@ -821,7 +826,7 @@ class ProcessApi:
|
|
|
821
826
|
|
|
822
827
|
return self.api_client.param_serialize(
|
|
823
828
|
method='POST',
|
|
824
|
-
resource_path='/process/
|
|
829
|
+
resource_path='/process/session',
|
|
825
830
|
path_params=_path_params,
|
|
826
831
|
query_params=_query_params,
|
|
827
832
|
header_params=_header_params,
|
|
@@ -838,9 +843,9 @@ class ProcessApi:
|
|
|
838
843
|
|
|
839
844
|
|
|
840
845
|
@validate_call
|
|
841
|
-
def
|
|
846
|
+
def delete_pty_session(
|
|
842
847
|
self,
|
|
843
|
-
session_id: Annotated[StrictStr, Field(description="
|
|
848
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
844
849
|
_request_timeout: Union[
|
|
845
850
|
None,
|
|
846
851
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -853,12 +858,12 @@ class ProcessApi:
|
|
|
853
858
|
_content_type: Optional[StrictStr] = None,
|
|
854
859
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
855
860
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
856
|
-
) ->
|
|
857
|
-
"""
|
|
861
|
+
) -> Dict[str, object]:
|
|
862
|
+
"""Delete a PTY session
|
|
858
863
|
|
|
859
|
-
|
|
864
|
+
Delete a pseudo-terminal session and terminate its process
|
|
860
865
|
|
|
861
|
-
:param session_id:
|
|
866
|
+
:param session_id: PTY session ID (required)
|
|
862
867
|
:type session_id: str
|
|
863
868
|
:param _request_timeout: timeout setting for this request. If one
|
|
864
869
|
number provided, it will be total request
|
|
@@ -882,7 +887,7 @@ class ProcessApi:
|
|
|
882
887
|
:return: Returns the result object.
|
|
883
888
|
""" # noqa: E501
|
|
884
889
|
|
|
885
|
-
_param = self.
|
|
890
|
+
_param = self._delete_pty_session_serialize(
|
|
886
891
|
session_id=session_id,
|
|
887
892
|
_request_auth=_request_auth,
|
|
888
893
|
_content_type=_content_type,
|
|
@@ -891,7 +896,7 @@ class ProcessApi:
|
|
|
891
896
|
)
|
|
892
897
|
|
|
893
898
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
894
|
-
'200': "
|
|
899
|
+
'200': "Dict[str, object]",
|
|
895
900
|
}
|
|
896
901
|
response_data = self.api_client.call_api(
|
|
897
902
|
*_param,
|
|
@@ -905,9 +910,9 @@ class ProcessApi:
|
|
|
905
910
|
|
|
906
911
|
|
|
907
912
|
@validate_call
|
|
908
|
-
def
|
|
913
|
+
def delete_pty_session_with_http_info(
|
|
909
914
|
self,
|
|
910
|
-
session_id: Annotated[StrictStr, Field(description="
|
|
915
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
911
916
|
_request_timeout: Union[
|
|
912
917
|
None,
|
|
913
918
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -920,12 +925,12 @@ class ProcessApi:
|
|
|
920
925
|
_content_type: Optional[StrictStr] = None,
|
|
921
926
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
922
927
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
923
|
-
) -> ApiResponse[
|
|
924
|
-
"""
|
|
928
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
929
|
+
"""Delete a PTY session
|
|
925
930
|
|
|
926
|
-
|
|
931
|
+
Delete a pseudo-terminal session and terminate its process
|
|
927
932
|
|
|
928
|
-
:param session_id:
|
|
933
|
+
:param session_id: PTY session ID (required)
|
|
929
934
|
:type session_id: str
|
|
930
935
|
:param _request_timeout: timeout setting for this request. If one
|
|
931
936
|
number provided, it will be total request
|
|
@@ -949,7 +954,7 @@ class ProcessApi:
|
|
|
949
954
|
:return: Returns the result object.
|
|
950
955
|
""" # noqa: E501
|
|
951
956
|
|
|
952
|
-
_param = self.
|
|
957
|
+
_param = self._delete_pty_session_serialize(
|
|
953
958
|
session_id=session_id,
|
|
954
959
|
_request_auth=_request_auth,
|
|
955
960
|
_content_type=_content_type,
|
|
@@ -958,7 +963,7 @@ class ProcessApi:
|
|
|
958
963
|
)
|
|
959
964
|
|
|
960
965
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
961
|
-
'200': "
|
|
966
|
+
'200': "Dict[str, object]",
|
|
962
967
|
}
|
|
963
968
|
response_data = self.api_client.call_api(
|
|
964
969
|
*_param,
|
|
@@ -972,9 +977,9 @@ class ProcessApi:
|
|
|
972
977
|
|
|
973
978
|
|
|
974
979
|
@validate_call
|
|
975
|
-
def
|
|
980
|
+
def delete_pty_session_without_preload_content(
|
|
976
981
|
self,
|
|
977
|
-
session_id: Annotated[StrictStr, Field(description="
|
|
982
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
978
983
|
_request_timeout: Union[
|
|
979
984
|
None,
|
|
980
985
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -988,11 +993,11 @@ class ProcessApi:
|
|
|
988
993
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
989
994
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
990
995
|
) -> RESTResponseType:
|
|
991
|
-
"""
|
|
996
|
+
"""Delete a PTY session
|
|
992
997
|
|
|
993
|
-
|
|
998
|
+
Delete a pseudo-terminal session and terminate its process
|
|
994
999
|
|
|
995
|
-
:param session_id:
|
|
1000
|
+
:param session_id: PTY session ID (required)
|
|
996
1001
|
:type session_id: str
|
|
997
1002
|
:param _request_timeout: timeout setting for this request. If one
|
|
998
1003
|
number provided, it will be total request
|
|
@@ -1016,7 +1021,7 @@ class ProcessApi:
|
|
|
1016
1021
|
:return: Returns the result object.
|
|
1017
1022
|
""" # noqa: E501
|
|
1018
1023
|
|
|
1019
|
-
_param = self.
|
|
1024
|
+
_param = self._delete_pty_session_serialize(
|
|
1020
1025
|
session_id=session_id,
|
|
1021
1026
|
_request_auth=_request_auth,
|
|
1022
1027
|
_content_type=_content_type,
|
|
@@ -1025,7 +1030,7 @@ class ProcessApi:
|
|
|
1025
1030
|
)
|
|
1026
1031
|
|
|
1027
1032
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1028
|
-
'200': "
|
|
1033
|
+
'200': "Dict[str, object]",
|
|
1029
1034
|
}
|
|
1030
1035
|
response_data = self.api_client.call_api(
|
|
1031
1036
|
*_param,
|
|
@@ -1034,7 +1039,7 @@ class ProcessApi:
|
|
|
1034
1039
|
return response_data.response
|
|
1035
1040
|
|
|
1036
1041
|
|
|
1037
|
-
def
|
|
1042
|
+
def _delete_pty_session_serialize(
|
|
1038
1043
|
self,
|
|
1039
1044
|
session_id,
|
|
1040
1045
|
_request_auth,
|
|
@@ -1080,8 +1085,8 @@ class ProcessApi:
|
|
|
1080
1085
|
]
|
|
1081
1086
|
|
|
1082
1087
|
return self.api_client.param_serialize(
|
|
1083
|
-
method='
|
|
1084
|
-
resource_path='/process/
|
|
1088
|
+
method='DELETE',
|
|
1089
|
+
resource_path='/process/pty/{sessionId}',
|
|
1085
1090
|
path_params=_path_params,
|
|
1086
1091
|
query_params=_query_params,
|
|
1087
1092
|
header_params=_header_params,
|
|
@@ -1098,10 +1103,9 @@ class ProcessApi:
|
|
|
1098
1103
|
|
|
1099
1104
|
|
|
1100
1105
|
@validate_call
|
|
1101
|
-
def
|
|
1106
|
+
def delete_session(
|
|
1102
1107
|
self,
|
|
1103
1108
|
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1104
|
-
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1105
1109
|
_request_timeout: Union[
|
|
1106
1110
|
None,
|
|
1107
1111
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1114,15 +1118,13 @@ class ProcessApi:
|
|
|
1114
1118
|
_content_type: Optional[StrictStr] = None,
|
|
1115
1119
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1116
1120
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1117
|
-
) ->
|
|
1118
|
-
"""
|
|
1121
|
+
) -> None:
|
|
1122
|
+
"""Delete a session
|
|
1119
1123
|
|
|
1120
|
-
|
|
1124
|
+
Delete an existing shell session
|
|
1121
1125
|
|
|
1122
1126
|
:param session_id: Session ID (required)
|
|
1123
1127
|
:type session_id: str
|
|
1124
|
-
:param command_id: Command ID (required)
|
|
1125
|
-
:type command_id: str
|
|
1126
1128
|
:param _request_timeout: timeout setting for this request. If one
|
|
1127
1129
|
number provided, it will be total request
|
|
1128
1130
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1145,9 +1147,8 @@ class ProcessApi:
|
|
|
1145
1147
|
:return: Returns the result object.
|
|
1146
1148
|
""" # noqa: E501
|
|
1147
1149
|
|
|
1148
|
-
_param = self.
|
|
1150
|
+
_param = self._delete_session_serialize(
|
|
1149
1151
|
session_id=session_id,
|
|
1150
|
-
command_id=command_id,
|
|
1151
1152
|
_request_auth=_request_auth,
|
|
1152
1153
|
_content_type=_content_type,
|
|
1153
1154
|
_headers=_headers,
|
|
@@ -1155,7 +1156,7 @@ class ProcessApi:
|
|
|
1155
1156
|
)
|
|
1156
1157
|
|
|
1157
1158
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1158
|
-
'
|
|
1159
|
+
'204': None,
|
|
1159
1160
|
}
|
|
1160
1161
|
response_data = self.api_client.call_api(
|
|
1161
1162
|
*_param,
|
|
@@ -1169,10 +1170,9 @@ class ProcessApi:
|
|
|
1169
1170
|
|
|
1170
1171
|
|
|
1171
1172
|
@validate_call
|
|
1172
|
-
def
|
|
1173
|
+
def delete_session_with_http_info(
|
|
1173
1174
|
self,
|
|
1174
1175
|
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1175
|
-
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1176
1176
|
_request_timeout: Union[
|
|
1177
1177
|
None,
|
|
1178
1178
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1185,15 +1185,13 @@ class ProcessApi:
|
|
|
1185
1185
|
_content_type: Optional[StrictStr] = None,
|
|
1186
1186
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1187
1187
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1188
|
-
) -> ApiResponse[
|
|
1189
|
-
"""
|
|
1188
|
+
) -> ApiResponse[None]:
|
|
1189
|
+
"""Delete a session
|
|
1190
1190
|
|
|
1191
|
-
|
|
1191
|
+
Delete an existing shell session
|
|
1192
1192
|
|
|
1193
1193
|
:param session_id: Session ID (required)
|
|
1194
1194
|
:type session_id: str
|
|
1195
|
-
:param command_id: Command ID (required)
|
|
1196
|
-
:type command_id: str
|
|
1197
1195
|
:param _request_timeout: timeout setting for this request. If one
|
|
1198
1196
|
number provided, it will be total request
|
|
1199
1197
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1216,9 +1214,8 @@ class ProcessApi:
|
|
|
1216
1214
|
:return: Returns the result object.
|
|
1217
1215
|
""" # noqa: E501
|
|
1218
1216
|
|
|
1219
|
-
_param = self.
|
|
1217
|
+
_param = self._delete_session_serialize(
|
|
1220
1218
|
session_id=session_id,
|
|
1221
|
-
command_id=command_id,
|
|
1222
1219
|
_request_auth=_request_auth,
|
|
1223
1220
|
_content_type=_content_type,
|
|
1224
1221
|
_headers=_headers,
|
|
@@ -1226,7 +1223,7 @@ class ProcessApi:
|
|
|
1226
1223
|
)
|
|
1227
1224
|
|
|
1228
1225
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1229
|
-
'
|
|
1226
|
+
'204': None,
|
|
1230
1227
|
}
|
|
1231
1228
|
response_data = self.api_client.call_api(
|
|
1232
1229
|
*_param,
|
|
@@ -1240,10 +1237,9 @@ class ProcessApi:
|
|
|
1240
1237
|
|
|
1241
1238
|
|
|
1242
1239
|
@validate_call
|
|
1243
|
-
def
|
|
1240
|
+
def delete_session_without_preload_content(
|
|
1244
1241
|
self,
|
|
1245
1242
|
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1246
|
-
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1247
1243
|
_request_timeout: Union[
|
|
1248
1244
|
None,
|
|
1249
1245
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1257,14 +1253,12 @@ class ProcessApi:
|
|
|
1257
1253
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1258
1254
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1259
1255
|
) -> RESTResponseType:
|
|
1260
|
-
"""
|
|
1256
|
+
"""Delete a session
|
|
1261
1257
|
|
|
1262
|
-
|
|
1258
|
+
Delete an existing shell session
|
|
1263
1259
|
|
|
1264
1260
|
:param session_id: Session ID (required)
|
|
1265
1261
|
:type session_id: str
|
|
1266
|
-
:param command_id: Command ID (required)
|
|
1267
|
-
:type command_id: str
|
|
1268
1262
|
:param _request_timeout: timeout setting for this request. If one
|
|
1269
1263
|
number provided, it will be total request
|
|
1270
1264
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1287,9 +1281,8 @@ class ProcessApi:
|
|
|
1287
1281
|
:return: Returns the result object.
|
|
1288
1282
|
""" # noqa: E501
|
|
1289
1283
|
|
|
1290
|
-
_param = self.
|
|
1284
|
+
_param = self._delete_session_serialize(
|
|
1291
1285
|
session_id=session_id,
|
|
1292
|
-
command_id=command_id,
|
|
1293
1286
|
_request_auth=_request_auth,
|
|
1294
1287
|
_content_type=_content_type,
|
|
1295
1288
|
_headers=_headers,
|
|
@@ -1297,7 +1290,7 @@ class ProcessApi:
|
|
|
1297
1290
|
)
|
|
1298
1291
|
|
|
1299
1292
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1300
|
-
'
|
|
1293
|
+
'204': None,
|
|
1301
1294
|
}
|
|
1302
1295
|
response_data = self.api_client.call_api(
|
|
1303
1296
|
*_param,
|
|
@@ -1306,10 +1299,1609 @@ class ProcessApi:
|
|
|
1306
1299
|
return response_data.response
|
|
1307
1300
|
|
|
1308
1301
|
|
|
1309
|
-
def
|
|
1302
|
+
def _delete_session_serialize(
|
|
1303
|
+
self,
|
|
1304
|
+
session_id,
|
|
1305
|
+
_request_auth,
|
|
1306
|
+
_content_type,
|
|
1307
|
+
_headers,
|
|
1308
|
+
_host_index,
|
|
1309
|
+
) -> RequestSerialized:
|
|
1310
|
+
|
|
1311
|
+
_host = None
|
|
1312
|
+
|
|
1313
|
+
_collection_formats: Dict[str, str] = {
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
_path_params: Dict[str, str] = {}
|
|
1317
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1318
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1319
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1320
|
+
_files: Dict[
|
|
1321
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1322
|
+
] = {}
|
|
1323
|
+
_body_params: Optional[bytes] = None
|
|
1324
|
+
|
|
1325
|
+
# process the path parameters
|
|
1326
|
+
if session_id is not None:
|
|
1327
|
+
_path_params['sessionId'] = session_id
|
|
1328
|
+
# process the query parameters
|
|
1329
|
+
# process the header parameters
|
|
1330
|
+
# process the form parameters
|
|
1331
|
+
# process the body parameter
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
# authentication setting
|
|
1337
|
+
_auth_settings: List[str] = [
|
|
1338
|
+
]
|
|
1339
|
+
|
|
1340
|
+
return self.api_client.param_serialize(
|
|
1341
|
+
method='DELETE',
|
|
1342
|
+
resource_path='/process/session/{sessionId}',
|
|
1343
|
+
path_params=_path_params,
|
|
1344
|
+
query_params=_query_params,
|
|
1345
|
+
header_params=_header_params,
|
|
1346
|
+
body=_body_params,
|
|
1347
|
+
post_params=_form_params,
|
|
1348
|
+
files=_files,
|
|
1349
|
+
auth_settings=_auth_settings,
|
|
1350
|
+
collection_formats=_collection_formats,
|
|
1351
|
+
_host=_host,
|
|
1352
|
+
_request_auth=_request_auth
|
|
1353
|
+
)
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
@validate_call
|
|
1359
|
+
def execute_command(
|
|
1360
|
+
self,
|
|
1361
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
1362
|
+
_request_timeout: Union[
|
|
1363
|
+
None,
|
|
1364
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1365
|
+
Tuple[
|
|
1366
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1367
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1368
|
+
]
|
|
1369
|
+
] = None,
|
|
1370
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1371
|
+
_content_type: Optional[StrictStr] = None,
|
|
1372
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1373
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1374
|
+
) -> ExecuteResponse:
|
|
1375
|
+
"""Execute a command
|
|
1376
|
+
|
|
1377
|
+
Execute a shell command and return the output and exit code
|
|
1378
|
+
|
|
1379
|
+
:param request: Command execution request (required)
|
|
1380
|
+
:type request: ExecuteRequest
|
|
1381
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1382
|
+
number provided, it will be total request
|
|
1383
|
+
timeout. It can also be a pair (tuple) of
|
|
1384
|
+
(connection, read) timeouts.
|
|
1385
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1386
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1387
|
+
request; this effectively ignores the
|
|
1388
|
+
authentication in the spec for a single request.
|
|
1389
|
+
:type _request_auth: dict, optional
|
|
1390
|
+
:param _content_type: force content-type for the request.
|
|
1391
|
+
:type _content_type: str, Optional
|
|
1392
|
+
:param _headers: set to override the headers for a single
|
|
1393
|
+
request; this effectively ignores the headers
|
|
1394
|
+
in the spec for a single request.
|
|
1395
|
+
:type _headers: dict, optional
|
|
1396
|
+
:param _host_index: set to override the host_index for a single
|
|
1397
|
+
request; this effectively ignores the host_index
|
|
1398
|
+
in the spec for a single request.
|
|
1399
|
+
:type _host_index: int, optional
|
|
1400
|
+
:return: Returns the result object.
|
|
1401
|
+
""" # noqa: E501
|
|
1402
|
+
|
|
1403
|
+
_param = self._execute_command_serialize(
|
|
1404
|
+
request=request,
|
|
1405
|
+
_request_auth=_request_auth,
|
|
1406
|
+
_content_type=_content_type,
|
|
1407
|
+
_headers=_headers,
|
|
1408
|
+
_host_index=_host_index
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1412
|
+
'200': "ExecuteResponse",
|
|
1413
|
+
}
|
|
1414
|
+
response_data = self.api_client.call_api(
|
|
1415
|
+
*_param,
|
|
1416
|
+
_request_timeout=_request_timeout
|
|
1417
|
+
)
|
|
1418
|
+
response_data.read()
|
|
1419
|
+
return self.api_client.response_deserialize(
|
|
1420
|
+
response_data=response_data,
|
|
1421
|
+
response_types_map=_response_types_map,
|
|
1422
|
+
).data
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
@validate_call
|
|
1426
|
+
def execute_command_with_http_info(
|
|
1427
|
+
self,
|
|
1428
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
1429
|
+
_request_timeout: Union[
|
|
1430
|
+
None,
|
|
1431
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1432
|
+
Tuple[
|
|
1433
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1434
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1435
|
+
]
|
|
1436
|
+
] = None,
|
|
1437
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1438
|
+
_content_type: Optional[StrictStr] = None,
|
|
1439
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1440
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1441
|
+
) -> ApiResponse[ExecuteResponse]:
|
|
1442
|
+
"""Execute a command
|
|
1443
|
+
|
|
1444
|
+
Execute a shell command and return the output and exit code
|
|
1445
|
+
|
|
1446
|
+
:param request: Command execution request (required)
|
|
1447
|
+
:type request: ExecuteRequest
|
|
1448
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1449
|
+
number provided, it will be total request
|
|
1450
|
+
timeout. It can also be a pair (tuple) of
|
|
1451
|
+
(connection, read) timeouts.
|
|
1452
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1453
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1454
|
+
request; this effectively ignores the
|
|
1455
|
+
authentication in the spec for a single request.
|
|
1456
|
+
:type _request_auth: dict, optional
|
|
1457
|
+
:param _content_type: force content-type for the request.
|
|
1458
|
+
:type _content_type: str, Optional
|
|
1459
|
+
:param _headers: set to override the headers for a single
|
|
1460
|
+
request; this effectively ignores the headers
|
|
1461
|
+
in the spec for a single request.
|
|
1462
|
+
:type _headers: dict, optional
|
|
1463
|
+
:param _host_index: set to override the host_index for a single
|
|
1464
|
+
request; this effectively ignores the host_index
|
|
1465
|
+
in the spec for a single request.
|
|
1466
|
+
:type _host_index: int, optional
|
|
1467
|
+
:return: Returns the result object.
|
|
1468
|
+
""" # noqa: E501
|
|
1469
|
+
|
|
1470
|
+
_param = self._execute_command_serialize(
|
|
1471
|
+
request=request,
|
|
1472
|
+
_request_auth=_request_auth,
|
|
1473
|
+
_content_type=_content_type,
|
|
1474
|
+
_headers=_headers,
|
|
1475
|
+
_host_index=_host_index
|
|
1476
|
+
)
|
|
1477
|
+
|
|
1478
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1479
|
+
'200': "ExecuteResponse",
|
|
1480
|
+
}
|
|
1481
|
+
response_data = self.api_client.call_api(
|
|
1482
|
+
*_param,
|
|
1483
|
+
_request_timeout=_request_timeout
|
|
1484
|
+
)
|
|
1485
|
+
response_data.read()
|
|
1486
|
+
return self.api_client.response_deserialize(
|
|
1487
|
+
response_data=response_data,
|
|
1488
|
+
response_types_map=_response_types_map,
|
|
1489
|
+
)
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
@validate_call
|
|
1493
|
+
def execute_command_without_preload_content(
|
|
1494
|
+
self,
|
|
1495
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
1496
|
+
_request_timeout: Union[
|
|
1497
|
+
None,
|
|
1498
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1499
|
+
Tuple[
|
|
1500
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1501
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1502
|
+
]
|
|
1503
|
+
] = None,
|
|
1504
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1505
|
+
_content_type: Optional[StrictStr] = None,
|
|
1506
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1507
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1508
|
+
) -> RESTResponseType:
|
|
1509
|
+
"""Execute a command
|
|
1510
|
+
|
|
1511
|
+
Execute a shell command and return the output and exit code
|
|
1512
|
+
|
|
1513
|
+
:param request: Command execution request (required)
|
|
1514
|
+
:type request: ExecuteRequest
|
|
1515
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1516
|
+
number provided, it will be total request
|
|
1517
|
+
timeout. It can also be a pair (tuple) of
|
|
1518
|
+
(connection, read) timeouts.
|
|
1519
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1520
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1521
|
+
request; this effectively ignores the
|
|
1522
|
+
authentication in the spec for a single request.
|
|
1523
|
+
:type _request_auth: dict, optional
|
|
1524
|
+
:param _content_type: force content-type for the request.
|
|
1525
|
+
:type _content_type: str, Optional
|
|
1526
|
+
:param _headers: set to override the headers for a single
|
|
1527
|
+
request; this effectively ignores the headers
|
|
1528
|
+
in the spec for a single request.
|
|
1529
|
+
:type _headers: dict, optional
|
|
1530
|
+
:param _host_index: set to override the host_index for a single
|
|
1531
|
+
request; this effectively ignores the host_index
|
|
1532
|
+
in the spec for a single request.
|
|
1533
|
+
:type _host_index: int, optional
|
|
1534
|
+
:return: Returns the result object.
|
|
1535
|
+
""" # noqa: E501
|
|
1536
|
+
|
|
1537
|
+
_param = self._execute_command_serialize(
|
|
1538
|
+
request=request,
|
|
1539
|
+
_request_auth=_request_auth,
|
|
1540
|
+
_content_type=_content_type,
|
|
1541
|
+
_headers=_headers,
|
|
1542
|
+
_host_index=_host_index
|
|
1543
|
+
)
|
|
1544
|
+
|
|
1545
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1546
|
+
'200': "ExecuteResponse",
|
|
1547
|
+
}
|
|
1548
|
+
response_data = self.api_client.call_api(
|
|
1549
|
+
*_param,
|
|
1550
|
+
_request_timeout=_request_timeout
|
|
1551
|
+
)
|
|
1552
|
+
return response_data.response
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
def _execute_command_serialize(
|
|
1556
|
+
self,
|
|
1557
|
+
request,
|
|
1558
|
+
_request_auth,
|
|
1559
|
+
_content_type,
|
|
1560
|
+
_headers,
|
|
1561
|
+
_host_index,
|
|
1562
|
+
) -> RequestSerialized:
|
|
1563
|
+
|
|
1564
|
+
_host = None
|
|
1565
|
+
|
|
1566
|
+
_collection_formats: Dict[str, str] = {
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
_path_params: Dict[str, str] = {}
|
|
1570
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1571
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1572
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1573
|
+
_files: Dict[
|
|
1574
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1575
|
+
] = {}
|
|
1576
|
+
_body_params: Optional[bytes] = None
|
|
1577
|
+
|
|
1578
|
+
# process the path parameters
|
|
1579
|
+
# process the query parameters
|
|
1580
|
+
# process the header parameters
|
|
1581
|
+
# process the form parameters
|
|
1582
|
+
# process the body parameter
|
|
1583
|
+
if request is not None:
|
|
1584
|
+
_body_params = request
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
# set the HTTP header `Accept`
|
|
1588
|
+
if 'Accept' not in _header_params:
|
|
1589
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1590
|
+
[
|
|
1591
|
+
'application/json'
|
|
1592
|
+
]
|
|
1593
|
+
)
|
|
1594
|
+
|
|
1595
|
+
# set the HTTP header `Content-Type`
|
|
1596
|
+
if _content_type:
|
|
1597
|
+
_header_params['Content-Type'] = _content_type
|
|
1598
|
+
else:
|
|
1599
|
+
_default_content_type = (
|
|
1600
|
+
self.api_client.select_header_content_type(
|
|
1601
|
+
[
|
|
1602
|
+
'application/json'
|
|
1603
|
+
]
|
|
1604
|
+
)
|
|
1605
|
+
)
|
|
1606
|
+
if _default_content_type is not None:
|
|
1607
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1608
|
+
|
|
1609
|
+
# authentication setting
|
|
1610
|
+
_auth_settings: List[str] = [
|
|
1611
|
+
]
|
|
1612
|
+
|
|
1613
|
+
return self.api_client.param_serialize(
|
|
1614
|
+
method='POST',
|
|
1615
|
+
resource_path='/process/execute',
|
|
1616
|
+
path_params=_path_params,
|
|
1617
|
+
query_params=_query_params,
|
|
1618
|
+
header_params=_header_params,
|
|
1619
|
+
body=_body_params,
|
|
1620
|
+
post_params=_form_params,
|
|
1621
|
+
files=_files,
|
|
1622
|
+
auth_settings=_auth_settings,
|
|
1623
|
+
collection_formats=_collection_formats,
|
|
1624
|
+
_host=_host,
|
|
1625
|
+
_request_auth=_request_auth
|
|
1626
|
+
)
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
@validate_call
|
|
1632
|
+
def get_pty_session(
|
|
1633
|
+
self,
|
|
1634
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
1635
|
+
_request_timeout: Union[
|
|
1636
|
+
None,
|
|
1637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1638
|
+
Tuple[
|
|
1639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1640
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1641
|
+
]
|
|
1642
|
+
] = None,
|
|
1643
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1644
|
+
_content_type: Optional[StrictStr] = None,
|
|
1645
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1646
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1647
|
+
) -> PtySessionInfo:
|
|
1648
|
+
"""Get PTY session information
|
|
1649
|
+
|
|
1650
|
+
Get detailed information about a specific pseudo-terminal session
|
|
1651
|
+
|
|
1652
|
+
:param session_id: PTY session ID (required)
|
|
1653
|
+
:type session_id: str
|
|
1654
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1655
|
+
number provided, it will be total request
|
|
1656
|
+
timeout. It can also be a pair (tuple) of
|
|
1657
|
+
(connection, read) timeouts.
|
|
1658
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1659
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1660
|
+
request; this effectively ignores the
|
|
1661
|
+
authentication in the spec for a single request.
|
|
1662
|
+
:type _request_auth: dict, optional
|
|
1663
|
+
:param _content_type: force content-type for the request.
|
|
1664
|
+
:type _content_type: str, Optional
|
|
1665
|
+
:param _headers: set to override the headers for a single
|
|
1666
|
+
request; this effectively ignores the headers
|
|
1667
|
+
in the spec for a single request.
|
|
1668
|
+
:type _headers: dict, optional
|
|
1669
|
+
:param _host_index: set to override the host_index for a single
|
|
1670
|
+
request; this effectively ignores the host_index
|
|
1671
|
+
in the spec for a single request.
|
|
1672
|
+
:type _host_index: int, optional
|
|
1673
|
+
:return: Returns the result object.
|
|
1674
|
+
""" # noqa: E501
|
|
1675
|
+
|
|
1676
|
+
_param = self._get_pty_session_serialize(
|
|
1677
|
+
session_id=session_id,
|
|
1678
|
+
_request_auth=_request_auth,
|
|
1679
|
+
_content_type=_content_type,
|
|
1680
|
+
_headers=_headers,
|
|
1681
|
+
_host_index=_host_index
|
|
1682
|
+
)
|
|
1683
|
+
|
|
1684
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1685
|
+
'200': "PtySessionInfo",
|
|
1686
|
+
}
|
|
1687
|
+
response_data = self.api_client.call_api(
|
|
1688
|
+
*_param,
|
|
1689
|
+
_request_timeout=_request_timeout
|
|
1690
|
+
)
|
|
1691
|
+
response_data.read()
|
|
1692
|
+
return self.api_client.response_deserialize(
|
|
1693
|
+
response_data=response_data,
|
|
1694
|
+
response_types_map=_response_types_map,
|
|
1695
|
+
).data
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
@validate_call
|
|
1699
|
+
def get_pty_session_with_http_info(
|
|
1700
|
+
self,
|
|
1701
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
1702
|
+
_request_timeout: Union[
|
|
1703
|
+
None,
|
|
1704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1705
|
+
Tuple[
|
|
1706
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1707
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1708
|
+
]
|
|
1709
|
+
] = None,
|
|
1710
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1711
|
+
_content_type: Optional[StrictStr] = None,
|
|
1712
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1713
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1714
|
+
) -> ApiResponse[PtySessionInfo]:
|
|
1715
|
+
"""Get PTY session information
|
|
1716
|
+
|
|
1717
|
+
Get detailed information about a specific pseudo-terminal session
|
|
1718
|
+
|
|
1719
|
+
:param session_id: PTY session ID (required)
|
|
1720
|
+
:type session_id: str
|
|
1721
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1722
|
+
number provided, it will be total request
|
|
1723
|
+
timeout. It can also be a pair (tuple) of
|
|
1724
|
+
(connection, read) timeouts.
|
|
1725
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1726
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1727
|
+
request; this effectively ignores the
|
|
1728
|
+
authentication in the spec for a single request.
|
|
1729
|
+
:type _request_auth: dict, optional
|
|
1730
|
+
:param _content_type: force content-type for the request.
|
|
1731
|
+
:type _content_type: str, Optional
|
|
1732
|
+
:param _headers: set to override the headers for a single
|
|
1733
|
+
request; this effectively ignores the headers
|
|
1734
|
+
in the spec for a single request.
|
|
1735
|
+
:type _headers: dict, optional
|
|
1736
|
+
:param _host_index: set to override the host_index for a single
|
|
1737
|
+
request; this effectively ignores the host_index
|
|
1738
|
+
in the spec for a single request.
|
|
1739
|
+
:type _host_index: int, optional
|
|
1740
|
+
:return: Returns the result object.
|
|
1741
|
+
""" # noqa: E501
|
|
1742
|
+
|
|
1743
|
+
_param = self._get_pty_session_serialize(
|
|
1744
|
+
session_id=session_id,
|
|
1745
|
+
_request_auth=_request_auth,
|
|
1746
|
+
_content_type=_content_type,
|
|
1747
|
+
_headers=_headers,
|
|
1748
|
+
_host_index=_host_index
|
|
1749
|
+
)
|
|
1750
|
+
|
|
1751
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1752
|
+
'200': "PtySessionInfo",
|
|
1753
|
+
}
|
|
1754
|
+
response_data = self.api_client.call_api(
|
|
1755
|
+
*_param,
|
|
1756
|
+
_request_timeout=_request_timeout
|
|
1757
|
+
)
|
|
1758
|
+
response_data.read()
|
|
1759
|
+
return self.api_client.response_deserialize(
|
|
1760
|
+
response_data=response_data,
|
|
1761
|
+
response_types_map=_response_types_map,
|
|
1762
|
+
)
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
@validate_call
|
|
1766
|
+
def get_pty_session_without_preload_content(
|
|
1767
|
+
self,
|
|
1768
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
1769
|
+
_request_timeout: Union[
|
|
1770
|
+
None,
|
|
1771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1772
|
+
Tuple[
|
|
1773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1774
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1775
|
+
]
|
|
1776
|
+
] = None,
|
|
1777
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1778
|
+
_content_type: Optional[StrictStr] = None,
|
|
1779
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1780
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1781
|
+
) -> RESTResponseType:
|
|
1782
|
+
"""Get PTY session information
|
|
1783
|
+
|
|
1784
|
+
Get detailed information about a specific pseudo-terminal session
|
|
1785
|
+
|
|
1786
|
+
:param session_id: PTY session ID (required)
|
|
1787
|
+
:type session_id: str
|
|
1788
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1789
|
+
number provided, it will be total request
|
|
1790
|
+
timeout. It can also be a pair (tuple) of
|
|
1791
|
+
(connection, read) timeouts.
|
|
1792
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1793
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1794
|
+
request; this effectively ignores the
|
|
1795
|
+
authentication in the spec for a single request.
|
|
1796
|
+
:type _request_auth: dict, optional
|
|
1797
|
+
:param _content_type: force content-type for the request.
|
|
1798
|
+
:type _content_type: str, Optional
|
|
1799
|
+
:param _headers: set to override the headers for a single
|
|
1800
|
+
request; this effectively ignores the headers
|
|
1801
|
+
in the spec for a single request.
|
|
1802
|
+
:type _headers: dict, optional
|
|
1803
|
+
:param _host_index: set to override the host_index for a single
|
|
1804
|
+
request; this effectively ignores the host_index
|
|
1805
|
+
in the spec for a single request.
|
|
1806
|
+
:type _host_index: int, optional
|
|
1807
|
+
:return: Returns the result object.
|
|
1808
|
+
""" # noqa: E501
|
|
1809
|
+
|
|
1810
|
+
_param = self._get_pty_session_serialize(
|
|
1811
|
+
session_id=session_id,
|
|
1812
|
+
_request_auth=_request_auth,
|
|
1813
|
+
_content_type=_content_type,
|
|
1814
|
+
_headers=_headers,
|
|
1815
|
+
_host_index=_host_index
|
|
1816
|
+
)
|
|
1817
|
+
|
|
1818
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1819
|
+
'200': "PtySessionInfo",
|
|
1820
|
+
}
|
|
1821
|
+
response_data = self.api_client.call_api(
|
|
1822
|
+
*_param,
|
|
1823
|
+
_request_timeout=_request_timeout
|
|
1824
|
+
)
|
|
1825
|
+
return response_data.response
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
def _get_pty_session_serialize(
|
|
1829
|
+
self,
|
|
1830
|
+
session_id,
|
|
1831
|
+
_request_auth,
|
|
1832
|
+
_content_type,
|
|
1833
|
+
_headers,
|
|
1834
|
+
_host_index,
|
|
1835
|
+
) -> RequestSerialized:
|
|
1836
|
+
|
|
1837
|
+
_host = None
|
|
1838
|
+
|
|
1839
|
+
_collection_formats: Dict[str, str] = {
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
_path_params: Dict[str, str] = {}
|
|
1843
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1844
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1845
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1846
|
+
_files: Dict[
|
|
1847
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1848
|
+
] = {}
|
|
1849
|
+
_body_params: Optional[bytes] = None
|
|
1850
|
+
|
|
1851
|
+
# process the path parameters
|
|
1852
|
+
if session_id is not None:
|
|
1853
|
+
_path_params['sessionId'] = session_id
|
|
1854
|
+
# process the query parameters
|
|
1855
|
+
# process the header parameters
|
|
1856
|
+
# process the form parameters
|
|
1857
|
+
# process the body parameter
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
# set the HTTP header `Accept`
|
|
1861
|
+
if 'Accept' not in _header_params:
|
|
1862
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1863
|
+
[
|
|
1864
|
+
'application/json'
|
|
1865
|
+
]
|
|
1866
|
+
)
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
# authentication setting
|
|
1870
|
+
_auth_settings: List[str] = [
|
|
1871
|
+
]
|
|
1872
|
+
|
|
1873
|
+
return self.api_client.param_serialize(
|
|
1874
|
+
method='GET',
|
|
1875
|
+
resource_path='/process/pty/{sessionId}',
|
|
1876
|
+
path_params=_path_params,
|
|
1877
|
+
query_params=_query_params,
|
|
1878
|
+
header_params=_header_params,
|
|
1879
|
+
body=_body_params,
|
|
1880
|
+
post_params=_form_params,
|
|
1881
|
+
files=_files,
|
|
1882
|
+
auth_settings=_auth_settings,
|
|
1883
|
+
collection_formats=_collection_formats,
|
|
1884
|
+
_host=_host,
|
|
1885
|
+
_request_auth=_request_auth
|
|
1886
|
+
)
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
@validate_call
|
|
1892
|
+
def get_session(
|
|
1893
|
+
self,
|
|
1894
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1895
|
+
_request_timeout: Union[
|
|
1896
|
+
None,
|
|
1897
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1898
|
+
Tuple[
|
|
1899
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1900
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1901
|
+
]
|
|
1902
|
+
] = None,
|
|
1903
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1904
|
+
_content_type: Optional[StrictStr] = None,
|
|
1905
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1906
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1907
|
+
) -> Session:
|
|
1908
|
+
"""Get session details
|
|
1909
|
+
|
|
1910
|
+
Get details of a specific session including its commands
|
|
1911
|
+
|
|
1912
|
+
:param session_id: Session ID (required)
|
|
1913
|
+
:type session_id: str
|
|
1914
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1915
|
+
number provided, it will be total request
|
|
1916
|
+
timeout. It can also be a pair (tuple) of
|
|
1917
|
+
(connection, read) timeouts.
|
|
1918
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1919
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1920
|
+
request; this effectively ignores the
|
|
1921
|
+
authentication in the spec for a single request.
|
|
1922
|
+
:type _request_auth: dict, optional
|
|
1923
|
+
:param _content_type: force content-type for the request.
|
|
1924
|
+
:type _content_type: str, Optional
|
|
1925
|
+
:param _headers: set to override the headers for a single
|
|
1926
|
+
request; this effectively ignores the headers
|
|
1927
|
+
in the spec for a single request.
|
|
1928
|
+
:type _headers: dict, optional
|
|
1929
|
+
:param _host_index: set to override the host_index for a single
|
|
1930
|
+
request; this effectively ignores the host_index
|
|
1931
|
+
in the spec for a single request.
|
|
1932
|
+
:type _host_index: int, optional
|
|
1933
|
+
:return: Returns the result object.
|
|
1934
|
+
""" # noqa: E501
|
|
1935
|
+
|
|
1936
|
+
_param = self._get_session_serialize(
|
|
1937
|
+
session_id=session_id,
|
|
1938
|
+
_request_auth=_request_auth,
|
|
1939
|
+
_content_type=_content_type,
|
|
1940
|
+
_headers=_headers,
|
|
1941
|
+
_host_index=_host_index
|
|
1942
|
+
)
|
|
1943
|
+
|
|
1944
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1945
|
+
'200': "Session",
|
|
1946
|
+
}
|
|
1947
|
+
response_data = self.api_client.call_api(
|
|
1948
|
+
*_param,
|
|
1949
|
+
_request_timeout=_request_timeout
|
|
1950
|
+
)
|
|
1951
|
+
response_data.read()
|
|
1952
|
+
return self.api_client.response_deserialize(
|
|
1953
|
+
response_data=response_data,
|
|
1954
|
+
response_types_map=_response_types_map,
|
|
1955
|
+
).data
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
@validate_call
|
|
1959
|
+
def get_session_with_http_info(
|
|
1960
|
+
self,
|
|
1961
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1962
|
+
_request_timeout: Union[
|
|
1963
|
+
None,
|
|
1964
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1965
|
+
Tuple[
|
|
1966
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1967
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1968
|
+
]
|
|
1969
|
+
] = None,
|
|
1970
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1971
|
+
_content_type: Optional[StrictStr] = None,
|
|
1972
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1973
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1974
|
+
) -> ApiResponse[Session]:
|
|
1975
|
+
"""Get session details
|
|
1976
|
+
|
|
1977
|
+
Get details of a specific session including its commands
|
|
1978
|
+
|
|
1979
|
+
:param session_id: Session ID (required)
|
|
1980
|
+
:type session_id: str
|
|
1981
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1982
|
+
number provided, it will be total request
|
|
1983
|
+
timeout. It can also be a pair (tuple) of
|
|
1984
|
+
(connection, read) timeouts.
|
|
1985
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1986
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1987
|
+
request; this effectively ignores the
|
|
1988
|
+
authentication in the spec for a single request.
|
|
1989
|
+
:type _request_auth: dict, optional
|
|
1990
|
+
:param _content_type: force content-type for the request.
|
|
1991
|
+
:type _content_type: str, Optional
|
|
1992
|
+
:param _headers: set to override the headers for a single
|
|
1993
|
+
request; this effectively ignores the headers
|
|
1994
|
+
in the spec for a single request.
|
|
1995
|
+
:type _headers: dict, optional
|
|
1996
|
+
:param _host_index: set to override the host_index for a single
|
|
1997
|
+
request; this effectively ignores the host_index
|
|
1998
|
+
in the spec for a single request.
|
|
1999
|
+
:type _host_index: int, optional
|
|
2000
|
+
:return: Returns the result object.
|
|
2001
|
+
""" # noqa: E501
|
|
2002
|
+
|
|
2003
|
+
_param = self._get_session_serialize(
|
|
2004
|
+
session_id=session_id,
|
|
2005
|
+
_request_auth=_request_auth,
|
|
2006
|
+
_content_type=_content_type,
|
|
2007
|
+
_headers=_headers,
|
|
2008
|
+
_host_index=_host_index
|
|
2009
|
+
)
|
|
2010
|
+
|
|
2011
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2012
|
+
'200': "Session",
|
|
2013
|
+
}
|
|
2014
|
+
response_data = self.api_client.call_api(
|
|
2015
|
+
*_param,
|
|
2016
|
+
_request_timeout=_request_timeout
|
|
2017
|
+
)
|
|
2018
|
+
response_data.read()
|
|
2019
|
+
return self.api_client.response_deserialize(
|
|
2020
|
+
response_data=response_data,
|
|
2021
|
+
response_types_map=_response_types_map,
|
|
2022
|
+
)
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
@validate_call
|
|
2026
|
+
def get_session_without_preload_content(
|
|
2027
|
+
self,
|
|
2028
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2029
|
+
_request_timeout: Union[
|
|
2030
|
+
None,
|
|
2031
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2032
|
+
Tuple[
|
|
2033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2034
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2035
|
+
]
|
|
2036
|
+
] = None,
|
|
2037
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2038
|
+
_content_type: Optional[StrictStr] = None,
|
|
2039
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2040
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2041
|
+
) -> RESTResponseType:
|
|
2042
|
+
"""Get session details
|
|
2043
|
+
|
|
2044
|
+
Get details of a specific session including its commands
|
|
2045
|
+
|
|
2046
|
+
:param session_id: Session ID (required)
|
|
2047
|
+
:type session_id: str
|
|
2048
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2049
|
+
number provided, it will be total request
|
|
2050
|
+
timeout. It can also be a pair (tuple) of
|
|
2051
|
+
(connection, read) timeouts.
|
|
2052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2054
|
+
request; this effectively ignores the
|
|
2055
|
+
authentication in the spec for a single request.
|
|
2056
|
+
:type _request_auth: dict, optional
|
|
2057
|
+
:param _content_type: force content-type for the request.
|
|
2058
|
+
:type _content_type: str, Optional
|
|
2059
|
+
:param _headers: set to override the headers for a single
|
|
2060
|
+
request; this effectively ignores the headers
|
|
2061
|
+
in the spec for a single request.
|
|
2062
|
+
:type _headers: dict, optional
|
|
2063
|
+
:param _host_index: set to override the host_index for a single
|
|
2064
|
+
request; this effectively ignores the host_index
|
|
2065
|
+
in the spec for a single request.
|
|
2066
|
+
:type _host_index: int, optional
|
|
2067
|
+
:return: Returns the result object.
|
|
2068
|
+
""" # noqa: E501
|
|
2069
|
+
|
|
2070
|
+
_param = self._get_session_serialize(
|
|
2071
|
+
session_id=session_id,
|
|
2072
|
+
_request_auth=_request_auth,
|
|
2073
|
+
_content_type=_content_type,
|
|
2074
|
+
_headers=_headers,
|
|
2075
|
+
_host_index=_host_index
|
|
2076
|
+
)
|
|
2077
|
+
|
|
2078
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2079
|
+
'200': "Session",
|
|
2080
|
+
}
|
|
2081
|
+
response_data = self.api_client.call_api(
|
|
2082
|
+
*_param,
|
|
2083
|
+
_request_timeout=_request_timeout
|
|
2084
|
+
)
|
|
2085
|
+
return response_data.response
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
def _get_session_serialize(
|
|
2089
|
+
self,
|
|
2090
|
+
session_id,
|
|
2091
|
+
_request_auth,
|
|
2092
|
+
_content_type,
|
|
2093
|
+
_headers,
|
|
2094
|
+
_host_index,
|
|
2095
|
+
) -> RequestSerialized:
|
|
2096
|
+
|
|
2097
|
+
_host = None
|
|
2098
|
+
|
|
2099
|
+
_collection_formats: Dict[str, str] = {
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
_path_params: Dict[str, str] = {}
|
|
2103
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2104
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2105
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2106
|
+
_files: Dict[
|
|
2107
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2108
|
+
] = {}
|
|
2109
|
+
_body_params: Optional[bytes] = None
|
|
2110
|
+
|
|
2111
|
+
# process the path parameters
|
|
2112
|
+
if session_id is not None:
|
|
2113
|
+
_path_params['sessionId'] = session_id
|
|
2114
|
+
# process the query parameters
|
|
2115
|
+
# process the header parameters
|
|
2116
|
+
# process the form parameters
|
|
2117
|
+
# process the body parameter
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
# set the HTTP header `Accept`
|
|
2121
|
+
if 'Accept' not in _header_params:
|
|
2122
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2123
|
+
[
|
|
2124
|
+
'application/json'
|
|
2125
|
+
]
|
|
2126
|
+
)
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
# authentication setting
|
|
2130
|
+
_auth_settings: List[str] = [
|
|
2131
|
+
]
|
|
2132
|
+
|
|
2133
|
+
return self.api_client.param_serialize(
|
|
2134
|
+
method='GET',
|
|
2135
|
+
resource_path='/process/session/{sessionId}',
|
|
2136
|
+
path_params=_path_params,
|
|
2137
|
+
query_params=_query_params,
|
|
2138
|
+
header_params=_header_params,
|
|
2139
|
+
body=_body_params,
|
|
2140
|
+
post_params=_form_params,
|
|
2141
|
+
files=_files,
|
|
2142
|
+
auth_settings=_auth_settings,
|
|
2143
|
+
collection_formats=_collection_formats,
|
|
2144
|
+
_host=_host,
|
|
2145
|
+
_request_auth=_request_auth
|
|
2146
|
+
)
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
@validate_call
|
|
2152
|
+
def get_session_command(
|
|
2153
|
+
self,
|
|
2154
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2155
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2156
|
+
_request_timeout: Union[
|
|
2157
|
+
None,
|
|
2158
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2159
|
+
Tuple[
|
|
2160
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2161
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2162
|
+
]
|
|
2163
|
+
] = None,
|
|
2164
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2165
|
+
_content_type: Optional[StrictStr] = None,
|
|
2166
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2167
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2168
|
+
) -> Command:
|
|
2169
|
+
"""Get session command details
|
|
2170
|
+
|
|
2171
|
+
Get details of a specific command within a session
|
|
2172
|
+
|
|
2173
|
+
:param session_id: Session ID (required)
|
|
2174
|
+
:type session_id: str
|
|
2175
|
+
:param command_id: Command ID (required)
|
|
2176
|
+
:type command_id: str
|
|
2177
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2178
|
+
number provided, it will be total request
|
|
2179
|
+
timeout. It can also be a pair (tuple) of
|
|
2180
|
+
(connection, read) timeouts.
|
|
2181
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2182
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2183
|
+
request; this effectively ignores the
|
|
2184
|
+
authentication in the spec for a single request.
|
|
2185
|
+
:type _request_auth: dict, optional
|
|
2186
|
+
:param _content_type: force content-type for the request.
|
|
2187
|
+
:type _content_type: str, Optional
|
|
2188
|
+
:param _headers: set to override the headers for a single
|
|
2189
|
+
request; this effectively ignores the headers
|
|
2190
|
+
in the spec for a single request.
|
|
2191
|
+
:type _headers: dict, optional
|
|
2192
|
+
:param _host_index: set to override the host_index for a single
|
|
2193
|
+
request; this effectively ignores the host_index
|
|
2194
|
+
in the spec for a single request.
|
|
2195
|
+
:type _host_index: int, optional
|
|
2196
|
+
:return: Returns the result object.
|
|
2197
|
+
""" # noqa: E501
|
|
2198
|
+
|
|
2199
|
+
_param = self._get_session_command_serialize(
|
|
2200
|
+
session_id=session_id,
|
|
2201
|
+
command_id=command_id,
|
|
2202
|
+
_request_auth=_request_auth,
|
|
2203
|
+
_content_type=_content_type,
|
|
2204
|
+
_headers=_headers,
|
|
2205
|
+
_host_index=_host_index
|
|
2206
|
+
)
|
|
2207
|
+
|
|
2208
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2209
|
+
'200': "Command",
|
|
2210
|
+
}
|
|
2211
|
+
response_data = self.api_client.call_api(
|
|
2212
|
+
*_param,
|
|
2213
|
+
_request_timeout=_request_timeout
|
|
2214
|
+
)
|
|
2215
|
+
response_data.read()
|
|
2216
|
+
return self.api_client.response_deserialize(
|
|
2217
|
+
response_data=response_data,
|
|
2218
|
+
response_types_map=_response_types_map,
|
|
2219
|
+
).data
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
@validate_call
|
|
2223
|
+
def get_session_command_with_http_info(
|
|
2224
|
+
self,
|
|
2225
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2226
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2227
|
+
_request_timeout: Union[
|
|
2228
|
+
None,
|
|
2229
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2230
|
+
Tuple[
|
|
2231
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2232
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2233
|
+
]
|
|
2234
|
+
] = None,
|
|
2235
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2236
|
+
_content_type: Optional[StrictStr] = None,
|
|
2237
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2238
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2239
|
+
) -> ApiResponse[Command]:
|
|
2240
|
+
"""Get session command details
|
|
2241
|
+
|
|
2242
|
+
Get details of a specific command within a session
|
|
2243
|
+
|
|
2244
|
+
:param session_id: Session ID (required)
|
|
2245
|
+
:type session_id: str
|
|
2246
|
+
:param command_id: Command ID (required)
|
|
2247
|
+
:type command_id: str
|
|
2248
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2249
|
+
number provided, it will be total request
|
|
2250
|
+
timeout. It can also be a pair (tuple) of
|
|
2251
|
+
(connection, read) timeouts.
|
|
2252
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2253
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2254
|
+
request; this effectively ignores the
|
|
2255
|
+
authentication in the spec for a single request.
|
|
2256
|
+
:type _request_auth: dict, optional
|
|
2257
|
+
:param _content_type: force content-type for the request.
|
|
2258
|
+
:type _content_type: str, Optional
|
|
2259
|
+
:param _headers: set to override the headers for a single
|
|
2260
|
+
request; this effectively ignores the headers
|
|
2261
|
+
in the spec for a single request.
|
|
2262
|
+
:type _headers: dict, optional
|
|
2263
|
+
:param _host_index: set to override the host_index for a single
|
|
2264
|
+
request; this effectively ignores the host_index
|
|
2265
|
+
in the spec for a single request.
|
|
2266
|
+
:type _host_index: int, optional
|
|
2267
|
+
:return: Returns the result object.
|
|
2268
|
+
""" # noqa: E501
|
|
2269
|
+
|
|
2270
|
+
_param = self._get_session_command_serialize(
|
|
2271
|
+
session_id=session_id,
|
|
2272
|
+
command_id=command_id,
|
|
2273
|
+
_request_auth=_request_auth,
|
|
2274
|
+
_content_type=_content_type,
|
|
2275
|
+
_headers=_headers,
|
|
2276
|
+
_host_index=_host_index
|
|
2277
|
+
)
|
|
2278
|
+
|
|
2279
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2280
|
+
'200': "Command",
|
|
2281
|
+
}
|
|
2282
|
+
response_data = self.api_client.call_api(
|
|
2283
|
+
*_param,
|
|
2284
|
+
_request_timeout=_request_timeout
|
|
2285
|
+
)
|
|
2286
|
+
response_data.read()
|
|
2287
|
+
return self.api_client.response_deserialize(
|
|
2288
|
+
response_data=response_data,
|
|
2289
|
+
response_types_map=_response_types_map,
|
|
2290
|
+
)
|
|
2291
|
+
|
|
2292
|
+
|
|
2293
|
+
@validate_call
|
|
2294
|
+
def get_session_command_without_preload_content(
|
|
2295
|
+
self,
|
|
2296
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2297
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2298
|
+
_request_timeout: Union[
|
|
2299
|
+
None,
|
|
2300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2301
|
+
Tuple[
|
|
2302
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2303
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2304
|
+
]
|
|
2305
|
+
] = None,
|
|
2306
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2307
|
+
_content_type: Optional[StrictStr] = None,
|
|
2308
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2309
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2310
|
+
) -> RESTResponseType:
|
|
2311
|
+
"""Get session command details
|
|
2312
|
+
|
|
2313
|
+
Get details of a specific command within a session
|
|
2314
|
+
|
|
2315
|
+
:param session_id: Session ID (required)
|
|
2316
|
+
:type session_id: str
|
|
2317
|
+
:param command_id: Command ID (required)
|
|
2318
|
+
:type command_id: str
|
|
2319
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2320
|
+
number provided, it will be total request
|
|
2321
|
+
timeout. It can also be a pair (tuple) of
|
|
2322
|
+
(connection, read) timeouts.
|
|
2323
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2324
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2325
|
+
request; this effectively ignores the
|
|
2326
|
+
authentication in the spec for a single request.
|
|
2327
|
+
:type _request_auth: dict, optional
|
|
2328
|
+
:param _content_type: force content-type for the request.
|
|
2329
|
+
:type _content_type: str, Optional
|
|
2330
|
+
:param _headers: set to override the headers for a single
|
|
2331
|
+
request; this effectively ignores the headers
|
|
2332
|
+
in the spec for a single request.
|
|
2333
|
+
:type _headers: dict, optional
|
|
2334
|
+
:param _host_index: set to override the host_index for a single
|
|
2335
|
+
request; this effectively ignores the host_index
|
|
2336
|
+
in the spec for a single request.
|
|
2337
|
+
:type _host_index: int, optional
|
|
2338
|
+
:return: Returns the result object.
|
|
2339
|
+
""" # noqa: E501
|
|
2340
|
+
|
|
2341
|
+
_param = self._get_session_command_serialize(
|
|
2342
|
+
session_id=session_id,
|
|
2343
|
+
command_id=command_id,
|
|
2344
|
+
_request_auth=_request_auth,
|
|
2345
|
+
_content_type=_content_type,
|
|
2346
|
+
_headers=_headers,
|
|
2347
|
+
_host_index=_host_index
|
|
2348
|
+
)
|
|
2349
|
+
|
|
2350
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2351
|
+
'200': "Command",
|
|
2352
|
+
}
|
|
2353
|
+
response_data = self.api_client.call_api(
|
|
2354
|
+
*_param,
|
|
2355
|
+
_request_timeout=_request_timeout
|
|
2356
|
+
)
|
|
2357
|
+
return response_data.response
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
def _get_session_command_serialize(
|
|
2361
|
+
self,
|
|
2362
|
+
session_id,
|
|
2363
|
+
command_id,
|
|
2364
|
+
_request_auth,
|
|
2365
|
+
_content_type,
|
|
2366
|
+
_headers,
|
|
2367
|
+
_host_index,
|
|
2368
|
+
) -> RequestSerialized:
|
|
2369
|
+
|
|
2370
|
+
_host = None
|
|
2371
|
+
|
|
2372
|
+
_collection_formats: Dict[str, str] = {
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
_path_params: Dict[str, str] = {}
|
|
2376
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2377
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2378
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2379
|
+
_files: Dict[
|
|
2380
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2381
|
+
] = {}
|
|
2382
|
+
_body_params: Optional[bytes] = None
|
|
2383
|
+
|
|
2384
|
+
# process the path parameters
|
|
2385
|
+
if session_id is not None:
|
|
2386
|
+
_path_params['sessionId'] = session_id
|
|
2387
|
+
if command_id is not None:
|
|
2388
|
+
_path_params['commandId'] = command_id
|
|
2389
|
+
# process the query parameters
|
|
2390
|
+
# process the header parameters
|
|
2391
|
+
# process the form parameters
|
|
2392
|
+
# process the body parameter
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
# set the HTTP header `Accept`
|
|
2396
|
+
if 'Accept' not in _header_params:
|
|
2397
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2398
|
+
[
|
|
2399
|
+
'application/json'
|
|
2400
|
+
]
|
|
2401
|
+
)
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
# authentication setting
|
|
2405
|
+
_auth_settings: List[str] = [
|
|
2406
|
+
]
|
|
2407
|
+
|
|
2408
|
+
return self.api_client.param_serialize(
|
|
2409
|
+
method='GET',
|
|
2410
|
+
resource_path='/process/session/{sessionId}/command/{commandId}',
|
|
2411
|
+
path_params=_path_params,
|
|
2412
|
+
query_params=_query_params,
|
|
2413
|
+
header_params=_header_params,
|
|
2414
|
+
body=_body_params,
|
|
2415
|
+
post_params=_form_params,
|
|
2416
|
+
files=_files,
|
|
2417
|
+
auth_settings=_auth_settings,
|
|
2418
|
+
collection_formats=_collection_formats,
|
|
2419
|
+
_host=_host,
|
|
2420
|
+
_request_auth=_request_auth
|
|
2421
|
+
)
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
@validate_call
|
|
2427
|
+
def get_session_command_logs(
|
|
2428
|
+
self,
|
|
2429
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2430
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2431
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
2432
|
+
_request_timeout: Union[
|
|
2433
|
+
None,
|
|
2434
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2435
|
+
Tuple[
|
|
2436
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2437
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2438
|
+
]
|
|
2439
|
+
] = None,
|
|
2440
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2441
|
+
_content_type: Optional[StrictStr] = None,
|
|
2442
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2443
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2444
|
+
) -> str:
|
|
2445
|
+
"""Get session command logs
|
|
2446
|
+
|
|
2447
|
+
Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
2448
|
+
|
|
2449
|
+
:param session_id: Session ID (required)
|
|
2450
|
+
:type session_id: str
|
|
2451
|
+
:param command_id: Command ID (required)
|
|
2452
|
+
:type command_id: str
|
|
2453
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
2454
|
+
:type follow: bool
|
|
2455
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2456
|
+
number provided, it will be total request
|
|
2457
|
+
timeout. It can also be a pair (tuple) of
|
|
2458
|
+
(connection, read) timeouts.
|
|
2459
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2460
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2461
|
+
request; this effectively ignores the
|
|
2462
|
+
authentication in the spec for a single request.
|
|
2463
|
+
:type _request_auth: dict, optional
|
|
2464
|
+
:param _content_type: force content-type for the request.
|
|
2465
|
+
:type _content_type: str, Optional
|
|
2466
|
+
:param _headers: set to override the headers for a single
|
|
2467
|
+
request; this effectively ignores the headers
|
|
2468
|
+
in the spec for a single request.
|
|
2469
|
+
:type _headers: dict, optional
|
|
2470
|
+
:param _host_index: set to override the host_index for a single
|
|
2471
|
+
request; this effectively ignores the host_index
|
|
2472
|
+
in the spec for a single request.
|
|
2473
|
+
:type _host_index: int, optional
|
|
2474
|
+
:return: Returns the result object.
|
|
2475
|
+
""" # noqa: E501
|
|
2476
|
+
|
|
2477
|
+
_param = self._get_session_command_logs_serialize(
|
|
2478
|
+
session_id=session_id,
|
|
2479
|
+
command_id=command_id,
|
|
2480
|
+
follow=follow,
|
|
2481
|
+
_request_auth=_request_auth,
|
|
2482
|
+
_content_type=_content_type,
|
|
2483
|
+
_headers=_headers,
|
|
2484
|
+
_host_index=_host_index
|
|
2485
|
+
)
|
|
2486
|
+
|
|
2487
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2488
|
+
'200': "str",
|
|
2489
|
+
}
|
|
2490
|
+
response_data = self.api_client.call_api(
|
|
2491
|
+
*_param,
|
|
2492
|
+
_request_timeout=_request_timeout
|
|
2493
|
+
)
|
|
2494
|
+
response_data.read()
|
|
2495
|
+
return self.api_client.response_deserialize(
|
|
2496
|
+
response_data=response_data,
|
|
2497
|
+
response_types_map=_response_types_map,
|
|
2498
|
+
).data
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
@validate_call
|
|
2502
|
+
def get_session_command_logs_with_http_info(
|
|
2503
|
+
self,
|
|
2504
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2505
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2506
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
2507
|
+
_request_timeout: Union[
|
|
2508
|
+
None,
|
|
2509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2510
|
+
Tuple[
|
|
2511
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2512
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2513
|
+
]
|
|
2514
|
+
] = None,
|
|
2515
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2516
|
+
_content_type: Optional[StrictStr] = None,
|
|
2517
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2518
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2519
|
+
) -> ApiResponse[str]:
|
|
2520
|
+
"""Get session command logs
|
|
2521
|
+
|
|
2522
|
+
Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
2523
|
+
|
|
2524
|
+
:param session_id: Session ID (required)
|
|
2525
|
+
:type session_id: str
|
|
2526
|
+
:param command_id: Command ID (required)
|
|
2527
|
+
:type command_id: str
|
|
2528
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
2529
|
+
:type follow: bool
|
|
2530
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2531
|
+
number provided, it will be total request
|
|
2532
|
+
timeout. It can also be a pair (tuple) of
|
|
2533
|
+
(connection, read) timeouts.
|
|
2534
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2535
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2536
|
+
request; this effectively ignores the
|
|
2537
|
+
authentication in the spec for a single request.
|
|
2538
|
+
:type _request_auth: dict, optional
|
|
2539
|
+
:param _content_type: force content-type for the request.
|
|
2540
|
+
:type _content_type: str, Optional
|
|
2541
|
+
:param _headers: set to override the headers for a single
|
|
2542
|
+
request; this effectively ignores the headers
|
|
2543
|
+
in the spec for a single request.
|
|
2544
|
+
:type _headers: dict, optional
|
|
2545
|
+
:param _host_index: set to override the host_index for a single
|
|
2546
|
+
request; this effectively ignores the host_index
|
|
2547
|
+
in the spec for a single request.
|
|
2548
|
+
:type _host_index: int, optional
|
|
2549
|
+
:return: Returns the result object.
|
|
2550
|
+
""" # noqa: E501
|
|
2551
|
+
|
|
2552
|
+
_param = self._get_session_command_logs_serialize(
|
|
2553
|
+
session_id=session_id,
|
|
2554
|
+
command_id=command_id,
|
|
2555
|
+
follow=follow,
|
|
2556
|
+
_request_auth=_request_auth,
|
|
2557
|
+
_content_type=_content_type,
|
|
2558
|
+
_headers=_headers,
|
|
2559
|
+
_host_index=_host_index
|
|
2560
|
+
)
|
|
2561
|
+
|
|
2562
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2563
|
+
'200': "str",
|
|
2564
|
+
}
|
|
2565
|
+
response_data = self.api_client.call_api(
|
|
2566
|
+
*_param,
|
|
2567
|
+
_request_timeout=_request_timeout
|
|
2568
|
+
)
|
|
2569
|
+
response_data.read()
|
|
2570
|
+
return self.api_client.response_deserialize(
|
|
2571
|
+
response_data=response_data,
|
|
2572
|
+
response_types_map=_response_types_map,
|
|
2573
|
+
)
|
|
2574
|
+
|
|
2575
|
+
|
|
2576
|
+
@validate_call
|
|
2577
|
+
def get_session_command_logs_without_preload_content(
|
|
2578
|
+
self,
|
|
2579
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2580
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
2581
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
2582
|
+
_request_timeout: Union[
|
|
2583
|
+
None,
|
|
2584
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2585
|
+
Tuple[
|
|
2586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2587
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2588
|
+
]
|
|
2589
|
+
] = None,
|
|
2590
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2591
|
+
_content_type: Optional[StrictStr] = None,
|
|
2592
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2593
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2594
|
+
) -> RESTResponseType:
|
|
2595
|
+
"""Get session command logs
|
|
2596
|
+
|
|
2597
|
+
Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
2598
|
+
|
|
2599
|
+
:param session_id: Session ID (required)
|
|
2600
|
+
:type session_id: str
|
|
2601
|
+
:param command_id: Command ID (required)
|
|
2602
|
+
:type command_id: str
|
|
2603
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
2604
|
+
:type follow: bool
|
|
2605
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2606
|
+
number provided, it will be total request
|
|
2607
|
+
timeout. It can also be a pair (tuple) of
|
|
2608
|
+
(connection, read) timeouts.
|
|
2609
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2610
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2611
|
+
request; this effectively ignores the
|
|
2612
|
+
authentication in the spec for a single request.
|
|
2613
|
+
:type _request_auth: dict, optional
|
|
2614
|
+
:param _content_type: force content-type for the request.
|
|
2615
|
+
:type _content_type: str, Optional
|
|
2616
|
+
:param _headers: set to override the headers for a single
|
|
2617
|
+
request; this effectively ignores the headers
|
|
2618
|
+
in the spec for a single request.
|
|
2619
|
+
:type _headers: dict, optional
|
|
2620
|
+
:param _host_index: set to override the host_index for a single
|
|
2621
|
+
request; this effectively ignores the host_index
|
|
2622
|
+
in the spec for a single request.
|
|
2623
|
+
:type _host_index: int, optional
|
|
2624
|
+
:return: Returns the result object.
|
|
2625
|
+
""" # noqa: E501
|
|
2626
|
+
|
|
2627
|
+
_param = self._get_session_command_logs_serialize(
|
|
2628
|
+
session_id=session_id,
|
|
2629
|
+
command_id=command_id,
|
|
2630
|
+
follow=follow,
|
|
2631
|
+
_request_auth=_request_auth,
|
|
2632
|
+
_content_type=_content_type,
|
|
2633
|
+
_headers=_headers,
|
|
2634
|
+
_host_index=_host_index
|
|
2635
|
+
)
|
|
2636
|
+
|
|
2637
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2638
|
+
'200': "str",
|
|
2639
|
+
}
|
|
2640
|
+
response_data = self.api_client.call_api(
|
|
2641
|
+
*_param,
|
|
2642
|
+
_request_timeout=_request_timeout
|
|
2643
|
+
)
|
|
2644
|
+
return response_data.response
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
def _get_session_command_logs_serialize(
|
|
1310
2648
|
self,
|
|
1311
2649
|
session_id,
|
|
1312
2650
|
command_id,
|
|
2651
|
+
follow,
|
|
2652
|
+
_request_auth,
|
|
2653
|
+
_content_type,
|
|
2654
|
+
_headers,
|
|
2655
|
+
_host_index,
|
|
2656
|
+
) -> RequestSerialized:
|
|
2657
|
+
|
|
2658
|
+
_host = None
|
|
2659
|
+
|
|
2660
|
+
_collection_formats: Dict[str, str] = {
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
_path_params: Dict[str, str] = {}
|
|
2664
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2665
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2666
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2667
|
+
_files: Dict[
|
|
2668
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2669
|
+
] = {}
|
|
2670
|
+
_body_params: Optional[bytes] = None
|
|
2671
|
+
|
|
2672
|
+
# process the path parameters
|
|
2673
|
+
if session_id is not None:
|
|
2674
|
+
_path_params['sessionId'] = session_id
|
|
2675
|
+
if command_id is not None:
|
|
2676
|
+
_path_params['commandId'] = command_id
|
|
2677
|
+
# process the query parameters
|
|
2678
|
+
if follow is not None:
|
|
2679
|
+
|
|
2680
|
+
_query_params.append(('follow', follow))
|
|
2681
|
+
|
|
2682
|
+
# process the header parameters
|
|
2683
|
+
# process the form parameters
|
|
2684
|
+
# process the body parameter
|
|
2685
|
+
|
|
2686
|
+
|
|
2687
|
+
# set the HTTP header `Accept`
|
|
2688
|
+
if 'Accept' not in _header_params:
|
|
2689
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2690
|
+
[
|
|
2691
|
+
'text/plain'
|
|
2692
|
+
]
|
|
2693
|
+
)
|
|
2694
|
+
|
|
2695
|
+
|
|
2696
|
+
# authentication setting
|
|
2697
|
+
_auth_settings: List[str] = [
|
|
2698
|
+
]
|
|
2699
|
+
|
|
2700
|
+
return self.api_client.param_serialize(
|
|
2701
|
+
method='GET',
|
|
2702
|
+
resource_path='/process/session/{sessionId}/command/{commandId}/logs',
|
|
2703
|
+
path_params=_path_params,
|
|
2704
|
+
query_params=_query_params,
|
|
2705
|
+
header_params=_header_params,
|
|
2706
|
+
body=_body_params,
|
|
2707
|
+
post_params=_form_params,
|
|
2708
|
+
files=_files,
|
|
2709
|
+
auth_settings=_auth_settings,
|
|
2710
|
+
collection_formats=_collection_formats,
|
|
2711
|
+
_host=_host,
|
|
2712
|
+
_request_auth=_request_auth
|
|
2713
|
+
)
|
|
2714
|
+
|
|
2715
|
+
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
@validate_call
|
|
2719
|
+
def list_pty_sessions(
|
|
2720
|
+
self,
|
|
2721
|
+
_request_timeout: Union[
|
|
2722
|
+
None,
|
|
2723
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2724
|
+
Tuple[
|
|
2725
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2726
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2727
|
+
]
|
|
2728
|
+
] = None,
|
|
2729
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2730
|
+
_content_type: Optional[StrictStr] = None,
|
|
2731
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2732
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2733
|
+
) -> PtyListResponse:
|
|
2734
|
+
"""List all PTY sessions
|
|
2735
|
+
|
|
2736
|
+
Get a list of all active pseudo-terminal sessions
|
|
2737
|
+
|
|
2738
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2739
|
+
number provided, it will be total request
|
|
2740
|
+
timeout. It can also be a pair (tuple) of
|
|
2741
|
+
(connection, read) timeouts.
|
|
2742
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2743
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2744
|
+
request; this effectively ignores the
|
|
2745
|
+
authentication in the spec for a single request.
|
|
2746
|
+
:type _request_auth: dict, optional
|
|
2747
|
+
:param _content_type: force content-type for the request.
|
|
2748
|
+
:type _content_type: str, Optional
|
|
2749
|
+
:param _headers: set to override the headers for a single
|
|
2750
|
+
request; this effectively ignores the headers
|
|
2751
|
+
in the spec for a single request.
|
|
2752
|
+
:type _headers: dict, optional
|
|
2753
|
+
:param _host_index: set to override the host_index for a single
|
|
2754
|
+
request; this effectively ignores the host_index
|
|
2755
|
+
in the spec for a single request.
|
|
2756
|
+
:type _host_index: int, optional
|
|
2757
|
+
:return: Returns the result object.
|
|
2758
|
+
""" # noqa: E501
|
|
2759
|
+
|
|
2760
|
+
_param = self._list_pty_sessions_serialize(
|
|
2761
|
+
_request_auth=_request_auth,
|
|
2762
|
+
_content_type=_content_type,
|
|
2763
|
+
_headers=_headers,
|
|
2764
|
+
_host_index=_host_index
|
|
2765
|
+
)
|
|
2766
|
+
|
|
2767
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2768
|
+
'200': "PtyListResponse",
|
|
2769
|
+
}
|
|
2770
|
+
response_data = self.api_client.call_api(
|
|
2771
|
+
*_param,
|
|
2772
|
+
_request_timeout=_request_timeout
|
|
2773
|
+
)
|
|
2774
|
+
response_data.read()
|
|
2775
|
+
return self.api_client.response_deserialize(
|
|
2776
|
+
response_data=response_data,
|
|
2777
|
+
response_types_map=_response_types_map,
|
|
2778
|
+
).data
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
@validate_call
|
|
2782
|
+
def list_pty_sessions_with_http_info(
|
|
2783
|
+
self,
|
|
2784
|
+
_request_timeout: Union[
|
|
2785
|
+
None,
|
|
2786
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2787
|
+
Tuple[
|
|
2788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2789
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2790
|
+
]
|
|
2791
|
+
] = None,
|
|
2792
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2793
|
+
_content_type: Optional[StrictStr] = None,
|
|
2794
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2795
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2796
|
+
) -> ApiResponse[PtyListResponse]:
|
|
2797
|
+
"""List all PTY sessions
|
|
2798
|
+
|
|
2799
|
+
Get a list of all active pseudo-terminal sessions
|
|
2800
|
+
|
|
2801
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2802
|
+
number provided, it will be total request
|
|
2803
|
+
timeout. It can also be a pair (tuple) of
|
|
2804
|
+
(connection, read) timeouts.
|
|
2805
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2806
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2807
|
+
request; this effectively ignores the
|
|
2808
|
+
authentication in the spec for a single request.
|
|
2809
|
+
:type _request_auth: dict, optional
|
|
2810
|
+
:param _content_type: force content-type for the request.
|
|
2811
|
+
:type _content_type: str, Optional
|
|
2812
|
+
:param _headers: set to override the headers for a single
|
|
2813
|
+
request; this effectively ignores the headers
|
|
2814
|
+
in the spec for a single request.
|
|
2815
|
+
:type _headers: dict, optional
|
|
2816
|
+
:param _host_index: set to override the host_index for a single
|
|
2817
|
+
request; this effectively ignores the host_index
|
|
2818
|
+
in the spec for a single request.
|
|
2819
|
+
:type _host_index: int, optional
|
|
2820
|
+
:return: Returns the result object.
|
|
2821
|
+
""" # noqa: E501
|
|
2822
|
+
|
|
2823
|
+
_param = self._list_pty_sessions_serialize(
|
|
2824
|
+
_request_auth=_request_auth,
|
|
2825
|
+
_content_type=_content_type,
|
|
2826
|
+
_headers=_headers,
|
|
2827
|
+
_host_index=_host_index
|
|
2828
|
+
)
|
|
2829
|
+
|
|
2830
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2831
|
+
'200': "PtyListResponse",
|
|
2832
|
+
}
|
|
2833
|
+
response_data = self.api_client.call_api(
|
|
2834
|
+
*_param,
|
|
2835
|
+
_request_timeout=_request_timeout
|
|
2836
|
+
)
|
|
2837
|
+
response_data.read()
|
|
2838
|
+
return self.api_client.response_deserialize(
|
|
2839
|
+
response_data=response_data,
|
|
2840
|
+
response_types_map=_response_types_map,
|
|
2841
|
+
)
|
|
2842
|
+
|
|
2843
|
+
|
|
2844
|
+
@validate_call
|
|
2845
|
+
def list_pty_sessions_without_preload_content(
|
|
2846
|
+
self,
|
|
2847
|
+
_request_timeout: Union[
|
|
2848
|
+
None,
|
|
2849
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2850
|
+
Tuple[
|
|
2851
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2852
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2853
|
+
]
|
|
2854
|
+
] = None,
|
|
2855
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2856
|
+
_content_type: Optional[StrictStr] = None,
|
|
2857
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2858
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2859
|
+
) -> RESTResponseType:
|
|
2860
|
+
"""List all PTY sessions
|
|
2861
|
+
|
|
2862
|
+
Get a list of all active pseudo-terminal sessions
|
|
2863
|
+
|
|
2864
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2865
|
+
number provided, it will be total request
|
|
2866
|
+
timeout. It can also be a pair (tuple) of
|
|
2867
|
+
(connection, read) timeouts.
|
|
2868
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2869
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2870
|
+
request; this effectively ignores the
|
|
2871
|
+
authentication in the spec for a single request.
|
|
2872
|
+
:type _request_auth: dict, optional
|
|
2873
|
+
:param _content_type: force content-type for the request.
|
|
2874
|
+
:type _content_type: str, Optional
|
|
2875
|
+
:param _headers: set to override the headers for a single
|
|
2876
|
+
request; this effectively ignores the headers
|
|
2877
|
+
in the spec for a single request.
|
|
2878
|
+
:type _headers: dict, optional
|
|
2879
|
+
:param _host_index: set to override the host_index for a single
|
|
2880
|
+
request; this effectively ignores the host_index
|
|
2881
|
+
in the spec for a single request.
|
|
2882
|
+
:type _host_index: int, optional
|
|
2883
|
+
:return: Returns the result object.
|
|
2884
|
+
""" # noqa: E501
|
|
2885
|
+
|
|
2886
|
+
_param = self._list_pty_sessions_serialize(
|
|
2887
|
+
_request_auth=_request_auth,
|
|
2888
|
+
_content_type=_content_type,
|
|
2889
|
+
_headers=_headers,
|
|
2890
|
+
_host_index=_host_index
|
|
2891
|
+
)
|
|
2892
|
+
|
|
2893
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2894
|
+
'200': "PtyListResponse",
|
|
2895
|
+
}
|
|
2896
|
+
response_data = self.api_client.call_api(
|
|
2897
|
+
*_param,
|
|
2898
|
+
_request_timeout=_request_timeout
|
|
2899
|
+
)
|
|
2900
|
+
return response_data.response
|
|
2901
|
+
|
|
2902
|
+
|
|
2903
|
+
def _list_pty_sessions_serialize(
|
|
2904
|
+
self,
|
|
1313
2905
|
_request_auth,
|
|
1314
2906
|
_content_type,
|
|
1315
2907
|
_headers,
|
|
@@ -1331,10 +2923,6 @@ class ProcessApi:
|
|
|
1331
2923
|
_body_params: Optional[bytes] = None
|
|
1332
2924
|
|
|
1333
2925
|
# process the path parameters
|
|
1334
|
-
if session_id is not None:
|
|
1335
|
-
_path_params['sessionId'] = session_id
|
|
1336
|
-
if command_id is not None:
|
|
1337
|
-
_path_params['commandId'] = command_id
|
|
1338
2926
|
# process the query parameters
|
|
1339
2927
|
# process the header parameters
|
|
1340
2928
|
# process the form parameters
|
|
@@ -1356,7 +2944,7 @@ class ProcessApi:
|
|
|
1356
2944
|
|
|
1357
2945
|
return self.api_client.param_serialize(
|
|
1358
2946
|
method='GET',
|
|
1359
|
-
resource_path='/process/
|
|
2947
|
+
resource_path='/process/pty',
|
|
1360
2948
|
path_params=_path_params,
|
|
1361
2949
|
query_params=_query_params,
|
|
1362
2950
|
header_params=_header_params,
|
|
@@ -1373,11 +2961,8 @@ class ProcessApi:
|
|
|
1373
2961
|
|
|
1374
2962
|
|
|
1375
2963
|
@validate_call
|
|
1376
|
-
def
|
|
2964
|
+
def list_sessions(
|
|
1377
2965
|
self,
|
|
1378
|
-
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1379
|
-
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1380
|
-
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1381
2966
|
_request_timeout: Union[
|
|
1382
2967
|
None,
|
|
1383
2968
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1390,17 +2975,11 @@ class ProcessApi:
|
|
|
1390
2975
|
_content_type: Optional[StrictStr] = None,
|
|
1391
2976
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1392
2977
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1393
|
-
) ->
|
|
1394
|
-
"""
|
|
2978
|
+
) -> List[Session]:
|
|
2979
|
+
"""List all sessions
|
|
1395
2980
|
|
|
1396
|
-
Get
|
|
2981
|
+
Get a list of all active shell sessions
|
|
1397
2982
|
|
|
1398
|
-
:param session_id: Session ID (required)
|
|
1399
|
-
:type session_id: str
|
|
1400
|
-
:param command_id: Command ID (required)
|
|
1401
|
-
:type command_id: str
|
|
1402
|
-
:param follow: Follow logs in real-time (WebSocket only)
|
|
1403
|
-
:type follow: bool
|
|
1404
2983
|
:param _request_timeout: timeout setting for this request. If one
|
|
1405
2984
|
number provided, it will be total request
|
|
1406
2985
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1423,10 +3002,7 @@ class ProcessApi:
|
|
|
1423
3002
|
:return: Returns the result object.
|
|
1424
3003
|
""" # noqa: E501
|
|
1425
3004
|
|
|
1426
|
-
_param = self.
|
|
1427
|
-
session_id=session_id,
|
|
1428
|
-
command_id=command_id,
|
|
1429
|
-
follow=follow,
|
|
3005
|
+
_param = self._list_sessions_serialize(
|
|
1430
3006
|
_request_auth=_request_auth,
|
|
1431
3007
|
_content_type=_content_type,
|
|
1432
3008
|
_headers=_headers,
|
|
@@ -1434,7 +3010,7 @@ class ProcessApi:
|
|
|
1434
3010
|
)
|
|
1435
3011
|
|
|
1436
3012
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1437
|
-
'200': "
|
|
3013
|
+
'200': "List[Session]",
|
|
1438
3014
|
}
|
|
1439
3015
|
response_data = self.api_client.call_api(
|
|
1440
3016
|
*_param,
|
|
@@ -1448,11 +3024,8 @@ class ProcessApi:
|
|
|
1448
3024
|
|
|
1449
3025
|
|
|
1450
3026
|
@validate_call
|
|
1451
|
-
def
|
|
3027
|
+
def list_sessions_with_http_info(
|
|
1452
3028
|
self,
|
|
1453
|
-
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1454
|
-
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1455
|
-
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1456
3029
|
_request_timeout: Union[
|
|
1457
3030
|
None,
|
|
1458
3031
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1465,17 +3038,11 @@ class ProcessApi:
|
|
|
1465
3038
|
_content_type: Optional[StrictStr] = None,
|
|
1466
3039
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1467
3040
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1468
|
-
) -> ApiResponse[
|
|
1469
|
-
"""
|
|
3041
|
+
) -> ApiResponse[List[Session]]:
|
|
3042
|
+
"""List all sessions
|
|
1470
3043
|
|
|
1471
|
-
Get
|
|
3044
|
+
Get a list of all active shell sessions
|
|
1472
3045
|
|
|
1473
|
-
:param session_id: Session ID (required)
|
|
1474
|
-
:type session_id: str
|
|
1475
|
-
:param command_id: Command ID (required)
|
|
1476
|
-
:type command_id: str
|
|
1477
|
-
:param follow: Follow logs in real-time (WebSocket only)
|
|
1478
|
-
:type follow: bool
|
|
1479
3046
|
:param _request_timeout: timeout setting for this request. If one
|
|
1480
3047
|
number provided, it will be total request
|
|
1481
3048
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1498,10 +3065,7 @@ class ProcessApi:
|
|
|
1498
3065
|
:return: Returns the result object.
|
|
1499
3066
|
""" # noqa: E501
|
|
1500
3067
|
|
|
1501
|
-
_param = self.
|
|
1502
|
-
session_id=session_id,
|
|
1503
|
-
command_id=command_id,
|
|
1504
|
-
follow=follow,
|
|
3068
|
+
_param = self._list_sessions_serialize(
|
|
1505
3069
|
_request_auth=_request_auth,
|
|
1506
3070
|
_content_type=_content_type,
|
|
1507
3071
|
_headers=_headers,
|
|
@@ -1509,7 +3073,7 @@ class ProcessApi:
|
|
|
1509
3073
|
)
|
|
1510
3074
|
|
|
1511
3075
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1512
|
-
'200': "
|
|
3076
|
+
'200': "List[Session]",
|
|
1513
3077
|
}
|
|
1514
3078
|
response_data = self.api_client.call_api(
|
|
1515
3079
|
*_param,
|
|
@@ -1523,11 +3087,8 @@ class ProcessApi:
|
|
|
1523
3087
|
|
|
1524
3088
|
|
|
1525
3089
|
@validate_call
|
|
1526
|
-
def
|
|
3090
|
+
def list_sessions_without_preload_content(
|
|
1527
3091
|
self,
|
|
1528
|
-
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1529
|
-
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1530
|
-
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1531
3092
|
_request_timeout: Union[
|
|
1532
3093
|
None,
|
|
1533
3094
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1541,16 +3102,10 @@ class ProcessApi:
|
|
|
1541
3102
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1542
3103
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1543
3104
|
) -> RESTResponseType:
|
|
1544
|
-
"""
|
|
3105
|
+
"""List all sessions
|
|
1545
3106
|
|
|
1546
|
-
Get
|
|
3107
|
+
Get a list of all active shell sessions
|
|
1547
3108
|
|
|
1548
|
-
:param session_id: Session ID (required)
|
|
1549
|
-
:type session_id: str
|
|
1550
|
-
:param command_id: Command ID (required)
|
|
1551
|
-
:type command_id: str
|
|
1552
|
-
:param follow: Follow logs in real-time (WebSocket only)
|
|
1553
|
-
:type follow: bool
|
|
1554
3109
|
:param _request_timeout: timeout setting for this request. If one
|
|
1555
3110
|
number provided, it will be total request
|
|
1556
3111
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1573,10 +3128,7 @@ class ProcessApi:
|
|
|
1573
3128
|
:return: Returns the result object.
|
|
1574
3129
|
""" # noqa: E501
|
|
1575
3130
|
|
|
1576
|
-
_param = self.
|
|
1577
|
-
session_id=session_id,
|
|
1578
|
-
command_id=command_id,
|
|
1579
|
-
follow=follow,
|
|
3131
|
+
_param = self._list_sessions_serialize(
|
|
1580
3132
|
_request_auth=_request_auth,
|
|
1581
3133
|
_content_type=_content_type,
|
|
1582
3134
|
_headers=_headers,
|
|
@@ -1584,7 +3136,7 @@ class ProcessApi:
|
|
|
1584
3136
|
)
|
|
1585
3137
|
|
|
1586
3138
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1587
|
-
'200': "
|
|
3139
|
+
'200': "List[Session]",
|
|
1588
3140
|
}
|
|
1589
3141
|
response_data = self.api_client.call_api(
|
|
1590
3142
|
*_param,
|
|
@@ -1593,11 +3145,8 @@ class ProcessApi:
|
|
|
1593
3145
|
return response_data.response
|
|
1594
3146
|
|
|
1595
3147
|
|
|
1596
|
-
def
|
|
3148
|
+
def _list_sessions_serialize(
|
|
1597
3149
|
self,
|
|
1598
|
-
session_id,
|
|
1599
|
-
command_id,
|
|
1600
|
-
follow,
|
|
1601
3150
|
_request_auth,
|
|
1602
3151
|
_content_type,
|
|
1603
3152
|
_headers,
|
|
@@ -1619,15 +3168,7 @@ class ProcessApi:
|
|
|
1619
3168
|
_body_params: Optional[bytes] = None
|
|
1620
3169
|
|
|
1621
3170
|
# process the path parameters
|
|
1622
|
-
if session_id is not None:
|
|
1623
|
-
_path_params['sessionId'] = session_id
|
|
1624
|
-
if command_id is not None:
|
|
1625
|
-
_path_params['commandId'] = command_id
|
|
1626
3171
|
# process the query parameters
|
|
1627
|
-
if follow is not None:
|
|
1628
|
-
|
|
1629
|
-
_query_params.append(('follow', follow))
|
|
1630
|
-
|
|
1631
3172
|
# process the header parameters
|
|
1632
3173
|
# process the form parameters
|
|
1633
3174
|
# process the body parameter
|
|
@@ -1637,7 +3178,7 @@ class ProcessApi:
|
|
|
1637
3178
|
if 'Accept' not in _header_params:
|
|
1638
3179
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1639
3180
|
[
|
|
1640
|
-
'
|
|
3181
|
+
'application/json'
|
|
1641
3182
|
]
|
|
1642
3183
|
)
|
|
1643
3184
|
|
|
@@ -1648,7 +3189,7 @@ class ProcessApi:
|
|
|
1648
3189
|
|
|
1649
3190
|
return self.api_client.param_serialize(
|
|
1650
3191
|
method='GET',
|
|
1651
|
-
resource_path='/process/session
|
|
3192
|
+
resource_path='/process/session',
|
|
1652
3193
|
path_params=_path_params,
|
|
1653
3194
|
query_params=_query_params,
|
|
1654
3195
|
header_params=_header_params,
|
|
@@ -1665,8 +3206,10 @@ class ProcessApi:
|
|
|
1665
3206
|
|
|
1666
3207
|
|
|
1667
3208
|
@validate_call
|
|
1668
|
-
def
|
|
3209
|
+
def resize_pty_session(
|
|
1669
3210
|
self,
|
|
3211
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3212
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
1670
3213
|
_request_timeout: Union[
|
|
1671
3214
|
None,
|
|
1672
3215
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1679,11 +3222,15 @@ class ProcessApi:
|
|
|
1679
3222
|
_content_type: Optional[StrictStr] = None,
|
|
1680
3223
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1681
3224
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1682
|
-
) ->
|
|
1683
|
-
"""
|
|
3225
|
+
) -> PtySessionInfo:
|
|
3226
|
+
"""Resize a PTY session
|
|
1684
3227
|
|
|
1685
|
-
|
|
3228
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
1686
3229
|
|
|
3230
|
+
:param session_id: PTY session ID (required)
|
|
3231
|
+
:type session_id: str
|
|
3232
|
+
:param request: Resize request with new dimensions (required)
|
|
3233
|
+
:type request: PtyResizeRequest
|
|
1687
3234
|
:param _request_timeout: timeout setting for this request. If one
|
|
1688
3235
|
number provided, it will be total request
|
|
1689
3236
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1706,7 +3253,9 @@ class ProcessApi:
|
|
|
1706
3253
|
:return: Returns the result object.
|
|
1707
3254
|
""" # noqa: E501
|
|
1708
3255
|
|
|
1709
|
-
_param = self.
|
|
3256
|
+
_param = self._resize_pty_session_serialize(
|
|
3257
|
+
session_id=session_id,
|
|
3258
|
+
request=request,
|
|
1710
3259
|
_request_auth=_request_auth,
|
|
1711
3260
|
_content_type=_content_type,
|
|
1712
3261
|
_headers=_headers,
|
|
@@ -1714,7 +3263,7 @@ class ProcessApi:
|
|
|
1714
3263
|
)
|
|
1715
3264
|
|
|
1716
3265
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1717
|
-
'200': "
|
|
3266
|
+
'200': "PtySessionInfo",
|
|
1718
3267
|
}
|
|
1719
3268
|
response_data = self.api_client.call_api(
|
|
1720
3269
|
*_param,
|
|
@@ -1728,8 +3277,10 @@ class ProcessApi:
|
|
|
1728
3277
|
|
|
1729
3278
|
|
|
1730
3279
|
@validate_call
|
|
1731
|
-
def
|
|
3280
|
+
def resize_pty_session_with_http_info(
|
|
1732
3281
|
self,
|
|
3282
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3283
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
1733
3284
|
_request_timeout: Union[
|
|
1734
3285
|
None,
|
|
1735
3286
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1742,11 +3293,15 @@ class ProcessApi:
|
|
|
1742
3293
|
_content_type: Optional[StrictStr] = None,
|
|
1743
3294
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1744
3295
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1745
|
-
) -> ApiResponse[
|
|
1746
|
-
"""
|
|
3296
|
+
) -> ApiResponse[PtySessionInfo]:
|
|
3297
|
+
"""Resize a PTY session
|
|
1747
3298
|
|
|
1748
|
-
|
|
3299
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
1749
3300
|
|
|
3301
|
+
:param session_id: PTY session ID (required)
|
|
3302
|
+
:type session_id: str
|
|
3303
|
+
:param request: Resize request with new dimensions (required)
|
|
3304
|
+
:type request: PtyResizeRequest
|
|
1750
3305
|
:param _request_timeout: timeout setting for this request. If one
|
|
1751
3306
|
number provided, it will be total request
|
|
1752
3307
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1769,7 +3324,9 @@ class ProcessApi:
|
|
|
1769
3324
|
:return: Returns the result object.
|
|
1770
3325
|
""" # noqa: E501
|
|
1771
3326
|
|
|
1772
|
-
_param = self.
|
|
3327
|
+
_param = self._resize_pty_session_serialize(
|
|
3328
|
+
session_id=session_id,
|
|
3329
|
+
request=request,
|
|
1773
3330
|
_request_auth=_request_auth,
|
|
1774
3331
|
_content_type=_content_type,
|
|
1775
3332
|
_headers=_headers,
|
|
@@ -1777,7 +3334,7 @@ class ProcessApi:
|
|
|
1777
3334
|
)
|
|
1778
3335
|
|
|
1779
3336
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1780
|
-
'200': "
|
|
3337
|
+
'200': "PtySessionInfo",
|
|
1781
3338
|
}
|
|
1782
3339
|
response_data = self.api_client.call_api(
|
|
1783
3340
|
*_param,
|
|
@@ -1791,8 +3348,10 @@ class ProcessApi:
|
|
|
1791
3348
|
|
|
1792
3349
|
|
|
1793
3350
|
@validate_call
|
|
1794
|
-
def
|
|
3351
|
+
def resize_pty_session_without_preload_content(
|
|
1795
3352
|
self,
|
|
3353
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3354
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
1796
3355
|
_request_timeout: Union[
|
|
1797
3356
|
None,
|
|
1798
3357
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1806,10 +3365,14 @@ class ProcessApi:
|
|
|
1806
3365
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1807
3366
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1808
3367
|
) -> RESTResponseType:
|
|
1809
|
-
"""
|
|
3368
|
+
"""Resize a PTY session
|
|
1810
3369
|
|
|
1811
|
-
|
|
3370
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
1812
3371
|
|
|
3372
|
+
:param session_id: PTY session ID (required)
|
|
3373
|
+
:type session_id: str
|
|
3374
|
+
:param request: Resize request with new dimensions (required)
|
|
3375
|
+
:type request: PtyResizeRequest
|
|
1813
3376
|
:param _request_timeout: timeout setting for this request. If one
|
|
1814
3377
|
number provided, it will be total request
|
|
1815
3378
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1832,7 +3395,9 @@ class ProcessApi:
|
|
|
1832
3395
|
:return: Returns the result object.
|
|
1833
3396
|
""" # noqa: E501
|
|
1834
3397
|
|
|
1835
|
-
_param = self.
|
|
3398
|
+
_param = self._resize_pty_session_serialize(
|
|
3399
|
+
session_id=session_id,
|
|
3400
|
+
request=request,
|
|
1836
3401
|
_request_auth=_request_auth,
|
|
1837
3402
|
_content_type=_content_type,
|
|
1838
3403
|
_headers=_headers,
|
|
@@ -1840,7 +3405,7 @@ class ProcessApi:
|
|
|
1840
3405
|
)
|
|
1841
3406
|
|
|
1842
3407
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1843
|
-
'200': "
|
|
3408
|
+
'200': "PtySessionInfo",
|
|
1844
3409
|
}
|
|
1845
3410
|
response_data = self.api_client.call_api(
|
|
1846
3411
|
*_param,
|
|
@@ -1849,8 +3414,10 @@ class ProcessApi:
|
|
|
1849
3414
|
return response_data.response
|
|
1850
3415
|
|
|
1851
3416
|
|
|
1852
|
-
def
|
|
3417
|
+
def _resize_pty_session_serialize(
|
|
1853
3418
|
self,
|
|
3419
|
+
session_id,
|
|
3420
|
+
request,
|
|
1854
3421
|
_request_auth,
|
|
1855
3422
|
_content_type,
|
|
1856
3423
|
_headers,
|
|
@@ -1872,10 +3439,14 @@ class ProcessApi:
|
|
|
1872
3439
|
_body_params: Optional[bytes] = None
|
|
1873
3440
|
|
|
1874
3441
|
# process the path parameters
|
|
3442
|
+
if session_id is not None:
|
|
3443
|
+
_path_params['sessionId'] = session_id
|
|
1875
3444
|
# process the query parameters
|
|
1876
3445
|
# process the header parameters
|
|
1877
3446
|
# process the form parameters
|
|
1878
3447
|
# process the body parameter
|
|
3448
|
+
if request is not None:
|
|
3449
|
+
_body_params = request
|
|
1879
3450
|
|
|
1880
3451
|
|
|
1881
3452
|
# set the HTTP header `Accept`
|
|
@@ -1886,14 +3457,27 @@ class ProcessApi:
|
|
|
1886
3457
|
]
|
|
1887
3458
|
)
|
|
1888
3459
|
|
|
3460
|
+
# set the HTTP header `Content-Type`
|
|
3461
|
+
if _content_type:
|
|
3462
|
+
_header_params['Content-Type'] = _content_type
|
|
3463
|
+
else:
|
|
3464
|
+
_default_content_type = (
|
|
3465
|
+
self.api_client.select_header_content_type(
|
|
3466
|
+
[
|
|
3467
|
+
'application/json'
|
|
3468
|
+
]
|
|
3469
|
+
)
|
|
3470
|
+
)
|
|
3471
|
+
if _default_content_type is not None:
|
|
3472
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1889
3473
|
|
|
1890
3474
|
# authentication setting
|
|
1891
3475
|
_auth_settings: List[str] = [
|
|
1892
3476
|
]
|
|
1893
3477
|
|
|
1894
3478
|
return self.api_client.param_serialize(
|
|
1895
|
-
method='
|
|
1896
|
-
resource_path='/process/
|
|
3479
|
+
method='POST',
|
|
3480
|
+
resource_path='/process/pty/{sessionId}/resize',
|
|
1897
3481
|
path_params=_path_params,
|
|
1898
3482
|
query_params=_query_params,
|
|
1899
3483
|
header_params=_header_params,
|