daytona_toolbox_api_client 0.102.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of daytona_toolbox_api_client might be problematic. Click here for more details.
- daytona_daemon_api_client/__init__.py +102 -0
- daytona_daemon_api_client/api/__init__.py +11 -0
- daytona_daemon_api_client/api/computer_use_api.py +6077 -0
- daytona_daemon_api_client/api/file_system_api.py +3463 -0
- daytona_daemon_api_client/api/git_api.py +3052 -0
- daytona_daemon_api_client/api/info_api.py +528 -0
- daytona_daemon_api_client/api/lsp_api.py +2027 -0
- daytona_daemon_api_client/api/port_api.py +547 -0
- daytona_daemon_api_client/api/process_api.py +2262 -0
- daytona_daemon_api_client/api_client.py +797 -0
- daytona_daemon_api_client/api_response.py +21 -0
- daytona_daemon_api_client/configuration.py +572 -0
- daytona_daemon_api_client/exceptions.py +216 -0
- daytona_daemon_api_client/models/__init__.py +79 -0
- daytona_daemon_api_client/models/command.py +104 -0
- daytona_daemon_api_client/models/completion_context.py +102 -0
- daytona_daemon_api_client/models/completion_item.py +112 -0
- daytona_daemon_api_client/models/completion_list.py +110 -0
- daytona_daemon_api_client/models/computer_use_start_response.py +115 -0
- daytona_daemon_api_client/models/computer_use_status_response.py +100 -0
- daytona_daemon_api_client/models/computer_use_stop_response.py +115 -0
- daytona_daemon_api_client/models/create_session_request.py +100 -0
- daytona_daemon_api_client/models/display_info.py +110 -0
- daytona_daemon_api_client/models/display_info_response.py +108 -0
- daytona_daemon_api_client/models/execute_request.py +104 -0
- daytona_daemon_api_client/models/execute_response.py +102 -0
- daytona_daemon_api_client/models/file_info.py +114 -0
- daytona_daemon_api_client/models/file_status.py +107 -0
- daytona_daemon_api_client/models/git_add_request.py +102 -0
- daytona_daemon_api_client/models/git_branch_request.py +102 -0
- daytona_daemon_api_client/models/git_checkout_request.py +102 -0
- daytona_daemon_api_client/models/git_clone_request.py +110 -0
- daytona_daemon_api_client/models/git_commit_info.py +108 -0
- daytona_daemon_api_client/models/git_commit_request.py +108 -0
- daytona_daemon_api_client/models/git_commit_response.py +100 -0
- daytona_daemon_api_client/models/git_git_delete_branch_request.py +102 -0
- daytona_daemon_api_client/models/git_repo_request.py +104 -0
- daytona_daemon_api_client/models/git_status.py +116 -0
- daytona_daemon_api_client/models/is_port_in_use_response.py +100 -0
- daytona_daemon_api_client/models/keyboard_hotkey_request.py +100 -0
- daytona_daemon_api_client/models/keyboard_press_request.py +102 -0
- daytona_daemon_api_client/models/keyboard_type_request.py +102 -0
- daytona_daemon_api_client/models/list_branch_response.py +100 -0
- daytona_daemon_api_client/models/lsp_completion_params.py +116 -0
- daytona_daemon_api_client/models/lsp_document_request.py +104 -0
- daytona_daemon_api_client/models/lsp_location.py +106 -0
- daytona_daemon_api_client/models/lsp_position.py +102 -0
- daytona_daemon_api_client/models/lsp_range.py +109 -0
- daytona_daemon_api_client/models/lsp_server_request.py +102 -0
- daytona_daemon_api_client/models/lsp_symbol.py +108 -0
- daytona_daemon_api_client/models/match.py +104 -0
- daytona_daemon_api_client/models/mouse_click_request.py +106 -0
- daytona_daemon_api_client/models/mouse_click_response.py +102 -0
- daytona_daemon_api_client/models/mouse_drag_request.py +108 -0
- daytona_daemon_api_client/models/mouse_drag_response.py +102 -0
- daytona_daemon_api_client/models/mouse_move_request.py +102 -0
- daytona_daemon_api_client/models/mouse_position_response.py +102 -0
- daytona_daemon_api_client/models/mouse_scroll_request.py +106 -0
- daytona_daemon_api_client/models/port_list.py +100 -0
- daytona_daemon_api_client/models/position.py +102 -0
- daytona_daemon_api_client/models/process_errors_response.py +102 -0
- daytona_daemon_api_client/models/process_logs_response.py +102 -0
- daytona_daemon_api_client/models/process_restart_response.py +102 -0
- daytona_daemon_api_client/models/process_status.py +106 -0
- daytona_daemon_api_client/models/process_status_response.py +102 -0
- daytona_daemon_api_client/models/project_dir_response.py +100 -0
- daytona_daemon_api_client/models/replace_request.py +104 -0
- daytona_daemon_api_client/models/replace_result.py +104 -0
- daytona_daemon_api_client/models/screenshot_response.py +108 -0
- daytona_daemon_api_client/models/scroll_response.py +100 -0
- daytona_daemon_api_client/models/search_files_response.py +100 -0
- daytona_daemon_api_client/models/session.py +110 -0
- daytona_daemon_api_client/models/session_execute_request.py +104 -0
- daytona_daemon_api_client/models/session_execute_response.py +108 -0
- daytona_daemon_api_client/models/status.py +43 -0
- daytona_daemon_api_client/models/window_info.py +112 -0
- daytona_daemon_api_client/models/windows_response.py +108 -0
- daytona_daemon_api_client/py.typed +0 -0
- daytona_daemon_api_client/rest.py +258 -0
- daytona_toolbox_api_client/__init__.py +102 -0
- daytona_toolbox_api_client/api/__init__.py +11 -0
- daytona_toolbox_api_client/api/computer_use_api.py +6011 -0
- daytona_toolbox_api_client/api/file_system_api.py +3310 -0
- daytona_toolbox_api_client/api/git_api.py +2970 -0
- daytona_toolbox_api_client/api/info_api.py +528 -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 +2200 -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 +79 -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_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/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/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/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/project_dir_response.py +100 -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/window_info.py +112 -0
- daytona_toolbox_api_client/models/windows_response.py +108 -0
- daytona_toolbox_api_client/py.typed +0 -0
- daytona_toolbox_api_client/rest.py +258 -0
- daytona_toolbox_api_client-0.102.0rc2.dist-info/METADATA +25 -0
- daytona_toolbox_api_client-0.102.0rc2.dist-info/RECORD +163 -0
- daytona_toolbox_api_client-0.102.0rc2.dist-info/WHEEL +5 -0
- daytona_toolbox_api_client-0.102.0rc2.dist-info/licenses/LICENSE +190 -0
- daytona_toolbox_api_client-0.102.0rc2.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,2262 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona Daemon API
|
|
5
|
+
|
|
6
|
+
Daytona Daemon Toolbox API for file operations, process execution, git operations, LSP, computer use, and more.
|
|
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 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.session import Session
|
|
27
|
+
from daytona_toolbox_api_client.models.session_execute_request import SessionExecuteRequest
|
|
28
|
+
from daytona_toolbox_api_client.models.session_execute_response import SessionExecuteResponse
|
|
29
|
+
|
|
30
|
+
from daytona_toolbox_api_client.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from daytona_toolbox_api_client.api_response import ApiResponse
|
|
32
|
+
from daytona_toolbox_api_client.rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ProcessApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
def create_session(
|
|
50
|
+
self,
|
|
51
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> None:
|
|
65
|
+
"""Create a new session
|
|
66
|
+
|
|
67
|
+
Create a new shell session for command execution
|
|
68
|
+
|
|
69
|
+
:param request: Session creation request (required)
|
|
70
|
+
:type request: CreateSessionRequest
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._create_session_serialize(
|
|
94
|
+
request=request,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
'201': None,
|
|
103
|
+
'400': "Dict[str, object]",
|
|
104
|
+
'409': "Dict[str, object]",
|
|
105
|
+
'500': "Dict[str, object]",
|
|
106
|
+
}
|
|
107
|
+
response_data = self.api_client.call_api(
|
|
108
|
+
*_param,
|
|
109
|
+
_request_timeout=_request_timeout
|
|
110
|
+
)
|
|
111
|
+
response_data.read()
|
|
112
|
+
return self.api_client.response_deserialize(
|
|
113
|
+
response_data=response_data,
|
|
114
|
+
response_types_map=_response_types_map,
|
|
115
|
+
).data
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@validate_call
|
|
119
|
+
def create_session_with_http_info(
|
|
120
|
+
self,
|
|
121
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[None]:
|
|
135
|
+
"""Create a new session
|
|
136
|
+
|
|
137
|
+
Create a new shell session for command execution
|
|
138
|
+
|
|
139
|
+
:param request: Session creation request (required)
|
|
140
|
+
:type request: CreateSessionRequest
|
|
141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
142
|
+
number provided, it will be total request
|
|
143
|
+
timeout. It can also be a pair (tuple) of
|
|
144
|
+
(connection, read) timeouts.
|
|
145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
147
|
+
request; this effectively ignores the
|
|
148
|
+
authentication in the spec for a single request.
|
|
149
|
+
:type _request_auth: dict, optional
|
|
150
|
+
:param _content_type: force content-type for the request.
|
|
151
|
+
:type _content_type: str, Optional
|
|
152
|
+
:param _headers: set to override the headers for a single
|
|
153
|
+
request; this effectively ignores the headers
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _headers: dict, optional
|
|
156
|
+
:param _host_index: set to override the host_index for a single
|
|
157
|
+
request; this effectively ignores the host_index
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _host_index: int, optional
|
|
160
|
+
:return: Returns the result object.
|
|
161
|
+
""" # noqa: E501
|
|
162
|
+
|
|
163
|
+
_param = self._create_session_serialize(
|
|
164
|
+
request=request,
|
|
165
|
+
_request_auth=_request_auth,
|
|
166
|
+
_content_type=_content_type,
|
|
167
|
+
_headers=_headers,
|
|
168
|
+
_host_index=_host_index
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
172
|
+
'201': None,
|
|
173
|
+
'400': "Dict[str, object]",
|
|
174
|
+
'409': "Dict[str, object]",
|
|
175
|
+
'500': "Dict[str, object]",
|
|
176
|
+
}
|
|
177
|
+
response_data = self.api_client.call_api(
|
|
178
|
+
*_param,
|
|
179
|
+
_request_timeout=_request_timeout
|
|
180
|
+
)
|
|
181
|
+
response_data.read()
|
|
182
|
+
return self.api_client.response_deserialize(
|
|
183
|
+
response_data=response_data,
|
|
184
|
+
response_types_map=_response_types_map,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
@validate_call
|
|
189
|
+
def create_session_without_preload_content(
|
|
190
|
+
self,
|
|
191
|
+
request: Annotated[CreateSessionRequest, Field(description="Session creation request")],
|
|
192
|
+
_request_timeout: Union[
|
|
193
|
+
None,
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Tuple[
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
198
|
+
]
|
|
199
|
+
] = None,
|
|
200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
_content_type: Optional[StrictStr] = None,
|
|
202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
204
|
+
) -> RESTResponseType:
|
|
205
|
+
"""Create a new session
|
|
206
|
+
|
|
207
|
+
Create a new shell session for command execution
|
|
208
|
+
|
|
209
|
+
:param request: Session creation request (required)
|
|
210
|
+
:type request: CreateSessionRequest
|
|
211
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
212
|
+
number provided, it will be total request
|
|
213
|
+
timeout. It can also be a pair (tuple) of
|
|
214
|
+
(connection, read) timeouts.
|
|
215
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
216
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
217
|
+
request; this effectively ignores the
|
|
218
|
+
authentication in the spec for a single request.
|
|
219
|
+
:type _request_auth: dict, optional
|
|
220
|
+
:param _content_type: force content-type for the request.
|
|
221
|
+
:type _content_type: str, Optional
|
|
222
|
+
:param _headers: set to override the headers for a single
|
|
223
|
+
request; this effectively ignores the headers
|
|
224
|
+
in the spec for a single request.
|
|
225
|
+
:type _headers: dict, optional
|
|
226
|
+
:param _host_index: set to override the host_index for a single
|
|
227
|
+
request; this effectively ignores the host_index
|
|
228
|
+
in the spec for a single request.
|
|
229
|
+
:type _host_index: int, optional
|
|
230
|
+
:return: Returns the result object.
|
|
231
|
+
""" # noqa: E501
|
|
232
|
+
|
|
233
|
+
_param = self._create_session_serialize(
|
|
234
|
+
request=request,
|
|
235
|
+
_request_auth=_request_auth,
|
|
236
|
+
_content_type=_content_type,
|
|
237
|
+
_headers=_headers,
|
|
238
|
+
_host_index=_host_index
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
242
|
+
'201': None,
|
|
243
|
+
'400': "Dict[str, object]",
|
|
244
|
+
'409': "Dict[str, object]",
|
|
245
|
+
'500': "Dict[str, object]",
|
|
246
|
+
}
|
|
247
|
+
response_data = self.api_client.call_api(
|
|
248
|
+
*_param,
|
|
249
|
+
_request_timeout=_request_timeout
|
|
250
|
+
)
|
|
251
|
+
return response_data.response
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _create_session_serialize(
|
|
255
|
+
self,
|
|
256
|
+
request,
|
|
257
|
+
_request_auth,
|
|
258
|
+
_content_type,
|
|
259
|
+
_headers,
|
|
260
|
+
_host_index,
|
|
261
|
+
) -> RequestSerialized:
|
|
262
|
+
|
|
263
|
+
_host = None
|
|
264
|
+
|
|
265
|
+
_collection_formats: Dict[str, str] = {
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
_path_params: Dict[str, str] = {}
|
|
269
|
+
_query_params: List[Tuple[str, str]] = []
|
|
270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
271
|
+
_form_params: List[Tuple[str, str]] = []
|
|
272
|
+
_files: Dict[
|
|
273
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
274
|
+
] = {}
|
|
275
|
+
_body_params: Optional[bytes] = None
|
|
276
|
+
|
|
277
|
+
# process the path parameters
|
|
278
|
+
# process the query parameters
|
|
279
|
+
# process the header parameters
|
|
280
|
+
# process the form parameters
|
|
281
|
+
# process the body parameter
|
|
282
|
+
if request is not None:
|
|
283
|
+
_body_params = request
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Accept`
|
|
287
|
+
if 'Accept' not in _header_params:
|
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
289
|
+
[
|
|
290
|
+
'application/json'
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
# set the HTTP header `Content-Type`
|
|
295
|
+
if _content_type:
|
|
296
|
+
_header_params['Content-Type'] = _content_type
|
|
297
|
+
else:
|
|
298
|
+
_default_content_type = (
|
|
299
|
+
self.api_client.select_header_content_type(
|
|
300
|
+
[
|
|
301
|
+
'application/json'
|
|
302
|
+
]
|
|
303
|
+
)
|
|
304
|
+
)
|
|
305
|
+
if _default_content_type is not None:
|
|
306
|
+
_header_params['Content-Type'] = _default_content_type
|
|
307
|
+
|
|
308
|
+
# authentication setting
|
|
309
|
+
_auth_settings: List[str] = [
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
return self.api_client.param_serialize(
|
|
313
|
+
method='POST',
|
|
314
|
+
resource_path='/process/session',
|
|
315
|
+
path_params=_path_params,
|
|
316
|
+
query_params=_query_params,
|
|
317
|
+
header_params=_header_params,
|
|
318
|
+
body=_body_params,
|
|
319
|
+
post_params=_form_params,
|
|
320
|
+
files=_files,
|
|
321
|
+
auth_settings=_auth_settings,
|
|
322
|
+
collection_formats=_collection_formats,
|
|
323
|
+
_host=_host,
|
|
324
|
+
_request_auth=_request_auth
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@validate_call
|
|
331
|
+
def delete_session(
|
|
332
|
+
self,
|
|
333
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
334
|
+
_request_timeout: Union[
|
|
335
|
+
None,
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
337
|
+
Tuple[
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
340
|
+
]
|
|
341
|
+
] = None,
|
|
342
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
343
|
+
_content_type: Optional[StrictStr] = None,
|
|
344
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
345
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
346
|
+
) -> None:
|
|
347
|
+
"""Delete a session
|
|
348
|
+
|
|
349
|
+
Delete an existing shell session
|
|
350
|
+
|
|
351
|
+
:param session_id: Session ID (required)
|
|
352
|
+
:type session_id: str
|
|
353
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
354
|
+
number provided, it will be total request
|
|
355
|
+
timeout. It can also be a pair (tuple) of
|
|
356
|
+
(connection, read) timeouts.
|
|
357
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
358
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
359
|
+
request; this effectively ignores the
|
|
360
|
+
authentication in the spec for a single request.
|
|
361
|
+
:type _request_auth: dict, optional
|
|
362
|
+
:param _content_type: force content-type for the request.
|
|
363
|
+
:type _content_type: str, Optional
|
|
364
|
+
:param _headers: set to override the headers for a single
|
|
365
|
+
request; this effectively ignores the headers
|
|
366
|
+
in the spec for a single request.
|
|
367
|
+
:type _headers: dict, optional
|
|
368
|
+
:param _host_index: set to override the host_index for a single
|
|
369
|
+
request; this effectively ignores the host_index
|
|
370
|
+
in the spec for a single request.
|
|
371
|
+
:type _host_index: int, optional
|
|
372
|
+
:return: Returns the result object.
|
|
373
|
+
""" # noqa: E501
|
|
374
|
+
|
|
375
|
+
_param = self._delete_session_serialize(
|
|
376
|
+
session_id=session_id,
|
|
377
|
+
_request_auth=_request_auth,
|
|
378
|
+
_content_type=_content_type,
|
|
379
|
+
_headers=_headers,
|
|
380
|
+
_host_index=_host_index
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
384
|
+
'204': None,
|
|
385
|
+
'400': "Dict[str, object]",
|
|
386
|
+
'404': "Dict[str, object]",
|
|
387
|
+
}
|
|
388
|
+
response_data = self.api_client.call_api(
|
|
389
|
+
*_param,
|
|
390
|
+
_request_timeout=_request_timeout
|
|
391
|
+
)
|
|
392
|
+
response_data.read()
|
|
393
|
+
return self.api_client.response_deserialize(
|
|
394
|
+
response_data=response_data,
|
|
395
|
+
response_types_map=_response_types_map,
|
|
396
|
+
).data
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
@validate_call
|
|
400
|
+
def delete_session_with_http_info(
|
|
401
|
+
self,
|
|
402
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
403
|
+
_request_timeout: Union[
|
|
404
|
+
None,
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Tuple[
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
409
|
+
]
|
|
410
|
+
] = None,
|
|
411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_content_type: Optional[StrictStr] = None,
|
|
413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
415
|
+
) -> ApiResponse[None]:
|
|
416
|
+
"""Delete a session
|
|
417
|
+
|
|
418
|
+
Delete an existing shell session
|
|
419
|
+
|
|
420
|
+
:param session_id: Session ID (required)
|
|
421
|
+
:type session_id: str
|
|
422
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
423
|
+
number provided, it will be total request
|
|
424
|
+
timeout. It can also be a pair (tuple) of
|
|
425
|
+
(connection, read) timeouts.
|
|
426
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
427
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
428
|
+
request; this effectively ignores the
|
|
429
|
+
authentication in the spec for a single request.
|
|
430
|
+
:type _request_auth: dict, optional
|
|
431
|
+
:param _content_type: force content-type for the request.
|
|
432
|
+
:type _content_type: str, Optional
|
|
433
|
+
:param _headers: set to override the headers for a single
|
|
434
|
+
request; this effectively ignores the headers
|
|
435
|
+
in the spec for a single request.
|
|
436
|
+
:type _headers: dict, optional
|
|
437
|
+
:param _host_index: set to override the host_index for a single
|
|
438
|
+
request; this effectively ignores the host_index
|
|
439
|
+
in the spec for a single request.
|
|
440
|
+
:type _host_index: int, optional
|
|
441
|
+
:return: Returns the result object.
|
|
442
|
+
""" # noqa: E501
|
|
443
|
+
|
|
444
|
+
_param = self._delete_session_serialize(
|
|
445
|
+
session_id=session_id,
|
|
446
|
+
_request_auth=_request_auth,
|
|
447
|
+
_content_type=_content_type,
|
|
448
|
+
_headers=_headers,
|
|
449
|
+
_host_index=_host_index
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
|
+
'204': None,
|
|
454
|
+
'400': "Dict[str, object]",
|
|
455
|
+
'404': "Dict[str, object]",
|
|
456
|
+
}
|
|
457
|
+
response_data = self.api_client.call_api(
|
|
458
|
+
*_param,
|
|
459
|
+
_request_timeout=_request_timeout
|
|
460
|
+
)
|
|
461
|
+
response_data.read()
|
|
462
|
+
return self.api_client.response_deserialize(
|
|
463
|
+
response_data=response_data,
|
|
464
|
+
response_types_map=_response_types_map,
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
@validate_call
|
|
469
|
+
def delete_session_without_preload_content(
|
|
470
|
+
self,
|
|
471
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
472
|
+
_request_timeout: Union[
|
|
473
|
+
None,
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
475
|
+
Tuple[
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
478
|
+
]
|
|
479
|
+
] = None,
|
|
480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
481
|
+
_content_type: Optional[StrictStr] = None,
|
|
482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
484
|
+
) -> RESTResponseType:
|
|
485
|
+
"""Delete a session
|
|
486
|
+
|
|
487
|
+
Delete an existing shell session
|
|
488
|
+
|
|
489
|
+
:param session_id: Session ID (required)
|
|
490
|
+
:type session_id: str
|
|
491
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
492
|
+
number provided, it will be total request
|
|
493
|
+
timeout. It can also be a pair (tuple) of
|
|
494
|
+
(connection, read) timeouts.
|
|
495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
496
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
497
|
+
request; this effectively ignores the
|
|
498
|
+
authentication in the spec for a single request.
|
|
499
|
+
:type _request_auth: dict, optional
|
|
500
|
+
:param _content_type: force content-type for the request.
|
|
501
|
+
:type _content_type: str, Optional
|
|
502
|
+
:param _headers: set to override the headers for a single
|
|
503
|
+
request; this effectively ignores the headers
|
|
504
|
+
in the spec for a single request.
|
|
505
|
+
:type _headers: dict, optional
|
|
506
|
+
:param _host_index: set to override the host_index for a single
|
|
507
|
+
request; this effectively ignores the host_index
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _host_index: int, optional
|
|
510
|
+
:return: Returns the result object.
|
|
511
|
+
""" # noqa: E501
|
|
512
|
+
|
|
513
|
+
_param = self._delete_session_serialize(
|
|
514
|
+
session_id=session_id,
|
|
515
|
+
_request_auth=_request_auth,
|
|
516
|
+
_content_type=_content_type,
|
|
517
|
+
_headers=_headers,
|
|
518
|
+
_host_index=_host_index
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
522
|
+
'204': None,
|
|
523
|
+
'400': "Dict[str, object]",
|
|
524
|
+
'404': "Dict[str, object]",
|
|
525
|
+
}
|
|
526
|
+
response_data = self.api_client.call_api(
|
|
527
|
+
*_param,
|
|
528
|
+
_request_timeout=_request_timeout
|
|
529
|
+
)
|
|
530
|
+
return response_data.response
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def _delete_session_serialize(
|
|
534
|
+
self,
|
|
535
|
+
session_id,
|
|
536
|
+
_request_auth,
|
|
537
|
+
_content_type,
|
|
538
|
+
_headers,
|
|
539
|
+
_host_index,
|
|
540
|
+
) -> RequestSerialized:
|
|
541
|
+
|
|
542
|
+
_host = None
|
|
543
|
+
|
|
544
|
+
_collection_formats: Dict[str, str] = {
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[
|
|
552
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
553
|
+
] = {}
|
|
554
|
+
_body_params: Optional[bytes] = None
|
|
555
|
+
|
|
556
|
+
# process the path parameters
|
|
557
|
+
if session_id is not None:
|
|
558
|
+
_path_params['sessionId'] = session_id
|
|
559
|
+
# process the query parameters
|
|
560
|
+
# process the header parameters
|
|
561
|
+
# process the form parameters
|
|
562
|
+
# process the body parameter
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
# set the HTTP header `Accept`
|
|
566
|
+
if 'Accept' not in _header_params:
|
|
567
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
568
|
+
[
|
|
569
|
+
'*/*'
|
|
570
|
+
]
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
# authentication setting
|
|
575
|
+
_auth_settings: List[str] = [
|
|
576
|
+
]
|
|
577
|
+
|
|
578
|
+
return self.api_client.param_serialize(
|
|
579
|
+
method='DELETE',
|
|
580
|
+
resource_path='/process/session/{sessionId}',
|
|
581
|
+
path_params=_path_params,
|
|
582
|
+
query_params=_query_params,
|
|
583
|
+
header_params=_header_params,
|
|
584
|
+
body=_body_params,
|
|
585
|
+
post_params=_form_params,
|
|
586
|
+
files=_files,
|
|
587
|
+
auth_settings=_auth_settings,
|
|
588
|
+
collection_formats=_collection_formats,
|
|
589
|
+
_host=_host,
|
|
590
|
+
_request_auth=_request_auth
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
@validate_call
|
|
597
|
+
def execute_command(
|
|
598
|
+
self,
|
|
599
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
600
|
+
_request_timeout: Union[
|
|
601
|
+
None,
|
|
602
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
603
|
+
Tuple[
|
|
604
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
605
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
606
|
+
]
|
|
607
|
+
] = None,
|
|
608
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
609
|
+
_content_type: Optional[StrictStr] = None,
|
|
610
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
611
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
612
|
+
) -> ExecuteResponse:
|
|
613
|
+
"""Execute a command
|
|
614
|
+
|
|
615
|
+
Execute a shell command and return the output and exit code
|
|
616
|
+
|
|
617
|
+
:param request: Command execution request (required)
|
|
618
|
+
:type request: ExecuteRequest
|
|
619
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
620
|
+
number provided, it will be total request
|
|
621
|
+
timeout. It can also be a pair (tuple) of
|
|
622
|
+
(connection, read) timeouts.
|
|
623
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
624
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
625
|
+
request; this effectively ignores the
|
|
626
|
+
authentication in the spec for a single request.
|
|
627
|
+
:type _request_auth: dict, optional
|
|
628
|
+
:param _content_type: force content-type for the request.
|
|
629
|
+
:type _content_type: str, Optional
|
|
630
|
+
:param _headers: set to override the headers for a single
|
|
631
|
+
request; this effectively ignores the headers
|
|
632
|
+
in the spec for a single request.
|
|
633
|
+
:type _headers: dict, optional
|
|
634
|
+
:param _host_index: set to override the host_index for a single
|
|
635
|
+
request; this effectively ignores the host_index
|
|
636
|
+
in the spec for a single request.
|
|
637
|
+
:type _host_index: int, optional
|
|
638
|
+
:return: Returns the result object.
|
|
639
|
+
""" # noqa: E501
|
|
640
|
+
|
|
641
|
+
_param = self._execute_command_serialize(
|
|
642
|
+
request=request,
|
|
643
|
+
_request_auth=_request_auth,
|
|
644
|
+
_content_type=_content_type,
|
|
645
|
+
_headers=_headers,
|
|
646
|
+
_host_index=_host_index
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
650
|
+
'200': "ExecuteResponse",
|
|
651
|
+
'400': "Dict[str, object]",
|
|
652
|
+
'408': "Dict[str, object]",
|
|
653
|
+
}
|
|
654
|
+
response_data = self.api_client.call_api(
|
|
655
|
+
*_param,
|
|
656
|
+
_request_timeout=_request_timeout
|
|
657
|
+
)
|
|
658
|
+
response_data.read()
|
|
659
|
+
return self.api_client.response_deserialize(
|
|
660
|
+
response_data=response_data,
|
|
661
|
+
response_types_map=_response_types_map,
|
|
662
|
+
).data
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
@validate_call
|
|
666
|
+
def execute_command_with_http_info(
|
|
667
|
+
self,
|
|
668
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
669
|
+
_request_timeout: Union[
|
|
670
|
+
None,
|
|
671
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
672
|
+
Tuple[
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
674
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
675
|
+
]
|
|
676
|
+
] = None,
|
|
677
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
678
|
+
_content_type: Optional[StrictStr] = None,
|
|
679
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
680
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
681
|
+
) -> ApiResponse[ExecuteResponse]:
|
|
682
|
+
"""Execute a command
|
|
683
|
+
|
|
684
|
+
Execute a shell command and return the output and exit code
|
|
685
|
+
|
|
686
|
+
:param request: Command execution request (required)
|
|
687
|
+
:type request: ExecuteRequest
|
|
688
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
689
|
+
number provided, it will be total request
|
|
690
|
+
timeout. It can also be a pair (tuple) of
|
|
691
|
+
(connection, read) timeouts.
|
|
692
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
693
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
694
|
+
request; this effectively ignores the
|
|
695
|
+
authentication in the spec for a single request.
|
|
696
|
+
:type _request_auth: dict, optional
|
|
697
|
+
:param _content_type: force content-type for the request.
|
|
698
|
+
:type _content_type: str, Optional
|
|
699
|
+
:param _headers: set to override the headers for a single
|
|
700
|
+
request; this effectively ignores the headers
|
|
701
|
+
in the spec for a single request.
|
|
702
|
+
:type _headers: dict, optional
|
|
703
|
+
:param _host_index: set to override the host_index for a single
|
|
704
|
+
request; this effectively ignores the host_index
|
|
705
|
+
in the spec for a single request.
|
|
706
|
+
:type _host_index: int, optional
|
|
707
|
+
:return: Returns the result object.
|
|
708
|
+
""" # noqa: E501
|
|
709
|
+
|
|
710
|
+
_param = self._execute_command_serialize(
|
|
711
|
+
request=request,
|
|
712
|
+
_request_auth=_request_auth,
|
|
713
|
+
_content_type=_content_type,
|
|
714
|
+
_headers=_headers,
|
|
715
|
+
_host_index=_host_index
|
|
716
|
+
)
|
|
717
|
+
|
|
718
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
719
|
+
'200': "ExecuteResponse",
|
|
720
|
+
'400': "Dict[str, object]",
|
|
721
|
+
'408': "Dict[str, object]",
|
|
722
|
+
}
|
|
723
|
+
response_data = self.api_client.call_api(
|
|
724
|
+
*_param,
|
|
725
|
+
_request_timeout=_request_timeout
|
|
726
|
+
)
|
|
727
|
+
response_data.read()
|
|
728
|
+
return self.api_client.response_deserialize(
|
|
729
|
+
response_data=response_data,
|
|
730
|
+
response_types_map=_response_types_map,
|
|
731
|
+
)
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
@validate_call
|
|
735
|
+
def execute_command_without_preload_content(
|
|
736
|
+
self,
|
|
737
|
+
request: Annotated[ExecuteRequest, Field(description="Command execution request")],
|
|
738
|
+
_request_timeout: Union[
|
|
739
|
+
None,
|
|
740
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
741
|
+
Tuple[
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
744
|
+
]
|
|
745
|
+
] = None,
|
|
746
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
747
|
+
_content_type: Optional[StrictStr] = None,
|
|
748
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
749
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
750
|
+
) -> RESTResponseType:
|
|
751
|
+
"""Execute a command
|
|
752
|
+
|
|
753
|
+
Execute a shell command and return the output and exit code
|
|
754
|
+
|
|
755
|
+
:param request: Command execution request (required)
|
|
756
|
+
:type request: ExecuteRequest
|
|
757
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
758
|
+
number provided, it will be total request
|
|
759
|
+
timeout. It can also be a pair (tuple) of
|
|
760
|
+
(connection, read) timeouts.
|
|
761
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
762
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
763
|
+
request; this effectively ignores the
|
|
764
|
+
authentication in the spec for a single request.
|
|
765
|
+
:type _request_auth: dict, optional
|
|
766
|
+
:param _content_type: force content-type for the request.
|
|
767
|
+
:type _content_type: str, Optional
|
|
768
|
+
:param _headers: set to override the headers for a single
|
|
769
|
+
request; this effectively ignores the headers
|
|
770
|
+
in the spec for a single request.
|
|
771
|
+
:type _headers: dict, optional
|
|
772
|
+
:param _host_index: set to override the host_index for a single
|
|
773
|
+
request; this effectively ignores the host_index
|
|
774
|
+
in the spec for a single request.
|
|
775
|
+
:type _host_index: int, optional
|
|
776
|
+
:return: Returns the result object.
|
|
777
|
+
""" # noqa: E501
|
|
778
|
+
|
|
779
|
+
_param = self._execute_command_serialize(
|
|
780
|
+
request=request,
|
|
781
|
+
_request_auth=_request_auth,
|
|
782
|
+
_content_type=_content_type,
|
|
783
|
+
_headers=_headers,
|
|
784
|
+
_host_index=_host_index
|
|
785
|
+
)
|
|
786
|
+
|
|
787
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
788
|
+
'200': "ExecuteResponse",
|
|
789
|
+
'400': "Dict[str, object]",
|
|
790
|
+
'408': "Dict[str, object]",
|
|
791
|
+
}
|
|
792
|
+
response_data = self.api_client.call_api(
|
|
793
|
+
*_param,
|
|
794
|
+
_request_timeout=_request_timeout
|
|
795
|
+
)
|
|
796
|
+
return response_data.response
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
def _execute_command_serialize(
|
|
800
|
+
self,
|
|
801
|
+
request,
|
|
802
|
+
_request_auth,
|
|
803
|
+
_content_type,
|
|
804
|
+
_headers,
|
|
805
|
+
_host_index,
|
|
806
|
+
) -> RequestSerialized:
|
|
807
|
+
|
|
808
|
+
_host = None
|
|
809
|
+
|
|
810
|
+
_collection_formats: Dict[str, str] = {
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
_path_params: Dict[str, str] = {}
|
|
814
|
+
_query_params: List[Tuple[str, str]] = []
|
|
815
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
816
|
+
_form_params: List[Tuple[str, str]] = []
|
|
817
|
+
_files: Dict[
|
|
818
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
819
|
+
] = {}
|
|
820
|
+
_body_params: Optional[bytes] = None
|
|
821
|
+
|
|
822
|
+
# process the path parameters
|
|
823
|
+
# process the query parameters
|
|
824
|
+
# process the header parameters
|
|
825
|
+
# process the form parameters
|
|
826
|
+
# process the body parameter
|
|
827
|
+
if request is not None:
|
|
828
|
+
_body_params = request
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
# set the HTTP header `Accept`
|
|
832
|
+
if 'Accept' not in _header_params:
|
|
833
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
834
|
+
[
|
|
835
|
+
'application/json'
|
|
836
|
+
]
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
# set the HTTP header `Content-Type`
|
|
840
|
+
if _content_type:
|
|
841
|
+
_header_params['Content-Type'] = _content_type
|
|
842
|
+
else:
|
|
843
|
+
_default_content_type = (
|
|
844
|
+
self.api_client.select_header_content_type(
|
|
845
|
+
[
|
|
846
|
+
'application/json'
|
|
847
|
+
]
|
|
848
|
+
)
|
|
849
|
+
)
|
|
850
|
+
if _default_content_type is not None:
|
|
851
|
+
_header_params['Content-Type'] = _default_content_type
|
|
852
|
+
|
|
853
|
+
# authentication setting
|
|
854
|
+
_auth_settings: List[str] = [
|
|
855
|
+
]
|
|
856
|
+
|
|
857
|
+
return self.api_client.param_serialize(
|
|
858
|
+
method='POST',
|
|
859
|
+
resource_path='/process/execute',
|
|
860
|
+
path_params=_path_params,
|
|
861
|
+
query_params=_query_params,
|
|
862
|
+
header_params=_header_params,
|
|
863
|
+
body=_body_params,
|
|
864
|
+
post_params=_form_params,
|
|
865
|
+
files=_files,
|
|
866
|
+
auth_settings=_auth_settings,
|
|
867
|
+
collection_formats=_collection_formats,
|
|
868
|
+
_host=_host,
|
|
869
|
+
_request_auth=_request_auth
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
@validate_call
|
|
876
|
+
def get_session(
|
|
877
|
+
self,
|
|
878
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
879
|
+
_request_timeout: Union[
|
|
880
|
+
None,
|
|
881
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
882
|
+
Tuple[
|
|
883
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
884
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
885
|
+
]
|
|
886
|
+
] = None,
|
|
887
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
888
|
+
_content_type: Optional[StrictStr] = None,
|
|
889
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
890
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
891
|
+
) -> Session:
|
|
892
|
+
"""Get session details
|
|
893
|
+
|
|
894
|
+
Get details of a specific session including its commands
|
|
895
|
+
|
|
896
|
+
:param session_id: Session ID (required)
|
|
897
|
+
:type session_id: str
|
|
898
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
899
|
+
number provided, it will be total request
|
|
900
|
+
timeout. It can also be a pair (tuple) of
|
|
901
|
+
(connection, read) timeouts.
|
|
902
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
903
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
904
|
+
request; this effectively ignores the
|
|
905
|
+
authentication in the spec for a single request.
|
|
906
|
+
:type _request_auth: dict, optional
|
|
907
|
+
:param _content_type: force content-type for the request.
|
|
908
|
+
:type _content_type: str, Optional
|
|
909
|
+
:param _headers: set to override the headers for a single
|
|
910
|
+
request; this effectively ignores the headers
|
|
911
|
+
in the spec for a single request.
|
|
912
|
+
:type _headers: dict, optional
|
|
913
|
+
:param _host_index: set to override the host_index for a single
|
|
914
|
+
request; this effectively ignores the host_index
|
|
915
|
+
in the spec for a single request.
|
|
916
|
+
:type _host_index: int, optional
|
|
917
|
+
:return: Returns the result object.
|
|
918
|
+
""" # noqa: E501
|
|
919
|
+
|
|
920
|
+
_param = self._get_session_serialize(
|
|
921
|
+
session_id=session_id,
|
|
922
|
+
_request_auth=_request_auth,
|
|
923
|
+
_content_type=_content_type,
|
|
924
|
+
_headers=_headers,
|
|
925
|
+
_host_index=_host_index
|
|
926
|
+
)
|
|
927
|
+
|
|
928
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
929
|
+
'200': "Session",
|
|
930
|
+
'404': "Dict[str, object]",
|
|
931
|
+
'500': "Dict[str, object]",
|
|
932
|
+
}
|
|
933
|
+
response_data = self.api_client.call_api(
|
|
934
|
+
*_param,
|
|
935
|
+
_request_timeout=_request_timeout
|
|
936
|
+
)
|
|
937
|
+
response_data.read()
|
|
938
|
+
return self.api_client.response_deserialize(
|
|
939
|
+
response_data=response_data,
|
|
940
|
+
response_types_map=_response_types_map,
|
|
941
|
+
).data
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
@validate_call
|
|
945
|
+
def get_session_with_http_info(
|
|
946
|
+
self,
|
|
947
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
948
|
+
_request_timeout: Union[
|
|
949
|
+
None,
|
|
950
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
951
|
+
Tuple[
|
|
952
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
953
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
954
|
+
]
|
|
955
|
+
] = None,
|
|
956
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
957
|
+
_content_type: Optional[StrictStr] = None,
|
|
958
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
959
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
960
|
+
) -> ApiResponse[Session]:
|
|
961
|
+
"""Get session details
|
|
962
|
+
|
|
963
|
+
Get details of a specific session including its commands
|
|
964
|
+
|
|
965
|
+
:param session_id: Session ID (required)
|
|
966
|
+
:type session_id: str
|
|
967
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
968
|
+
number provided, it will be total request
|
|
969
|
+
timeout. It can also be a pair (tuple) of
|
|
970
|
+
(connection, read) timeouts.
|
|
971
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
972
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
973
|
+
request; this effectively ignores the
|
|
974
|
+
authentication in the spec for a single request.
|
|
975
|
+
:type _request_auth: dict, optional
|
|
976
|
+
:param _content_type: force content-type for the request.
|
|
977
|
+
:type _content_type: str, Optional
|
|
978
|
+
:param _headers: set to override the headers for a single
|
|
979
|
+
request; this effectively ignores the headers
|
|
980
|
+
in the spec for a single request.
|
|
981
|
+
:type _headers: dict, optional
|
|
982
|
+
:param _host_index: set to override the host_index for a single
|
|
983
|
+
request; this effectively ignores the host_index
|
|
984
|
+
in the spec for a single request.
|
|
985
|
+
:type _host_index: int, optional
|
|
986
|
+
:return: Returns the result object.
|
|
987
|
+
""" # noqa: E501
|
|
988
|
+
|
|
989
|
+
_param = self._get_session_serialize(
|
|
990
|
+
session_id=session_id,
|
|
991
|
+
_request_auth=_request_auth,
|
|
992
|
+
_content_type=_content_type,
|
|
993
|
+
_headers=_headers,
|
|
994
|
+
_host_index=_host_index
|
|
995
|
+
)
|
|
996
|
+
|
|
997
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
998
|
+
'200': "Session",
|
|
999
|
+
'404': "Dict[str, object]",
|
|
1000
|
+
'500': "Dict[str, object]",
|
|
1001
|
+
}
|
|
1002
|
+
response_data = self.api_client.call_api(
|
|
1003
|
+
*_param,
|
|
1004
|
+
_request_timeout=_request_timeout
|
|
1005
|
+
)
|
|
1006
|
+
response_data.read()
|
|
1007
|
+
return self.api_client.response_deserialize(
|
|
1008
|
+
response_data=response_data,
|
|
1009
|
+
response_types_map=_response_types_map,
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
@validate_call
|
|
1014
|
+
def get_session_without_preload_content(
|
|
1015
|
+
self,
|
|
1016
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1017
|
+
_request_timeout: Union[
|
|
1018
|
+
None,
|
|
1019
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1020
|
+
Tuple[
|
|
1021
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1022
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1023
|
+
]
|
|
1024
|
+
] = None,
|
|
1025
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1026
|
+
_content_type: Optional[StrictStr] = None,
|
|
1027
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1028
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1029
|
+
) -> RESTResponseType:
|
|
1030
|
+
"""Get session details
|
|
1031
|
+
|
|
1032
|
+
Get details of a specific session including its commands
|
|
1033
|
+
|
|
1034
|
+
:param session_id: Session ID (required)
|
|
1035
|
+
:type session_id: str
|
|
1036
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1037
|
+
number provided, it will be total request
|
|
1038
|
+
timeout. It can also be a pair (tuple) of
|
|
1039
|
+
(connection, read) timeouts.
|
|
1040
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1041
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1042
|
+
request; this effectively ignores the
|
|
1043
|
+
authentication in the spec for a single request.
|
|
1044
|
+
:type _request_auth: dict, optional
|
|
1045
|
+
:param _content_type: force content-type for the request.
|
|
1046
|
+
:type _content_type: str, Optional
|
|
1047
|
+
:param _headers: set to override the headers for a single
|
|
1048
|
+
request; this effectively ignores the headers
|
|
1049
|
+
in the spec for a single request.
|
|
1050
|
+
:type _headers: dict, optional
|
|
1051
|
+
:param _host_index: set to override the host_index for a single
|
|
1052
|
+
request; this effectively ignores the host_index
|
|
1053
|
+
in the spec for a single request.
|
|
1054
|
+
:type _host_index: int, optional
|
|
1055
|
+
:return: Returns the result object.
|
|
1056
|
+
""" # noqa: E501
|
|
1057
|
+
|
|
1058
|
+
_param = self._get_session_serialize(
|
|
1059
|
+
session_id=session_id,
|
|
1060
|
+
_request_auth=_request_auth,
|
|
1061
|
+
_content_type=_content_type,
|
|
1062
|
+
_headers=_headers,
|
|
1063
|
+
_host_index=_host_index
|
|
1064
|
+
)
|
|
1065
|
+
|
|
1066
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1067
|
+
'200': "Session",
|
|
1068
|
+
'404': "Dict[str, object]",
|
|
1069
|
+
'500': "Dict[str, object]",
|
|
1070
|
+
}
|
|
1071
|
+
response_data = self.api_client.call_api(
|
|
1072
|
+
*_param,
|
|
1073
|
+
_request_timeout=_request_timeout
|
|
1074
|
+
)
|
|
1075
|
+
return response_data.response
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
def _get_session_serialize(
|
|
1079
|
+
self,
|
|
1080
|
+
session_id,
|
|
1081
|
+
_request_auth,
|
|
1082
|
+
_content_type,
|
|
1083
|
+
_headers,
|
|
1084
|
+
_host_index,
|
|
1085
|
+
) -> RequestSerialized:
|
|
1086
|
+
|
|
1087
|
+
_host = None
|
|
1088
|
+
|
|
1089
|
+
_collection_formats: Dict[str, str] = {
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
_path_params: Dict[str, str] = {}
|
|
1093
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1094
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1095
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1096
|
+
_files: Dict[
|
|
1097
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1098
|
+
] = {}
|
|
1099
|
+
_body_params: Optional[bytes] = None
|
|
1100
|
+
|
|
1101
|
+
# process the path parameters
|
|
1102
|
+
if session_id is not None:
|
|
1103
|
+
_path_params['sessionId'] = session_id
|
|
1104
|
+
# process the query parameters
|
|
1105
|
+
# process the header parameters
|
|
1106
|
+
# process the form parameters
|
|
1107
|
+
# process the body parameter
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
# set the HTTP header `Accept`
|
|
1111
|
+
if 'Accept' not in _header_params:
|
|
1112
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1113
|
+
[
|
|
1114
|
+
'application/json'
|
|
1115
|
+
]
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
# authentication setting
|
|
1120
|
+
_auth_settings: List[str] = [
|
|
1121
|
+
]
|
|
1122
|
+
|
|
1123
|
+
return self.api_client.param_serialize(
|
|
1124
|
+
method='GET',
|
|
1125
|
+
resource_path='/process/session/{sessionId}',
|
|
1126
|
+
path_params=_path_params,
|
|
1127
|
+
query_params=_query_params,
|
|
1128
|
+
header_params=_header_params,
|
|
1129
|
+
body=_body_params,
|
|
1130
|
+
post_params=_form_params,
|
|
1131
|
+
files=_files,
|
|
1132
|
+
auth_settings=_auth_settings,
|
|
1133
|
+
collection_formats=_collection_formats,
|
|
1134
|
+
_host=_host,
|
|
1135
|
+
_request_auth=_request_auth
|
|
1136
|
+
)
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
@validate_call
|
|
1142
|
+
def get_session_command(
|
|
1143
|
+
self,
|
|
1144
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1145
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1146
|
+
_request_timeout: Union[
|
|
1147
|
+
None,
|
|
1148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1149
|
+
Tuple[
|
|
1150
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1151
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1152
|
+
]
|
|
1153
|
+
] = None,
|
|
1154
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1155
|
+
_content_type: Optional[StrictStr] = None,
|
|
1156
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1157
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1158
|
+
) -> Command:
|
|
1159
|
+
"""Get session command details
|
|
1160
|
+
|
|
1161
|
+
Get details of a specific command within a session
|
|
1162
|
+
|
|
1163
|
+
:param session_id: Session ID (required)
|
|
1164
|
+
:type session_id: str
|
|
1165
|
+
:param command_id: Command ID (required)
|
|
1166
|
+
:type command_id: str
|
|
1167
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1168
|
+
number provided, it will be total request
|
|
1169
|
+
timeout. It can also be a pair (tuple) of
|
|
1170
|
+
(connection, read) timeouts.
|
|
1171
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1172
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1173
|
+
request; this effectively ignores the
|
|
1174
|
+
authentication in the spec for a single request.
|
|
1175
|
+
:type _request_auth: dict, optional
|
|
1176
|
+
:param _content_type: force content-type for the request.
|
|
1177
|
+
:type _content_type: str, Optional
|
|
1178
|
+
:param _headers: set to override the headers for a single
|
|
1179
|
+
request; this effectively ignores the headers
|
|
1180
|
+
in the spec for a single request.
|
|
1181
|
+
:type _headers: dict, optional
|
|
1182
|
+
:param _host_index: set to override the host_index for a single
|
|
1183
|
+
request; this effectively ignores the host_index
|
|
1184
|
+
in the spec for a single request.
|
|
1185
|
+
:type _host_index: int, optional
|
|
1186
|
+
:return: Returns the result object.
|
|
1187
|
+
""" # noqa: E501
|
|
1188
|
+
|
|
1189
|
+
_param = self._get_session_command_serialize(
|
|
1190
|
+
session_id=session_id,
|
|
1191
|
+
command_id=command_id,
|
|
1192
|
+
_request_auth=_request_auth,
|
|
1193
|
+
_content_type=_content_type,
|
|
1194
|
+
_headers=_headers,
|
|
1195
|
+
_host_index=_host_index
|
|
1196
|
+
)
|
|
1197
|
+
|
|
1198
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1199
|
+
'200': "Command",
|
|
1200
|
+
'404': "Dict[str, object]",
|
|
1201
|
+
}
|
|
1202
|
+
response_data = self.api_client.call_api(
|
|
1203
|
+
*_param,
|
|
1204
|
+
_request_timeout=_request_timeout
|
|
1205
|
+
)
|
|
1206
|
+
response_data.read()
|
|
1207
|
+
return self.api_client.response_deserialize(
|
|
1208
|
+
response_data=response_data,
|
|
1209
|
+
response_types_map=_response_types_map,
|
|
1210
|
+
).data
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
@validate_call
|
|
1214
|
+
def get_session_command_with_http_info(
|
|
1215
|
+
self,
|
|
1216
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1217
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1218
|
+
_request_timeout: Union[
|
|
1219
|
+
None,
|
|
1220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1221
|
+
Tuple[
|
|
1222
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1223
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1224
|
+
]
|
|
1225
|
+
] = None,
|
|
1226
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1227
|
+
_content_type: Optional[StrictStr] = None,
|
|
1228
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1229
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1230
|
+
) -> ApiResponse[Command]:
|
|
1231
|
+
"""Get session command details
|
|
1232
|
+
|
|
1233
|
+
Get details of a specific command within a session
|
|
1234
|
+
|
|
1235
|
+
:param session_id: Session ID (required)
|
|
1236
|
+
:type session_id: str
|
|
1237
|
+
:param command_id: Command ID (required)
|
|
1238
|
+
:type command_id: str
|
|
1239
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1240
|
+
number provided, it will be total request
|
|
1241
|
+
timeout. It can also be a pair (tuple) of
|
|
1242
|
+
(connection, read) timeouts.
|
|
1243
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1244
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1245
|
+
request; this effectively ignores the
|
|
1246
|
+
authentication in the spec for a single request.
|
|
1247
|
+
:type _request_auth: dict, optional
|
|
1248
|
+
:param _content_type: force content-type for the request.
|
|
1249
|
+
:type _content_type: str, Optional
|
|
1250
|
+
:param _headers: set to override the headers for a single
|
|
1251
|
+
request; this effectively ignores the headers
|
|
1252
|
+
in the spec for a single request.
|
|
1253
|
+
:type _headers: dict, optional
|
|
1254
|
+
:param _host_index: set to override the host_index for a single
|
|
1255
|
+
request; this effectively ignores the host_index
|
|
1256
|
+
in the spec for a single request.
|
|
1257
|
+
:type _host_index: int, optional
|
|
1258
|
+
:return: Returns the result object.
|
|
1259
|
+
""" # noqa: E501
|
|
1260
|
+
|
|
1261
|
+
_param = self._get_session_command_serialize(
|
|
1262
|
+
session_id=session_id,
|
|
1263
|
+
command_id=command_id,
|
|
1264
|
+
_request_auth=_request_auth,
|
|
1265
|
+
_content_type=_content_type,
|
|
1266
|
+
_headers=_headers,
|
|
1267
|
+
_host_index=_host_index
|
|
1268
|
+
)
|
|
1269
|
+
|
|
1270
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1271
|
+
'200': "Command",
|
|
1272
|
+
'404': "Dict[str, object]",
|
|
1273
|
+
}
|
|
1274
|
+
response_data = self.api_client.call_api(
|
|
1275
|
+
*_param,
|
|
1276
|
+
_request_timeout=_request_timeout
|
|
1277
|
+
)
|
|
1278
|
+
response_data.read()
|
|
1279
|
+
return self.api_client.response_deserialize(
|
|
1280
|
+
response_data=response_data,
|
|
1281
|
+
response_types_map=_response_types_map,
|
|
1282
|
+
)
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
@validate_call
|
|
1286
|
+
def get_session_command_without_preload_content(
|
|
1287
|
+
self,
|
|
1288
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1289
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1290
|
+
_request_timeout: Union[
|
|
1291
|
+
None,
|
|
1292
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1293
|
+
Tuple[
|
|
1294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1296
|
+
]
|
|
1297
|
+
] = None,
|
|
1298
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1299
|
+
_content_type: Optional[StrictStr] = None,
|
|
1300
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1301
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1302
|
+
) -> RESTResponseType:
|
|
1303
|
+
"""Get session command details
|
|
1304
|
+
|
|
1305
|
+
Get details of a specific command within a session
|
|
1306
|
+
|
|
1307
|
+
:param session_id: Session ID (required)
|
|
1308
|
+
:type session_id: str
|
|
1309
|
+
:param command_id: Command ID (required)
|
|
1310
|
+
:type command_id: str
|
|
1311
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1312
|
+
number provided, it will be total request
|
|
1313
|
+
timeout. It can also be a pair (tuple) of
|
|
1314
|
+
(connection, read) timeouts.
|
|
1315
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1316
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1317
|
+
request; this effectively ignores the
|
|
1318
|
+
authentication in the spec for a single request.
|
|
1319
|
+
:type _request_auth: dict, optional
|
|
1320
|
+
:param _content_type: force content-type for the request.
|
|
1321
|
+
:type _content_type: str, Optional
|
|
1322
|
+
:param _headers: set to override the headers for a single
|
|
1323
|
+
request; this effectively ignores the headers
|
|
1324
|
+
in the spec for a single request.
|
|
1325
|
+
:type _headers: dict, optional
|
|
1326
|
+
:param _host_index: set to override the host_index for a single
|
|
1327
|
+
request; this effectively ignores the host_index
|
|
1328
|
+
in the spec for a single request.
|
|
1329
|
+
:type _host_index: int, optional
|
|
1330
|
+
:return: Returns the result object.
|
|
1331
|
+
""" # noqa: E501
|
|
1332
|
+
|
|
1333
|
+
_param = self._get_session_command_serialize(
|
|
1334
|
+
session_id=session_id,
|
|
1335
|
+
command_id=command_id,
|
|
1336
|
+
_request_auth=_request_auth,
|
|
1337
|
+
_content_type=_content_type,
|
|
1338
|
+
_headers=_headers,
|
|
1339
|
+
_host_index=_host_index
|
|
1340
|
+
)
|
|
1341
|
+
|
|
1342
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1343
|
+
'200': "Command",
|
|
1344
|
+
'404': "Dict[str, object]",
|
|
1345
|
+
}
|
|
1346
|
+
response_data = self.api_client.call_api(
|
|
1347
|
+
*_param,
|
|
1348
|
+
_request_timeout=_request_timeout
|
|
1349
|
+
)
|
|
1350
|
+
return response_data.response
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
def _get_session_command_serialize(
|
|
1354
|
+
self,
|
|
1355
|
+
session_id,
|
|
1356
|
+
command_id,
|
|
1357
|
+
_request_auth,
|
|
1358
|
+
_content_type,
|
|
1359
|
+
_headers,
|
|
1360
|
+
_host_index,
|
|
1361
|
+
) -> RequestSerialized:
|
|
1362
|
+
|
|
1363
|
+
_host = None
|
|
1364
|
+
|
|
1365
|
+
_collection_formats: Dict[str, str] = {
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
_path_params: Dict[str, str] = {}
|
|
1369
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1370
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1371
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1372
|
+
_files: Dict[
|
|
1373
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1374
|
+
] = {}
|
|
1375
|
+
_body_params: Optional[bytes] = None
|
|
1376
|
+
|
|
1377
|
+
# process the path parameters
|
|
1378
|
+
if session_id is not None:
|
|
1379
|
+
_path_params['sessionId'] = session_id
|
|
1380
|
+
if command_id is not None:
|
|
1381
|
+
_path_params['commandId'] = command_id
|
|
1382
|
+
# process the query parameters
|
|
1383
|
+
# process the header parameters
|
|
1384
|
+
# process the form parameters
|
|
1385
|
+
# process the body parameter
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
# set the HTTP header `Accept`
|
|
1389
|
+
if 'Accept' not in _header_params:
|
|
1390
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1391
|
+
[
|
|
1392
|
+
'application/json'
|
|
1393
|
+
]
|
|
1394
|
+
)
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
# authentication setting
|
|
1398
|
+
_auth_settings: List[str] = [
|
|
1399
|
+
]
|
|
1400
|
+
|
|
1401
|
+
return self.api_client.param_serialize(
|
|
1402
|
+
method='GET',
|
|
1403
|
+
resource_path='/process/session/{sessionId}/command/{commandId}',
|
|
1404
|
+
path_params=_path_params,
|
|
1405
|
+
query_params=_query_params,
|
|
1406
|
+
header_params=_header_params,
|
|
1407
|
+
body=_body_params,
|
|
1408
|
+
post_params=_form_params,
|
|
1409
|
+
files=_files,
|
|
1410
|
+
auth_settings=_auth_settings,
|
|
1411
|
+
collection_formats=_collection_formats,
|
|
1412
|
+
_host=_host,
|
|
1413
|
+
_request_auth=_request_auth
|
|
1414
|
+
)
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
@validate_call
|
|
1420
|
+
def get_session_command_logs(
|
|
1421
|
+
self,
|
|
1422
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1423
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1424
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1425
|
+
_request_timeout: Union[
|
|
1426
|
+
None,
|
|
1427
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1428
|
+
Tuple[
|
|
1429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1430
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1431
|
+
]
|
|
1432
|
+
] = None,
|
|
1433
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1434
|
+
_content_type: Optional[StrictStr] = None,
|
|
1435
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1436
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1437
|
+
) -> str:
|
|
1438
|
+
"""Get session command logs
|
|
1439
|
+
|
|
1440
|
+
Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
1441
|
+
|
|
1442
|
+
:param session_id: Session ID (required)
|
|
1443
|
+
:type session_id: str
|
|
1444
|
+
:param command_id: Command ID (required)
|
|
1445
|
+
:type command_id: str
|
|
1446
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
1447
|
+
:type follow: bool
|
|
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._get_session_command_logs_serialize(
|
|
1471
|
+
session_id=session_id,
|
|
1472
|
+
command_id=command_id,
|
|
1473
|
+
follow=follow,
|
|
1474
|
+
_request_auth=_request_auth,
|
|
1475
|
+
_content_type=_content_type,
|
|
1476
|
+
_headers=_headers,
|
|
1477
|
+
_host_index=_host_index
|
|
1478
|
+
)
|
|
1479
|
+
|
|
1480
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1481
|
+
'200': "str",
|
|
1482
|
+
'400': "Dict[str, object]",
|
|
1483
|
+
'403': "Dict[str, object]",
|
|
1484
|
+
'404': "Dict[str, object]",
|
|
1485
|
+
}
|
|
1486
|
+
response_data = self.api_client.call_api(
|
|
1487
|
+
*_param,
|
|
1488
|
+
_request_timeout=_request_timeout
|
|
1489
|
+
)
|
|
1490
|
+
response_data.read()
|
|
1491
|
+
return self.api_client.response_deserialize(
|
|
1492
|
+
response_data=response_data,
|
|
1493
|
+
response_types_map=_response_types_map,
|
|
1494
|
+
).data
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
@validate_call
|
|
1498
|
+
def get_session_command_logs_with_http_info(
|
|
1499
|
+
self,
|
|
1500
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1501
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1502
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1503
|
+
_request_timeout: Union[
|
|
1504
|
+
None,
|
|
1505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1506
|
+
Tuple[
|
|
1507
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1508
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1509
|
+
]
|
|
1510
|
+
] = None,
|
|
1511
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1512
|
+
_content_type: Optional[StrictStr] = None,
|
|
1513
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1514
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1515
|
+
) -> ApiResponse[str]:
|
|
1516
|
+
"""Get session command logs
|
|
1517
|
+
|
|
1518
|
+
Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
1519
|
+
|
|
1520
|
+
:param session_id: Session ID (required)
|
|
1521
|
+
:type session_id: str
|
|
1522
|
+
:param command_id: Command ID (required)
|
|
1523
|
+
:type command_id: str
|
|
1524
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
1525
|
+
:type follow: bool
|
|
1526
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1527
|
+
number provided, it will be total request
|
|
1528
|
+
timeout. It can also be a pair (tuple) of
|
|
1529
|
+
(connection, read) timeouts.
|
|
1530
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1531
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1532
|
+
request; this effectively ignores the
|
|
1533
|
+
authentication in the spec for a single request.
|
|
1534
|
+
:type _request_auth: dict, optional
|
|
1535
|
+
:param _content_type: force content-type for the request.
|
|
1536
|
+
:type _content_type: str, Optional
|
|
1537
|
+
:param _headers: set to override the headers for a single
|
|
1538
|
+
request; this effectively ignores the headers
|
|
1539
|
+
in the spec for a single request.
|
|
1540
|
+
:type _headers: dict, optional
|
|
1541
|
+
:param _host_index: set to override the host_index for a single
|
|
1542
|
+
request; this effectively ignores the host_index
|
|
1543
|
+
in the spec for a single request.
|
|
1544
|
+
:type _host_index: int, optional
|
|
1545
|
+
:return: Returns the result object.
|
|
1546
|
+
""" # noqa: E501
|
|
1547
|
+
|
|
1548
|
+
_param = self._get_session_command_logs_serialize(
|
|
1549
|
+
session_id=session_id,
|
|
1550
|
+
command_id=command_id,
|
|
1551
|
+
follow=follow,
|
|
1552
|
+
_request_auth=_request_auth,
|
|
1553
|
+
_content_type=_content_type,
|
|
1554
|
+
_headers=_headers,
|
|
1555
|
+
_host_index=_host_index
|
|
1556
|
+
)
|
|
1557
|
+
|
|
1558
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1559
|
+
'200': "str",
|
|
1560
|
+
'400': "Dict[str, object]",
|
|
1561
|
+
'403': "Dict[str, object]",
|
|
1562
|
+
'404': "Dict[str, object]",
|
|
1563
|
+
}
|
|
1564
|
+
response_data = self.api_client.call_api(
|
|
1565
|
+
*_param,
|
|
1566
|
+
_request_timeout=_request_timeout
|
|
1567
|
+
)
|
|
1568
|
+
response_data.read()
|
|
1569
|
+
return self.api_client.response_deserialize(
|
|
1570
|
+
response_data=response_data,
|
|
1571
|
+
response_types_map=_response_types_map,
|
|
1572
|
+
)
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
@validate_call
|
|
1576
|
+
def get_session_command_logs_without_preload_content(
|
|
1577
|
+
self,
|
|
1578
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1579
|
+
command_id: Annotated[StrictStr, Field(description="Command ID")],
|
|
1580
|
+
follow: Annotated[Optional[StrictBool], Field(description="Follow logs in real-time (WebSocket only)")] = None,
|
|
1581
|
+
_request_timeout: Union[
|
|
1582
|
+
None,
|
|
1583
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1584
|
+
Tuple[
|
|
1585
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1586
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1587
|
+
]
|
|
1588
|
+
] = None,
|
|
1589
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1590
|
+
_content_type: Optional[StrictStr] = None,
|
|
1591
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1592
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1593
|
+
) -> RESTResponseType:
|
|
1594
|
+
"""Get session command logs
|
|
1595
|
+
|
|
1596
|
+
Get logs for a specific command within a session. Supports both HTTP and WebSocket streaming.
|
|
1597
|
+
|
|
1598
|
+
:param session_id: Session ID (required)
|
|
1599
|
+
:type session_id: str
|
|
1600
|
+
:param command_id: Command ID (required)
|
|
1601
|
+
:type command_id: str
|
|
1602
|
+
:param follow: Follow logs in real-time (WebSocket only)
|
|
1603
|
+
:type follow: bool
|
|
1604
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1605
|
+
number provided, it will be total request
|
|
1606
|
+
timeout. It can also be a pair (tuple) of
|
|
1607
|
+
(connection, read) timeouts.
|
|
1608
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1609
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1610
|
+
request; this effectively ignores the
|
|
1611
|
+
authentication in the spec for a single request.
|
|
1612
|
+
:type _request_auth: dict, optional
|
|
1613
|
+
:param _content_type: force content-type for the request.
|
|
1614
|
+
:type _content_type: str, Optional
|
|
1615
|
+
:param _headers: set to override the headers for a single
|
|
1616
|
+
request; this effectively ignores the headers
|
|
1617
|
+
in the spec for a single request.
|
|
1618
|
+
:type _headers: dict, optional
|
|
1619
|
+
:param _host_index: set to override the host_index for a single
|
|
1620
|
+
request; this effectively ignores the host_index
|
|
1621
|
+
in the spec for a single request.
|
|
1622
|
+
:type _host_index: int, optional
|
|
1623
|
+
:return: Returns the result object.
|
|
1624
|
+
""" # noqa: E501
|
|
1625
|
+
|
|
1626
|
+
_param = self._get_session_command_logs_serialize(
|
|
1627
|
+
session_id=session_id,
|
|
1628
|
+
command_id=command_id,
|
|
1629
|
+
follow=follow,
|
|
1630
|
+
_request_auth=_request_auth,
|
|
1631
|
+
_content_type=_content_type,
|
|
1632
|
+
_headers=_headers,
|
|
1633
|
+
_host_index=_host_index
|
|
1634
|
+
)
|
|
1635
|
+
|
|
1636
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1637
|
+
'200': "str",
|
|
1638
|
+
'400': "Dict[str, object]",
|
|
1639
|
+
'403': "Dict[str, object]",
|
|
1640
|
+
'404': "Dict[str, object]",
|
|
1641
|
+
}
|
|
1642
|
+
response_data = self.api_client.call_api(
|
|
1643
|
+
*_param,
|
|
1644
|
+
_request_timeout=_request_timeout
|
|
1645
|
+
)
|
|
1646
|
+
return response_data.response
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
def _get_session_command_logs_serialize(
|
|
1650
|
+
self,
|
|
1651
|
+
session_id,
|
|
1652
|
+
command_id,
|
|
1653
|
+
follow,
|
|
1654
|
+
_request_auth,
|
|
1655
|
+
_content_type,
|
|
1656
|
+
_headers,
|
|
1657
|
+
_host_index,
|
|
1658
|
+
) -> RequestSerialized:
|
|
1659
|
+
|
|
1660
|
+
_host = None
|
|
1661
|
+
|
|
1662
|
+
_collection_formats: Dict[str, str] = {
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
_path_params: Dict[str, str] = {}
|
|
1666
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1667
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1668
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1669
|
+
_files: Dict[
|
|
1670
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1671
|
+
] = {}
|
|
1672
|
+
_body_params: Optional[bytes] = None
|
|
1673
|
+
|
|
1674
|
+
# process the path parameters
|
|
1675
|
+
if session_id is not None:
|
|
1676
|
+
_path_params['sessionId'] = session_id
|
|
1677
|
+
if command_id is not None:
|
|
1678
|
+
_path_params['commandId'] = command_id
|
|
1679
|
+
# process the query parameters
|
|
1680
|
+
if follow is not None:
|
|
1681
|
+
|
|
1682
|
+
_query_params.append(('follow', follow))
|
|
1683
|
+
|
|
1684
|
+
# process the header parameters
|
|
1685
|
+
# process the form parameters
|
|
1686
|
+
# process the body parameter
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
# set the HTTP header `Accept`
|
|
1690
|
+
if 'Accept' not in _header_params:
|
|
1691
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1692
|
+
[
|
|
1693
|
+
'text/plain'
|
|
1694
|
+
]
|
|
1695
|
+
)
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
# authentication setting
|
|
1699
|
+
_auth_settings: List[str] = [
|
|
1700
|
+
]
|
|
1701
|
+
|
|
1702
|
+
return self.api_client.param_serialize(
|
|
1703
|
+
method='GET',
|
|
1704
|
+
resource_path='/process/session/{sessionId}/command/{commandId}/logs',
|
|
1705
|
+
path_params=_path_params,
|
|
1706
|
+
query_params=_query_params,
|
|
1707
|
+
header_params=_header_params,
|
|
1708
|
+
body=_body_params,
|
|
1709
|
+
post_params=_form_params,
|
|
1710
|
+
files=_files,
|
|
1711
|
+
auth_settings=_auth_settings,
|
|
1712
|
+
collection_formats=_collection_formats,
|
|
1713
|
+
_host=_host,
|
|
1714
|
+
_request_auth=_request_auth
|
|
1715
|
+
)
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
@validate_call
|
|
1721
|
+
def list_sessions(
|
|
1722
|
+
self,
|
|
1723
|
+
_request_timeout: Union[
|
|
1724
|
+
None,
|
|
1725
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1726
|
+
Tuple[
|
|
1727
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1728
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1729
|
+
]
|
|
1730
|
+
] = None,
|
|
1731
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1732
|
+
_content_type: Optional[StrictStr] = None,
|
|
1733
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1734
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1735
|
+
) -> List[Session]:
|
|
1736
|
+
"""List all sessions
|
|
1737
|
+
|
|
1738
|
+
Get a list of all active shell sessions
|
|
1739
|
+
|
|
1740
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1741
|
+
number provided, it will be total request
|
|
1742
|
+
timeout. It can also be a pair (tuple) of
|
|
1743
|
+
(connection, read) timeouts.
|
|
1744
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1745
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1746
|
+
request; this effectively ignores the
|
|
1747
|
+
authentication in the spec for a single request.
|
|
1748
|
+
:type _request_auth: dict, optional
|
|
1749
|
+
:param _content_type: force content-type for the request.
|
|
1750
|
+
:type _content_type: str, Optional
|
|
1751
|
+
:param _headers: set to override the headers for a single
|
|
1752
|
+
request; this effectively ignores the headers
|
|
1753
|
+
in the spec for a single request.
|
|
1754
|
+
:type _headers: dict, optional
|
|
1755
|
+
:param _host_index: set to override the host_index for a single
|
|
1756
|
+
request; this effectively ignores the host_index
|
|
1757
|
+
in the spec for a single request.
|
|
1758
|
+
:type _host_index: int, optional
|
|
1759
|
+
:return: Returns the result object.
|
|
1760
|
+
""" # noqa: E501
|
|
1761
|
+
|
|
1762
|
+
_param = self._list_sessions_serialize(
|
|
1763
|
+
_request_auth=_request_auth,
|
|
1764
|
+
_content_type=_content_type,
|
|
1765
|
+
_headers=_headers,
|
|
1766
|
+
_host_index=_host_index
|
|
1767
|
+
)
|
|
1768
|
+
|
|
1769
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1770
|
+
'200': "List[Session]",
|
|
1771
|
+
'500': "Dict[str, object]",
|
|
1772
|
+
}
|
|
1773
|
+
response_data = self.api_client.call_api(
|
|
1774
|
+
*_param,
|
|
1775
|
+
_request_timeout=_request_timeout
|
|
1776
|
+
)
|
|
1777
|
+
response_data.read()
|
|
1778
|
+
return self.api_client.response_deserialize(
|
|
1779
|
+
response_data=response_data,
|
|
1780
|
+
response_types_map=_response_types_map,
|
|
1781
|
+
).data
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
@validate_call
|
|
1785
|
+
def list_sessions_with_http_info(
|
|
1786
|
+
self,
|
|
1787
|
+
_request_timeout: Union[
|
|
1788
|
+
None,
|
|
1789
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1790
|
+
Tuple[
|
|
1791
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1792
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1793
|
+
]
|
|
1794
|
+
] = None,
|
|
1795
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1796
|
+
_content_type: Optional[StrictStr] = None,
|
|
1797
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1798
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1799
|
+
) -> ApiResponse[List[Session]]:
|
|
1800
|
+
"""List all sessions
|
|
1801
|
+
|
|
1802
|
+
Get a list of all active shell sessions
|
|
1803
|
+
|
|
1804
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1805
|
+
number provided, it will be total request
|
|
1806
|
+
timeout. It can also be a pair (tuple) of
|
|
1807
|
+
(connection, read) timeouts.
|
|
1808
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1809
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1810
|
+
request; this effectively ignores the
|
|
1811
|
+
authentication in the spec for a single request.
|
|
1812
|
+
:type _request_auth: dict, optional
|
|
1813
|
+
:param _content_type: force content-type for the request.
|
|
1814
|
+
:type _content_type: str, Optional
|
|
1815
|
+
:param _headers: set to override the headers for a single
|
|
1816
|
+
request; this effectively ignores the headers
|
|
1817
|
+
in the spec for a single request.
|
|
1818
|
+
:type _headers: dict, optional
|
|
1819
|
+
:param _host_index: set to override the host_index for a single
|
|
1820
|
+
request; this effectively ignores the host_index
|
|
1821
|
+
in the spec for a single request.
|
|
1822
|
+
:type _host_index: int, optional
|
|
1823
|
+
:return: Returns the result object.
|
|
1824
|
+
""" # noqa: E501
|
|
1825
|
+
|
|
1826
|
+
_param = self._list_sessions_serialize(
|
|
1827
|
+
_request_auth=_request_auth,
|
|
1828
|
+
_content_type=_content_type,
|
|
1829
|
+
_headers=_headers,
|
|
1830
|
+
_host_index=_host_index
|
|
1831
|
+
)
|
|
1832
|
+
|
|
1833
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1834
|
+
'200': "List[Session]",
|
|
1835
|
+
'500': "Dict[str, object]",
|
|
1836
|
+
}
|
|
1837
|
+
response_data = self.api_client.call_api(
|
|
1838
|
+
*_param,
|
|
1839
|
+
_request_timeout=_request_timeout
|
|
1840
|
+
)
|
|
1841
|
+
response_data.read()
|
|
1842
|
+
return self.api_client.response_deserialize(
|
|
1843
|
+
response_data=response_data,
|
|
1844
|
+
response_types_map=_response_types_map,
|
|
1845
|
+
)
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
@validate_call
|
|
1849
|
+
def list_sessions_without_preload_content(
|
|
1850
|
+
self,
|
|
1851
|
+
_request_timeout: Union[
|
|
1852
|
+
None,
|
|
1853
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1854
|
+
Tuple[
|
|
1855
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1856
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1857
|
+
]
|
|
1858
|
+
] = None,
|
|
1859
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1860
|
+
_content_type: Optional[StrictStr] = None,
|
|
1861
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1862
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1863
|
+
) -> RESTResponseType:
|
|
1864
|
+
"""List all sessions
|
|
1865
|
+
|
|
1866
|
+
Get a list of all active shell sessions
|
|
1867
|
+
|
|
1868
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1869
|
+
number provided, it will be total request
|
|
1870
|
+
timeout. It can also be a pair (tuple) of
|
|
1871
|
+
(connection, read) timeouts.
|
|
1872
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1873
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1874
|
+
request; this effectively ignores the
|
|
1875
|
+
authentication in the spec for a single request.
|
|
1876
|
+
:type _request_auth: dict, optional
|
|
1877
|
+
:param _content_type: force content-type for the request.
|
|
1878
|
+
:type _content_type: str, Optional
|
|
1879
|
+
:param _headers: set to override the headers for a single
|
|
1880
|
+
request; this effectively ignores the headers
|
|
1881
|
+
in the spec for a single request.
|
|
1882
|
+
:type _headers: dict, optional
|
|
1883
|
+
:param _host_index: set to override the host_index for a single
|
|
1884
|
+
request; this effectively ignores the host_index
|
|
1885
|
+
in the spec for a single request.
|
|
1886
|
+
:type _host_index: int, optional
|
|
1887
|
+
:return: Returns the result object.
|
|
1888
|
+
""" # noqa: E501
|
|
1889
|
+
|
|
1890
|
+
_param = self._list_sessions_serialize(
|
|
1891
|
+
_request_auth=_request_auth,
|
|
1892
|
+
_content_type=_content_type,
|
|
1893
|
+
_headers=_headers,
|
|
1894
|
+
_host_index=_host_index
|
|
1895
|
+
)
|
|
1896
|
+
|
|
1897
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1898
|
+
'200': "List[Session]",
|
|
1899
|
+
'500': "Dict[str, object]",
|
|
1900
|
+
}
|
|
1901
|
+
response_data = self.api_client.call_api(
|
|
1902
|
+
*_param,
|
|
1903
|
+
_request_timeout=_request_timeout
|
|
1904
|
+
)
|
|
1905
|
+
return response_data.response
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
def _list_sessions_serialize(
|
|
1909
|
+
self,
|
|
1910
|
+
_request_auth,
|
|
1911
|
+
_content_type,
|
|
1912
|
+
_headers,
|
|
1913
|
+
_host_index,
|
|
1914
|
+
) -> RequestSerialized:
|
|
1915
|
+
|
|
1916
|
+
_host = None
|
|
1917
|
+
|
|
1918
|
+
_collection_formats: Dict[str, str] = {
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
_path_params: Dict[str, str] = {}
|
|
1922
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1923
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1924
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1925
|
+
_files: Dict[
|
|
1926
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1927
|
+
] = {}
|
|
1928
|
+
_body_params: Optional[bytes] = None
|
|
1929
|
+
|
|
1930
|
+
# process the path parameters
|
|
1931
|
+
# process the query parameters
|
|
1932
|
+
# process the header parameters
|
|
1933
|
+
# process the form parameters
|
|
1934
|
+
# process the body parameter
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
# set the HTTP header `Accept`
|
|
1938
|
+
if 'Accept' not in _header_params:
|
|
1939
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1940
|
+
[
|
|
1941
|
+
'application/json'
|
|
1942
|
+
]
|
|
1943
|
+
)
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
# authentication setting
|
|
1947
|
+
_auth_settings: List[str] = [
|
|
1948
|
+
]
|
|
1949
|
+
|
|
1950
|
+
return self.api_client.param_serialize(
|
|
1951
|
+
method='GET',
|
|
1952
|
+
resource_path='/process/session',
|
|
1953
|
+
path_params=_path_params,
|
|
1954
|
+
query_params=_query_params,
|
|
1955
|
+
header_params=_header_params,
|
|
1956
|
+
body=_body_params,
|
|
1957
|
+
post_params=_form_params,
|
|
1958
|
+
files=_files,
|
|
1959
|
+
auth_settings=_auth_settings,
|
|
1960
|
+
collection_formats=_collection_formats,
|
|
1961
|
+
_host=_host,
|
|
1962
|
+
_request_auth=_request_auth
|
|
1963
|
+
)
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
@validate_call
|
|
1969
|
+
def session_execute_command(
|
|
1970
|
+
self,
|
|
1971
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
1972
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
1973
|
+
_request_timeout: Union[
|
|
1974
|
+
None,
|
|
1975
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1976
|
+
Tuple[
|
|
1977
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1978
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1979
|
+
]
|
|
1980
|
+
] = None,
|
|
1981
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1982
|
+
_content_type: Optional[StrictStr] = None,
|
|
1983
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1984
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1985
|
+
) -> SessionExecuteResponse:
|
|
1986
|
+
"""Execute command in session
|
|
1987
|
+
|
|
1988
|
+
Execute a command within an existing shell session
|
|
1989
|
+
|
|
1990
|
+
:param session_id: Session ID (required)
|
|
1991
|
+
:type session_id: str
|
|
1992
|
+
:param request: Command execution request (required)
|
|
1993
|
+
:type request: SessionExecuteRequest
|
|
1994
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1995
|
+
number provided, it will be total request
|
|
1996
|
+
timeout. It can also be a pair (tuple) of
|
|
1997
|
+
(connection, read) timeouts.
|
|
1998
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1999
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2000
|
+
request; this effectively ignores the
|
|
2001
|
+
authentication in the spec for a single request.
|
|
2002
|
+
:type _request_auth: dict, optional
|
|
2003
|
+
:param _content_type: force content-type for the request.
|
|
2004
|
+
:type _content_type: str, Optional
|
|
2005
|
+
:param _headers: set to override the headers for a single
|
|
2006
|
+
request; this effectively ignores the headers
|
|
2007
|
+
in the spec for a single request.
|
|
2008
|
+
:type _headers: dict, optional
|
|
2009
|
+
:param _host_index: set to override the host_index for a single
|
|
2010
|
+
request; this effectively ignores the host_index
|
|
2011
|
+
in the spec for a single request.
|
|
2012
|
+
:type _host_index: int, optional
|
|
2013
|
+
:return: Returns the result object.
|
|
2014
|
+
""" # noqa: E501
|
|
2015
|
+
|
|
2016
|
+
_param = self._session_execute_command_serialize(
|
|
2017
|
+
session_id=session_id,
|
|
2018
|
+
request=request,
|
|
2019
|
+
_request_auth=_request_auth,
|
|
2020
|
+
_content_type=_content_type,
|
|
2021
|
+
_headers=_headers,
|
|
2022
|
+
_host_index=_host_index
|
|
2023
|
+
)
|
|
2024
|
+
|
|
2025
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2026
|
+
'200': "SessionExecuteResponse",
|
|
2027
|
+
'202': "SessionExecuteResponse",
|
|
2028
|
+
'400': "Dict[str, object]",
|
|
2029
|
+
'404': "Dict[str, object]",
|
|
2030
|
+
}
|
|
2031
|
+
response_data = self.api_client.call_api(
|
|
2032
|
+
*_param,
|
|
2033
|
+
_request_timeout=_request_timeout
|
|
2034
|
+
)
|
|
2035
|
+
response_data.read()
|
|
2036
|
+
return self.api_client.response_deserialize(
|
|
2037
|
+
response_data=response_data,
|
|
2038
|
+
response_types_map=_response_types_map,
|
|
2039
|
+
).data
|
|
2040
|
+
|
|
2041
|
+
|
|
2042
|
+
@validate_call
|
|
2043
|
+
def session_execute_command_with_http_info(
|
|
2044
|
+
self,
|
|
2045
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2046
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
2047
|
+
_request_timeout: Union[
|
|
2048
|
+
None,
|
|
2049
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2050
|
+
Tuple[
|
|
2051
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2052
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2053
|
+
]
|
|
2054
|
+
] = None,
|
|
2055
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2056
|
+
_content_type: Optional[StrictStr] = None,
|
|
2057
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2058
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2059
|
+
) -> ApiResponse[SessionExecuteResponse]:
|
|
2060
|
+
"""Execute command in session
|
|
2061
|
+
|
|
2062
|
+
Execute a command within an existing shell session
|
|
2063
|
+
|
|
2064
|
+
:param session_id: Session ID (required)
|
|
2065
|
+
:type session_id: str
|
|
2066
|
+
:param request: Command execution request (required)
|
|
2067
|
+
:type request: SessionExecuteRequest
|
|
2068
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2069
|
+
number provided, it will be total request
|
|
2070
|
+
timeout. It can also be a pair (tuple) of
|
|
2071
|
+
(connection, read) timeouts.
|
|
2072
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2073
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2074
|
+
request; this effectively ignores the
|
|
2075
|
+
authentication in the spec for a single request.
|
|
2076
|
+
:type _request_auth: dict, optional
|
|
2077
|
+
:param _content_type: force content-type for the request.
|
|
2078
|
+
:type _content_type: str, Optional
|
|
2079
|
+
:param _headers: set to override the headers for a single
|
|
2080
|
+
request; this effectively ignores the headers
|
|
2081
|
+
in the spec for a single request.
|
|
2082
|
+
:type _headers: dict, optional
|
|
2083
|
+
:param _host_index: set to override the host_index for a single
|
|
2084
|
+
request; this effectively ignores the host_index
|
|
2085
|
+
in the spec for a single request.
|
|
2086
|
+
:type _host_index: int, optional
|
|
2087
|
+
:return: Returns the result object.
|
|
2088
|
+
""" # noqa: E501
|
|
2089
|
+
|
|
2090
|
+
_param = self._session_execute_command_serialize(
|
|
2091
|
+
session_id=session_id,
|
|
2092
|
+
request=request,
|
|
2093
|
+
_request_auth=_request_auth,
|
|
2094
|
+
_content_type=_content_type,
|
|
2095
|
+
_headers=_headers,
|
|
2096
|
+
_host_index=_host_index
|
|
2097
|
+
)
|
|
2098
|
+
|
|
2099
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2100
|
+
'200': "SessionExecuteResponse",
|
|
2101
|
+
'202': "SessionExecuteResponse",
|
|
2102
|
+
'400': "Dict[str, object]",
|
|
2103
|
+
'404': "Dict[str, object]",
|
|
2104
|
+
}
|
|
2105
|
+
response_data = self.api_client.call_api(
|
|
2106
|
+
*_param,
|
|
2107
|
+
_request_timeout=_request_timeout
|
|
2108
|
+
)
|
|
2109
|
+
response_data.read()
|
|
2110
|
+
return self.api_client.response_deserialize(
|
|
2111
|
+
response_data=response_data,
|
|
2112
|
+
response_types_map=_response_types_map,
|
|
2113
|
+
)
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
@validate_call
|
|
2117
|
+
def session_execute_command_without_preload_content(
|
|
2118
|
+
self,
|
|
2119
|
+
session_id: Annotated[StrictStr, Field(description="Session ID")],
|
|
2120
|
+
request: Annotated[SessionExecuteRequest, Field(description="Command execution request")],
|
|
2121
|
+
_request_timeout: Union[
|
|
2122
|
+
None,
|
|
2123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2124
|
+
Tuple[
|
|
2125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2127
|
+
]
|
|
2128
|
+
] = None,
|
|
2129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2130
|
+
_content_type: Optional[StrictStr] = None,
|
|
2131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2133
|
+
) -> RESTResponseType:
|
|
2134
|
+
"""Execute command in session
|
|
2135
|
+
|
|
2136
|
+
Execute a command within an existing shell session
|
|
2137
|
+
|
|
2138
|
+
:param session_id: Session ID (required)
|
|
2139
|
+
:type session_id: str
|
|
2140
|
+
:param request: Command execution request (required)
|
|
2141
|
+
:type request: SessionExecuteRequest
|
|
2142
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2143
|
+
number provided, it will be total request
|
|
2144
|
+
timeout. It can also be a pair (tuple) of
|
|
2145
|
+
(connection, read) timeouts.
|
|
2146
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2147
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2148
|
+
request; this effectively ignores the
|
|
2149
|
+
authentication in the spec for a single request.
|
|
2150
|
+
:type _request_auth: dict, optional
|
|
2151
|
+
:param _content_type: force content-type for the request.
|
|
2152
|
+
:type _content_type: str, Optional
|
|
2153
|
+
:param _headers: set to override the headers for a single
|
|
2154
|
+
request; this effectively ignores the headers
|
|
2155
|
+
in the spec for a single request.
|
|
2156
|
+
:type _headers: dict, optional
|
|
2157
|
+
:param _host_index: set to override the host_index for a single
|
|
2158
|
+
request; this effectively ignores the host_index
|
|
2159
|
+
in the spec for a single request.
|
|
2160
|
+
:type _host_index: int, optional
|
|
2161
|
+
:return: Returns the result object.
|
|
2162
|
+
""" # noqa: E501
|
|
2163
|
+
|
|
2164
|
+
_param = self._session_execute_command_serialize(
|
|
2165
|
+
session_id=session_id,
|
|
2166
|
+
request=request,
|
|
2167
|
+
_request_auth=_request_auth,
|
|
2168
|
+
_content_type=_content_type,
|
|
2169
|
+
_headers=_headers,
|
|
2170
|
+
_host_index=_host_index
|
|
2171
|
+
)
|
|
2172
|
+
|
|
2173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2174
|
+
'200': "SessionExecuteResponse",
|
|
2175
|
+
'202': "SessionExecuteResponse",
|
|
2176
|
+
'400': "Dict[str, object]",
|
|
2177
|
+
'404': "Dict[str, object]",
|
|
2178
|
+
}
|
|
2179
|
+
response_data = self.api_client.call_api(
|
|
2180
|
+
*_param,
|
|
2181
|
+
_request_timeout=_request_timeout
|
|
2182
|
+
)
|
|
2183
|
+
return response_data.response
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
def _session_execute_command_serialize(
|
|
2187
|
+
self,
|
|
2188
|
+
session_id,
|
|
2189
|
+
request,
|
|
2190
|
+
_request_auth,
|
|
2191
|
+
_content_type,
|
|
2192
|
+
_headers,
|
|
2193
|
+
_host_index,
|
|
2194
|
+
) -> RequestSerialized:
|
|
2195
|
+
|
|
2196
|
+
_host = None
|
|
2197
|
+
|
|
2198
|
+
_collection_formats: Dict[str, str] = {
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
_path_params: Dict[str, str] = {}
|
|
2202
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2203
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2204
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2205
|
+
_files: Dict[
|
|
2206
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2207
|
+
] = {}
|
|
2208
|
+
_body_params: Optional[bytes] = None
|
|
2209
|
+
|
|
2210
|
+
# process the path parameters
|
|
2211
|
+
if session_id is not None:
|
|
2212
|
+
_path_params['sessionId'] = session_id
|
|
2213
|
+
# process the query parameters
|
|
2214
|
+
# process the header parameters
|
|
2215
|
+
# process the form parameters
|
|
2216
|
+
# process the body parameter
|
|
2217
|
+
if request is not None:
|
|
2218
|
+
_body_params = request
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
# set the HTTP header `Accept`
|
|
2222
|
+
if 'Accept' not in _header_params:
|
|
2223
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2224
|
+
[
|
|
2225
|
+
'application/json'
|
|
2226
|
+
]
|
|
2227
|
+
)
|
|
2228
|
+
|
|
2229
|
+
# set the HTTP header `Content-Type`
|
|
2230
|
+
if _content_type:
|
|
2231
|
+
_header_params['Content-Type'] = _content_type
|
|
2232
|
+
else:
|
|
2233
|
+
_default_content_type = (
|
|
2234
|
+
self.api_client.select_header_content_type(
|
|
2235
|
+
[
|
|
2236
|
+
'application/json'
|
|
2237
|
+
]
|
|
2238
|
+
)
|
|
2239
|
+
)
|
|
2240
|
+
if _default_content_type is not None:
|
|
2241
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2242
|
+
|
|
2243
|
+
# authentication setting
|
|
2244
|
+
_auth_settings: List[str] = [
|
|
2245
|
+
]
|
|
2246
|
+
|
|
2247
|
+
return self.api_client.param_serialize(
|
|
2248
|
+
method='POST',
|
|
2249
|
+
resource_path='/process/session/{sessionId}/exec',
|
|
2250
|
+
path_params=_path_params,
|
|
2251
|
+
query_params=_query_params,
|
|
2252
|
+
header_params=_header_params,
|
|
2253
|
+
body=_body_params,
|
|
2254
|
+
post_params=_form_params,
|
|
2255
|
+
files=_files,
|
|
2256
|
+
auth_settings=_auth_settings,
|
|
2257
|
+
collection_formats=_collection_formats,
|
|
2258
|
+
_host=_host,
|
|
2259
|
+
_request_auth=_request_auth
|
|
2260
|
+
)
|
|
2261
|
+
|
|
2262
|
+
|