polyaxon 2.0.6rc8__py3-none-any.whl → 2.1.0__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.
- polyaxon/_cli/config.py +1 -1
- polyaxon/_cli/run.py +8 -0
- polyaxon/_cli/services/clean_artifacts.py +1 -1
- polyaxon/_client/client.py +17 -0
- polyaxon/_client/run.py +12 -0
- polyaxon/_compiler/resolver/agent.py +1 -1
- polyaxon/_compiler/resolver/runtime.py +1 -1
- polyaxon/_deploy/schemas/service.py +4 -0
- polyaxon/_docker/executor.py +10 -4
- polyaxon/_env_vars/getters/run.py +3 -0
- polyaxon/_env_vars/keys.py +5 -0
- polyaxon/_flow/__init__.py +2 -0
- polyaxon/_flow/builds/__init__.py +19 -6
- polyaxon/_flow/component/base.py +1 -0
- polyaxon/_flow/component/component.py +14 -0
- polyaxon/_flow/environment/__init__.py +5 -5
- polyaxon/_flow/hooks/__init__.py +19 -6
- polyaxon/_flow/matrix/tuner.py +18 -6
- polyaxon/_flow/operations/operation.py +19 -0
- polyaxon/_flow/run/__init__.py +2 -2
- polyaxon/_flow/run/kubeflow/paddle_job.py +34 -2
- polyaxon/_flow/run/kubeflow/pytorch_job.py +50 -3
- polyaxon/_flow/run/kubeflow/scheduling_policy.py +4 -0
- polyaxon/_flow/run/kubeflow/tf_job.py +2 -1
- polyaxon/_fs/fs.py +5 -0
- polyaxon/_k8s/converter/converters/job.py +1 -1
- polyaxon/_k8s/converter/converters/kubeflow/paddle_job.py +1 -0
- polyaxon/_k8s/converter/converters/kubeflow/pytroch_job.py +2 -0
- polyaxon/_k8s/converter/converters/kubeflow/tf_job.py +1 -0
- polyaxon/_k8s/custom_resources/kubeflow/paddle_job.py +10 -1
- polyaxon/_k8s/custom_resources/kubeflow/pytorch_job.py +14 -1
- polyaxon/_k8s/custom_resources/kubeflow/tf_job.py +4 -0
- polyaxon/_k8s/executor/base.py +23 -6
- polyaxon/_k8s/logging/async_monitor.py +73 -12
- polyaxon/_k8s/manager/async_manager.py +81 -23
- polyaxon/_k8s/manager/base.py +4 -0
- polyaxon/_k8s/manager/manager.py +266 -133
- polyaxon/_operations/tuner.py +1 -0
- polyaxon/_polyaxonfile/check.py +2 -0
- polyaxon/_polyaxonfile/manager/operations.py +3 -0
- polyaxon/_polyaxonfile/manager/workflows.py +2 -0
- polyaxon/_polyaxonfile/specs/compiled_operation.py +1 -0
- polyaxon/_polyaxonfile/specs/operation.py +1 -0
- polyaxon/_polyaxonfile/specs/sections.py +3 -0
- polyaxon/_runner/agent/async_agent.py +94 -18
- polyaxon/_runner/agent/base_agent.py +25 -7
- polyaxon/_runner/agent/client.py +15 -1
- polyaxon/_runner/agent/sync_agent.py +83 -18
- polyaxon/_runner/executor.py +13 -7
- polyaxon/_schemas/agent.py +27 -1
- polyaxon/_schemas/client.py +30 -3
- polyaxon/_sdk/api/agents_v1_api.py +875 -51
- polyaxon/_sdk/api/service_accounts_v1_api.py +12 -12
- polyaxon/_sdk/schemas/__init__.py +3 -0
- polyaxon/_sdk/schemas/v1_agent_reconcile_body_request.py +14 -0
- polyaxon/_sidecar/container/__init__.py +1 -1
- polyaxon/_sidecar/container/monitors/spec.py +1 -1
- polyaxon/pkg.py +1 -1
- {polyaxon-2.0.6rc8.dist-info → polyaxon-2.1.0.dist-info}/METADATA +6 -6
- {polyaxon-2.0.6rc8.dist-info → polyaxon-2.1.0.dist-info}/RECORD +64 -63
- {polyaxon-2.0.6rc8.dist-info → polyaxon-2.1.0.dist-info}/LICENSE +0 -0
- {polyaxon-2.0.6rc8.dist-info → polyaxon-2.1.0.dist-info}/WHEEL +0 -0
- {polyaxon-2.0.6rc8.dist-info → polyaxon-2.1.0.dist-info}/entry_points.txt +0 -0
- {polyaxon-2.0.6rc8.dist-info → polyaxon-2.1.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Optional
|
1
|
+
from typing import Dict, Optional
|
2
2
|
from typing_extensions import Annotated
|
3
3
|
|
4
4
|
from clipped.compact.pydantic import Field, StrictInt, StrictStr, validate_arguments
|
@@ -6,14 +6,189 @@ from clipped.compact.pydantic import Field, StrictInt, StrictStr, validate_argum
|
|
6
6
|
from polyaxon._schemas.lifecycle import V1Status
|
7
7
|
from polyaxon._sdk.base_api import BaseApi
|
8
8
|
from polyaxon._sdk.schemas.v1_agent import V1Agent
|
9
|
+
from polyaxon._sdk.schemas.v1_agent_reconcile_body_request import (
|
10
|
+
V1AgentReconcileBodyRequest,
|
11
|
+
)
|
9
12
|
from polyaxon._sdk.schemas.v1_agent_state_response import V1AgentStateResponse
|
10
13
|
from polyaxon._sdk.schemas.v1_agent_status_body_request import V1AgentStatusBodyRequest
|
11
14
|
from polyaxon._sdk.schemas.v1_list_agents_response import V1ListAgentsResponse
|
12
15
|
from polyaxon._sdk.schemas.v1_token import V1Token
|
13
16
|
from polyaxon.exceptions import ApiTypeError
|
17
|
+
from traceml.logging import V1Logs
|
14
18
|
|
15
19
|
|
16
20
|
class AgentsV1Api(BaseApi):
|
21
|
+
@validate_arguments
|
22
|
+
def collect_agent_data(
|
23
|
+
self,
|
24
|
+
namespace: Annotated[StrictStr, Field(..., description="namespace")],
|
25
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
26
|
+
uuid: Annotated[
|
27
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
28
|
+
],
|
29
|
+
**kwargs
|
30
|
+
) -> object: # noqa: E501
|
31
|
+
"""collect agent # noqa: E501
|
32
|
+
|
33
|
+
This method makes a synchronous HTTP request by default. To make an
|
34
|
+
asynchronous HTTP request, please pass async_req=True
|
35
|
+
|
36
|
+
>>> thread = api.collect_agent_data(namespace, owner, uuid, async_req=True)
|
37
|
+
>>> result = thread.get()
|
38
|
+
|
39
|
+
:param namespace: namespace (required)
|
40
|
+
:type namespace: str
|
41
|
+
:param owner: Owner of the namespace (required)
|
42
|
+
:type owner: str
|
43
|
+
:param uuid: Uuid identifier of the entity (required)
|
44
|
+
:type uuid: str
|
45
|
+
:param async_req: Whether to execute the request asynchronously.
|
46
|
+
:type async_req: bool, optional
|
47
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
48
|
+
be returned without reading/decoding response
|
49
|
+
data. Default is True.
|
50
|
+
:type _preload_content: bool, optional
|
51
|
+
:param _request_timeout: timeout setting for this request. If one
|
52
|
+
number provided, it will be total request
|
53
|
+
timeout. It can also be a pair (tuple) of
|
54
|
+
(connection, read) timeouts.
|
55
|
+
:return: Returns the result object.
|
56
|
+
If the method is called asynchronously,
|
57
|
+
returns the request thread.
|
58
|
+
:rtype: object
|
59
|
+
"""
|
60
|
+
kwargs["_return_http_data_only"] = True
|
61
|
+
return self.collect_agent_data_with_http_info(
|
62
|
+
namespace, owner, uuid, **kwargs
|
63
|
+
) # noqa: E501
|
64
|
+
|
65
|
+
@validate_arguments
|
66
|
+
def collect_agent_data_with_http_info(
|
67
|
+
self,
|
68
|
+
namespace: Annotated[StrictStr, Field(..., description="namespace")],
|
69
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
70
|
+
uuid: Annotated[
|
71
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
72
|
+
],
|
73
|
+
**kwargs
|
74
|
+
): # noqa: E501
|
75
|
+
"""collect agent # noqa: E501
|
76
|
+
|
77
|
+
This method makes a synchronous HTTP request by default. To make an
|
78
|
+
asynchronous HTTP request, please pass async_req=True
|
79
|
+
|
80
|
+
>>> thread = api.collect_agent_data_with_http_info(namespace, owner, uuid, async_req=True)
|
81
|
+
>>> result = thread.get()
|
82
|
+
|
83
|
+
:param namespace: namespace (required)
|
84
|
+
:type namespace: str
|
85
|
+
:param owner: Owner of the namespace (required)
|
86
|
+
:type owner: str
|
87
|
+
:param uuid: Uuid identifier of the entity (required)
|
88
|
+
:type uuid: str
|
89
|
+
:param async_req: Whether to execute the request asynchronously.
|
90
|
+
:type async_req: bool, optional
|
91
|
+
:param _return_http_data_only: response data without head status code
|
92
|
+
and headers
|
93
|
+
:type _return_http_data_only: bool, optional
|
94
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
95
|
+
be returned without reading/decoding response
|
96
|
+
data. Default is True.
|
97
|
+
:type _preload_content: bool, optional
|
98
|
+
:param _request_timeout: timeout setting for this request. If one
|
99
|
+
number provided, it will be total request
|
100
|
+
timeout. It can also be a pair (tuple) of
|
101
|
+
(connection, read) timeouts.
|
102
|
+
:param _request_auth: set to override the auth_settings for an a single
|
103
|
+
request; this effectively ignores the authentication
|
104
|
+
in the spec for a single request.
|
105
|
+
:type _request_auth: dict, optional
|
106
|
+
:type _content_type: string, optional: force content-type for the request
|
107
|
+
:return: Returns the result object.
|
108
|
+
If the method is called asynchronously,
|
109
|
+
returns the request thread.
|
110
|
+
:rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
|
111
|
+
"""
|
112
|
+
|
113
|
+
_params = locals()
|
114
|
+
|
115
|
+
_all_params = ["namespace", "owner", "uuid"]
|
116
|
+
_all_params.extend(
|
117
|
+
[
|
118
|
+
"async_req",
|
119
|
+
"_return_http_data_only",
|
120
|
+
"_preload_content",
|
121
|
+
"_request_timeout",
|
122
|
+
"_request_auth",
|
123
|
+
"_content_type",
|
124
|
+
"_headers",
|
125
|
+
]
|
126
|
+
)
|
127
|
+
|
128
|
+
# validate the arguments
|
129
|
+
for _key, _val in _params["kwargs"].items():
|
130
|
+
if _key not in _all_params:
|
131
|
+
raise ApiTypeError(
|
132
|
+
"Got an unexpected keyword argument '%s'"
|
133
|
+
" to method collect_agent_data" % _key
|
134
|
+
)
|
135
|
+
_params[_key] = _val
|
136
|
+
del _params["kwargs"]
|
137
|
+
|
138
|
+
_collection_formats = {}
|
139
|
+
|
140
|
+
# process the path parameters
|
141
|
+
_path_params = {}
|
142
|
+
if _params["namespace"]:
|
143
|
+
_path_params["namespace"] = _params["namespace"]
|
144
|
+
if _params["owner"]:
|
145
|
+
_path_params["owner"] = _params["owner"]
|
146
|
+
if _params["uuid"]:
|
147
|
+
_path_params["uuid"] = _params["uuid"]
|
148
|
+
|
149
|
+
# process the query parameters
|
150
|
+
_query_params = []
|
151
|
+
# process the header parameters
|
152
|
+
_header_params = dict(_params.get("_headers", {}))
|
153
|
+
# process the form parameters
|
154
|
+
_form_params = []
|
155
|
+
_files = {}
|
156
|
+
# process the body parameter
|
157
|
+
_body_params = None
|
158
|
+
# set the HTTP header `Accept`
|
159
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
160
|
+
["application/json"]
|
161
|
+
) # noqa: E501
|
162
|
+
|
163
|
+
# authentication setting
|
164
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
165
|
+
|
166
|
+
_response_types_map = {
|
167
|
+
"200": "object",
|
168
|
+
"204": "object",
|
169
|
+
"403": "object",
|
170
|
+
"404": "object",
|
171
|
+
}
|
172
|
+
|
173
|
+
return self.api_client.call_api(
|
174
|
+
"/internal/v1/{namespace}/{owner}/agents/{uuid}/collect",
|
175
|
+
"POST",
|
176
|
+
_path_params,
|
177
|
+
_query_params,
|
178
|
+
_header_params,
|
179
|
+
body=_body_params,
|
180
|
+
post_params=_form_params,
|
181
|
+
files=_files,
|
182
|
+
response_types_map=_response_types_map,
|
183
|
+
auth_settings=_auth_settings,
|
184
|
+
async_req=_params.get("async_req"),
|
185
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
186
|
+
_preload_content=_params.get("_preload_content", True),
|
187
|
+
_request_timeout=_params.get("_request_timeout"),
|
188
|
+
collection_formats=_collection_formats,
|
189
|
+
_request_auth=_params.get("_request_auth"),
|
190
|
+
)
|
191
|
+
|
17
192
|
@validate_arguments
|
18
193
|
def create_agent(
|
19
194
|
self,
|
@@ -904,6 +1079,230 @@ class AgentsV1Api(BaseApi):
|
|
904
1079
|
_request_auth=_params.get("_request_auth"),
|
905
1080
|
)
|
906
1081
|
|
1082
|
+
@validate_arguments
|
1083
|
+
def get_agent_logs(
|
1084
|
+
self,
|
1085
|
+
namespace: Annotated[StrictStr, Field(..., description="namespace")],
|
1086
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1087
|
+
uuid: Annotated[
|
1088
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
1089
|
+
],
|
1090
|
+
service: Annotated[Optional[StrictStr], Field(description="Service.")] = None,
|
1091
|
+
last_file: Annotated[
|
1092
|
+
Optional[StrictStr], Field(description="last_file.")
|
1093
|
+
] = None,
|
1094
|
+
force: Annotated[
|
1095
|
+
Optional[bool], Field(description="Force query param.")
|
1096
|
+
] = None,
|
1097
|
+
connection: Annotated[
|
1098
|
+
Optional[StrictStr], Field(description="Connection to use.")
|
1099
|
+
] = None,
|
1100
|
+
**kwargs
|
1101
|
+
) -> V1Logs: # noqa: E501
|
1102
|
+
"""Get run logs # noqa: E501
|
1103
|
+
|
1104
|
+
This method makes a synchronous HTTP request by default. To make an
|
1105
|
+
asynchronous HTTP request, please pass async_req=True
|
1106
|
+
|
1107
|
+
>>> thread = api.get_agent_logs(namespace, owner, uuid, service, last_file, force, connection, async_req=True)
|
1108
|
+
>>> result = thread.get()
|
1109
|
+
|
1110
|
+
:param namespace: namespace (required)
|
1111
|
+
:type namespace: str
|
1112
|
+
:param owner: Owner of the namespace (required)
|
1113
|
+
:type owner: str
|
1114
|
+
:param uuid: Uuid identifier of the entity (required)
|
1115
|
+
:type uuid: str
|
1116
|
+
:param service: Service.
|
1117
|
+
:type service: str
|
1118
|
+
:param last_file: last_file.
|
1119
|
+
:type last_file: str
|
1120
|
+
:param force: Force query param.
|
1121
|
+
:type force: bool
|
1122
|
+
:param connection: Connection to use.
|
1123
|
+
:type connection: str
|
1124
|
+
:param async_req: Whether to execute the request asynchronously.
|
1125
|
+
:type async_req: bool, optional
|
1126
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
1127
|
+
be returned without reading/decoding response
|
1128
|
+
data. Default is True.
|
1129
|
+
:type _preload_content: bool, optional
|
1130
|
+
:param _request_timeout: timeout setting for this request. If one
|
1131
|
+
number provided, it will be total request
|
1132
|
+
timeout. It can also be a pair (tuple) of
|
1133
|
+
(connection, read) timeouts.
|
1134
|
+
:return: Returns the result object.
|
1135
|
+
If the method is called asynchronously,
|
1136
|
+
returns the request thread.
|
1137
|
+
:rtype: V1Logs
|
1138
|
+
"""
|
1139
|
+
kwargs["_return_http_data_only"] = True
|
1140
|
+
return self.get_agent_logs_with_http_info(
|
1141
|
+
namespace, owner, uuid, service, last_file, force, connection, **kwargs
|
1142
|
+
) # noqa: E501
|
1143
|
+
|
1144
|
+
@validate_arguments
|
1145
|
+
def get_agent_logs_with_http_info(
|
1146
|
+
self,
|
1147
|
+
namespace: Annotated[StrictStr, Field(..., description="namespace")],
|
1148
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1149
|
+
uuid: Annotated[
|
1150
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
1151
|
+
],
|
1152
|
+
service: Annotated[Optional[StrictStr], Field(description="Service.")] = None,
|
1153
|
+
last_file: Annotated[
|
1154
|
+
Optional[StrictStr], Field(description="last_file.")
|
1155
|
+
] = None,
|
1156
|
+
force: Annotated[
|
1157
|
+
Optional[bool], Field(description="Force query param.")
|
1158
|
+
] = None,
|
1159
|
+
connection: Annotated[
|
1160
|
+
Optional[StrictStr], Field(description="Connection to use.")
|
1161
|
+
] = None,
|
1162
|
+
**kwargs
|
1163
|
+
): # noqa: E501
|
1164
|
+
"""Get run logs # noqa: E501
|
1165
|
+
|
1166
|
+
This method makes a synchronous HTTP request by default. To make an
|
1167
|
+
asynchronous HTTP request, please pass async_req=True
|
1168
|
+
|
1169
|
+
>>> thread = api.get_agent_logs_with_http_info(namespace, owner, uuid, service, last_file, force, connection, async_req=True)
|
1170
|
+
>>> result = thread.get()
|
1171
|
+
|
1172
|
+
:param namespace: namespace (required)
|
1173
|
+
:type namespace: str
|
1174
|
+
:param owner: Owner of the namespace (required)
|
1175
|
+
:type owner: str
|
1176
|
+
:param uuid: Uuid identifier of the entity (required)
|
1177
|
+
:type uuid: str
|
1178
|
+
:param service: Service.
|
1179
|
+
:type service: str
|
1180
|
+
:param last_file: last_file.
|
1181
|
+
:type last_file: str
|
1182
|
+
:param force: Force query param.
|
1183
|
+
:type force: bool
|
1184
|
+
:param connection: Connection to use.
|
1185
|
+
:type connection: str
|
1186
|
+
:param async_req: Whether to execute the request asynchronously.
|
1187
|
+
:type async_req: bool, optional
|
1188
|
+
:param _return_http_data_only: response data without head status code
|
1189
|
+
and headers
|
1190
|
+
:type _return_http_data_only: bool, optional
|
1191
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
1192
|
+
be returned without reading/decoding response
|
1193
|
+
data. Default is True.
|
1194
|
+
:type _preload_content: bool, optional
|
1195
|
+
:param _request_timeout: timeout setting for this request. If one
|
1196
|
+
number provided, it will be total request
|
1197
|
+
timeout. It can also be a pair (tuple) of
|
1198
|
+
(connection, read) timeouts.
|
1199
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1200
|
+
request; this effectively ignores the authentication
|
1201
|
+
in the spec for a single request.
|
1202
|
+
:type _request_auth: dict, optional
|
1203
|
+
:type _content_type: string, optional: force content-type for the request
|
1204
|
+
:return: Returns the result object.
|
1205
|
+
If the method is called asynchronously,
|
1206
|
+
returns the request thread.
|
1207
|
+
:rtype: tuple(V1Logs, status_code(int), headers(HTTPHeaderDict))
|
1208
|
+
"""
|
1209
|
+
|
1210
|
+
_params = locals()
|
1211
|
+
|
1212
|
+
_all_params = [
|
1213
|
+
"namespace",
|
1214
|
+
"owner",
|
1215
|
+
"uuid",
|
1216
|
+
"service",
|
1217
|
+
"last_file",
|
1218
|
+
"force",
|
1219
|
+
"connection",
|
1220
|
+
]
|
1221
|
+
_all_params.extend(
|
1222
|
+
[
|
1223
|
+
"async_req",
|
1224
|
+
"_return_http_data_only",
|
1225
|
+
"_preload_content",
|
1226
|
+
"_request_timeout",
|
1227
|
+
"_request_auth",
|
1228
|
+
"_content_type",
|
1229
|
+
"_headers",
|
1230
|
+
]
|
1231
|
+
)
|
1232
|
+
|
1233
|
+
# validate the arguments
|
1234
|
+
for _key, _val in _params["kwargs"].items():
|
1235
|
+
if _key not in _all_params:
|
1236
|
+
raise ApiTypeError(
|
1237
|
+
"Got an unexpected keyword argument '%s'"
|
1238
|
+
" to method get_agent_logs" % _key
|
1239
|
+
)
|
1240
|
+
_params[_key] = _val
|
1241
|
+
del _params["kwargs"]
|
1242
|
+
|
1243
|
+
_collection_formats = {}
|
1244
|
+
|
1245
|
+
# process the path parameters
|
1246
|
+
_path_params = {}
|
1247
|
+
if _params["namespace"]:
|
1248
|
+
_path_params["namespace"] = _params["namespace"]
|
1249
|
+
if _params["owner"]:
|
1250
|
+
_path_params["owner"] = _params["owner"]
|
1251
|
+
if _params["uuid"]:
|
1252
|
+
_path_params["uuid"] = _params["uuid"]
|
1253
|
+
|
1254
|
+
# process the query parameters
|
1255
|
+
_query_params = []
|
1256
|
+
if _params.get("service") is not None: # noqa: E501
|
1257
|
+
_query_params.append(("service", _params["service"]))
|
1258
|
+
if _params.get("last_file") is not None: # noqa: E501
|
1259
|
+
_query_params.append(("last_file", _params["last_file"]))
|
1260
|
+
if _params.get("force") is not None: # noqa: E501
|
1261
|
+
_query_params.append(("force", _params["force"]))
|
1262
|
+
if _params.get("connection") is not None: # noqa: E501
|
1263
|
+
_query_params.append(("connection", _params["connection"]))
|
1264
|
+
|
1265
|
+
# process the header parameters
|
1266
|
+
_header_params = dict(_params.get("_headers", {}))
|
1267
|
+
# process the form parameters
|
1268
|
+
_form_params = []
|
1269
|
+
_files = {}
|
1270
|
+
# process the body parameter
|
1271
|
+
_body_params = None
|
1272
|
+
# set the HTTP header `Accept`
|
1273
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1274
|
+
["application/json"]
|
1275
|
+
) # noqa: E501
|
1276
|
+
|
1277
|
+
# authentication setting
|
1278
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
1279
|
+
|
1280
|
+
_response_types_map = {
|
1281
|
+
"200": "V1Logs",
|
1282
|
+
"204": "object",
|
1283
|
+
"403": "object",
|
1284
|
+
"404": "object",
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
return self.api_client.call_api(
|
1288
|
+
"/streams/v1/{namespace}/{owner}/agents/{uuid}/logs",
|
1289
|
+
"GET",
|
1290
|
+
_path_params,
|
1291
|
+
_query_params,
|
1292
|
+
_header_params,
|
1293
|
+
body=_body_params,
|
1294
|
+
post_params=_form_params,
|
1295
|
+
files=_files,
|
1296
|
+
response_types_map=_response_types_map,
|
1297
|
+
auth_settings=_auth_settings,
|
1298
|
+
async_req=_params.get("async_req"),
|
1299
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
1300
|
+
_preload_content=_params.get("_preload_content", True),
|
1301
|
+
_request_timeout=_params.get("_request_timeout"),
|
1302
|
+
collection_formats=_collection_formats,
|
1303
|
+
_request_auth=_params.get("_request_auth"),
|
1304
|
+
)
|
1305
|
+
|
907
1306
|
@validate_arguments
|
908
1307
|
def get_agent_state(
|
909
1308
|
self,
|
@@ -1106,29 +1505,184 @@ class AgentsV1Api(BaseApi):
|
|
1106
1505
|
:rtype: V1Token
|
1107
1506
|
"""
|
1108
1507
|
kwargs["_return_http_data_only"] = True
|
1109
|
-
return self.get_agent_token_with_http_info(owner, uuid, **kwargs) # noqa: E501
|
1508
|
+
return self.get_agent_token_with_http_info(owner, uuid, **kwargs) # noqa: E501
|
1509
|
+
|
1510
|
+
@validate_arguments
|
1511
|
+
def get_agent_token_with_http_info(
|
1512
|
+
self,
|
1513
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1514
|
+
uuid: Annotated[
|
1515
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
1516
|
+
],
|
1517
|
+
**kwargs
|
1518
|
+
): # noqa: E501
|
1519
|
+
"""Get agent token # noqa: E501
|
1520
|
+
|
1521
|
+
This method makes a synchronous HTTP request by default. To make an
|
1522
|
+
asynchronous HTTP request, please pass async_req=True
|
1523
|
+
|
1524
|
+
>>> thread = api.get_agent_token_with_http_info(owner, uuid, async_req=True)
|
1525
|
+
>>> result = thread.get()
|
1526
|
+
|
1527
|
+
:param owner: Owner of the namespace (required)
|
1528
|
+
:type owner: str
|
1529
|
+
:param uuid: Uuid identifier of the entity (required)
|
1530
|
+
:type uuid: str
|
1531
|
+
:param async_req: Whether to execute the request asynchronously.
|
1532
|
+
:type async_req: bool, optional
|
1533
|
+
:param _return_http_data_only: response data without head status code
|
1534
|
+
and headers
|
1535
|
+
:type _return_http_data_only: bool, optional
|
1536
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
1537
|
+
be returned without reading/decoding response
|
1538
|
+
data. Default is True.
|
1539
|
+
:type _preload_content: bool, optional
|
1540
|
+
:param _request_timeout: timeout setting for this request. If one
|
1541
|
+
number provided, it will be total request
|
1542
|
+
timeout. It can also be a pair (tuple) of
|
1543
|
+
(connection, read) timeouts.
|
1544
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1545
|
+
request; this effectively ignores the authentication
|
1546
|
+
in the spec for a single request.
|
1547
|
+
:type _request_auth: dict, optional
|
1548
|
+
:type _content_type: string, optional: force content-type for the request
|
1549
|
+
:return: Returns the result object.
|
1550
|
+
If the method is called asynchronously,
|
1551
|
+
returns the request thread.
|
1552
|
+
:rtype: tuple(V1Token, status_code(int), headers(HTTPHeaderDict))
|
1553
|
+
"""
|
1554
|
+
|
1555
|
+
_params = locals()
|
1556
|
+
|
1557
|
+
_all_params = ["owner", "uuid"]
|
1558
|
+
_all_params.extend(
|
1559
|
+
[
|
1560
|
+
"async_req",
|
1561
|
+
"_return_http_data_only",
|
1562
|
+
"_preload_content",
|
1563
|
+
"_request_timeout",
|
1564
|
+
"_request_auth",
|
1565
|
+
"_content_type",
|
1566
|
+
"_headers",
|
1567
|
+
]
|
1568
|
+
)
|
1569
|
+
|
1570
|
+
# validate the arguments
|
1571
|
+
for _key, _val in _params["kwargs"].items():
|
1572
|
+
if _key not in _all_params:
|
1573
|
+
raise ApiTypeError(
|
1574
|
+
"Got an unexpected keyword argument '%s'"
|
1575
|
+
" to method get_agent_token" % _key
|
1576
|
+
)
|
1577
|
+
_params[_key] = _val
|
1578
|
+
del _params["kwargs"]
|
1579
|
+
|
1580
|
+
_collection_formats = {}
|
1581
|
+
|
1582
|
+
# process the path parameters
|
1583
|
+
_path_params = {}
|
1584
|
+
if _params["owner"]:
|
1585
|
+
_path_params["owner"] = _params["owner"]
|
1586
|
+
if _params["uuid"]:
|
1587
|
+
_path_params["uuid"] = _params["uuid"]
|
1588
|
+
|
1589
|
+
# process the query parameters
|
1590
|
+
_query_params = []
|
1591
|
+
|
1592
|
+
# process the header parameters
|
1593
|
+
_header_params = dict(_params.get("_headers", {}))
|
1594
|
+
|
1595
|
+
# process the form parameters
|
1596
|
+
_form_params = []
|
1597
|
+
_files = {}
|
1598
|
+
|
1599
|
+
# process the body parameter
|
1600
|
+
_body_params = None
|
1601
|
+
|
1602
|
+
# set the HTTP header `Accept`
|
1603
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1604
|
+
["application/json"]
|
1605
|
+
) # noqa: E501
|
1606
|
+
|
1607
|
+
# authentication setting
|
1608
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
1609
|
+
|
1610
|
+
_response_types_map = {
|
1611
|
+
"200": "V1Token",
|
1612
|
+
"204": "object",
|
1613
|
+
"403": "object",
|
1614
|
+
"404": "object",
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
return self.api_client.call_api(
|
1618
|
+
"/api/v1/orgs/{owner}/agents/{uuid}/token",
|
1619
|
+
"GET",
|
1620
|
+
_path_params,
|
1621
|
+
_query_params,
|
1622
|
+
_header_params,
|
1623
|
+
body=_body_params,
|
1624
|
+
post_params=_form_params,
|
1625
|
+
files=_files,
|
1626
|
+
response_types_map=_response_types_map,
|
1627
|
+
auth_settings=_auth_settings,
|
1628
|
+
async_req=_params.get("async_req"),
|
1629
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
1630
|
+
_preload_content=_params.get("_preload_content", True),
|
1631
|
+
_request_timeout=_params.get("_request_timeout"),
|
1632
|
+
collection_formats=_collection_formats,
|
1633
|
+
_request_auth=_params.get("_request_auth"),
|
1634
|
+
)
|
1635
|
+
|
1636
|
+
@validate_arguments
|
1637
|
+
def get_global_state(
|
1638
|
+
self,
|
1639
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1640
|
+
**kwargs
|
1641
|
+
) -> V1AgentStateResponse: # noqa: E501
|
1642
|
+
"""Get Global State (queues/runs) # noqa: E501
|
1643
|
+
|
1644
|
+
This method makes a synchronous HTTP request by default. To make an
|
1645
|
+
asynchronous HTTP request, please pass async_req=True
|
1646
|
+
|
1647
|
+
>>> thread = api.get_global_state(owner, async_req=True)
|
1648
|
+
>>> result = thread.get()
|
1649
|
+
|
1650
|
+
:param owner: Owner of the namespace (required)
|
1651
|
+
:type owner: str
|
1652
|
+
:param async_req: Whether to execute the request asynchronously.
|
1653
|
+
:type async_req: bool, optional
|
1654
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
1655
|
+
be returned without reading/decoding response
|
1656
|
+
data. Default is True.
|
1657
|
+
:type _preload_content: bool, optional
|
1658
|
+
:param _request_timeout: timeout setting for this request. If one
|
1659
|
+
number provided, it will be total request
|
1660
|
+
timeout. It can also be a pair (tuple) of
|
1661
|
+
(connection, read) timeouts.
|
1662
|
+
:return: Returns the result object.
|
1663
|
+
If the method is called asynchronously,
|
1664
|
+
returns the request thread.
|
1665
|
+
:rtype: V1AgentStateResponse
|
1666
|
+
"""
|
1667
|
+
kwargs["_return_http_data_only"] = True
|
1668
|
+
return self.get_global_state_with_http_info(owner, **kwargs) # noqa: E501
|
1110
1669
|
|
1111
1670
|
@validate_arguments
|
1112
|
-
def
|
1671
|
+
def get_global_state_with_http_info(
|
1113
1672
|
self,
|
1114
1673
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1115
|
-
uuid: Annotated[
|
1116
|
-
StrictStr, Field(..., description="Uuid identifier of the entity")
|
1117
|
-
],
|
1118
1674
|
**kwargs
|
1119
1675
|
): # noqa: E501
|
1120
|
-
"""Get
|
1676
|
+
"""Get Global State (queues/runs) # noqa: E501
|
1121
1677
|
|
1122
1678
|
This method makes a synchronous HTTP request by default. To make an
|
1123
1679
|
asynchronous HTTP request, please pass async_req=True
|
1124
1680
|
|
1125
|
-
>>> thread = api.
|
1681
|
+
>>> thread = api.get_global_state_with_http_info(owner, async_req=True)
|
1126
1682
|
>>> result = thread.get()
|
1127
1683
|
|
1128
1684
|
:param owner: Owner of the namespace (required)
|
1129
1685
|
:type owner: str
|
1130
|
-
:param uuid: Uuid identifier of the entity (required)
|
1131
|
-
:type uuid: str
|
1132
1686
|
:param async_req: Whether to execute the request asynchronously.
|
1133
1687
|
:type async_req: bool, optional
|
1134
1688
|
:param _return_http_data_only: response data without head status code
|
@@ -1150,12 +1704,12 @@ class AgentsV1Api(BaseApi):
|
|
1150
1704
|
:return: Returns the result object.
|
1151
1705
|
If the method is called asynchronously,
|
1152
1706
|
returns the request thread.
|
1153
|
-
:rtype: tuple(
|
1707
|
+
:rtype: tuple(V1AgentStateResponse, status_code(int), headers(HTTPHeaderDict))
|
1154
1708
|
"""
|
1155
1709
|
|
1156
1710
|
_params = locals()
|
1157
1711
|
|
1158
|
-
_all_params = ["owner"
|
1712
|
+
_all_params = ["owner"]
|
1159
1713
|
_all_params.extend(
|
1160
1714
|
[
|
1161
1715
|
"async_req",
|
@@ -1173,7 +1727,7 @@ class AgentsV1Api(BaseApi):
|
|
1173
1727
|
if _key not in _all_params:
|
1174
1728
|
raise ApiTypeError(
|
1175
1729
|
"Got an unexpected keyword argument '%s'"
|
1176
|
-
" to method
|
1730
|
+
" to method get_global_state" % _key
|
1177
1731
|
)
|
1178
1732
|
_params[_key] = _val
|
1179
1733
|
del _params["kwargs"]
|
@@ -1184,22 +1738,16 @@ class AgentsV1Api(BaseApi):
|
|
1184
1738
|
_path_params = {}
|
1185
1739
|
if _params["owner"]:
|
1186
1740
|
_path_params["owner"] = _params["owner"]
|
1187
|
-
if _params["uuid"]:
|
1188
|
-
_path_params["uuid"] = _params["uuid"]
|
1189
1741
|
|
1190
1742
|
# process the query parameters
|
1191
1743
|
_query_params = []
|
1192
|
-
|
1193
1744
|
# process the header parameters
|
1194
1745
|
_header_params = dict(_params.get("_headers", {}))
|
1195
|
-
|
1196
1746
|
# process the form parameters
|
1197
1747
|
_form_params = []
|
1198
1748
|
_files = {}
|
1199
|
-
|
1200
1749
|
# process the body parameter
|
1201
1750
|
_body_params = None
|
1202
|
-
|
1203
1751
|
# set the HTTP header `Accept`
|
1204
1752
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
1205
1753
|
["application/json"]
|
@@ -1209,14 +1757,14 @@ class AgentsV1Api(BaseApi):
|
|
1209
1757
|
_auth_settings = ["ApiKey"] # noqa: E501
|
1210
1758
|
|
1211
1759
|
_response_types_map = {
|
1212
|
-
"200": "
|
1760
|
+
"200": "V1AgentStateResponse",
|
1213
1761
|
"204": "object",
|
1214
1762
|
"403": "object",
|
1215
1763
|
"404": "object",
|
1216
1764
|
}
|
1217
1765
|
|
1218
1766
|
return self.api_client.call_api(
|
1219
|
-
"/api/v1/orgs/{owner}/agents/
|
1767
|
+
"/api/v1/orgs/{owner}/agents/state",
|
1220
1768
|
"GET",
|
1221
1769
|
_path_params,
|
1222
1770
|
_query_params,
|
@@ -1235,21 +1783,47 @@ class AgentsV1Api(BaseApi):
|
|
1235
1783
|
)
|
1236
1784
|
|
1237
1785
|
@validate_arguments
|
1238
|
-
def
|
1786
|
+
def inspect_agent(
|
1239
1787
|
self,
|
1788
|
+
namespace: Annotated[StrictStr, Field(..., description="namespace")],
|
1240
1789
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1790
|
+
uuid: Annotated[
|
1791
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
1792
|
+
],
|
1793
|
+
service: Annotated[Optional[StrictStr], Field(description="Service.")] = None,
|
1794
|
+
last_file: Annotated[
|
1795
|
+
Optional[StrictStr], Field(description="last_file.")
|
1796
|
+
] = None,
|
1797
|
+
force: Annotated[
|
1798
|
+
Optional[bool], Field(description="Force query param.")
|
1799
|
+
] = None,
|
1800
|
+
connection: Annotated[
|
1801
|
+
Optional[StrictStr], Field(description="Connection to use.")
|
1802
|
+
] = None,
|
1241
1803
|
**kwargs
|
1242
|
-
) ->
|
1243
|
-
"""
|
1804
|
+
) -> object: # noqa: E501
|
1805
|
+
"""Inspect an agent's service full conditions # noqa: E501
|
1244
1806
|
|
1245
1807
|
This method makes a synchronous HTTP request by default. To make an
|
1246
1808
|
asynchronous HTTP request, please pass async_req=True
|
1247
1809
|
|
1248
|
-
>>> thread = api.
|
1810
|
+
>>> thread = api.inspect_agent(namespace, owner, uuid, service, last_file, force, connection, async_req=True)
|
1249
1811
|
>>> result = thread.get()
|
1250
1812
|
|
1813
|
+
:param namespace: namespace (required)
|
1814
|
+
:type namespace: str
|
1251
1815
|
:param owner: Owner of the namespace (required)
|
1252
1816
|
:type owner: str
|
1817
|
+
:param uuid: Uuid identifier of the entity (required)
|
1818
|
+
:type uuid: str
|
1819
|
+
:param service: Service.
|
1820
|
+
:type service: str
|
1821
|
+
:param last_file: last_file.
|
1822
|
+
:type last_file: str
|
1823
|
+
:param force: Force query param.
|
1824
|
+
:type force: bool
|
1825
|
+
:param connection: Connection to use.
|
1826
|
+
:type connection: str
|
1253
1827
|
:param async_req: Whether to execute the request asynchronously.
|
1254
1828
|
:type async_req: bool, optional
|
1255
1829
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
@@ -1263,27 +1837,55 @@ class AgentsV1Api(BaseApi):
|
|
1263
1837
|
:return: Returns the result object.
|
1264
1838
|
If the method is called asynchronously,
|
1265
1839
|
returns the request thread.
|
1266
|
-
:rtype:
|
1840
|
+
:rtype: object
|
1267
1841
|
"""
|
1268
1842
|
kwargs["_return_http_data_only"] = True
|
1269
|
-
return self.
|
1843
|
+
return self.inspect_agent_with_http_info(
|
1844
|
+
namespace, owner, uuid, service, last_file, force, connection, **kwargs
|
1845
|
+
) # noqa: E501
|
1270
1846
|
|
1271
1847
|
@validate_arguments
|
1272
|
-
def
|
1848
|
+
def inspect_agent_with_http_info(
|
1273
1849
|
self,
|
1850
|
+
namespace: Annotated[StrictStr, Field(..., description="namespace")],
|
1274
1851
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
1852
|
+
uuid: Annotated[
|
1853
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
1854
|
+
],
|
1855
|
+
service: Annotated[Optional[StrictStr], Field(description="Service.")] = None,
|
1856
|
+
last_file: Annotated[
|
1857
|
+
Optional[StrictStr], Field(description="last_file.")
|
1858
|
+
] = None,
|
1859
|
+
force: Annotated[
|
1860
|
+
Optional[bool], Field(description="Force query param.")
|
1861
|
+
] = None,
|
1862
|
+
connection: Annotated[
|
1863
|
+
Optional[StrictStr], Field(description="Connection to use.")
|
1864
|
+
] = None,
|
1275
1865
|
**kwargs
|
1276
1866
|
): # noqa: E501
|
1277
|
-
"""
|
1867
|
+
"""Inspect an agent's service full conditions # noqa: E501
|
1278
1868
|
|
1279
1869
|
This method makes a synchronous HTTP request by default. To make an
|
1280
1870
|
asynchronous HTTP request, please pass async_req=True
|
1281
1871
|
|
1282
|
-
>>> thread = api.
|
1872
|
+
>>> thread = api.inspect_agent_with_http_info(namespace, owner, uuid, service, last_file, force, connection, async_req=True)
|
1283
1873
|
>>> result = thread.get()
|
1284
1874
|
|
1875
|
+
:param namespace: namespace (required)
|
1876
|
+
:type namespace: str
|
1285
1877
|
:param owner: Owner of the namespace (required)
|
1286
1878
|
:type owner: str
|
1879
|
+
:param uuid: Uuid identifier of the entity (required)
|
1880
|
+
:type uuid: str
|
1881
|
+
:param service: Service.
|
1882
|
+
:type service: str
|
1883
|
+
:param last_file: last_file.
|
1884
|
+
:type last_file: str
|
1885
|
+
:param force: Force query param.
|
1886
|
+
:type force: bool
|
1887
|
+
:param connection: Connection to use.
|
1888
|
+
:type connection: str
|
1287
1889
|
:param async_req: Whether to execute the request asynchronously.
|
1288
1890
|
:type async_req: bool, optional
|
1289
1891
|
:param _return_http_data_only: response data without head status code
|
@@ -1305,12 +1907,20 @@ class AgentsV1Api(BaseApi):
|
|
1305
1907
|
:return: Returns the result object.
|
1306
1908
|
If the method is called asynchronously,
|
1307
1909
|
returns the request thread.
|
1308
|
-
:rtype: tuple(
|
1910
|
+
:rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
|
1309
1911
|
"""
|
1310
1912
|
|
1311
1913
|
_params = locals()
|
1312
1914
|
|
1313
|
-
_all_params = [
|
1915
|
+
_all_params = [
|
1916
|
+
"namespace",
|
1917
|
+
"owner",
|
1918
|
+
"uuid",
|
1919
|
+
"service",
|
1920
|
+
"last_file",
|
1921
|
+
"force",
|
1922
|
+
"connection",
|
1923
|
+
]
|
1314
1924
|
_all_params.extend(
|
1315
1925
|
[
|
1316
1926
|
"async_req",
|
@@ -1328,7 +1938,7 @@ class AgentsV1Api(BaseApi):
|
|
1328
1938
|
if _key not in _all_params:
|
1329
1939
|
raise ApiTypeError(
|
1330
1940
|
"Got an unexpected keyword argument '%s'"
|
1331
|
-
" to method
|
1941
|
+
" to method inspect_agent" % _key
|
1332
1942
|
)
|
1333
1943
|
_params[_key] = _val
|
1334
1944
|
del _params["kwargs"]
|
@@ -1337,11 +1947,24 @@ class AgentsV1Api(BaseApi):
|
|
1337
1947
|
|
1338
1948
|
# process the path parameters
|
1339
1949
|
_path_params = {}
|
1950
|
+
if _params["namespace"]:
|
1951
|
+
_path_params["namespace"] = _params["namespace"]
|
1340
1952
|
if _params["owner"]:
|
1341
1953
|
_path_params["owner"] = _params["owner"]
|
1954
|
+
if _params["uuid"]:
|
1955
|
+
_path_params["uuid"] = _params["uuid"]
|
1342
1956
|
|
1343
1957
|
# process the query parameters
|
1344
1958
|
_query_params = []
|
1959
|
+
if _params.get("service") is not None: # noqa: E501
|
1960
|
+
_query_params.append(("service", _params["service"]))
|
1961
|
+
if _params.get("last_file") is not None: # noqa: E501
|
1962
|
+
_query_params.append(("last_file", _params["last_file"]))
|
1963
|
+
if _params.get("force") is not None: # noqa: E501
|
1964
|
+
_query_params.append(("force", _params["force"]))
|
1965
|
+
if _params.get("connection") is not None: # noqa: E501
|
1966
|
+
_query_params.append(("connection", _params["connection"]))
|
1967
|
+
|
1345
1968
|
# process the header parameters
|
1346
1969
|
_header_params = dict(_params.get("_headers", {}))
|
1347
1970
|
# process the form parameters
|
@@ -1358,14 +1981,14 @@ class AgentsV1Api(BaseApi):
|
|
1358
1981
|
_auth_settings = ["ApiKey"] # noqa: E501
|
1359
1982
|
|
1360
1983
|
_response_types_map = {
|
1361
|
-
"200": "
|
1984
|
+
"200": "object",
|
1362
1985
|
"204": "object",
|
1363
1986
|
"403": "object",
|
1364
1987
|
"404": "object",
|
1365
1988
|
}
|
1366
1989
|
|
1367
1990
|
return self.api_client.call_api(
|
1368
|
-
"/
|
1991
|
+
"/streams/v1/{namespace}/{owner}/agents/{uuid}/k8s_inspect",
|
1369
1992
|
"GET",
|
1370
1993
|
_path_params,
|
1371
1994
|
_query_params,
|
@@ -2046,7 +2669,7 @@ class AgentsV1Api(BaseApi):
|
|
2046
2669
|
def patch_agent_token(
|
2047
2670
|
self,
|
2048
2671
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
2049
|
-
entity: Annotated[StrictStr, Field(..., description="
|
2672
|
+
entity: Annotated[StrictStr, Field(..., description="Entity")],
|
2050
2673
|
body: Annotated[V1Token, Field(..., description="Token body")],
|
2051
2674
|
**kwargs
|
2052
2675
|
) -> V1Token: # noqa: E501
|
@@ -2060,7 +2683,7 @@ class AgentsV1Api(BaseApi):
|
|
2060
2683
|
|
2061
2684
|
:param owner: Owner of the namespace (required)
|
2062
2685
|
:type owner: str
|
2063
|
-
:param entity:
|
2686
|
+
:param entity: Entity (required)
|
2064
2687
|
:type entity: str
|
2065
2688
|
:param body: Token body (required)
|
2066
2689
|
:type body: V1Token
|
@@ -2088,7 +2711,7 @@ class AgentsV1Api(BaseApi):
|
|
2088
2711
|
def patch_agent_token_with_http_info(
|
2089
2712
|
self,
|
2090
2713
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
2091
|
-
entity: Annotated[StrictStr, Field(..., description="
|
2714
|
+
entity: Annotated[StrictStr, Field(..., description="Entity")],
|
2092
2715
|
body: Annotated[V1Token, Field(..., description="Token body")],
|
2093
2716
|
**kwargs
|
2094
2717
|
): # noqa: E501
|
@@ -2102,7 +2725,7 @@ class AgentsV1Api(BaseApi):
|
|
2102
2725
|
|
2103
2726
|
:param owner: Owner of the namespace (required)
|
2104
2727
|
:type owner: str
|
2105
|
-
:param entity:
|
2728
|
+
:param entity: Entity (required)
|
2106
2729
|
:type entity: str
|
2107
2730
|
:param body: Token body (required)
|
2108
2731
|
:type body: V1Token
|
@@ -2221,6 +2844,186 @@ class AgentsV1Api(BaseApi):
|
|
2221
2844
|
_request_auth=_params.get("_request_auth"),
|
2222
2845
|
)
|
2223
2846
|
|
2847
|
+
@validate_arguments
|
2848
|
+
def reconcile_agent(
|
2849
|
+
self,
|
2850
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
2851
|
+
uuid: Annotated[
|
2852
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
2853
|
+
],
|
2854
|
+
body: V1AgentReconcileBodyRequest,
|
2855
|
+
**kwargs
|
2856
|
+
) -> object: # noqa: E501
|
2857
|
+
"""Reconcile agent # noqa: E501
|
2858
|
+
|
2859
|
+
This method makes a synchronous HTTP request by default. To make an
|
2860
|
+
asynchronous HTTP request, please pass async_req=True
|
2861
|
+
|
2862
|
+
>>> thread = api.reconcile_agent(owner, uuid, body, async_req=True)
|
2863
|
+
>>> result = thread.get()
|
2864
|
+
|
2865
|
+
:param owner: Owner of the namespace (required)
|
2866
|
+
:type owner: str
|
2867
|
+
:param uuid: Uuid identifier of the entity (required)
|
2868
|
+
:type uuid: str
|
2869
|
+
:param body: (required)
|
2870
|
+
:type body: V1AgentReconcileBodyRequest
|
2871
|
+
:param async_req: Whether to execute the request asynchronously.
|
2872
|
+
:type async_req: bool, optional
|
2873
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
2874
|
+
be returned without reading/decoding response
|
2875
|
+
data. Default is True.
|
2876
|
+
:type _preload_content: bool, optional
|
2877
|
+
:param _request_timeout: timeout setting for this request. If one
|
2878
|
+
number provided, it will be total request
|
2879
|
+
timeout. It can also be a pair (tuple) of
|
2880
|
+
(connection, read) timeouts.
|
2881
|
+
:return: Returns the result object.
|
2882
|
+
If the method is called asynchronously,
|
2883
|
+
returns the request thread.
|
2884
|
+
:rtype: object
|
2885
|
+
"""
|
2886
|
+
kwargs["_return_http_data_only"] = True
|
2887
|
+
return self.reconcile_agent_with_http_info(
|
2888
|
+
owner, uuid, body, **kwargs
|
2889
|
+
) # noqa: E501
|
2890
|
+
|
2891
|
+
@validate_arguments
|
2892
|
+
def reconcile_agent_with_http_info(
|
2893
|
+
self,
|
2894
|
+
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
2895
|
+
uuid: Annotated[
|
2896
|
+
StrictStr, Field(..., description="Uuid identifier of the entity")
|
2897
|
+
],
|
2898
|
+
body: V1AgentReconcileBodyRequest,
|
2899
|
+
**kwargs
|
2900
|
+
): # noqa: E501
|
2901
|
+
"""Reconcile agent # noqa: E501
|
2902
|
+
|
2903
|
+
This method makes a synchronous HTTP request by default. To make an
|
2904
|
+
asynchronous HTTP request, please pass async_req=True
|
2905
|
+
|
2906
|
+
>>> thread = api.reconcile_agent_with_http_info(owner, uuid, body, async_req=True)
|
2907
|
+
>>> result = thread.get()
|
2908
|
+
|
2909
|
+
:param owner: Owner of the namespace (required)
|
2910
|
+
:type owner: str
|
2911
|
+
:param uuid: Uuid identifier of the entity (required)
|
2912
|
+
:type uuid: str
|
2913
|
+
:param body: (required)
|
2914
|
+
:type body: V1AgentReconcileBodyRequest
|
2915
|
+
:param async_req: Whether to execute the request asynchronously.
|
2916
|
+
:type async_req: bool, optional
|
2917
|
+
:param _return_http_data_only: response data without head status code
|
2918
|
+
and headers
|
2919
|
+
:type _return_http_data_only: bool, optional
|
2920
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
2921
|
+
be returned without reading/decoding response
|
2922
|
+
data. Default is True.
|
2923
|
+
:type _preload_content: bool, optional
|
2924
|
+
:param _request_timeout: timeout setting for this request. If one
|
2925
|
+
number provided, it will be total request
|
2926
|
+
timeout. It can also be a pair (tuple) of
|
2927
|
+
(connection, read) timeouts.
|
2928
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2929
|
+
request; this effectively ignores the authentication
|
2930
|
+
in the spec for a single request.
|
2931
|
+
:type _request_auth: dict, optional
|
2932
|
+
:type _content_type: string, optional: force content-type for the request
|
2933
|
+
:return: Returns the result object.
|
2934
|
+
If the method is called asynchronously,
|
2935
|
+
returns the request thread.
|
2936
|
+
:rtype: None
|
2937
|
+
"""
|
2938
|
+
|
2939
|
+
_params = locals()
|
2940
|
+
|
2941
|
+
_all_params = ["owner", "uuid", "body"]
|
2942
|
+
_all_params.extend(
|
2943
|
+
[
|
2944
|
+
"async_req",
|
2945
|
+
"_return_http_data_only",
|
2946
|
+
"_preload_content",
|
2947
|
+
"_request_timeout",
|
2948
|
+
"_request_auth",
|
2949
|
+
"_content_type",
|
2950
|
+
"_headers",
|
2951
|
+
]
|
2952
|
+
)
|
2953
|
+
|
2954
|
+
# validate the arguments
|
2955
|
+
for _key, _val in _params["kwargs"].items():
|
2956
|
+
if _key not in _all_params:
|
2957
|
+
raise ApiTypeError(
|
2958
|
+
"Got an unexpected keyword argument '%s'"
|
2959
|
+
" to method reconcile_agent" % _key
|
2960
|
+
)
|
2961
|
+
_params[_key] = _val
|
2962
|
+
del _params["kwargs"]
|
2963
|
+
|
2964
|
+
_collection_formats = {}
|
2965
|
+
|
2966
|
+
# process the path parameters
|
2967
|
+
_path_params = {}
|
2968
|
+
if _params["owner"]:
|
2969
|
+
_path_params["owner"] = _params["owner"]
|
2970
|
+
if _params["uuid"]:
|
2971
|
+
_path_params["uuid"] = _params["uuid"]
|
2972
|
+
|
2973
|
+
# process the query parameters
|
2974
|
+
_query_params = []
|
2975
|
+
# process the header parameters
|
2976
|
+
_header_params = dict(_params.get("_headers", {}))
|
2977
|
+
# process the form parameters
|
2978
|
+
_form_params = []
|
2979
|
+
_files = {}
|
2980
|
+
# process the body parameter
|
2981
|
+
_body_params = None
|
2982
|
+
if _params["body"]:
|
2983
|
+
_body_params = _params["body"]
|
2984
|
+
|
2985
|
+
# set the HTTP header `Accept`
|
2986
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
2987
|
+
["application/json"]
|
2988
|
+
) # noqa: E501
|
2989
|
+
|
2990
|
+
# set the HTTP header `Content-Type`
|
2991
|
+
_content_types_list = _params.get(
|
2992
|
+
"_content_type",
|
2993
|
+
self.api_client.select_header_content_type(["application/json"]),
|
2994
|
+
)
|
2995
|
+
if _content_types_list:
|
2996
|
+
_header_params["Content-Type"] = _content_types_list
|
2997
|
+
|
2998
|
+
# authentication setting
|
2999
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
3000
|
+
|
3001
|
+
_response_types_map = {
|
3002
|
+
"200": "V1Agent",
|
3003
|
+
"204": "object",
|
3004
|
+
"403": "object",
|
3005
|
+
"404": "object",
|
3006
|
+
}
|
3007
|
+
|
3008
|
+
return self.api_client.call_api(
|
3009
|
+
"/api/v1/orgs/{owner}/agents/{uuid}/reconcile",
|
3010
|
+
"PATCH",
|
3011
|
+
_path_params,
|
3012
|
+
_query_params,
|
3013
|
+
_header_params,
|
3014
|
+
body=_body_params,
|
3015
|
+
post_params=_form_params,
|
3016
|
+
files=_files,
|
3017
|
+
response_types_map=_response_types_map,
|
3018
|
+
auth_settings=_auth_settings,
|
3019
|
+
async_req=_params.get("async_req"),
|
3020
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
3021
|
+
_preload_content=_params.get("_preload_content", True),
|
3022
|
+
_request_timeout=_params.get("_request_timeout"),
|
3023
|
+
collection_formats=_collection_formats,
|
3024
|
+
_request_auth=_params.get("_request_auth"),
|
3025
|
+
)
|
3026
|
+
|
2224
3027
|
@validate_arguments
|
2225
3028
|
def sync_agent(
|
2226
3029
|
self,
|
@@ -2399,18 +3202,21 @@ class AgentsV1Api(BaseApi):
|
|
2399
3202
|
def cron_agent(
|
2400
3203
|
self,
|
2401
3204
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
3205
|
+
body: Annotated[Optional[Dict], Field(..., description="Cron body")] = None,
|
2402
3206
|
**kwargs
|
2403
|
-
) ->
|
3207
|
+
) -> V1AgentStateResponse: # noqa: E501
|
2404
3208
|
"""Global Cron agent # noqa: E501
|
2405
3209
|
|
2406
3210
|
This method makes a synchronous HTTP request by default. To make an
|
2407
3211
|
asynchronous HTTP request, please pass async_req=True
|
2408
3212
|
|
2409
|
-
>>> thread = api.cron_agent(owner, async_req=True)
|
3213
|
+
>>> thread = api.cron_agent(owner, body, async_req=True)
|
2410
3214
|
>>> result = thread.get()
|
2411
3215
|
|
2412
3216
|
:param owner: Owner of the namespace (required)
|
2413
3217
|
:type owner: str
|
3218
|
+
:param body: Cron body (required)
|
3219
|
+
:type body: object
|
2414
3220
|
:param async_req: Whether to execute the request asynchronously.
|
2415
3221
|
:type async_req: bool, optional
|
2416
3222
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
@@ -2424,15 +3230,16 @@ class AgentsV1Api(BaseApi):
|
|
2424
3230
|
:return: Returns the result object.
|
2425
3231
|
If the method is called asynchronously,
|
2426
3232
|
returns the request thread.
|
2427
|
-
:rtype:
|
3233
|
+
:rtype: V1AgentStateResponse
|
2428
3234
|
"""
|
2429
3235
|
kwargs["_return_http_data_only"] = True
|
2430
|
-
return self.cron_agent_with_http_info(owner, **kwargs) # noqa: E501
|
3236
|
+
return self.cron_agent_with_http_info(owner, body, **kwargs) # noqa: E501
|
2431
3237
|
|
2432
3238
|
@validate_arguments
|
2433
3239
|
def cron_agent_with_http_info(
|
2434
3240
|
self,
|
2435
3241
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
3242
|
+
body: Annotated[Optional[Dict], Field(..., description="Cron body")] = None,
|
2436
3243
|
**kwargs
|
2437
3244
|
): # noqa: E501
|
2438
3245
|
"""Cron agent # noqa: E501
|
@@ -2440,11 +3247,13 @@ class AgentsV1Api(BaseApi):
|
|
2440
3247
|
This method makes a synchronous HTTP request by default. To make an
|
2441
3248
|
asynchronous HTTP request, please pass async_req=True
|
2442
3249
|
|
2443
|
-
>>> thread = api.cron_agent_with_http_info(owner, async_req=True)
|
3250
|
+
>>> thread = api.cron_agent_with_http_info(owner, body, async_req=True)
|
2444
3251
|
>>> result = thread.get()
|
2445
3252
|
|
2446
3253
|
:param owner: Owner of the namespace (required)
|
2447
3254
|
:type owner: str
|
3255
|
+
:param body: Cron body (required)
|
3256
|
+
:type body: object
|
2448
3257
|
:param async_req: Whether to execute the request asynchronously.
|
2449
3258
|
:type async_req: bool, optional
|
2450
3259
|
:param _return_http_data_only: response data without head status code
|
@@ -2466,12 +3275,12 @@ class AgentsV1Api(BaseApi):
|
|
2466
3275
|
:return: Returns the result object.
|
2467
3276
|
If the method is called asynchronously,
|
2468
3277
|
returns the request thread.
|
2469
|
-
:rtype:
|
3278
|
+
:rtype: tuple(V1AgentStateResponse, status_code(int), headers(HTTPHeaderDict))
|
2470
3279
|
"""
|
2471
3280
|
|
2472
3281
|
_params = locals()
|
2473
3282
|
|
2474
|
-
_all_params = ["owner"]
|
3283
|
+
_all_params = ["owner", "body"]
|
2475
3284
|
_all_params.extend(
|
2476
3285
|
[
|
2477
3286
|
"async_req",
|
@@ -2510,15 +3319,30 @@ class AgentsV1Api(BaseApi):
|
|
2510
3319
|
_files = {}
|
2511
3320
|
# process the body parameter
|
2512
3321
|
_body_params = None
|
3322
|
+
if _params["body"]:
|
3323
|
+
_body_params = _params["body"]
|
2513
3324
|
# set the HTTP header `Accept`
|
2514
3325
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
2515
3326
|
["application/json"]
|
2516
3327
|
) # noqa: E501
|
2517
3328
|
|
3329
|
+
# set the HTTP header `Content-Type`
|
3330
|
+
_content_types_list = _params.get(
|
3331
|
+
"_content_type",
|
3332
|
+
self.api_client.select_header_content_type(["application/json"]),
|
3333
|
+
)
|
3334
|
+
if _content_types_list:
|
3335
|
+
_header_params["Content-Type"] = _content_types_list
|
3336
|
+
|
2518
3337
|
# authentication setting
|
2519
3338
|
_auth_settings = ["ApiKey"] # noqa: E501
|
2520
3339
|
|
2521
|
-
_response_types_map = {
|
3340
|
+
_response_types_map = {
|
3341
|
+
"200": "V1AgentStateResponse",
|
3342
|
+
"204": "object",
|
3343
|
+
"403": "object",
|
3344
|
+
"404": "object",
|
3345
|
+
}
|
2522
3346
|
|
2523
3347
|
return self.api_client.call_api(
|
2524
3348
|
"/api/v1/orgs/{owner}/agents/cron",
|
@@ -2901,7 +3725,7 @@ class AgentsV1Api(BaseApi):
|
|
2901
3725
|
def update_agent_token(
|
2902
3726
|
self,
|
2903
3727
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
2904
|
-
entity: Annotated[StrictStr, Field(..., description="
|
3728
|
+
entity: Annotated[StrictStr, Field(..., description="Entity")],
|
2905
3729
|
body: Annotated[V1Token, Field(..., description="Token body")],
|
2906
3730
|
**kwargs
|
2907
3731
|
) -> V1Token: # noqa: E501
|
@@ -2915,7 +3739,7 @@ class AgentsV1Api(BaseApi):
|
|
2915
3739
|
|
2916
3740
|
:param owner: Owner of the namespace (required)
|
2917
3741
|
:type owner: str
|
2918
|
-
:param entity:
|
3742
|
+
:param entity: Entity (required)
|
2919
3743
|
:type entity: str
|
2920
3744
|
:param body: Token body (required)
|
2921
3745
|
:type body: V1Token
|
@@ -2943,7 +3767,7 @@ class AgentsV1Api(BaseApi):
|
|
2943
3767
|
def update_agent_token_with_http_info(
|
2944
3768
|
self,
|
2945
3769
|
owner: Annotated[StrictStr, Field(..., description="Owner of the namespace")],
|
2946
|
-
entity: Annotated[StrictStr, Field(..., description="
|
3770
|
+
entity: Annotated[StrictStr, Field(..., description="Entity")],
|
2947
3771
|
body: Annotated[V1Token, Field(..., description="Token body")],
|
2948
3772
|
**kwargs
|
2949
3773
|
): # noqa: E501
|
@@ -2957,7 +3781,7 @@ class AgentsV1Api(BaseApi):
|
|
2957
3781
|
|
2958
3782
|
:param owner: Owner of the namespace (required)
|
2959
3783
|
:type owner: str
|
2960
|
-
:param entity:
|
3784
|
+
:param entity: Entity (required)
|
2961
3785
|
:type entity: str
|
2962
3786
|
:param body: Token body (required)
|
2963
3787
|
:type body: V1Token
|