daytona_toolbox_api_client 0.128.2a1__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.
- daytona_toolbox_api_client/__init__.py +113 -0
- daytona_toolbox_api_client/api/__init__.py +12 -0
- daytona_toolbox_api_client/api/computer_use_api.py +6011 -0
- daytona_toolbox_api_client/api/file_system_api.py +3584 -0
- daytona_toolbox_api_client/api/git_api.py +2970 -0
- daytona_toolbox_api_client/api/info_api.py +774 -0
- daytona_toolbox_api_client/api/interpreter_api.py +1076 -0
- daytona_toolbox_api_client/api/lsp_api.py +1972 -0
- daytona_toolbox_api_client/api/port_api.py +544 -0
- daytona_toolbox_api_client/api/process_api.py +3784 -0
- daytona_toolbox_api_client/api_client.py +797 -0
- daytona_toolbox_api_client/api_response.py +21 -0
- daytona_toolbox_api_client/configuration.py +572 -0
- daytona_toolbox_api_client/exceptions.py +216 -0
- daytona_toolbox_api_client/models/__init__.py +89 -0
- daytona_toolbox_api_client/models/command.py +104 -0
- daytona_toolbox_api_client/models/completion_context.py +102 -0
- daytona_toolbox_api_client/models/completion_item.py +112 -0
- daytona_toolbox_api_client/models/completion_list.py +110 -0
- daytona_toolbox_api_client/models/computer_use_start_response.py +115 -0
- daytona_toolbox_api_client/models/computer_use_status_response.py +100 -0
- daytona_toolbox_api_client/models/computer_use_stop_response.py +115 -0
- daytona_toolbox_api_client/models/create_context_request.py +102 -0
- daytona_toolbox_api_client/models/create_context_response.py +108 -0
- daytona_toolbox_api_client/models/create_session_request.py +100 -0
- daytona_toolbox_api_client/models/display_info.py +110 -0
- daytona_toolbox_api_client/models/display_info_response.py +108 -0
- daytona_toolbox_api_client/models/execute_request.py +104 -0
- daytona_toolbox_api_client/models/execute_response.py +102 -0
- daytona_toolbox_api_client/models/file_info.py +114 -0
- daytona_toolbox_api_client/models/file_status.py +107 -0
- daytona_toolbox_api_client/models/files_download_request.py +100 -0
- daytona_toolbox_api_client/models/git_add_request.py +102 -0
- daytona_toolbox_api_client/models/git_branch_request.py +102 -0
- daytona_toolbox_api_client/models/git_checkout_request.py +102 -0
- daytona_toolbox_api_client/models/git_clone_request.py +110 -0
- daytona_toolbox_api_client/models/git_commit_info.py +108 -0
- daytona_toolbox_api_client/models/git_commit_request.py +108 -0
- daytona_toolbox_api_client/models/git_commit_response.py +100 -0
- daytona_toolbox_api_client/models/git_git_delete_branch_request.py +102 -0
- daytona_toolbox_api_client/models/git_repo_request.py +104 -0
- daytona_toolbox_api_client/models/git_status.py +116 -0
- daytona_toolbox_api_client/models/interpreter_context.py +108 -0
- daytona_toolbox_api_client/models/interpreter_context_info.py +108 -0
- daytona_toolbox_api_client/models/is_port_in_use_response.py +100 -0
- daytona_toolbox_api_client/models/keyboard_hotkey_request.py +100 -0
- daytona_toolbox_api_client/models/keyboard_press_request.py +102 -0
- daytona_toolbox_api_client/models/keyboard_type_request.py +102 -0
- daytona_toolbox_api_client/models/list_branch_response.py +100 -0
- daytona_toolbox_api_client/models/list_contexts_response.py +108 -0
- daytona_toolbox_api_client/models/lsp_completion_params.py +116 -0
- daytona_toolbox_api_client/models/lsp_document_request.py +104 -0
- daytona_toolbox_api_client/models/lsp_location.py +106 -0
- daytona_toolbox_api_client/models/lsp_position.py +102 -0
- daytona_toolbox_api_client/models/lsp_range.py +109 -0
- daytona_toolbox_api_client/models/lsp_server_request.py +102 -0
- daytona_toolbox_api_client/models/lsp_symbol.py +108 -0
- daytona_toolbox_api_client/models/match.py +104 -0
- daytona_toolbox_api_client/models/mouse_click_request.py +106 -0
- daytona_toolbox_api_client/models/mouse_click_response.py +102 -0
- daytona_toolbox_api_client/models/mouse_drag_request.py +108 -0
- daytona_toolbox_api_client/models/mouse_drag_response.py +102 -0
- daytona_toolbox_api_client/models/mouse_move_request.py +102 -0
- daytona_toolbox_api_client/models/mouse_position_response.py +102 -0
- daytona_toolbox_api_client/models/mouse_scroll_request.py +106 -0
- daytona_toolbox_api_client/models/port_list.py +100 -0
- daytona_toolbox_api_client/models/position.py +102 -0
- daytona_toolbox_api_client/models/process_errors_response.py +102 -0
- daytona_toolbox_api_client/models/process_logs_response.py +102 -0
- daytona_toolbox_api_client/models/process_restart_response.py +102 -0
- daytona_toolbox_api_client/models/process_status.py +106 -0
- daytona_toolbox_api_client/models/process_status_response.py +102 -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/replace_request.py +104 -0
- daytona_toolbox_api_client/models/replace_result.py +104 -0
- daytona_toolbox_api_client/models/screenshot_response.py +108 -0
- daytona_toolbox_api_client/models/scroll_response.py +100 -0
- daytona_toolbox_api_client/models/search_files_response.py +100 -0
- daytona_toolbox_api_client/models/session.py +110 -0
- daytona_toolbox_api_client/models/session_execute_request.py +104 -0
- daytona_toolbox_api_client/models/session_execute_response.py +108 -0
- daytona_toolbox_api_client/models/status.py +43 -0
- daytona_toolbox_api_client/models/user_home_dir_response.py +100 -0
- daytona_toolbox_api_client/models/window_info.py +112 -0
- daytona_toolbox_api_client/models/windows_response.py +108 -0
- daytona_toolbox_api_client/models/work_dir_response.py +100 -0
- daytona_toolbox_api_client/py.typed +0 -0
- daytona_toolbox_api_client/rest.py +258 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/METADATA +25 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/RECORD +97 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/WHEEL +5 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/licenses/LICENSE +190 -0
- daytona_toolbox_api_client-0.128.2a1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3784 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona Daemon API
|
|
5
|
+
|
|
6
|
+
Daytona Daemon API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v0.0.0-dev
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictBool, StrictStr
|
|
20
|
+
from typing import Any, Dict, List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from daytona_toolbox_api_client.models.command import Command
|
|
23
|
+
from daytona_toolbox_api_client.models.create_session_request import CreateSessionRequest
|
|
24
|
+
from daytona_toolbox_api_client.models.execute_request import ExecuteRequest
|
|
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
|
|
31
|
+
from daytona_toolbox_api_client.models.session import Session
|
|
32
|
+
from daytona_toolbox_api_client.models.session_execute_request import SessionExecuteRequest
|
|
33
|
+
from daytona_toolbox_api_client.models.session_execute_response import SessionExecuteResponse
|
|
34
|
+
|
|
35
|
+
from daytona_toolbox_api_client.api_client import ApiClient, RequestSerialized
|
|
36
|
+
from daytona_toolbox_api_client.api_response import ApiResponse
|
|
37
|
+
from daytona_toolbox_api_client.rest import RESTResponseType
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class ProcessApi:
|
|
41
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
42
|
+
Ref: https://openapi-generator.tech
|
|
43
|
+
|
|
44
|
+
Do not edit the class manually.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, api_client=None) -> None:
|
|
48
|
+
if api_client is None:
|
|
49
|
+
api_client = ApiClient.get_default()
|
|
50
|
+
self.api_client = api_client
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@validate_call
|
|
54
|
+
def connect_pty_session(
|
|
55
|
+
self,
|
|
56
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
57
|
+
_request_timeout: Union[
|
|
58
|
+
None,
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Tuple[
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
63
|
+
]
|
|
64
|
+
] = None,
|
|
65
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_content_type: Optional[StrictStr] = None,
|
|
67
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
+
) -> None:
|
|
70
|
+
"""Connect to PTY session via WebSocket
|
|
71
|
+
|
|
72
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
73
|
+
|
|
74
|
+
:param session_id: PTY session ID (required)
|
|
75
|
+
:type session_id: str
|
|
76
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
77
|
+
number provided, it will be total request
|
|
78
|
+
timeout. It can also be a pair (tuple) of
|
|
79
|
+
(connection, read) timeouts.
|
|
80
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
81
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
82
|
+
request; this effectively ignores the
|
|
83
|
+
authentication in the spec for a single request.
|
|
84
|
+
:type _request_auth: dict, optional
|
|
85
|
+
:param _content_type: force content-type for the request.
|
|
86
|
+
:type _content_type: str, Optional
|
|
87
|
+
:param _headers: set to override the headers for a single
|
|
88
|
+
request; this effectively ignores the headers
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _headers: dict, optional
|
|
91
|
+
:param _host_index: set to override the host_index for a single
|
|
92
|
+
request; this effectively ignores the host_index
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _host_index: int, optional
|
|
95
|
+
:return: Returns the result object.
|
|
96
|
+
""" # noqa: E501
|
|
97
|
+
|
|
98
|
+
_param = self._connect_pty_session_serialize(
|
|
99
|
+
session_id=session_id,
|
|
100
|
+
_request_auth=_request_auth,
|
|
101
|
+
_content_type=_content_type,
|
|
102
|
+
_headers=_headers,
|
|
103
|
+
_host_index=_host_index
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
107
|
+
'101': None,
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def connect_pty_session_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[None]:
|
|
137
|
+
"""Connect to PTY session via WebSocket
|
|
138
|
+
|
|
139
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
140
|
+
|
|
141
|
+
:param session_id: PTY session ID (required)
|
|
142
|
+
:type session_id: str
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._connect_pty_session_serialize(
|
|
166
|
+
session_id=session_id,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'101': None,
|
|
175
|
+
}
|
|
176
|
+
response_data = self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
def connect_pty_session_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
191
|
+
_request_timeout: Union[
|
|
192
|
+
None,
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Tuple[
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
197
|
+
]
|
|
198
|
+
] = None,
|
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
|
+
) -> RESTResponseType:
|
|
204
|
+
"""Connect to PTY session via WebSocket
|
|
205
|
+
|
|
206
|
+
Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
207
|
+
|
|
208
|
+
:param session_id: PTY session ID (required)
|
|
209
|
+
:type session_id: str
|
|
210
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
211
|
+
number provided, it will be total request
|
|
212
|
+
timeout. It can also be a pair (tuple) of
|
|
213
|
+
(connection, read) timeouts.
|
|
214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
216
|
+
request; this effectively ignores the
|
|
217
|
+
authentication in the spec for a single request.
|
|
218
|
+
:type _request_auth: dict, optional
|
|
219
|
+
:param _content_type: force content-type for the request.
|
|
220
|
+
:type _content_type: str, Optional
|
|
221
|
+
:param _headers: set to override the headers for a single
|
|
222
|
+
request; this effectively ignores the headers
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _headers: dict, optional
|
|
225
|
+
:param _host_index: set to override the host_index for a single
|
|
226
|
+
request; this effectively ignores the host_index
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _host_index: int, optional
|
|
229
|
+
:return: Returns the result object.
|
|
230
|
+
""" # noqa: E501
|
|
231
|
+
|
|
232
|
+
_param = self._connect_pty_session_serialize(
|
|
233
|
+
session_id=session_id,
|
|
234
|
+
_request_auth=_request_auth,
|
|
235
|
+
_content_type=_content_type,
|
|
236
|
+
_headers=_headers,
|
|
237
|
+
_host_index=_host_index
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
241
|
+
'101': None,
|
|
242
|
+
}
|
|
243
|
+
response_data = self.api_client.call_api(
|
|
244
|
+
*_param,
|
|
245
|
+
_request_timeout=_request_timeout
|
|
246
|
+
)
|
|
247
|
+
return response_data.response
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _connect_pty_session_serialize(
|
|
251
|
+
self,
|
|
252
|
+
session_id,
|
|
253
|
+
_request_auth,
|
|
254
|
+
_content_type,
|
|
255
|
+
_headers,
|
|
256
|
+
_host_index,
|
|
257
|
+
) -> RequestSerialized:
|
|
258
|
+
|
|
259
|
+
_host = None
|
|
260
|
+
|
|
261
|
+
_collection_formats: Dict[str, str] = {
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
_path_params: Dict[str, str] = {}
|
|
265
|
+
_query_params: List[Tuple[str, str]] = []
|
|
266
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
267
|
+
_form_params: List[Tuple[str, str]] = []
|
|
268
|
+
_files: Dict[
|
|
269
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
270
|
+
] = {}
|
|
271
|
+
_body_params: Optional[bytes] = None
|
|
272
|
+
|
|
273
|
+
# process the path parameters
|
|
274
|
+
if session_id is not None:
|
|
275
|
+
_path_params['sessionId'] = session_id
|
|
276
|
+
# process the query parameters
|
|
277
|
+
# process the header parameters
|
|
278
|
+
# process the form parameters
|
|
279
|
+
# process the body parameter
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
# authentication setting
|
|
285
|
+
_auth_settings: List[str] = [
|
|
286
|
+
]
|
|
287
|
+
|
|
288
|
+
return self.api_client.param_serialize(
|
|
289
|
+
method='GET',
|
|
290
|
+
resource_path='/process/pty/{sessionId}/connect',
|
|
291
|
+
path_params=_path_params,
|
|
292
|
+
query_params=_query_params,
|
|
293
|
+
header_params=_header_params,
|
|
294
|
+
body=_body_params,
|
|
295
|
+
post_params=_form_params,
|
|
296
|
+
files=_files,
|
|
297
|
+
auth_settings=_auth_settings,
|
|
298
|
+
collection_formats=_collection_formats,
|
|
299
|
+
_host=_host,
|
|
300
|
+
_request_auth=_request_auth
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
@validate_call
|
|
307
|
+
def create_pty_session(
|
|
308
|
+
self,
|
|
309
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
310
|
+
_request_timeout: Union[
|
|
311
|
+
None,
|
|
312
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
313
|
+
Tuple[
|
|
314
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
316
|
+
]
|
|
317
|
+
] = None,
|
|
318
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
319
|
+
_content_type: Optional[StrictStr] = None,
|
|
320
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
321
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
322
|
+
) -> PtyCreateResponse:
|
|
323
|
+
"""Create a new PTY session
|
|
324
|
+
|
|
325
|
+
Create a new pseudo-terminal session with specified configuration
|
|
326
|
+
|
|
327
|
+
:param request: PTY session creation request (required)
|
|
328
|
+
:type request: PtyCreateRequest
|
|
329
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
330
|
+
number provided, it will be total request
|
|
331
|
+
timeout. It can also be a pair (tuple) of
|
|
332
|
+
(connection, read) timeouts.
|
|
333
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
334
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
335
|
+
request; this effectively ignores the
|
|
336
|
+
authentication in the spec for a single request.
|
|
337
|
+
:type _request_auth: dict, optional
|
|
338
|
+
:param _content_type: force content-type for the request.
|
|
339
|
+
:type _content_type: str, Optional
|
|
340
|
+
:param _headers: set to override the headers for a single
|
|
341
|
+
request; this effectively ignores the headers
|
|
342
|
+
in the spec for a single request.
|
|
343
|
+
:type _headers: dict, optional
|
|
344
|
+
:param _host_index: set to override the host_index for a single
|
|
345
|
+
request; this effectively ignores the host_index
|
|
346
|
+
in the spec for a single request.
|
|
347
|
+
:type _host_index: int, optional
|
|
348
|
+
:return: Returns the result object.
|
|
349
|
+
""" # noqa: E501
|
|
350
|
+
|
|
351
|
+
_param = self._create_pty_session_serialize(
|
|
352
|
+
request=request,
|
|
353
|
+
_request_auth=_request_auth,
|
|
354
|
+
_content_type=_content_type,
|
|
355
|
+
_headers=_headers,
|
|
356
|
+
_host_index=_host_index
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
360
|
+
'201': "PtyCreateResponse",
|
|
361
|
+
}
|
|
362
|
+
response_data = self.api_client.call_api(
|
|
363
|
+
*_param,
|
|
364
|
+
_request_timeout=_request_timeout
|
|
365
|
+
)
|
|
366
|
+
response_data.read()
|
|
367
|
+
return self.api_client.response_deserialize(
|
|
368
|
+
response_data=response_data,
|
|
369
|
+
response_types_map=_response_types_map,
|
|
370
|
+
).data
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
@validate_call
|
|
374
|
+
def create_pty_session_with_http_info(
|
|
375
|
+
self,
|
|
376
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
377
|
+
_request_timeout: Union[
|
|
378
|
+
None,
|
|
379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
380
|
+
Tuple[
|
|
381
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
382
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
383
|
+
]
|
|
384
|
+
] = None,
|
|
385
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
386
|
+
_content_type: Optional[StrictStr] = None,
|
|
387
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
388
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
389
|
+
) -> ApiResponse[PtyCreateResponse]:
|
|
390
|
+
"""Create a new PTY session
|
|
391
|
+
|
|
392
|
+
Create a new pseudo-terminal session with specified configuration
|
|
393
|
+
|
|
394
|
+
:param request: PTY session creation request (required)
|
|
395
|
+
:type request: PtyCreateRequest
|
|
396
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
397
|
+
number provided, it will be total request
|
|
398
|
+
timeout. It can also be a pair (tuple) of
|
|
399
|
+
(connection, read) timeouts.
|
|
400
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
401
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
402
|
+
request; this effectively ignores the
|
|
403
|
+
authentication in the spec for a single request.
|
|
404
|
+
:type _request_auth: dict, optional
|
|
405
|
+
:param _content_type: force content-type for the request.
|
|
406
|
+
:type _content_type: str, Optional
|
|
407
|
+
:param _headers: set to override the headers for a single
|
|
408
|
+
request; this effectively ignores the headers
|
|
409
|
+
in the spec for a single request.
|
|
410
|
+
:type _headers: dict, optional
|
|
411
|
+
:param _host_index: set to override the host_index for a single
|
|
412
|
+
request; this effectively ignores the host_index
|
|
413
|
+
in the spec for a single request.
|
|
414
|
+
:type _host_index: int, optional
|
|
415
|
+
:return: Returns the result object.
|
|
416
|
+
""" # noqa: E501
|
|
417
|
+
|
|
418
|
+
_param = self._create_pty_session_serialize(
|
|
419
|
+
request=request,
|
|
420
|
+
_request_auth=_request_auth,
|
|
421
|
+
_content_type=_content_type,
|
|
422
|
+
_headers=_headers,
|
|
423
|
+
_host_index=_host_index
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
427
|
+
'201': "PtyCreateResponse",
|
|
428
|
+
}
|
|
429
|
+
response_data = self.api_client.call_api(
|
|
430
|
+
*_param,
|
|
431
|
+
_request_timeout=_request_timeout
|
|
432
|
+
)
|
|
433
|
+
response_data.read()
|
|
434
|
+
return self.api_client.response_deserialize(
|
|
435
|
+
response_data=response_data,
|
|
436
|
+
response_types_map=_response_types_map,
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
@validate_call
|
|
441
|
+
def create_pty_session_without_preload_content(
|
|
442
|
+
self,
|
|
443
|
+
request: Annotated[PtyCreateRequest, Field(description="PTY session creation request")],
|
|
444
|
+
_request_timeout: Union[
|
|
445
|
+
None,
|
|
446
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
447
|
+
Tuple[
|
|
448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
449
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
450
|
+
]
|
|
451
|
+
] = None,
|
|
452
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
453
|
+
_content_type: Optional[StrictStr] = None,
|
|
454
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
455
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
456
|
+
) -> RESTResponseType:
|
|
457
|
+
"""Create a new PTY session
|
|
458
|
+
|
|
459
|
+
Create a new pseudo-terminal session with specified configuration
|
|
460
|
+
|
|
461
|
+
:param request: PTY session creation request (required)
|
|
462
|
+
:type request: PtyCreateRequest
|
|
463
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
464
|
+
number provided, it will be total request
|
|
465
|
+
timeout. It can also be a pair (tuple) of
|
|
466
|
+
(connection, read) timeouts.
|
|
467
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
468
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
469
|
+
request; this effectively ignores the
|
|
470
|
+
authentication in the spec for a single request.
|
|
471
|
+
:type _request_auth: dict, optional
|
|
472
|
+
:param _content_type: force content-type for the request.
|
|
473
|
+
:type _content_type: str, Optional
|
|
474
|
+
:param _headers: set to override the headers for a single
|
|
475
|
+
request; this effectively ignores the headers
|
|
476
|
+
in the spec for a single request.
|
|
477
|
+
:type _headers: dict, optional
|
|
478
|
+
:param _host_index: set to override the host_index for a single
|
|
479
|
+
request; this effectively ignores the host_index
|
|
480
|
+
in the spec for a single request.
|
|
481
|
+
:type _host_index: int, optional
|
|
482
|
+
:return: Returns the result object.
|
|
483
|
+
""" # noqa: E501
|
|
484
|
+
|
|
485
|
+
_param = self._create_pty_session_serialize(
|
|
486
|
+
request=request,
|
|
487
|
+
_request_auth=_request_auth,
|
|
488
|
+
_content_type=_content_type,
|
|
489
|
+
_headers=_headers,
|
|
490
|
+
_host_index=_host_index
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
494
|
+
'201': "PtyCreateResponse",
|
|
495
|
+
}
|
|
496
|
+
response_data = self.api_client.call_api(
|
|
497
|
+
*_param,
|
|
498
|
+
_request_timeout=_request_timeout
|
|
499
|
+
)
|
|
500
|
+
return response_data.response
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
def _create_pty_session_serialize(
|
|
504
|
+
self,
|
|
505
|
+
request,
|
|
506
|
+
_request_auth,
|
|
507
|
+
_content_type,
|
|
508
|
+
_headers,
|
|
509
|
+
_host_index,
|
|
510
|
+
) -> RequestSerialized:
|
|
511
|
+
|
|
512
|
+
_host = None
|
|
513
|
+
|
|
514
|
+
_collection_formats: Dict[str, str] = {
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
_path_params: Dict[str, str] = {}
|
|
518
|
+
_query_params: List[Tuple[str, str]] = []
|
|
519
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
520
|
+
_form_params: List[Tuple[str, str]] = []
|
|
521
|
+
_files: Dict[
|
|
522
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
523
|
+
] = {}
|
|
524
|
+
_body_params: Optional[bytes] = None
|
|
525
|
+
|
|
526
|
+
# process the path parameters
|
|
527
|
+
# process the query parameters
|
|
528
|
+
# process the header parameters
|
|
529
|
+
# process the form parameters
|
|
530
|
+
# process the body parameter
|
|
531
|
+
if request is not None:
|
|
532
|
+
_body_params = request
|
|
533
|
+
|
|
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
|
+
)
|
|
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
|
|
556
|
+
|
|
557
|
+
# authentication setting
|
|
558
|
+
_auth_settings: List[str] = [
|
|
559
|
+
]
|
|
560
|
+
|
|
561
|
+
return self.api_client.param_serialize(
|
|
562
|
+
method='POST',
|
|
563
|
+
resource_path='/process/pty',
|
|
564
|
+
path_params=_path_params,
|
|
565
|
+
query_params=_query_params,
|
|
566
|
+
header_params=_header_params,
|
|
567
|
+
body=_body_params,
|
|
568
|
+
post_params=_form_params,
|
|
569
|
+
files=_files,
|
|
570
|
+
auth_settings=_auth_settings,
|
|
571
|
+
collection_formats=_collection_formats,
|
|
572
|
+
_host=_host,
|
|
573
|
+
_request_auth=_request_auth
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
@validate_call
|
|
580
|
+
def create_session(
|
|
581
|
+
self,
|
|
582
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
583
|
+
_request_timeout: Union[
|
|
584
|
+
None,
|
|
585
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
586
|
+
Tuple[
|
|
587
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
588
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
589
|
+
]
|
|
590
|
+
] = None,
|
|
591
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
592
|
+
_content_type: Optional[StrictStr] = None,
|
|
593
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
594
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
595
|
+
) -> None:
|
|
596
|
+
"""Create a new session
|
|
597
|
+
|
|
598
|
+
Create a new shell session for command execution
|
|
599
|
+
|
|
600
|
+
:param request: Session creation request (required)
|
|
601
|
+
:type request: CreateSessionRequest
|
|
602
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
603
|
+
number provided, it will be total request
|
|
604
|
+
timeout. It can also be a pair (tuple) of
|
|
605
|
+
(connection, read) timeouts.
|
|
606
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
607
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
608
|
+
request; this effectively ignores the
|
|
609
|
+
authentication in the spec for a single request.
|
|
610
|
+
:type _request_auth: dict, optional
|
|
611
|
+
:param _content_type: force content-type for the request.
|
|
612
|
+
:type _content_type: str, Optional
|
|
613
|
+
:param _headers: set to override the headers for a single
|
|
614
|
+
request; this effectively ignores the headers
|
|
615
|
+
in the spec for a single request.
|
|
616
|
+
:type _headers: dict, optional
|
|
617
|
+
:param _host_index: set to override the host_index for a single
|
|
618
|
+
request; this effectively ignores the host_index
|
|
619
|
+
in the spec for a single request.
|
|
620
|
+
:type _host_index: int, optional
|
|
621
|
+
:return: Returns the result object.
|
|
622
|
+
""" # noqa: E501
|
|
623
|
+
|
|
624
|
+
_param = self._create_session_serialize(
|
|
625
|
+
request=request,
|
|
626
|
+
_request_auth=_request_auth,
|
|
627
|
+
_content_type=_content_type,
|
|
628
|
+
_headers=_headers,
|
|
629
|
+
_host_index=_host_index
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
633
|
+
'201': None,
|
|
634
|
+
}
|
|
635
|
+
response_data = self.api_client.call_api(
|
|
636
|
+
*_param,
|
|
637
|
+
_request_timeout=_request_timeout
|
|
638
|
+
)
|
|
639
|
+
response_data.read()
|
|
640
|
+
return self.api_client.response_deserialize(
|
|
641
|
+
response_data=response_data,
|
|
642
|
+
response_types_map=_response_types_map,
|
|
643
|
+
).data
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
@validate_call
|
|
647
|
+
def create_session_with_http_info(
|
|
648
|
+
self,
|
|
649
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
650
|
+
_request_timeout: Union[
|
|
651
|
+
None,
|
|
652
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
653
|
+
Tuple[
|
|
654
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
655
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
656
|
+
]
|
|
657
|
+
] = None,
|
|
658
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
659
|
+
_content_type: Optional[StrictStr] = None,
|
|
660
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
661
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
662
|
+
) -> ApiResponse[None]:
|
|
663
|
+
"""Create a new session
|
|
664
|
+
|
|
665
|
+
Create a new shell session for command execution
|
|
666
|
+
|
|
667
|
+
:param request: Session creation request (required)
|
|
668
|
+
:type request: CreateSessionRequest
|
|
669
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
670
|
+
number provided, it will be total request
|
|
671
|
+
timeout. It can also be a pair (tuple) of
|
|
672
|
+
(connection, read) timeouts.
|
|
673
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
674
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
675
|
+
request; this effectively ignores the
|
|
676
|
+
authentication in the spec for a single request.
|
|
677
|
+
:type _request_auth: dict, optional
|
|
678
|
+
:param _content_type: force content-type for the request.
|
|
679
|
+
:type _content_type: str, Optional
|
|
680
|
+
:param _headers: set to override the headers for a single
|
|
681
|
+
request; this effectively ignores the headers
|
|
682
|
+
in the spec for a single request.
|
|
683
|
+
:type _headers: dict, optional
|
|
684
|
+
:param _host_index: set to override the host_index for a single
|
|
685
|
+
request; this effectively ignores the host_index
|
|
686
|
+
in the spec for a single request.
|
|
687
|
+
:type _host_index: int, optional
|
|
688
|
+
:return: Returns the result object.
|
|
689
|
+
""" # noqa: E501
|
|
690
|
+
|
|
691
|
+
_param = self._create_session_serialize(
|
|
692
|
+
request=request,
|
|
693
|
+
_request_auth=_request_auth,
|
|
694
|
+
_content_type=_content_type,
|
|
695
|
+
_headers=_headers,
|
|
696
|
+
_host_index=_host_index
|
|
697
|
+
)
|
|
698
|
+
|
|
699
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
700
|
+
'201': None,
|
|
701
|
+
}
|
|
702
|
+
response_data = self.api_client.call_api(
|
|
703
|
+
*_param,
|
|
704
|
+
_request_timeout=_request_timeout
|
|
705
|
+
)
|
|
706
|
+
response_data.read()
|
|
707
|
+
return self.api_client.response_deserialize(
|
|
708
|
+
response_data=response_data,
|
|
709
|
+
response_types_map=_response_types_map,
|
|
710
|
+
)
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
@validate_call
|
|
714
|
+
def create_session_without_preload_content(
|
|
715
|
+
self,
|
|
716
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
717
|
+
_request_timeout: Union[
|
|
718
|
+
None,
|
|
719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
720
|
+
Tuple[
|
|
721
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
722
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
723
|
+
]
|
|
724
|
+
] = None,
|
|
725
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
726
|
+
_content_type: Optional[StrictStr] = None,
|
|
727
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
728
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
729
|
+
) -> RESTResponseType:
|
|
730
|
+
"""Create a new session
|
|
731
|
+
|
|
732
|
+
Create a new shell session for command execution
|
|
733
|
+
|
|
734
|
+
:param request: Session creation request (required)
|
|
735
|
+
:type request: CreateSessionRequest
|
|
736
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
737
|
+
number provided, it will be total request
|
|
738
|
+
timeout. It can also be a pair (tuple) of
|
|
739
|
+
(connection, read) timeouts.
|
|
740
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
741
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
742
|
+
request; this effectively ignores the
|
|
743
|
+
authentication in the spec for a single request.
|
|
744
|
+
:type _request_auth: dict, optional
|
|
745
|
+
:param _content_type: force content-type for the request.
|
|
746
|
+
:type _content_type: str, Optional
|
|
747
|
+
:param _headers: set to override the headers for a single
|
|
748
|
+
request; this effectively ignores the headers
|
|
749
|
+
in the spec for a single request.
|
|
750
|
+
:type _headers: dict, optional
|
|
751
|
+
:param _host_index: set to override the host_index for a single
|
|
752
|
+
request; this effectively ignores the host_index
|
|
753
|
+
in the spec for a single request.
|
|
754
|
+
:type _host_index: int, optional
|
|
755
|
+
:return: Returns the result object.
|
|
756
|
+
""" # noqa: E501
|
|
757
|
+
|
|
758
|
+
_param = self._create_session_serialize(
|
|
759
|
+
request=request,
|
|
760
|
+
_request_auth=_request_auth,
|
|
761
|
+
_content_type=_content_type,
|
|
762
|
+
_headers=_headers,
|
|
763
|
+
_host_index=_host_index
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
767
|
+
'201': None,
|
|
768
|
+
}
|
|
769
|
+
response_data = self.api_client.call_api(
|
|
770
|
+
*_param,
|
|
771
|
+
_request_timeout=_request_timeout
|
|
772
|
+
)
|
|
773
|
+
return response_data.response
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
def _create_session_serialize(
|
|
777
|
+
self,
|
|
778
|
+
request,
|
|
779
|
+
_request_auth,
|
|
780
|
+
_content_type,
|
|
781
|
+
_headers,
|
|
782
|
+
_host_index,
|
|
783
|
+
) -> RequestSerialized:
|
|
784
|
+
|
|
785
|
+
_host = None
|
|
786
|
+
|
|
787
|
+
_collection_formats: Dict[str, str] = {
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
_path_params: Dict[str, str] = {}
|
|
791
|
+
_query_params: List[Tuple[str, str]] = []
|
|
792
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
793
|
+
_form_params: List[Tuple[str, str]] = []
|
|
794
|
+
_files: Dict[
|
|
795
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
796
|
+
] = {}
|
|
797
|
+
_body_params: Optional[bytes] = None
|
|
798
|
+
|
|
799
|
+
# process the path parameters
|
|
800
|
+
# process the query parameters
|
|
801
|
+
# process the header parameters
|
|
802
|
+
# process the form parameters
|
|
803
|
+
# process the body parameter
|
|
804
|
+
if request is not None:
|
|
805
|
+
_body_params = request
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
# set the HTTP header `Content-Type`
|
|
810
|
+
if _content_type:
|
|
811
|
+
_header_params['Content-Type'] = _content_type
|
|
812
|
+
else:
|
|
813
|
+
_default_content_type = (
|
|
814
|
+
self.api_client.select_header_content_type(
|
|
815
|
+
[
|
|
816
|
+
'application/json'
|
|
817
|
+
]
|
|
818
|
+
)
|
|
819
|
+
)
|
|
820
|
+
if _default_content_type is not None:
|
|
821
|
+
_header_params['Content-Type'] = _default_content_type
|
|
822
|
+
|
|
823
|
+
# authentication setting
|
|
824
|
+
_auth_settings: List[str] = [
|
|
825
|
+
]
|
|
826
|
+
|
|
827
|
+
return self.api_client.param_serialize(
|
|
828
|
+
method='POST',
|
|
829
|
+
resource_path='/process/session',
|
|
830
|
+
path_params=_path_params,
|
|
831
|
+
query_params=_query_params,
|
|
832
|
+
header_params=_header_params,
|
|
833
|
+
body=_body_params,
|
|
834
|
+
post_params=_form_params,
|
|
835
|
+
files=_files,
|
|
836
|
+
auth_settings=_auth_settings,
|
|
837
|
+
collection_formats=_collection_formats,
|
|
838
|
+
_host=_host,
|
|
839
|
+
_request_auth=_request_auth
|
|
840
|
+
)
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
@validate_call
|
|
846
|
+
def delete_pty_session(
|
|
847
|
+
self,
|
|
848
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
849
|
+
_request_timeout: Union[
|
|
850
|
+
None,
|
|
851
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
852
|
+
Tuple[
|
|
853
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
854
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
855
|
+
]
|
|
856
|
+
] = None,
|
|
857
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
858
|
+
_content_type: Optional[StrictStr] = None,
|
|
859
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
860
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
861
|
+
) -> Dict[str, object]:
|
|
862
|
+
"""Delete a PTY session
|
|
863
|
+
|
|
864
|
+
Delete a pseudo-terminal session and terminate its process
|
|
865
|
+
|
|
866
|
+
:param session_id: PTY session ID (required)
|
|
867
|
+
:type session_id: str
|
|
868
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
869
|
+
number provided, it will be total request
|
|
870
|
+
timeout. It can also be a pair (tuple) of
|
|
871
|
+
(connection, read) timeouts.
|
|
872
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
873
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
874
|
+
request; this effectively ignores the
|
|
875
|
+
authentication in the spec for a single request.
|
|
876
|
+
:type _request_auth: dict, optional
|
|
877
|
+
:param _content_type: force content-type for the request.
|
|
878
|
+
:type _content_type: str, Optional
|
|
879
|
+
:param _headers: set to override the headers for a single
|
|
880
|
+
request; this effectively ignores the headers
|
|
881
|
+
in the spec for a single request.
|
|
882
|
+
:type _headers: dict, optional
|
|
883
|
+
:param _host_index: set to override the host_index for a single
|
|
884
|
+
request; this effectively ignores the host_index
|
|
885
|
+
in the spec for a single request.
|
|
886
|
+
:type _host_index: int, optional
|
|
887
|
+
:return: Returns the result object.
|
|
888
|
+
""" # noqa: E501
|
|
889
|
+
|
|
890
|
+
_param = self._delete_pty_session_serialize(
|
|
891
|
+
session_id=session_id,
|
|
892
|
+
_request_auth=_request_auth,
|
|
893
|
+
_content_type=_content_type,
|
|
894
|
+
_headers=_headers,
|
|
895
|
+
_host_index=_host_index
|
|
896
|
+
)
|
|
897
|
+
|
|
898
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
899
|
+
'200': "Dict[str, object]",
|
|
900
|
+
}
|
|
901
|
+
response_data = self.api_client.call_api(
|
|
902
|
+
*_param,
|
|
903
|
+
_request_timeout=_request_timeout
|
|
904
|
+
)
|
|
905
|
+
response_data.read()
|
|
906
|
+
return self.api_client.response_deserialize(
|
|
907
|
+
response_data=response_data,
|
|
908
|
+
response_types_map=_response_types_map,
|
|
909
|
+
).data
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
@validate_call
|
|
913
|
+
def delete_pty_session_with_http_info(
|
|
914
|
+
self,
|
|
915
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
916
|
+
_request_timeout: Union[
|
|
917
|
+
None,
|
|
918
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
919
|
+
Tuple[
|
|
920
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
921
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
922
|
+
]
|
|
923
|
+
] = None,
|
|
924
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
925
|
+
_content_type: Optional[StrictStr] = None,
|
|
926
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
927
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
928
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
929
|
+
"""Delete a PTY session
|
|
930
|
+
|
|
931
|
+
Delete a pseudo-terminal session and terminate its process
|
|
932
|
+
|
|
933
|
+
:param session_id: PTY session ID (required)
|
|
934
|
+
:type session_id: str
|
|
935
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
936
|
+
number provided, it will be total request
|
|
937
|
+
timeout. It can also be a pair (tuple) of
|
|
938
|
+
(connection, read) timeouts.
|
|
939
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
940
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
941
|
+
request; this effectively ignores the
|
|
942
|
+
authentication in the spec for a single request.
|
|
943
|
+
:type _request_auth: dict, optional
|
|
944
|
+
:param _content_type: force content-type for the request.
|
|
945
|
+
:type _content_type: str, Optional
|
|
946
|
+
:param _headers: set to override the headers for a single
|
|
947
|
+
request; this effectively ignores the headers
|
|
948
|
+
in the spec for a single request.
|
|
949
|
+
:type _headers: dict, optional
|
|
950
|
+
:param _host_index: set to override the host_index for a single
|
|
951
|
+
request; this effectively ignores the host_index
|
|
952
|
+
in the spec for a single request.
|
|
953
|
+
:type _host_index: int, optional
|
|
954
|
+
:return: Returns the result object.
|
|
955
|
+
""" # noqa: E501
|
|
956
|
+
|
|
957
|
+
_param = self._delete_pty_session_serialize(
|
|
958
|
+
session_id=session_id,
|
|
959
|
+
_request_auth=_request_auth,
|
|
960
|
+
_content_type=_content_type,
|
|
961
|
+
_headers=_headers,
|
|
962
|
+
_host_index=_host_index
|
|
963
|
+
)
|
|
964
|
+
|
|
965
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
966
|
+
'200': "Dict[str, object]",
|
|
967
|
+
}
|
|
968
|
+
response_data = self.api_client.call_api(
|
|
969
|
+
*_param,
|
|
970
|
+
_request_timeout=_request_timeout
|
|
971
|
+
)
|
|
972
|
+
response_data.read()
|
|
973
|
+
return self.api_client.response_deserialize(
|
|
974
|
+
response_data=response_data,
|
|
975
|
+
response_types_map=_response_types_map,
|
|
976
|
+
)
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
@validate_call
|
|
980
|
+
def delete_pty_session_without_preload_content(
|
|
981
|
+
self,
|
|
982
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
983
|
+
_request_timeout: Union[
|
|
984
|
+
None,
|
|
985
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
986
|
+
Tuple[
|
|
987
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
988
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
989
|
+
]
|
|
990
|
+
] = None,
|
|
991
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
992
|
+
_content_type: Optional[StrictStr] = None,
|
|
993
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
994
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
995
|
+
) -> RESTResponseType:
|
|
996
|
+
"""Delete a PTY session
|
|
997
|
+
|
|
998
|
+
Delete a pseudo-terminal session and terminate its process
|
|
999
|
+
|
|
1000
|
+
:param session_id: PTY session ID (required)
|
|
1001
|
+
:type session_id: str
|
|
1002
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1003
|
+
number provided, it will be total request
|
|
1004
|
+
timeout. It can also be a pair (tuple) of
|
|
1005
|
+
(connection, read) timeouts.
|
|
1006
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1007
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1008
|
+
request; this effectively ignores the
|
|
1009
|
+
authentication in the spec for a single request.
|
|
1010
|
+
:type _request_auth: dict, optional
|
|
1011
|
+
:param _content_type: force content-type for the request.
|
|
1012
|
+
:type _content_type: str, Optional
|
|
1013
|
+
:param _headers: set to override the headers for a single
|
|
1014
|
+
request; this effectively ignores the headers
|
|
1015
|
+
in the spec for a single request.
|
|
1016
|
+
:type _headers: dict, optional
|
|
1017
|
+
:param _host_index: set to override the host_index for a single
|
|
1018
|
+
request; this effectively ignores the host_index
|
|
1019
|
+
in the spec for a single request.
|
|
1020
|
+
:type _host_index: int, optional
|
|
1021
|
+
:return: Returns the result object.
|
|
1022
|
+
""" # noqa: E501
|
|
1023
|
+
|
|
1024
|
+
_param = self._delete_pty_session_serialize(
|
|
1025
|
+
session_id=session_id,
|
|
1026
|
+
_request_auth=_request_auth,
|
|
1027
|
+
_content_type=_content_type,
|
|
1028
|
+
_headers=_headers,
|
|
1029
|
+
_host_index=_host_index
|
|
1030
|
+
)
|
|
1031
|
+
|
|
1032
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1033
|
+
'200': "Dict[str, object]",
|
|
1034
|
+
}
|
|
1035
|
+
response_data = self.api_client.call_api(
|
|
1036
|
+
*_param,
|
|
1037
|
+
_request_timeout=_request_timeout
|
|
1038
|
+
)
|
|
1039
|
+
return response_data.response
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
def _delete_pty_session_serialize(
|
|
1043
|
+
self,
|
|
1044
|
+
session_id,
|
|
1045
|
+
_request_auth,
|
|
1046
|
+
_content_type,
|
|
1047
|
+
_headers,
|
|
1048
|
+
_host_index,
|
|
1049
|
+
) -> RequestSerialized:
|
|
1050
|
+
|
|
1051
|
+
_host = None
|
|
1052
|
+
|
|
1053
|
+
_collection_formats: Dict[str, str] = {
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
_path_params: Dict[str, str] = {}
|
|
1057
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1058
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1059
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1060
|
+
_files: Dict[
|
|
1061
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1062
|
+
] = {}
|
|
1063
|
+
_body_params: Optional[bytes] = None
|
|
1064
|
+
|
|
1065
|
+
# process the path parameters
|
|
1066
|
+
if session_id is not None:
|
|
1067
|
+
_path_params['sessionId'] = session_id
|
|
1068
|
+
# process the query parameters
|
|
1069
|
+
# process the header parameters
|
|
1070
|
+
# process the form parameters
|
|
1071
|
+
# process the body parameter
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
# set the HTTP header `Accept`
|
|
1075
|
+
if 'Accept' not in _header_params:
|
|
1076
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1077
|
+
[
|
|
1078
|
+
'application/json'
|
|
1079
|
+
]
|
|
1080
|
+
)
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
# authentication setting
|
|
1084
|
+
_auth_settings: List[str] = [
|
|
1085
|
+
]
|
|
1086
|
+
|
|
1087
|
+
return self.api_client.param_serialize(
|
|
1088
|
+
method='DELETE',
|
|
1089
|
+
resource_path='/process/pty/{sessionId}',
|
|
1090
|
+
path_params=_path_params,
|
|
1091
|
+
query_params=_query_params,
|
|
1092
|
+
header_params=_header_params,
|
|
1093
|
+
body=_body_params,
|
|
1094
|
+
post_params=_form_params,
|
|
1095
|
+
files=_files,
|
|
1096
|
+
auth_settings=_auth_settings,
|
|
1097
|
+
collection_formats=_collection_formats,
|
|
1098
|
+
_host=_host,
|
|
1099
|
+
_request_auth=_request_auth
|
|
1100
|
+
)
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
@validate_call
|
|
1106
|
+
def delete_session(
|
|
1107
|
+
self,
|
|
1108
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1109
|
+
_request_timeout: Union[
|
|
1110
|
+
None,
|
|
1111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1112
|
+
Tuple[
|
|
1113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1114
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1115
|
+
]
|
|
1116
|
+
] = None,
|
|
1117
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1118
|
+
_content_type: Optional[StrictStr] = None,
|
|
1119
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1120
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1121
|
+
) -> None:
|
|
1122
|
+
"""Delete a session
|
|
1123
|
+
|
|
1124
|
+
Delete an existing shell session
|
|
1125
|
+
|
|
1126
|
+
:param session_id: Session ID (required)
|
|
1127
|
+
:type session_id: str
|
|
1128
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1129
|
+
number provided, it will be total request
|
|
1130
|
+
timeout. It can also be a pair (tuple) of
|
|
1131
|
+
(connection, read) timeouts.
|
|
1132
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1133
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1134
|
+
request; this effectively ignores the
|
|
1135
|
+
authentication in the spec for a single request.
|
|
1136
|
+
:type _request_auth: dict, optional
|
|
1137
|
+
:param _content_type: force content-type for the request.
|
|
1138
|
+
:type _content_type: str, Optional
|
|
1139
|
+
:param _headers: set to override the headers for a single
|
|
1140
|
+
request; this effectively ignores the headers
|
|
1141
|
+
in the spec for a single request.
|
|
1142
|
+
:type _headers: dict, optional
|
|
1143
|
+
:param _host_index: set to override the host_index for a single
|
|
1144
|
+
request; this effectively ignores the host_index
|
|
1145
|
+
in the spec for a single request.
|
|
1146
|
+
:type _host_index: int, optional
|
|
1147
|
+
:return: Returns the result object.
|
|
1148
|
+
""" # noqa: E501
|
|
1149
|
+
|
|
1150
|
+
_param = self._delete_session_serialize(
|
|
1151
|
+
session_id=session_id,
|
|
1152
|
+
_request_auth=_request_auth,
|
|
1153
|
+
_content_type=_content_type,
|
|
1154
|
+
_headers=_headers,
|
|
1155
|
+
_host_index=_host_index
|
|
1156
|
+
)
|
|
1157
|
+
|
|
1158
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1159
|
+
'204': None,
|
|
1160
|
+
}
|
|
1161
|
+
response_data = self.api_client.call_api(
|
|
1162
|
+
*_param,
|
|
1163
|
+
_request_timeout=_request_timeout
|
|
1164
|
+
)
|
|
1165
|
+
response_data.read()
|
|
1166
|
+
return self.api_client.response_deserialize(
|
|
1167
|
+
response_data=response_data,
|
|
1168
|
+
response_types_map=_response_types_map,
|
|
1169
|
+
).data
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
@validate_call
|
|
1173
|
+
def delete_session_with_http_info(
|
|
1174
|
+
self,
|
|
1175
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1176
|
+
_request_timeout: Union[
|
|
1177
|
+
None,
|
|
1178
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1179
|
+
Tuple[
|
|
1180
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1181
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1182
|
+
]
|
|
1183
|
+
] = None,
|
|
1184
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1185
|
+
_content_type: Optional[StrictStr] = None,
|
|
1186
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1187
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1188
|
+
) -> ApiResponse[None]:
|
|
1189
|
+
"""Delete a session
|
|
1190
|
+
|
|
1191
|
+
Delete an existing shell session
|
|
1192
|
+
|
|
1193
|
+
:param session_id: Session ID (required)
|
|
1194
|
+
:type session_id: str
|
|
1195
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1196
|
+
number provided, it will be total request
|
|
1197
|
+
timeout. It can also be a pair (tuple) of
|
|
1198
|
+
(connection, read) timeouts.
|
|
1199
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1200
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1201
|
+
request; this effectively ignores the
|
|
1202
|
+
authentication in the spec for a single request.
|
|
1203
|
+
:type _request_auth: dict, optional
|
|
1204
|
+
:param _content_type: force content-type for the request.
|
|
1205
|
+
:type _content_type: str, Optional
|
|
1206
|
+
:param _headers: set to override the headers for a single
|
|
1207
|
+
request; this effectively ignores the headers
|
|
1208
|
+
in the spec for a single request.
|
|
1209
|
+
:type _headers: dict, optional
|
|
1210
|
+
:param _host_index: set to override the host_index for a single
|
|
1211
|
+
request; this effectively ignores the host_index
|
|
1212
|
+
in the spec for a single request.
|
|
1213
|
+
:type _host_index: int, optional
|
|
1214
|
+
:return: Returns the result object.
|
|
1215
|
+
""" # noqa: E501
|
|
1216
|
+
|
|
1217
|
+
_param = self._delete_session_serialize(
|
|
1218
|
+
session_id=session_id,
|
|
1219
|
+
_request_auth=_request_auth,
|
|
1220
|
+
_content_type=_content_type,
|
|
1221
|
+
_headers=_headers,
|
|
1222
|
+
_host_index=_host_index
|
|
1223
|
+
)
|
|
1224
|
+
|
|
1225
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1226
|
+
'204': None,
|
|
1227
|
+
}
|
|
1228
|
+
response_data = self.api_client.call_api(
|
|
1229
|
+
*_param,
|
|
1230
|
+
_request_timeout=_request_timeout
|
|
1231
|
+
)
|
|
1232
|
+
response_data.read()
|
|
1233
|
+
return self.api_client.response_deserialize(
|
|
1234
|
+
response_data=response_data,
|
|
1235
|
+
response_types_map=_response_types_map,
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
@validate_call
|
|
1240
|
+
def delete_session_without_preload_content(
|
|
1241
|
+
self,
|
|
1242
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1243
|
+
_request_timeout: Union[
|
|
1244
|
+
None,
|
|
1245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1246
|
+
Tuple[
|
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1248
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1249
|
+
]
|
|
1250
|
+
] = None,
|
|
1251
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1252
|
+
_content_type: Optional[StrictStr] = None,
|
|
1253
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1254
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1255
|
+
) -> RESTResponseType:
|
|
1256
|
+
"""Delete a session
|
|
1257
|
+
|
|
1258
|
+
Delete an existing shell session
|
|
1259
|
+
|
|
1260
|
+
:param session_id: Session ID (required)
|
|
1261
|
+
:type session_id: str
|
|
1262
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1263
|
+
number provided, it will be total request
|
|
1264
|
+
timeout. It can also be a pair (tuple) of
|
|
1265
|
+
(connection, read) timeouts.
|
|
1266
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1267
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1268
|
+
request; this effectively ignores the
|
|
1269
|
+
authentication in the spec for a single request.
|
|
1270
|
+
:type _request_auth: dict, optional
|
|
1271
|
+
:param _content_type: force content-type for the request.
|
|
1272
|
+
:type _content_type: str, Optional
|
|
1273
|
+
:param _headers: set to override the headers for a single
|
|
1274
|
+
request; this effectively ignores the headers
|
|
1275
|
+
in the spec for a single request.
|
|
1276
|
+
:type _headers: dict, optional
|
|
1277
|
+
:param _host_index: set to override the host_index for a single
|
|
1278
|
+
request; this effectively ignores the host_index
|
|
1279
|
+
in the spec for a single request.
|
|
1280
|
+
:type _host_index: int, optional
|
|
1281
|
+
:return: Returns the result object.
|
|
1282
|
+
""" # noqa: E501
|
|
1283
|
+
|
|
1284
|
+
_param = self._delete_session_serialize(
|
|
1285
|
+
session_id=session_id,
|
|
1286
|
+
_request_auth=_request_auth,
|
|
1287
|
+
_content_type=_content_type,
|
|
1288
|
+
_headers=_headers,
|
|
1289
|
+
_host_index=_host_index
|
|
1290
|
+
)
|
|
1291
|
+
|
|
1292
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1293
|
+
'204': None,
|
|
1294
|
+
}
|
|
1295
|
+
response_data = self.api_client.call_api(
|
|
1296
|
+
*_param,
|
|
1297
|
+
_request_timeout=_request_timeout
|
|
1298
|
+
)
|
|
1299
|
+
return response_data.response
|
|
1300
|
+
|
|
1301
|
+
|
|
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(
|
|
2648
|
+
self,
|
|
2649
|
+
session_id,
|
|
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,
|
|
2905
|
+
_request_auth,
|
|
2906
|
+
_content_type,
|
|
2907
|
+
_headers,
|
|
2908
|
+
_host_index,
|
|
2909
|
+
) -> RequestSerialized:
|
|
2910
|
+
|
|
2911
|
+
_host = None
|
|
2912
|
+
|
|
2913
|
+
_collection_formats: Dict[str, str] = {
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
_path_params: Dict[str, str] = {}
|
|
2917
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2918
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2919
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2920
|
+
_files: Dict[
|
|
2921
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2922
|
+
] = {}
|
|
2923
|
+
_body_params: Optional[bytes] = None
|
|
2924
|
+
|
|
2925
|
+
# process the path parameters
|
|
2926
|
+
# process the query parameters
|
|
2927
|
+
# process the header parameters
|
|
2928
|
+
# process the form parameters
|
|
2929
|
+
# process the body parameter
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
# set the HTTP header `Accept`
|
|
2933
|
+
if 'Accept' not in _header_params:
|
|
2934
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2935
|
+
[
|
|
2936
|
+
'application/json'
|
|
2937
|
+
]
|
|
2938
|
+
)
|
|
2939
|
+
|
|
2940
|
+
|
|
2941
|
+
# authentication setting
|
|
2942
|
+
_auth_settings: List[str] = [
|
|
2943
|
+
]
|
|
2944
|
+
|
|
2945
|
+
return self.api_client.param_serialize(
|
|
2946
|
+
method='GET',
|
|
2947
|
+
resource_path='/process/pty',
|
|
2948
|
+
path_params=_path_params,
|
|
2949
|
+
query_params=_query_params,
|
|
2950
|
+
header_params=_header_params,
|
|
2951
|
+
body=_body_params,
|
|
2952
|
+
post_params=_form_params,
|
|
2953
|
+
files=_files,
|
|
2954
|
+
auth_settings=_auth_settings,
|
|
2955
|
+
collection_formats=_collection_formats,
|
|
2956
|
+
_host=_host,
|
|
2957
|
+
_request_auth=_request_auth
|
|
2958
|
+
)
|
|
2959
|
+
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
@validate_call
|
|
2964
|
+
def list_sessions(
|
|
2965
|
+
self,
|
|
2966
|
+
_request_timeout: Union[
|
|
2967
|
+
None,
|
|
2968
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2969
|
+
Tuple[
|
|
2970
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2971
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2972
|
+
]
|
|
2973
|
+
] = None,
|
|
2974
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2975
|
+
_content_type: Optional[StrictStr] = None,
|
|
2976
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2977
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2978
|
+
) -> List[Session]:
|
|
2979
|
+
"""List all sessions
|
|
2980
|
+
|
|
2981
|
+
Get a list of all active shell sessions
|
|
2982
|
+
|
|
2983
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2984
|
+
number provided, it will be total request
|
|
2985
|
+
timeout. It can also be a pair (tuple) of
|
|
2986
|
+
(connection, read) timeouts.
|
|
2987
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2988
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2989
|
+
request; this effectively ignores the
|
|
2990
|
+
authentication in the spec for a single request.
|
|
2991
|
+
:type _request_auth: dict, optional
|
|
2992
|
+
:param _content_type: force content-type for the request.
|
|
2993
|
+
:type _content_type: str, Optional
|
|
2994
|
+
:param _headers: set to override the headers for a single
|
|
2995
|
+
request; this effectively ignores the headers
|
|
2996
|
+
in the spec for a single request.
|
|
2997
|
+
:type _headers: dict, optional
|
|
2998
|
+
:param _host_index: set to override the host_index for a single
|
|
2999
|
+
request; this effectively ignores the host_index
|
|
3000
|
+
in the spec for a single request.
|
|
3001
|
+
:type _host_index: int, optional
|
|
3002
|
+
:return: Returns the result object.
|
|
3003
|
+
""" # noqa: E501
|
|
3004
|
+
|
|
3005
|
+
_param = self._list_sessions_serialize(
|
|
3006
|
+
_request_auth=_request_auth,
|
|
3007
|
+
_content_type=_content_type,
|
|
3008
|
+
_headers=_headers,
|
|
3009
|
+
_host_index=_host_index
|
|
3010
|
+
)
|
|
3011
|
+
|
|
3012
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3013
|
+
'200': "List[Session]",
|
|
3014
|
+
}
|
|
3015
|
+
response_data = self.api_client.call_api(
|
|
3016
|
+
*_param,
|
|
3017
|
+
_request_timeout=_request_timeout
|
|
3018
|
+
)
|
|
3019
|
+
response_data.read()
|
|
3020
|
+
return self.api_client.response_deserialize(
|
|
3021
|
+
response_data=response_data,
|
|
3022
|
+
response_types_map=_response_types_map,
|
|
3023
|
+
).data
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
@validate_call
|
|
3027
|
+
def list_sessions_with_http_info(
|
|
3028
|
+
self,
|
|
3029
|
+
_request_timeout: Union[
|
|
3030
|
+
None,
|
|
3031
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3032
|
+
Tuple[
|
|
3033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3034
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3035
|
+
]
|
|
3036
|
+
] = None,
|
|
3037
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3038
|
+
_content_type: Optional[StrictStr] = None,
|
|
3039
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3040
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3041
|
+
) -> ApiResponse[List[Session]]:
|
|
3042
|
+
"""List all sessions
|
|
3043
|
+
|
|
3044
|
+
Get a list of all active shell sessions
|
|
3045
|
+
|
|
3046
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3047
|
+
number provided, it will be total request
|
|
3048
|
+
timeout. It can also be a pair (tuple) of
|
|
3049
|
+
(connection, read) timeouts.
|
|
3050
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3051
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3052
|
+
request; this effectively ignores the
|
|
3053
|
+
authentication in the spec for a single request.
|
|
3054
|
+
:type _request_auth: dict, optional
|
|
3055
|
+
:param _content_type: force content-type for the request.
|
|
3056
|
+
:type _content_type: str, Optional
|
|
3057
|
+
:param _headers: set to override the headers for a single
|
|
3058
|
+
request; this effectively ignores the headers
|
|
3059
|
+
in the spec for a single request.
|
|
3060
|
+
:type _headers: dict, optional
|
|
3061
|
+
:param _host_index: set to override the host_index for a single
|
|
3062
|
+
request; this effectively ignores the host_index
|
|
3063
|
+
in the spec for a single request.
|
|
3064
|
+
:type _host_index: int, optional
|
|
3065
|
+
:return: Returns the result object.
|
|
3066
|
+
""" # noqa: E501
|
|
3067
|
+
|
|
3068
|
+
_param = self._list_sessions_serialize(
|
|
3069
|
+
_request_auth=_request_auth,
|
|
3070
|
+
_content_type=_content_type,
|
|
3071
|
+
_headers=_headers,
|
|
3072
|
+
_host_index=_host_index
|
|
3073
|
+
)
|
|
3074
|
+
|
|
3075
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3076
|
+
'200': "List[Session]",
|
|
3077
|
+
}
|
|
3078
|
+
response_data = self.api_client.call_api(
|
|
3079
|
+
*_param,
|
|
3080
|
+
_request_timeout=_request_timeout
|
|
3081
|
+
)
|
|
3082
|
+
response_data.read()
|
|
3083
|
+
return self.api_client.response_deserialize(
|
|
3084
|
+
response_data=response_data,
|
|
3085
|
+
response_types_map=_response_types_map,
|
|
3086
|
+
)
|
|
3087
|
+
|
|
3088
|
+
|
|
3089
|
+
@validate_call
|
|
3090
|
+
def list_sessions_without_preload_content(
|
|
3091
|
+
self,
|
|
3092
|
+
_request_timeout: Union[
|
|
3093
|
+
None,
|
|
3094
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3095
|
+
Tuple[
|
|
3096
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3097
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3098
|
+
]
|
|
3099
|
+
] = None,
|
|
3100
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3101
|
+
_content_type: Optional[StrictStr] = None,
|
|
3102
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3103
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3104
|
+
) -> RESTResponseType:
|
|
3105
|
+
"""List all sessions
|
|
3106
|
+
|
|
3107
|
+
Get a list of all active shell sessions
|
|
3108
|
+
|
|
3109
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3110
|
+
number provided, it will be total request
|
|
3111
|
+
timeout. It can also be a pair (tuple) of
|
|
3112
|
+
(connection, read) timeouts.
|
|
3113
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3114
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3115
|
+
request; this effectively ignores the
|
|
3116
|
+
authentication in the spec for a single request.
|
|
3117
|
+
:type _request_auth: dict, optional
|
|
3118
|
+
:param _content_type: force content-type for the request.
|
|
3119
|
+
:type _content_type: str, Optional
|
|
3120
|
+
:param _headers: set to override the headers for a single
|
|
3121
|
+
request; this effectively ignores the headers
|
|
3122
|
+
in the spec for a single request.
|
|
3123
|
+
:type _headers: dict, optional
|
|
3124
|
+
:param _host_index: set to override the host_index for a single
|
|
3125
|
+
request; this effectively ignores the host_index
|
|
3126
|
+
in the spec for a single request.
|
|
3127
|
+
:type _host_index: int, optional
|
|
3128
|
+
:return: Returns the result object.
|
|
3129
|
+
""" # noqa: E501
|
|
3130
|
+
|
|
3131
|
+
_param = self._list_sessions_serialize(
|
|
3132
|
+
_request_auth=_request_auth,
|
|
3133
|
+
_content_type=_content_type,
|
|
3134
|
+
_headers=_headers,
|
|
3135
|
+
_host_index=_host_index
|
|
3136
|
+
)
|
|
3137
|
+
|
|
3138
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3139
|
+
'200': "List[Session]",
|
|
3140
|
+
}
|
|
3141
|
+
response_data = self.api_client.call_api(
|
|
3142
|
+
*_param,
|
|
3143
|
+
_request_timeout=_request_timeout
|
|
3144
|
+
)
|
|
3145
|
+
return response_data.response
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
def _list_sessions_serialize(
|
|
3149
|
+
self,
|
|
3150
|
+
_request_auth,
|
|
3151
|
+
_content_type,
|
|
3152
|
+
_headers,
|
|
3153
|
+
_host_index,
|
|
3154
|
+
) -> RequestSerialized:
|
|
3155
|
+
|
|
3156
|
+
_host = None
|
|
3157
|
+
|
|
3158
|
+
_collection_formats: Dict[str, str] = {
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
_path_params: Dict[str, str] = {}
|
|
3162
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3163
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3164
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3165
|
+
_files: Dict[
|
|
3166
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3167
|
+
] = {}
|
|
3168
|
+
_body_params: Optional[bytes] = None
|
|
3169
|
+
|
|
3170
|
+
# process the path parameters
|
|
3171
|
+
# process the query parameters
|
|
3172
|
+
# process the header parameters
|
|
3173
|
+
# process the form parameters
|
|
3174
|
+
# process the body parameter
|
|
3175
|
+
|
|
3176
|
+
|
|
3177
|
+
# set the HTTP header `Accept`
|
|
3178
|
+
if 'Accept' not in _header_params:
|
|
3179
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3180
|
+
[
|
|
3181
|
+
'application/json'
|
|
3182
|
+
]
|
|
3183
|
+
)
|
|
3184
|
+
|
|
3185
|
+
|
|
3186
|
+
# authentication setting
|
|
3187
|
+
_auth_settings: List[str] = [
|
|
3188
|
+
]
|
|
3189
|
+
|
|
3190
|
+
return self.api_client.param_serialize(
|
|
3191
|
+
method='GET',
|
|
3192
|
+
resource_path='/process/session',
|
|
3193
|
+
path_params=_path_params,
|
|
3194
|
+
query_params=_query_params,
|
|
3195
|
+
header_params=_header_params,
|
|
3196
|
+
body=_body_params,
|
|
3197
|
+
post_params=_form_params,
|
|
3198
|
+
files=_files,
|
|
3199
|
+
auth_settings=_auth_settings,
|
|
3200
|
+
collection_formats=_collection_formats,
|
|
3201
|
+
_host=_host,
|
|
3202
|
+
_request_auth=_request_auth
|
|
3203
|
+
)
|
|
3204
|
+
|
|
3205
|
+
|
|
3206
|
+
|
|
3207
|
+
|
|
3208
|
+
@validate_call
|
|
3209
|
+
def resize_pty_session(
|
|
3210
|
+
self,
|
|
3211
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3212
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
3213
|
+
_request_timeout: Union[
|
|
3214
|
+
None,
|
|
3215
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3216
|
+
Tuple[
|
|
3217
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3218
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3219
|
+
]
|
|
3220
|
+
] = None,
|
|
3221
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3222
|
+
_content_type: Optional[StrictStr] = None,
|
|
3223
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3224
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3225
|
+
) -> PtySessionInfo:
|
|
3226
|
+
"""Resize a PTY session
|
|
3227
|
+
|
|
3228
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
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
|
|
3234
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3235
|
+
number provided, it will be total request
|
|
3236
|
+
timeout. It can also be a pair (tuple) of
|
|
3237
|
+
(connection, read) timeouts.
|
|
3238
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3239
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3240
|
+
request; this effectively ignores the
|
|
3241
|
+
authentication in the spec for a single request.
|
|
3242
|
+
:type _request_auth: dict, optional
|
|
3243
|
+
:param _content_type: force content-type for the request.
|
|
3244
|
+
:type _content_type: str, Optional
|
|
3245
|
+
:param _headers: set to override the headers for a single
|
|
3246
|
+
request; this effectively ignores the headers
|
|
3247
|
+
in the spec for a single request.
|
|
3248
|
+
:type _headers: dict, optional
|
|
3249
|
+
:param _host_index: set to override the host_index for a single
|
|
3250
|
+
request; this effectively ignores the host_index
|
|
3251
|
+
in the spec for a single request.
|
|
3252
|
+
:type _host_index: int, optional
|
|
3253
|
+
:return: Returns the result object.
|
|
3254
|
+
""" # noqa: E501
|
|
3255
|
+
|
|
3256
|
+
_param = self._resize_pty_session_serialize(
|
|
3257
|
+
session_id=session_id,
|
|
3258
|
+
request=request,
|
|
3259
|
+
_request_auth=_request_auth,
|
|
3260
|
+
_content_type=_content_type,
|
|
3261
|
+
_headers=_headers,
|
|
3262
|
+
_host_index=_host_index
|
|
3263
|
+
)
|
|
3264
|
+
|
|
3265
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3266
|
+
'200': "PtySessionInfo",
|
|
3267
|
+
}
|
|
3268
|
+
response_data = self.api_client.call_api(
|
|
3269
|
+
*_param,
|
|
3270
|
+
_request_timeout=_request_timeout
|
|
3271
|
+
)
|
|
3272
|
+
response_data.read()
|
|
3273
|
+
return self.api_client.response_deserialize(
|
|
3274
|
+
response_data=response_data,
|
|
3275
|
+
response_types_map=_response_types_map,
|
|
3276
|
+
).data
|
|
3277
|
+
|
|
3278
|
+
|
|
3279
|
+
@validate_call
|
|
3280
|
+
def resize_pty_session_with_http_info(
|
|
3281
|
+
self,
|
|
3282
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3283
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
3284
|
+
_request_timeout: Union[
|
|
3285
|
+
None,
|
|
3286
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3287
|
+
Tuple[
|
|
3288
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3289
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3290
|
+
]
|
|
3291
|
+
] = None,
|
|
3292
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3293
|
+
_content_type: Optional[StrictStr] = None,
|
|
3294
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3295
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3296
|
+
) -> ApiResponse[PtySessionInfo]:
|
|
3297
|
+
"""Resize a PTY session
|
|
3298
|
+
|
|
3299
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
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
|
|
3305
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3306
|
+
number provided, it will be total request
|
|
3307
|
+
timeout. It can also be a pair (tuple) of
|
|
3308
|
+
(connection, read) timeouts.
|
|
3309
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3310
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3311
|
+
request; this effectively ignores the
|
|
3312
|
+
authentication in the spec for a single request.
|
|
3313
|
+
:type _request_auth: dict, optional
|
|
3314
|
+
:param _content_type: force content-type for the request.
|
|
3315
|
+
:type _content_type: str, Optional
|
|
3316
|
+
:param _headers: set to override the headers for a single
|
|
3317
|
+
request; this effectively ignores the headers
|
|
3318
|
+
in the spec for a single request.
|
|
3319
|
+
:type _headers: dict, optional
|
|
3320
|
+
:param _host_index: set to override the host_index for a single
|
|
3321
|
+
request; this effectively ignores the host_index
|
|
3322
|
+
in the spec for a single request.
|
|
3323
|
+
:type _host_index: int, optional
|
|
3324
|
+
:return: Returns the result object.
|
|
3325
|
+
""" # noqa: E501
|
|
3326
|
+
|
|
3327
|
+
_param = self._resize_pty_session_serialize(
|
|
3328
|
+
session_id=session_id,
|
|
3329
|
+
request=request,
|
|
3330
|
+
_request_auth=_request_auth,
|
|
3331
|
+
_content_type=_content_type,
|
|
3332
|
+
_headers=_headers,
|
|
3333
|
+
_host_index=_host_index
|
|
3334
|
+
)
|
|
3335
|
+
|
|
3336
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3337
|
+
'200': "PtySessionInfo",
|
|
3338
|
+
}
|
|
3339
|
+
response_data = self.api_client.call_api(
|
|
3340
|
+
*_param,
|
|
3341
|
+
_request_timeout=_request_timeout
|
|
3342
|
+
)
|
|
3343
|
+
response_data.read()
|
|
3344
|
+
return self.api_client.response_deserialize(
|
|
3345
|
+
response_data=response_data,
|
|
3346
|
+
response_types_map=_response_types_map,
|
|
3347
|
+
)
|
|
3348
|
+
|
|
3349
|
+
|
|
3350
|
+
@validate_call
|
|
3351
|
+
def resize_pty_session_without_preload_content(
|
|
3352
|
+
self,
|
|
3353
|
+
session_id: Annotated[StrictStr, Field(description="PTY session ID")],
|
|
3354
|
+
request: Annotated[PtyResizeRequest, Field(description="Resize request with new dimensions")],
|
|
3355
|
+
_request_timeout: Union[
|
|
3356
|
+
None,
|
|
3357
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3358
|
+
Tuple[
|
|
3359
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3360
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3361
|
+
]
|
|
3362
|
+
] = None,
|
|
3363
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3364
|
+
_content_type: Optional[StrictStr] = None,
|
|
3365
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3366
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3367
|
+
) -> RESTResponseType:
|
|
3368
|
+
"""Resize a PTY session
|
|
3369
|
+
|
|
3370
|
+
Resize the terminal dimensions of a pseudo-terminal session
|
|
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
|
|
3376
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3377
|
+
number provided, it will be total request
|
|
3378
|
+
timeout. It can also be a pair (tuple) of
|
|
3379
|
+
(connection, read) timeouts.
|
|
3380
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3381
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3382
|
+
request; this effectively ignores the
|
|
3383
|
+
authentication in the spec for a single request.
|
|
3384
|
+
:type _request_auth: dict, optional
|
|
3385
|
+
:param _content_type: force content-type for the request.
|
|
3386
|
+
:type _content_type: str, Optional
|
|
3387
|
+
:param _headers: set to override the headers for a single
|
|
3388
|
+
request; this effectively ignores the headers
|
|
3389
|
+
in the spec for a single request.
|
|
3390
|
+
:type _headers: dict, optional
|
|
3391
|
+
:param _host_index: set to override the host_index for a single
|
|
3392
|
+
request; this effectively ignores the host_index
|
|
3393
|
+
in the spec for a single request.
|
|
3394
|
+
:type _host_index: int, optional
|
|
3395
|
+
:return: Returns the result object.
|
|
3396
|
+
""" # noqa: E501
|
|
3397
|
+
|
|
3398
|
+
_param = self._resize_pty_session_serialize(
|
|
3399
|
+
session_id=session_id,
|
|
3400
|
+
request=request,
|
|
3401
|
+
_request_auth=_request_auth,
|
|
3402
|
+
_content_type=_content_type,
|
|
3403
|
+
_headers=_headers,
|
|
3404
|
+
_host_index=_host_index
|
|
3405
|
+
)
|
|
3406
|
+
|
|
3407
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3408
|
+
'200': "PtySessionInfo",
|
|
3409
|
+
}
|
|
3410
|
+
response_data = self.api_client.call_api(
|
|
3411
|
+
*_param,
|
|
3412
|
+
_request_timeout=_request_timeout
|
|
3413
|
+
)
|
|
3414
|
+
return response_data.response
|
|
3415
|
+
|
|
3416
|
+
|
|
3417
|
+
def _resize_pty_session_serialize(
|
|
3418
|
+
self,
|
|
3419
|
+
session_id,
|
|
3420
|
+
request,
|
|
3421
|
+
_request_auth,
|
|
3422
|
+
_content_type,
|
|
3423
|
+
_headers,
|
|
3424
|
+
_host_index,
|
|
3425
|
+
) -> RequestSerialized:
|
|
3426
|
+
|
|
3427
|
+
_host = None
|
|
3428
|
+
|
|
3429
|
+
_collection_formats: Dict[str, str] = {
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
_path_params: Dict[str, str] = {}
|
|
3433
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3434
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3435
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3436
|
+
_files: Dict[
|
|
3437
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3438
|
+
] = {}
|
|
3439
|
+
_body_params: Optional[bytes] = None
|
|
3440
|
+
|
|
3441
|
+
# process the path parameters
|
|
3442
|
+
if session_id is not None:
|
|
3443
|
+
_path_params['sessionId'] = session_id
|
|
3444
|
+
# process the query parameters
|
|
3445
|
+
# process the header parameters
|
|
3446
|
+
# process the form parameters
|
|
3447
|
+
# process the body parameter
|
|
3448
|
+
if request is not None:
|
|
3449
|
+
_body_params = request
|
|
3450
|
+
|
|
3451
|
+
|
|
3452
|
+
# set the HTTP header `Accept`
|
|
3453
|
+
if 'Accept' not in _header_params:
|
|
3454
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3455
|
+
[
|
|
3456
|
+
'application/json'
|
|
3457
|
+
]
|
|
3458
|
+
)
|
|
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
|
|
3473
|
+
|
|
3474
|
+
# authentication setting
|
|
3475
|
+
_auth_settings: List[str] = [
|
|
3476
|
+
]
|
|
3477
|
+
|
|
3478
|
+
return self.api_client.param_serialize(
|
|
3479
|
+
method='POST',
|
|
3480
|
+
resource_path='/process/pty/{sessionId}/resize',
|
|
3481
|
+
path_params=_path_params,
|
|
3482
|
+
query_params=_query_params,
|
|
3483
|
+
header_params=_header_params,
|
|
3484
|
+
body=_body_params,
|
|
3485
|
+
post_params=_form_params,
|
|
3486
|
+
files=_files,
|
|
3487
|
+
auth_settings=_auth_settings,
|
|
3488
|
+
collection_formats=_collection_formats,
|
|
3489
|
+
_host=_host,
|
|
3490
|
+
_request_auth=_request_auth
|
|
3491
|
+
)
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
|
|
3495
|
+
|
|
3496
|
+
@validate_call
|
|
3497
|
+
def session_execute_command(
|
|
3498
|
+
self,
|
|
3499
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3500
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
3501
|
+
_request_timeout: Union[
|
|
3502
|
+
None,
|
|
3503
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3504
|
+
Tuple[
|
|
3505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3506
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3507
|
+
]
|
|
3508
|
+
] = None,
|
|
3509
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3510
|
+
_content_type: Optional[StrictStr] = None,
|
|
3511
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3512
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3513
|
+
) -> SessionExecuteResponse:
|
|
3514
|
+
"""Execute command in session
|
|
3515
|
+
|
|
3516
|
+
Execute a command within an existing shell session
|
|
3517
|
+
|
|
3518
|
+
:param session_id: Session ID (required)
|
|
3519
|
+
:type session_id: str
|
|
3520
|
+
:param request: Command execution request (required)
|
|
3521
|
+
:type request: SessionExecuteRequest
|
|
3522
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3523
|
+
number provided, it will be total request
|
|
3524
|
+
timeout. It can also be a pair (tuple) of
|
|
3525
|
+
(connection, read) timeouts.
|
|
3526
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3527
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3528
|
+
request; this effectively ignores the
|
|
3529
|
+
authentication in the spec for a single request.
|
|
3530
|
+
:type _request_auth: dict, optional
|
|
3531
|
+
:param _content_type: force content-type for the request.
|
|
3532
|
+
:type _content_type: str, Optional
|
|
3533
|
+
:param _headers: set to override the headers for a single
|
|
3534
|
+
request; this effectively ignores the headers
|
|
3535
|
+
in the spec for a single request.
|
|
3536
|
+
:type _headers: dict, optional
|
|
3537
|
+
:param _host_index: set to override the host_index for a single
|
|
3538
|
+
request; this effectively ignores the host_index
|
|
3539
|
+
in the spec for a single request.
|
|
3540
|
+
:type _host_index: int, optional
|
|
3541
|
+
:return: Returns the result object.
|
|
3542
|
+
""" # noqa: E501
|
|
3543
|
+
|
|
3544
|
+
_param = self._session_execute_command_serialize(
|
|
3545
|
+
session_id=session_id,
|
|
3546
|
+
request=request,
|
|
3547
|
+
_request_auth=_request_auth,
|
|
3548
|
+
_content_type=_content_type,
|
|
3549
|
+
_headers=_headers,
|
|
3550
|
+
_host_index=_host_index
|
|
3551
|
+
)
|
|
3552
|
+
|
|
3553
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3554
|
+
'200': "SessionExecuteResponse",
|
|
3555
|
+
'202': "SessionExecuteResponse",
|
|
3556
|
+
}
|
|
3557
|
+
response_data = self.api_client.call_api(
|
|
3558
|
+
*_param,
|
|
3559
|
+
_request_timeout=_request_timeout
|
|
3560
|
+
)
|
|
3561
|
+
response_data.read()
|
|
3562
|
+
return self.api_client.response_deserialize(
|
|
3563
|
+
response_data=response_data,
|
|
3564
|
+
response_types_map=_response_types_map,
|
|
3565
|
+
).data
|
|
3566
|
+
|
|
3567
|
+
|
|
3568
|
+
@validate_call
|
|
3569
|
+
def session_execute_command_with_http_info(
|
|
3570
|
+
self,
|
|
3571
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3572
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
3573
|
+
_request_timeout: Union[
|
|
3574
|
+
None,
|
|
3575
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3576
|
+
Tuple[
|
|
3577
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3578
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3579
|
+
]
|
|
3580
|
+
] = None,
|
|
3581
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3582
|
+
_content_type: Optional[StrictStr] = None,
|
|
3583
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3584
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3585
|
+
) -> ApiResponse[SessionExecuteResponse]:
|
|
3586
|
+
"""Execute command in session
|
|
3587
|
+
|
|
3588
|
+
Execute a command within an existing shell session
|
|
3589
|
+
|
|
3590
|
+
:param session_id: Session ID (required)
|
|
3591
|
+
:type session_id: str
|
|
3592
|
+
:param request: Command execution request (required)
|
|
3593
|
+
:type request: SessionExecuteRequest
|
|
3594
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3595
|
+
number provided, it will be total request
|
|
3596
|
+
timeout. It can also be a pair (tuple) of
|
|
3597
|
+
(connection, read) timeouts.
|
|
3598
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3599
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3600
|
+
request; this effectively ignores the
|
|
3601
|
+
authentication in the spec for a single request.
|
|
3602
|
+
:type _request_auth: dict, optional
|
|
3603
|
+
:param _content_type: force content-type for the request.
|
|
3604
|
+
:type _content_type: str, Optional
|
|
3605
|
+
:param _headers: set to override the headers for a single
|
|
3606
|
+
request; this effectively ignores the headers
|
|
3607
|
+
in the spec for a single request.
|
|
3608
|
+
:type _headers: dict, optional
|
|
3609
|
+
:param _host_index: set to override the host_index for a single
|
|
3610
|
+
request; this effectively ignores the host_index
|
|
3611
|
+
in the spec for a single request.
|
|
3612
|
+
:type _host_index: int, optional
|
|
3613
|
+
:return: Returns the result object.
|
|
3614
|
+
""" # noqa: E501
|
|
3615
|
+
|
|
3616
|
+
_param = self._session_execute_command_serialize(
|
|
3617
|
+
session_id=session_id,
|
|
3618
|
+
request=request,
|
|
3619
|
+
_request_auth=_request_auth,
|
|
3620
|
+
_content_type=_content_type,
|
|
3621
|
+
_headers=_headers,
|
|
3622
|
+
_host_index=_host_index
|
|
3623
|
+
)
|
|
3624
|
+
|
|
3625
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3626
|
+
'200': "SessionExecuteResponse",
|
|
3627
|
+
'202': "SessionExecuteResponse",
|
|
3628
|
+
}
|
|
3629
|
+
response_data = self.api_client.call_api(
|
|
3630
|
+
*_param,
|
|
3631
|
+
_request_timeout=_request_timeout
|
|
3632
|
+
)
|
|
3633
|
+
response_data.read()
|
|
3634
|
+
return self.api_client.response_deserialize(
|
|
3635
|
+
response_data=response_data,
|
|
3636
|
+
response_types_map=_response_types_map,
|
|
3637
|
+
)
|
|
3638
|
+
|
|
3639
|
+
|
|
3640
|
+
@validate_call
|
|
3641
|
+
def session_execute_command_without_preload_content(
|
|
3642
|
+
self,
|
|
3643
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
3644
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
3645
|
+
_request_timeout: Union[
|
|
3646
|
+
None,
|
|
3647
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3648
|
+
Tuple[
|
|
3649
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3650
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3651
|
+
]
|
|
3652
|
+
] = None,
|
|
3653
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3654
|
+
_content_type: Optional[StrictStr] = None,
|
|
3655
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3656
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3657
|
+
) -> RESTResponseType:
|
|
3658
|
+
"""Execute command in session
|
|
3659
|
+
|
|
3660
|
+
Execute a command within an existing shell session
|
|
3661
|
+
|
|
3662
|
+
:param session_id: Session ID (required)
|
|
3663
|
+
:type session_id: str
|
|
3664
|
+
:param request: Command execution request (required)
|
|
3665
|
+
:type request: SessionExecuteRequest
|
|
3666
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3667
|
+
number provided, it will be total request
|
|
3668
|
+
timeout. It can also be a pair (tuple) of
|
|
3669
|
+
(connection, read) timeouts.
|
|
3670
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3671
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3672
|
+
request; this effectively ignores the
|
|
3673
|
+
authentication in the spec for a single request.
|
|
3674
|
+
:type _request_auth: dict, optional
|
|
3675
|
+
:param _content_type: force content-type for the request.
|
|
3676
|
+
:type _content_type: str, Optional
|
|
3677
|
+
:param _headers: set to override the headers for a single
|
|
3678
|
+
request; this effectively ignores the headers
|
|
3679
|
+
in the spec for a single request.
|
|
3680
|
+
:type _headers: dict, optional
|
|
3681
|
+
:param _host_index: set to override the host_index for a single
|
|
3682
|
+
request; this effectively ignores the host_index
|
|
3683
|
+
in the spec for a single request.
|
|
3684
|
+
:type _host_index: int, optional
|
|
3685
|
+
:return: Returns the result object.
|
|
3686
|
+
""" # noqa: E501
|
|
3687
|
+
|
|
3688
|
+
_param = self._session_execute_command_serialize(
|
|
3689
|
+
session_id=session_id,
|
|
3690
|
+
request=request,
|
|
3691
|
+
_request_auth=_request_auth,
|
|
3692
|
+
_content_type=_content_type,
|
|
3693
|
+
_headers=_headers,
|
|
3694
|
+
_host_index=_host_index
|
|
3695
|
+
)
|
|
3696
|
+
|
|
3697
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3698
|
+
'200': "SessionExecuteResponse",
|
|
3699
|
+
'202': "SessionExecuteResponse",
|
|
3700
|
+
}
|
|
3701
|
+
response_data = self.api_client.call_api(
|
|
3702
|
+
*_param,
|
|
3703
|
+
_request_timeout=_request_timeout
|
|
3704
|
+
)
|
|
3705
|
+
return response_data.response
|
|
3706
|
+
|
|
3707
|
+
|
|
3708
|
+
def _session_execute_command_serialize(
|
|
3709
|
+
self,
|
|
3710
|
+
session_id,
|
|
3711
|
+
request,
|
|
3712
|
+
_request_auth,
|
|
3713
|
+
_content_type,
|
|
3714
|
+
_headers,
|
|
3715
|
+
_host_index,
|
|
3716
|
+
) -> RequestSerialized:
|
|
3717
|
+
|
|
3718
|
+
_host = None
|
|
3719
|
+
|
|
3720
|
+
_collection_formats: Dict[str, str] = {
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
_path_params: Dict[str, str] = {}
|
|
3724
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3725
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3726
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3727
|
+
_files: Dict[
|
|
3728
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3729
|
+
] = {}
|
|
3730
|
+
_body_params: Optional[bytes] = None
|
|
3731
|
+
|
|
3732
|
+
# process the path parameters
|
|
3733
|
+
if session_id is not None:
|
|
3734
|
+
_path_params['sessionId'] = session_id
|
|
3735
|
+
# process the query parameters
|
|
3736
|
+
# process the header parameters
|
|
3737
|
+
# process the form parameters
|
|
3738
|
+
# process the body parameter
|
|
3739
|
+
if request is not None:
|
|
3740
|
+
_body_params = request
|
|
3741
|
+
|
|
3742
|
+
|
|
3743
|
+
# set the HTTP header `Accept`
|
|
3744
|
+
if 'Accept' not in _header_params:
|
|
3745
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3746
|
+
[
|
|
3747
|
+
'application/json'
|
|
3748
|
+
]
|
|
3749
|
+
)
|
|
3750
|
+
|
|
3751
|
+
# set the HTTP header `Content-Type`
|
|
3752
|
+
if _content_type:
|
|
3753
|
+
_header_params['Content-Type'] = _content_type
|
|
3754
|
+
else:
|
|
3755
|
+
_default_content_type = (
|
|
3756
|
+
self.api_client.select_header_content_type(
|
|
3757
|
+
[
|
|
3758
|
+
'application/json'
|
|
3759
|
+
]
|
|
3760
|
+
)
|
|
3761
|
+
)
|
|
3762
|
+
if _default_content_type is not None:
|
|
3763
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3764
|
+
|
|
3765
|
+
# authentication setting
|
|
3766
|
+
_auth_settings: List[str] = [
|
|
3767
|
+
]
|
|
3768
|
+
|
|
3769
|
+
return self.api_client.param_serialize(
|
|
3770
|
+
method='POST',
|
|
3771
|
+
resource_path='/process/session/{sessionId}/exec',
|
|
3772
|
+
path_params=_path_params,
|
|
3773
|
+
query_params=_query_params,
|
|
3774
|
+
header_params=_header_params,
|
|
3775
|
+
body=_body_params,
|
|
3776
|
+
post_params=_form_params,
|
|
3777
|
+
files=_files,
|
|
3778
|
+
auth_settings=_auth_settings,
|
|
3779
|
+
collection_formats=_collection_formats,
|
|
3780
|
+
_host=_host,
|
|
3781
|
+
_request_auth=_request_auth
|
|
3782
|
+
)
|
|
3783
|
+
|
|
3784
|
+
|