polyaxon 2.1.8__py3-none-any.whl → 2.2.0.post1__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/artifacts.py +16 -12
- polyaxon/_cli/components.py +16 -12
- polyaxon/_cli/config.py +31 -0
- polyaxon/_cli/dashboard.py +15 -2
- polyaxon/_cli/init.py +1 -1
- polyaxon/_cli/models.py +16 -12
- polyaxon/_cli/operations.py +100 -54
- polyaxon/_cli/project_versions.py +26 -5
- polyaxon/_cli/projects.py +23 -9
- polyaxon/_cli/run.py +29 -9
- polyaxon/_client/mixin.py +39 -0
- polyaxon/_client/project.py +22 -22
- polyaxon/_client/run.py +44 -25
- polyaxon/_compiler/contexts/ray_job.py +4 -2
- polyaxon/_deploy/schemas/proxy.py +1 -0
- polyaxon/_env_vars/getters/owner_entity.py +4 -2
- polyaxon/_env_vars/getters/project.py +4 -2
- polyaxon/_env_vars/getters/run.py +2 -2
- polyaxon/_env_vars/keys.py +1 -0
- polyaxon/_k8s/converter/base/main.py +1 -0
- polyaxon/_k8s/converter/common/accelerators.py +7 -4
- polyaxon/_k8s/converter/converters/ray_job.py +4 -2
- polyaxon/_k8s/custom_resources/setter.py +1 -1
- polyaxon/_local_process/__init__.py +0 -0
- polyaxon/_local_process/agent.py +6 -0
- polyaxon/_local_process/converter/__init__.py +1 -0
- polyaxon/_local_process/converter/base/__init__.py +1 -0
- polyaxon/_local_process/converter/base/base.py +140 -0
- polyaxon/_local_process/converter/base/containers.py +69 -0
- polyaxon/_local_process/converter/base/env_vars.py +253 -0
- polyaxon/_local_process/converter/base/init.py +414 -0
- polyaxon/_local_process/converter/base/main.py +74 -0
- polyaxon/_local_process/converter/base/mounts.py +82 -0
- polyaxon/_local_process/converter/converters/__init__.py +8 -0
- polyaxon/_local_process/converter/converters/job.py +40 -0
- polyaxon/_local_process/converter/converters/service.py +41 -0
- polyaxon/_local_process/converter/mixins.py +38 -0
- polyaxon/_local_process/executor.py +132 -0
- polyaxon/_local_process/process_types.py +39 -0
- polyaxon/_sdk/api/organizations_v1_api.py +8 -8
- polyaxon/_sdk/api/project_dashboards_v1_api.py +12 -12
- polyaxon/_sdk/api/project_searches_v1_api.py +12 -12
- polyaxon/_sdk/api/projects_v1_api.py +221 -44
- polyaxon/_sdk/api/runs_v1_api.py +156 -202
- polyaxon/_sdk/api/service_accounts_v1_api.py +4 -4
- polyaxon/_sdk/api/teams_v1_api.py +2827 -375
- polyaxon/_sdk/api/users_v1_api.py +231 -55
- polyaxon/_sdk/schemas/v1_settings_catalog.py +1 -0
- polyaxon/_sdk/schemas/v1_team.py +3 -0
- polyaxon/_sdk/schemas/v1_user.py +1 -2
- polyaxon/_utils/fqn_utils.py +25 -2
- polyaxon/pkg.py +1 -1
- {polyaxon-2.1.8.dist-info → polyaxon-2.2.0.post1.dist-info}/METADATA +8 -8
- {polyaxon-2.1.8.dist-info → polyaxon-2.2.0.post1.dist-info}/RECORD +58 -41
- {polyaxon-2.1.8.dist-info → polyaxon-2.2.0.post1.dist-info}/LICENSE +0 -0
- {polyaxon-2.1.8.dist-info → polyaxon-2.2.0.post1.dist-info}/WHEEL +0 -0
- {polyaxon-2.1.8.dist-info → polyaxon-2.2.0.post1.dist-info}/entry_points.txt +0 -0
- {polyaxon-2.1.8.dist-info → polyaxon-2.2.0.post1.dist-info}/top_level.txt +0 -0
@@ -15,8 +15,8 @@ class UsersV1Api(BaseApi):
|
|
15
15
|
@validate_arguments
|
16
16
|
def create_token(
|
17
17
|
self, body: Annotated[V1Token, Field(..., description="Token body")], **kwargs
|
18
|
-
) -> V1Token:
|
19
|
-
"""Create token
|
18
|
+
) -> V1Token: # noqa: E501
|
19
|
+
"""Create token # noqa: E501
|
20
20
|
|
21
21
|
This method makes a synchronous HTTP request by default. To make an
|
22
22
|
asynchronous HTTP request, please pass async_req=True
|
@@ -42,13 +42,13 @@ class UsersV1Api(BaseApi):
|
|
42
42
|
:rtype: V1Token
|
43
43
|
"""
|
44
44
|
kwargs["_return_http_data_only"] = True
|
45
|
-
return self.create_token_with_http_info(body, **kwargs)
|
45
|
+
return self.create_token_with_http_info(body, **kwargs) # noqa: E501
|
46
46
|
|
47
47
|
@validate_arguments
|
48
48
|
def create_token_with_http_info(
|
49
49
|
self, body: Annotated[V1Token, Field(..., description="Token body")], **kwargs
|
50
|
-
):
|
51
|
-
"""Create token
|
50
|
+
): # noqa: E501
|
51
|
+
"""Create token # noqa: E501
|
52
52
|
|
53
53
|
This method makes a synchronous HTTP request by default. To make an
|
54
54
|
asynchronous HTTP request, please pass async_req=True
|
@@ -114,14 +114,11 @@ class UsersV1Api(BaseApi):
|
|
114
114
|
|
115
115
|
# process the query parameters
|
116
116
|
_query_params = []
|
117
|
-
|
118
117
|
# process the header parameters
|
119
118
|
_header_params = dict(_params.get("_headers", {}))
|
120
|
-
|
121
119
|
# process the form parameters
|
122
120
|
_form_params = []
|
123
121
|
_files = {}
|
124
|
-
|
125
122
|
# process the body parameter
|
126
123
|
_body_params = None
|
127
124
|
if _params["body"]:
|
@@ -130,7 +127,7 @@ class UsersV1Api(BaseApi):
|
|
130
127
|
# set the HTTP header `Accept`
|
131
128
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
132
129
|
["application/json"]
|
133
|
-
)
|
130
|
+
) # noqa: E501
|
134
131
|
|
135
132
|
# set the HTTP header `Content-Type`
|
136
133
|
_content_types_list = _params.get(
|
@@ -141,7 +138,7 @@ class UsersV1Api(BaseApi):
|
|
141
138
|
_header_params["Content-Type"] = _content_types_list
|
142
139
|
|
143
140
|
# authentication setting
|
144
|
-
_auth_settings = ["ApiKey"]
|
141
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
145
142
|
|
146
143
|
_response_types_map = {
|
147
144
|
"200": "V1Token",
|
@@ -162,7 +159,7 @@ class UsersV1Api(BaseApi):
|
|
162
159
|
response_types_map=_response_types_map,
|
163
160
|
auth_settings=_auth_settings,
|
164
161
|
async_req=_params.get("async_req"),
|
165
|
-
_return_http_data_only=_params.get("_return_http_data_only"),
|
162
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
166
163
|
_preload_content=_params.get("_preload_content", True),
|
167
164
|
_request_timeout=_params.get("_request_timeout"),
|
168
165
|
collection_formats=_collection_formats,
|
@@ -174,8 +171,8 @@ class UsersV1Api(BaseApi):
|
|
174
171
|
self,
|
175
172
|
uuid: Annotated[StrictStr, Field(..., description="UUid of the namespace")],
|
176
173
|
**kwargs
|
177
|
-
) -> None:
|
178
|
-
"""Delete token
|
174
|
+
) -> None: # noqa: E501
|
175
|
+
"""Delete token # noqa: E501
|
179
176
|
|
180
177
|
This method makes a synchronous HTTP request by default. To make an
|
181
178
|
asynchronous HTTP request, please pass async_req=True
|
@@ -201,15 +198,15 @@ class UsersV1Api(BaseApi):
|
|
201
198
|
:rtype: None
|
202
199
|
"""
|
203
200
|
kwargs["_return_http_data_only"] = True
|
204
|
-
return self.delete_token_with_http_info(uuid, **kwargs)
|
201
|
+
return self.delete_token_with_http_info(uuid, **kwargs) # noqa: E501
|
205
202
|
|
206
203
|
@validate_arguments
|
207
204
|
def delete_token_with_http_info(
|
208
205
|
self,
|
209
206
|
uuid: Annotated[StrictStr, Field(..., description="UUid of the namespace")],
|
210
207
|
**kwargs
|
211
|
-
):
|
212
|
-
"""Delete token
|
208
|
+
): # noqa: E501
|
209
|
+
"""Delete token # noqa: E501
|
213
210
|
|
214
211
|
This method makes a synchronous HTTP request by default. To make an
|
215
212
|
asynchronous HTTP request, please pass async_req=True
|
@@ -277,24 +274,20 @@ class UsersV1Api(BaseApi):
|
|
277
274
|
|
278
275
|
# process the query parameters
|
279
276
|
_query_params = []
|
280
|
-
|
281
277
|
# process the header parameters
|
282
278
|
_header_params = dict(_params.get("_headers", {}))
|
283
|
-
|
284
279
|
# process the form parameters
|
285
280
|
_form_params = []
|
286
281
|
_files = {}
|
287
|
-
|
288
282
|
# process the body parameter
|
289
283
|
_body_params = None
|
290
|
-
|
291
284
|
# set the HTTP header `Accept`
|
292
285
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
293
286
|
["application/json"]
|
294
|
-
)
|
287
|
+
) # noqa: E501
|
295
288
|
|
296
289
|
# authentication setting
|
297
|
-
_auth_settings = ["ApiKey"]
|
290
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
298
291
|
|
299
292
|
_response_types_map = {}
|
300
293
|
|
@@ -310,7 +303,7 @@ class UsersV1Api(BaseApi):
|
|
310
303
|
response_types_map=_response_types_map,
|
311
304
|
auth_settings=_auth_settings,
|
312
305
|
async_req=_params.get("async_req"),
|
313
|
-
_return_http_data_only=_params.get("_return_http_data_only"),
|
306
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
314
307
|
_preload_content=_params.get("_preload_content", True),
|
315
308
|
_request_timeout=_params.get("_request_timeout"),
|
316
309
|
collection_formats=_collection_formats,
|
@@ -332,8 +325,8 @@ class UsersV1Api(BaseApi):
|
|
332
325
|
] = None,
|
333
326
|
no_page: Annotated[Optional[bool], Field(description="No pagination.")] = None,
|
334
327
|
**kwargs
|
335
|
-
) -> V1ListActivitiesResponse:
|
336
|
-
"""User History
|
328
|
+
) -> V1ListActivitiesResponse: # noqa: E501
|
329
|
+
"""User History # noqa: E501
|
337
330
|
|
338
331
|
This method makes a synchronous HTTP request by default. To make an
|
339
332
|
asynchronous HTTP request, please pass async_req=True
|
@@ -369,7 +362,7 @@ class UsersV1Api(BaseApi):
|
|
369
362
|
kwargs["_return_http_data_only"] = True
|
370
363
|
return self.get_history_with_http_info(
|
371
364
|
offset, limit, sort, query, no_page, **kwargs
|
372
|
-
)
|
365
|
+
) # noqa: E501
|
373
366
|
|
374
367
|
@validate_arguments
|
375
368
|
def get_history_with_http_info(
|
@@ -463,25 +456,26 @@ class UsersV1Api(BaseApi):
|
|
463
456
|
_query_params = []
|
464
457
|
if _params.get("offset") is not None: # noqa: E501
|
465
458
|
_query_params.append(("offset", _params["offset"]))
|
459
|
+
|
466
460
|
if _params.get("limit") is not None: # noqa: E501
|
467
461
|
_query_params.append(("limit", _params["limit"]))
|
462
|
+
|
468
463
|
if _params.get("sort") is not None: # noqa: E501
|
469
464
|
_query_params.append(("sort", _params["sort"]))
|
465
|
+
|
470
466
|
if _params.get("query") is not None: # noqa: E501
|
471
467
|
_query_params.append(("query", _params["query"]))
|
468
|
+
|
472
469
|
if _params.get("no_page") is not None: # noqa: E501
|
473
470
|
_query_params.append(("no_page", _params["no_page"]))
|
474
471
|
|
475
472
|
# process the header parameters
|
476
473
|
_header_params = dict(_params.get("_headers", {}))
|
477
|
-
|
478
474
|
# process the form parameters
|
479
475
|
_form_params = []
|
480
476
|
_files = {}
|
481
|
-
|
482
477
|
# process the body parameter
|
483
478
|
_body_params = None
|
484
|
-
|
485
479
|
# set the HTTP header `Accept`
|
486
480
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
487
481
|
["application/json"]
|
@@ -662,25 +656,26 @@ class UsersV1Api(BaseApi):
|
|
662
656
|
_query_params = []
|
663
657
|
if _params.get("offset") is not None: # noqa: E501
|
664
658
|
_query_params.append(("offset", _params["offset"]))
|
659
|
+
|
665
660
|
if _params.get("limit") is not None: # noqa: E501
|
666
661
|
_query_params.append(("limit", _params["limit"]))
|
662
|
+
|
667
663
|
if _params.get("sort") is not None: # noqa: E501
|
668
664
|
_query_params.append(("sort", _params["sort"]))
|
665
|
+
|
669
666
|
if _params.get("query") is not None: # noqa: E501
|
670
667
|
_query_params.append(("query", _params["query"]))
|
668
|
+
|
671
669
|
if _params.get("no_page") is not None: # noqa: E501
|
672
670
|
_query_params.append(("no_page", _params["no_page"]))
|
673
671
|
|
674
672
|
# process the header parameters
|
675
673
|
_header_params = dict(_params.get("_headers", {}))
|
676
|
-
|
677
674
|
# process the form parameters
|
678
675
|
_form_params = []
|
679
676
|
_files = {}
|
680
|
-
|
681
677
|
# process the body parameter
|
682
678
|
_body_params = None
|
683
|
-
|
684
679
|
# set the HTTP header `Accept`
|
685
680
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
686
681
|
["application/json"]
|
@@ -823,17 +818,13 @@ class UsersV1Api(BaseApi):
|
|
823
818
|
|
824
819
|
# process the query parameters
|
825
820
|
_query_params = []
|
826
|
-
|
827
821
|
# process the header parameters
|
828
822
|
_header_params = dict(_params.get("_headers", {}))
|
829
|
-
|
830
823
|
# process the form parameters
|
831
824
|
_form_params = []
|
832
825
|
_files = {}
|
833
|
-
|
834
826
|
# process the body parameter
|
835
827
|
_body_params = None
|
836
|
-
|
837
828
|
# set the HTTP header `Accept`
|
838
829
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
839
830
|
["application/json"]
|
@@ -962,17 +953,13 @@ class UsersV1Api(BaseApi):
|
|
962
953
|
|
963
954
|
# process the query parameters
|
964
955
|
_query_params = []
|
965
|
-
|
966
956
|
# process the header parameters
|
967
957
|
_header_params = dict(_params.get("_headers", {}))
|
968
|
-
|
969
958
|
# process the form parameters
|
970
959
|
_form_params = []
|
971
960
|
_files = {}
|
972
|
-
|
973
961
|
# process the body parameter
|
974
962
|
_body_params = None
|
975
|
-
|
976
963
|
# set the HTTP header `Accept`
|
977
964
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
978
965
|
["application/json"]
|
@@ -1007,6 +994,206 @@ class UsersV1Api(BaseApi):
|
|
1007
994
|
_request_auth=_params.get("_request_auth"),
|
1008
995
|
)
|
1009
996
|
|
997
|
+
@validate_arguments
|
998
|
+
def get_workspaces(
|
999
|
+
self,
|
1000
|
+
offset: Annotated[
|
1001
|
+
Optional[StrictInt], Field(description="Pagination offset.")
|
1002
|
+
] = None,
|
1003
|
+
limit: Annotated[Optional[StrictInt], Field(description="Limit size.")] = None,
|
1004
|
+
sort: Annotated[
|
1005
|
+
Optional[StrictStr], Field(description="Sort to order the search.")
|
1006
|
+
] = None,
|
1007
|
+
query: Annotated[
|
1008
|
+
Optional[StrictStr], Field(description="Query filter the search.")
|
1009
|
+
] = None,
|
1010
|
+
no_page: Annotated[Optional[bool], Field(description="No pagination.")] = None,
|
1011
|
+
**kwargs
|
1012
|
+
) -> object: # noqa: E501
|
1013
|
+
"""User workspaces # noqa: E501
|
1014
|
+
|
1015
|
+
This method makes a synchronous HTTP request by default. To make an
|
1016
|
+
asynchronous HTTP request, please pass async_req=True
|
1017
|
+
|
1018
|
+
>>> thread = api.get_workspaces(offset, limit, sort, query, no_page, async_req=True)
|
1019
|
+
>>> result = thread.get()
|
1020
|
+
|
1021
|
+
:param offset: Pagination offset.
|
1022
|
+
:type offset: int
|
1023
|
+
:param limit: Limit size.
|
1024
|
+
:type limit: int
|
1025
|
+
:param sort: Sort to order the search.
|
1026
|
+
:type sort: str
|
1027
|
+
:param query: Query filter the search.
|
1028
|
+
:type query: str
|
1029
|
+
:param no_page: No pagination.
|
1030
|
+
:type no_page: bool
|
1031
|
+
:param async_req: Whether to execute the request asynchronously.
|
1032
|
+
:type async_req: bool, optional
|
1033
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
1034
|
+
be returned without reading/decoding response
|
1035
|
+
data. Default is True.
|
1036
|
+
:type _preload_content: bool, optional
|
1037
|
+
:param _request_timeout: timeout setting for this request. If one
|
1038
|
+
number provided, it will be total request
|
1039
|
+
timeout. It can also be a pair (tuple) of
|
1040
|
+
(connection, read) timeouts.
|
1041
|
+
:return: Returns the result object.
|
1042
|
+
If the method is called asynchronously,
|
1043
|
+
returns the request thread.
|
1044
|
+
:rtype: object
|
1045
|
+
"""
|
1046
|
+
kwargs["_return_http_data_only"] = True
|
1047
|
+
return self.get_workspaces_with_http_info(
|
1048
|
+
offset, limit, sort, query, no_page, **kwargs
|
1049
|
+
) # noqa: E501
|
1050
|
+
|
1051
|
+
@validate_arguments
|
1052
|
+
def get_workspaces_with_http_info(
|
1053
|
+
self,
|
1054
|
+
offset: Annotated[
|
1055
|
+
Optional[StrictInt], Field(description="Pagination offset.")
|
1056
|
+
] = None,
|
1057
|
+
limit: Annotated[Optional[StrictInt], Field(description="Limit size.")] = None,
|
1058
|
+
sort: Annotated[
|
1059
|
+
Optional[StrictStr], Field(description="Sort to order the search.")
|
1060
|
+
] = None,
|
1061
|
+
query: Annotated[
|
1062
|
+
Optional[StrictStr], Field(description="Query filter the search.")
|
1063
|
+
] = None,
|
1064
|
+
no_page: Annotated[Optional[bool], Field(description="No pagination.")] = None,
|
1065
|
+
**kwargs
|
1066
|
+
): # noqa: E501
|
1067
|
+
"""User workspaces # noqa: E501
|
1068
|
+
|
1069
|
+
This method makes a synchronous HTTP request by default. To make an
|
1070
|
+
asynchronous HTTP request, please pass async_req=True
|
1071
|
+
|
1072
|
+
>>> thread = api.get_workspaces_with_http_info(offset, limit, sort, query, no_page, async_req=True)
|
1073
|
+
>>> result = thread.get()
|
1074
|
+
|
1075
|
+
:param offset: Pagination offset.
|
1076
|
+
:type offset: int
|
1077
|
+
:param limit: Limit size.
|
1078
|
+
:type limit: int
|
1079
|
+
:param sort: Sort to order the search.
|
1080
|
+
:type sort: str
|
1081
|
+
:param query: Query filter the search.
|
1082
|
+
:type query: str
|
1083
|
+
:param no_page: No pagination.
|
1084
|
+
:type no_page: bool
|
1085
|
+
:param async_req: Whether to execute the request asynchronously.
|
1086
|
+
:type async_req: bool, optional
|
1087
|
+
:param _return_http_data_only: response data without head status code
|
1088
|
+
and headers
|
1089
|
+
:type _return_http_data_only: bool, optional
|
1090
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
1091
|
+
be returned without reading/decoding response
|
1092
|
+
data. Default is True.
|
1093
|
+
:type _preload_content: bool, optional
|
1094
|
+
:param _request_timeout: timeout setting for this request. If one
|
1095
|
+
number provided, it will be total request
|
1096
|
+
timeout. It can also be a pair (tuple) of
|
1097
|
+
(connection, read) timeouts.
|
1098
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1099
|
+
request; this effectively ignores the authentication
|
1100
|
+
in the spec for a single request.
|
1101
|
+
:type _request_auth: dict, optional
|
1102
|
+
:type _content_type: string, optional: force content-type for the request
|
1103
|
+
:return: Returns the result object.
|
1104
|
+
If the method is called asynchronously,
|
1105
|
+
returns the request thread.
|
1106
|
+
:rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
|
1107
|
+
"""
|
1108
|
+
|
1109
|
+
_params = locals()
|
1110
|
+
|
1111
|
+
_all_params = ["offset", "limit", "sort", "query", "no_page"]
|
1112
|
+
_all_params.extend(
|
1113
|
+
[
|
1114
|
+
"async_req",
|
1115
|
+
"_return_http_data_only",
|
1116
|
+
"_preload_content",
|
1117
|
+
"_request_timeout",
|
1118
|
+
"_request_auth",
|
1119
|
+
"_content_type",
|
1120
|
+
"_headers",
|
1121
|
+
]
|
1122
|
+
)
|
1123
|
+
|
1124
|
+
# validate the arguments
|
1125
|
+
for _key, _val in _params["kwargs"].items():
|
1126
|
+
if _key not in _all_params:
|
1127
|
+
raise ApiTypeError(
|
1128
|
+
"Got an unexpected keyword argument '%s'"
|
1129
|
+
" to method get_workspaces" % _key
|
1130
|
+
)
|
1131
|
+
_params[_key] = _val
|
1132
|
+
del _params["kwargs"]
|
1133
|
+
|
1134
|
+
_collection_formats = {}
|
1135
|
+
|
1136
|
+
# process the path parameters
|
1137
|
+
_path_params = {}
|
1138
|
+
|
1139
|
+
# process the query parameters
|
1140
|
+
_query_params = []
|
1141
|
+
if _params.get("offset") is not None: # noqa: E501
|
1142
|
+
_query_params.append(("offset", _params["offset"]))
|
1143
|
+
|
1144
|
+
if _params.get("limit") is not None: # noqa: E501
|
1145
|
+
_query_params.append(("limit", _params["limit"]))
|
1146
|
+
|
1147
|
+
if _params.get("sort") is not None: # noqa: E501
|
1148
|
+
_query_params.append(("sort", _params["sort"]))
|
1149
|
+
|
1150
|
+
if _params.get("query") is not None: # noqa: E501
|
1151
|
+
_query_params.append(("query", _params["query"]))
|
1152
|
+
|
1153
|
+
if _params.get("no_page") is not None: # noqa: E501
|
1154
|
+
_query_params.append(("no_page", _params["no_page"]))
|
1155
|
+
|
1156
|
+
# process the header parameters
|
1157
|
+
_header_params = dict(_params.get("_headers", {}))
|
1158
|
+
# process the form parameters
|
1159
|
+
_form_params = []
|
1160
|
+
_files = {}
|
1161
|
+
# process the body parameter
|
1162
|
+
_body_params = None
|
1163
|
+
# set the HTTP header `Accept`
|
1164
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1165
|
+
["application/json"]
|
1166
|
+
) # noqa: E501
|
1167
|
+
|
1168
|
+
# authentication setting
|
1169
|
+
_auth_settings = ["ApiKey"] # noqa: E501
|
1170
|
+
|
1171
|
+
_response_types_map = {
|
1172
|
+
"200": "object",
|
1173
|
+
"204": "object",
|
1174
|
+
"403": "object",
|
1175
|
+
"404": "object",
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
return self.api_client.call_api(
|
1179
|
+
"/api/v1/users/workspaces",
|
1180
|
+
"GET",
|
1181
|
+
_path_params,
|
1182
|
+
_query_params,
|
1183
|
+
_header_params,
|
1184
|
+
body=_body_params,
|
1185
|
+
post_params=_form_params,
|
1186
|
+
files=_files,
|
1187
|
+
response_types_map=_response_types_map,
|
1188
|
+
auth_settings=_auth_settings,
|
1189
|
+
async_req=_params.get("async_req"),
|
1190
|
+
_return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
|
1191
|
+
_preload_content=_params.get("_preload_content", True),
|
1192
|
+
_request_timeout=_params.get("_request_timeout"),
|
1193
|
+
collection_formats=_collection_formats,
|
1194
|
+
_request_auth=_params.get("_request_auth"),
|
1195
|
+
)
|
1196
|
+
|
1010
1197
|
@validate_arguments
|
1011
1198
|
def list_tokens(
|
1012
1199
|
self,
|
@@ -1153,25 +1340,26 @@ class UsersV1Api(BaseApi):
|
|
1153
1340
|
_query_params = []
|
1154
1341
|
if _params.get("offset") is not None: # noqa: E501
|
1155
1342
|
_query_params.append(("offset", _params["offset"]))
|
1343
|
+
|
1156
1344
|
if _params.get("limit") is not None: # noqa: E501
|
1157
1345
|
_query_params.append(("limit", _params["limit"]))
|
1346
|
+
|
1158
1347
|
if _params.get("sort") is not None: # noqa: E501
|
1159
1348
|
_query_params.append(("sort", _params["sort"]))
|
1349
|
+
|
1160
1350
|
if _params.get("query") is not None: # noqa: E501
|
1161
1351
|
_query_params.append(("query", _params["query"]))
|
1352
|
+
|
1162
1353
|
if _params.get("no_page") is not None: # noqa: E501
|
1163
1354
|
_query_params.append(("no_page", _params["no_page"]))
|
1164
1355
|
|
1165
1356
|
# process the header parameters
|
1166
1357
|
_header_params = dict(_params.get("_headers", {}))
|
1167
|
-
|
1168
1358
|
# process the form parameters
|
1169
1359
|
_form_params = []
|
1170
1360
|
_files = {}
|
1171
|
-
|
1172
1361
|
# process the body parameter
|
1173
1362
|
_body_params = None
|
1174
|
-
|
1175
1363
|
# set the HTTP header `Accept`
|
1176
1364
|
_header_params["Accept"] = self.api_client.select_header_accept(
|
1177
1365
|
["application/json"]
|
@@ -1320,14 +1508,11 @@ class UsersV1Api(BaseApi):
|
|
1320
1508
|
|
1321
1509
|
# process the query parameters
|
1322
1510
|
_query_params = []
|
1323
|
-
|
1324
1511
|
# process the header parameters
|
1325
1512
|
_header_params = dict(_params.get("_headers", {}))
|
1326
|
-
|
1327
1513
|
# process the form parameters
|
1328
1514
|
_form_params = []
|
1329
1515
|
_files = {}
|
1330
|
-
|
1331
1516
|
# process the body parameter
|
1332
1517
|
_body_params = None
|
1333
1518
|
if _params["body"]:
|
@@ -1473,14 +1658,11 @@ class UsersV1Api(BaseApi):
|
|
1473
1658
|
|
1474
1659
|
# process the query parameters
|
1475
1660
|
_query_params = []
|
1476
|
-
|
1477
1661
|
# process the header parameters
|
1478
1662
|
_header_params = dict(_params.get("_headers", {}))
|
1479
|
-
|
1480
1663
|
# process the form parameters
|
1481
1664
|
_form_params = []
|
1482
1665
|
_files = {}
|
1483
|
-
|
1484
1666
|
# process the body parameter
|
1485
1667
|
_body_params = None
|
1486
1668
|
if _params["body"]:
|
@@ -1644,14 +1826,11 @@ class UsersV1Api(BaseApi):
|
|
1644
1826
|
|
1645
1827
|
# process the query parameters
|
1646
1828
|
_query_params = []
|
1647
|
-
|
1648
1829
|
# process the header parameters
|
1649
1830
|
_header_params = dict(_params.get("_headers", {}))
|
1650
|
-
|
1651
1831
|
# process the form parameters
|
1652
1832
|
_form_params = []
|
1653
1833
|
_files = {}
|
1654
|
-
|
1655
1834
|
# process the body parameter
|
1656
1835
|
_body_params = None
|
1657
1836
|
if _params["body"]:
|
@@ -1797,14 +1976,11 @@ class UsersV1Api(BaseApi):
|
|
1797
1976
|
|
1798
1977
|
# process the query parameters
|
1799
1978
|
_query_params = []
|
1800
|
-
|
1801
1979
|
# process the header parameters
|
1802
1980
|
_header_params = dict(_params.get("_headers", {}))
|
1803
|
-
|
1804
1981
|
# process the form parameters
|
1805
1982
|
_form_params = []
|
1806
1983
|
_files = {}
|
1807
|
-
|
1808
1984
|
# process the body parameter
|
1809
1985
|
_body_params = None
|
1810
1986
|
if _params["body"]:
|
polyaxon/_sdk/schemas/v1_team.py
CHANGED
@@ -11,10 +11,13 @@ from polyaxon._sdk.schemas.v1_team_settings import V1TeamSettings
|
|
11
11
|
|
12
12
|
class V1Team(BaseAllowSchemaModel):
|
13
13
|
uuid: Optional[UUIDStr]
|
14
|
+
owner: Optional[StrictStr]
|
14
15
|
name: Optional[StrictStr]
|
15
16
|
projects: Optional[List[StrictStr]]
|
16
17
|
component_hubs: Optional[List[StrictStr]]
|
17
18
|
model_registries: Optional[List[StrictStr]]
|
18
19
|
settings: Optional[V1TeamSettings]
|
20
|
+
policy: Optional[StrictStr]
|
21
|
+
role: Optional[StrictStr]
|
19
22
|
created_at: Optional[datetime.datetime]
|
20
23
|
updated_at: Optional[datetime.datetime]
|
polyaxon/_sdk/schemas/v1_user.py
CHANGED
@@ -2,12 +2,11 @@ from typing import Optional
|
|
2
2
|
|
3
3
|
from clipped.compact.pydantic import StrictStr
|
4
4
|
from clipped.config.schema import BaseAllowSchemaModel
|
5
|
-
from clipped.types.email import EmailStr
|
6
5
|
|
7
6
|
|
8
7
|
class V1User(BaseAllowSchemaModel):
|
9
8
|
username: Optional[StrictStr]
|
10
|
-
email: Optional[
|
9
|
+
email: Optional[StrictStr]
|
11
10
|
name: Optional[StrictStr]
|
12
11
|
kind: Optional[StrictStr]
|
13
12
|
theme: Optional[int]
|
polyaxon/_utils/fqn_utils.py
CHANGED
@@ -9,15 +9,32 @@ from clipped.utils.paths import get_relative_path_to
|
|
9
9
|
from polyaxon.exceptions import PolyaxonSchemaError
|
10
10
|
|
11
11
|
|
12
|
+
def get_owner_team_space(owner: str, team: Optional[str] = None) -> str:
|
13
|
+
if team:
|
14
|
+
return "{}/{}".format(owner, team)
|
15
|
+
return owner
|
16
|
+
|
17
|
+
|
18
|
+
def split_owner_team_space(owner: str) -> Tuple[str, Optional[str]]:
|
19
|
+
return owner.split("/") if owner and "/" in owner else (owner, None)
|
20
|
+
|
21
|
+
|
22
|
+
def _remove_team(owner: str) -> str:
|
23
|
+
return split_owner_team_space(owner)[0]
|
24
|
+
|
25
|
+
|
12
26
|
def get_project_instance(owner: str, project: str) -> str:
|
27
|
+
owner = _remove_team(owner)
|
13
28
|
return "{}.{}".format(owner, project)
|
14
29
|
|
15
30
|
|
16
31
|
def get_run_instance(owner: str, project: str, run_uuid: str) -> str:
|
32
|
+
owner = _remove_team(owner)
|
17
33
|
return "{}.{}.runs.{}".format(owner, project, run_uuid)
|
18
34
|
|
19
35
|
|
20
36
|
def get_cleaner_instance(owner: str, project: str, run_uuid: str) -> str:
|
37
|
+
owner = _remove_team(owner)
|
21
38
|
return "{}.{}.cleaners.{}".format(owner, project, run_uuid)
|
22
39
|
|
23
40
|
|
@@ -53,6 +70,7 @@ def to_fqn_name(name: str) -> str:
|
|
53
70
|
def get_entity_full_name(
|
54
71
|
owner: Optional[str] = None, entity: Optional[str] = None
|
55
72
|
) -> str:
|
73
|
+
owner = _remove_team(owner)
|
56
74
|
if owner and entity:
|
57
75
|
return "{}/{}".format(owner, entity)
|
58
76
|
return entity
|
@@ -65,11 +83,14 @@ def get_entity_info(entity: str) -> Tuple[str, str]:
|
|
65
83
|
)
|
66
84
|
|
67
85
|
parts = entity.replace(".", "/").split("/")
|
68
|
-
if len(parts) >
|
86
|
+
if len(parts) > 3:
|
69
87
|
raise PolyaxonSchemaError(
|
70
88
|
"Received an invalid entity reference: `{}`".format(entity)
|
71
89
|
)
|
72
|
-
if len(parts) ==
|
90
|
+
if len(parts) == 3:
|
91
|
+
owner = "/".join(parts[:2])
|
92
|
+
entity_name = parts[2]
|
93
|
+
elif len(parts) == 2:
|
73
94
|
owner, entity_name = parts
|
74
95
|
else:
|
75
96
|
owner = None
|
@@ -81,6 +102,8 @@ def get_entity_info(entity: str) -> Tuple[str, str]:
|
|
81
102
|
def get_versioned_entity_full_name(
|
82
103
|
owner: Optional[str], component: str, tag: Optional[str] = None
|
83
104
|
) -> str:
|
105
|
+
owner = _remove_team(owner)
|
106
|
+
|
84
107
|
if tag:
|
85
108
|
component = "{}:{}".format(component, tag)
|
86
109
|
if owner:
|
polyaxon/pkg.py
CHANGED