anyscale 0.26.14__py3-none-any.whl → 0.26.16__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.
- anyscale/_private/anyscale_client/anyscale_client.py +4 -2
- anyscale/_private/anyscale_client/common.py +6 -4
- anyscale/_private/anyscale_client/fake_anyscale_client.py +16 -7
- anyscale/_private/docgen/__main__.py +4 -4
- anyscale/_private/docgen/generator.py +2 -2
- anyscale/_private/models/model_base.py +5 -2
- anyscale/_private/sdk/__init__.py +2 -2
- anyscale/_private/utils/progress_util.py +2 -2
- anyscale/_private/workload/workload_sdk.py +10 -7
- anyscale/aggregated_instance_usage/commands.py +6 -2
- anyscale/anyscale-cloud-setup.yaml +4 -0
- anyscale/client/README.md +8 -11
- anyscale/client/openapi_client/__init__.py +6 -8
- anyscale/client/openapi_client/api/default_api.py +292 -377
- anyscale/client/openapi_client/models/__init__.py +6 -8
- anyscale/client/openapi_client/models/alert_type.py +11 -2
- anyscale/client/openapi_client/models/create_job_queue_requests.py +3 -32
- anyscale/client/openapi_client/models/{product_autoscaler_flag.py → list_ray_sessions_response.py} +22 -23
- anyscale/client/openapi_client/models/{productautoscalerflag_response.py → listraysessionsresponse_response.py} +11 -11
- anyscale/client/openapi_client/models/metric.py +133 -3
- anyscale/client/openapi_client/models/ray_session.py +121 -0
- anyscale/client/openapi_client/models/task_exception_group_aggregate.py +28 -1
- anyscale/client/openapi_client/models/{taskexceptiongroupaggregate_list_response.py → task_exception_group_aggregate_response.py} +52 -25
- anyscale/client/openapi_client/models/task_function_name_group_aggregate.py +28 -1
- anyscale/client/openapi_client/models/{taskfunctionnamegroupaggregate_list_response.py → task_function_name_group_aggregate_response.py} +52 -25
- anyscale/client/openapi_client/models/task_job_group_aggregate.py +28 -1
- anyscale/client/openapi_client/models/{taskjobgroupaggregate_list_response.py → task_job_group_aggregate_response.py} +52 -25
- anyscale/client/openapi_client/models/task_table_row.py +19 -19
- anyscale/cloud/__init__.py +2 -2
- anyscale/cloud/_private/cloud_sdk.py +2 -2
- anyscale/cloud/commands.py +9 -6
- anyscale/cloud_resource.py +1 -1
- anyscale/cloud_utils.py +11 -6
- anyscale/cluster_compute.py +6 -5
- anyscale/cluster_env.py +10 -5
- anyscale/commands/login_commands.py +24 -3
- anyscale/commands/schedule_commands.py +2 -1
- anyscale/compute_config/_private/compute_config_sdk.py +1 -1
- anyscale/compute_config/commands.py +15 -7
- anyscale/connect_utils/prepare_cluster.py +14 -4
- anyscale/controllers/cloud_controller.py +9 -9
- anyscale/controllers/cloud_functional_verification_controller.py +4 -2
- anyscale/controllers/cluster_controller.py +1 -0
- anyscale/controllers/job_controller.py +1 -1
- anyscale/controllers/service_controller.py +2 -1
- anyscale/image/commands.py +6 -6
- anyscale/job/commands.py +12 -12
- anyscale/organization_invitation/commands.py +11 -7
- anyscale/project/__init__.py +2 -2
- anyscale/project/_private/project_sdk.py +2 -2
- anyscale/project/commands.py +3 -3
- anyscale/project_utils.py +5 -4
- anyscale/resource_quota/commands.py +18 -10
- anyscale/schedule/commands.py +12 -8
- anyscale/sdk/anyscale_client/sdk.py +5 -4
- anyscale/service/commands.py +17 -17
- anyscale/service_account/commands.py +12 -10
- anyscale/user/commands.py +5 -3
- anyscale/utils/connect_helpers.py +16 -3
- anyscale/utils/gcp_utils.py +25 -9
- anyscale/utils/runtime_env.py +3 -1
- anyscale/version.py +1 -1
- anyscale/workspace/__init__.py +10 -5
- anyscale/workspace/_private/workspace_sdk.py +9 -7
- anyscale/workspace/commands.py +25 -23
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/METADATA +1 -1
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/RECORD +72 -74
- anyscale/client/openapi_client/models/aviary_model_config_v2.py +0 -358
- anyscale/client/openapi_client/models/buffer_registration.py +0 -285
- anyscale/client/openapi_client/models/finish_ft_job_request_v2.py +0 -183
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/LICENSE +0 -0
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/NOTICE +0 -0
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/WHEEL +0 -0
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.14.dist-info → anyscale-0.26.16.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,16 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
2
|
import inspect
|
3
|
-
from typing import
|
3
|
+
from typing import (
|
4
|
+
Any,
|
5
|
+
Callable,
|
6
|
+
Dict,
|
7
|
+
Generic,
|
8
|
+
List,
|
9
|
+
Optional,
|
10
|
+
TYPE_CHECKING,
|
11
|
+
TypeVar,
|
12
|
+
Union,
|
13
|
+
)
|
4
14
|
|
5
15
|
from anyscale.anyscale_pydantic import BaseModel
|
6
16
|
from anyscale.client.openapi_client.models.session import Session
|
@@ -8,6 +18,7 @@ from anyscale.sdk.anyscale_client.models.cluster import Cluster
|
|
8
18
|
|
9
19
|
|
10
20
|
if TYPE_CHECKING:
|
21
|
+
from anyscale.sdk.anyscale_client.api.default_api import DefaultApi
|
11
22
|
from anyscale.sdk.anyscale_client.sdk import AnyscaleSDK
|
12
23
|
|
13
24
|
|
@@ -48,7 +59,9 @@ def _multiclient_supported() -> bool:
|
|
48
59
|
return "_context_to_restore" in _context_params
|
49
60
|
|
50
61
|
|
51
|
-
def find_project_id(
|
62
|
+
def find_project_id(
|
63
|
+
sdk: Union["AnyscaleSDK", "DefaultApi"], project_name: str
|
64
|
+
) -> Optional[str]:
|
52
65
|
"""Return id if a project of a given name exists."""
|
53
66
|
resp = sdk.search_projects({"name": {"equals": project_name}})
|
54
67
|
if len(resp.results) > 0:
|
@@ -58,7 +71,7 @@ def find_project_id(sdk: "AnyscaleSDK", project_name: str) -> Optional[str]:
|
|
58
71
|
|
59
72
|
|
60
73
|
def get_cluster(
|
61
|
-
sdk: "AnyscaleSDK", project_id: str, session_name: str
|
74
|
+
sdk: Union["AnyscaleSDK", "DefaultApi"], project_id: str, session_name: str
|
62
75
|
) -> Optional[Session]:
|
63
76
|
"""Query Anyscale for the given cluster's metadata."""
|
64
77
|
clusters = sdk.search_clusters(
|
anyscale/utils/gcp_utils.py
CHANGED
@@ -41,15 +41,31 @@ GCP_REQUIRED_APIS = [
|
|
41
41
|
]
|
42
42
|
|
43
43
|
GCP_RESOURCE_DICT: Dict[str, CloudAnalyticsEventCloudResource] = {
|
44
|
-
"VPC": CloudAnalyticsEventCloudResource.GCP_VPC,
|
45
|
-
"Subnet": CloudAnalyticsEventCloudResource
|
46
|
-
|
47
|
-
|
48
|
-
"
|
49
|
-
|
50
|
-
|
51
|
-
"
|
52
|
-
|
44
|
+
"VPC": CloudAnalyticsEventCloudResource(CloudAnalyticsEventCloudResource.GCP_VPC),
|
45
|
+
"Subnet": CloudAnalyticsEventCloudResource(
|
46
|
+
CloudAnalyticsEventCloudResource.GCP_SUBNET
|
47
|
+
),
|
48
|
+
"Project": CloudAnalyticsEventCloudResource(
|
49
|
+
CloudAnalyticsEventCloudResource.GCP_PROJECT
|
50
|
+
),
|
51
|
+
"Anyscale Access Service Account": CloudAnalyticsEventCloudResource(
|
52
|
+
CloudAnalyticsEventCloudResource.GCP_SERVICE_ACCOUNT
|
53
|
+
),
|
54
|
+
"Dataplane Service Account": CloudAnalyticsEventCloudResource(
|
55
|
+
CloudAnalyticsEventCloudResource.GCP_SERVICE_ACCOUNT
|
56
|
+
),
|
57
|
+
"Firewall Policy": CloudAnalyticsEventCloudResource(
|
58
|
+
CloudAnalyticsEventCloudResource.GCP_FIREWALL_POLICY
|
59
|
+
),
|
60
|
+
"Filestore": CloudAnalyticsEventCloudResource(
|
61
|
+
CloudAnalyticsEventCloudResource.GCP_FILESTORE
|
62
|
+
),
|
63
|
+
"Google Cloud Storage Bucket": CloudAnalyticsEventCloudResource(
|
64
|
+
CloudAnalyticsEventCloudResource.GCP_STORAGE_BUCKET
|
65
|
+
),
|
66
|
+
"Memorystore": CloudAnalyticsEventCloudResource(
|
67
|
+
CloudAnalyticsEventCloudResource.GCP_MEMORYSTORE
|
68
|
+
),
|
53
69
|
}
|
54
70
|
|
55
71
|
|
anyscale/utils/runtime_env.py
CHANGED
@@ -15,6 +15,7 @@ from typing import (
|
|
15
15
|
Optional,
|
16
16
|
Tuple,
|
17
17
|
TYPE_CHECKING,
|
18
|
+
Union,
|
18
19
|
)
|
19
20
|
from urllib.parse import urlparse
|
20
21
|
|
@@ -31,6 +32,7 @@ from anyscale.client.openapi_client.models.cloud_with_cloud_resource_gcp import
|
|
31
32
|
CloudWithCloudResourceGCP,
|
32
33
|
)
|
33
34
|
from anyscale.client.openapi_client.models.user_info import UserInfo
|
35
|
+
from anyscale.sdk.anyscale_client.api.default_api import DefaultApi as SDKDefaultApi
|
34
36
|
from anyscale.shared_anyscale_utils.aws import bucket_name_from_maybe_bucket_arn
|
35
37
|
from anyscale.util import is_anyscale_workspace
|
36
38
|
from anyscale.utils.ray_utils import zip_directory # type: ignore
|
@@ -221,7 +223,7 @@ def upload_and_rewrite_working_dir(
|
|
221
223
|
|
222
224
|
def override_runtime_env_config(
|
223
225
|
runtime_env: Optional[Dict[str, Any]],
|
224
|
-
anyscale_api_client: DefaultApi,
|
226
|
+
anyscale_api_client: Union[DefaultApi, SDKDefaultApi],
|
225
227
|
api_client: DefaultApi,
|
226
228
|
workload_type: Workload,
|
227
229
|
compute_config_id: Optional[str],
|
anyscale/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.26.
|
1
|
+
__version__ = "0.26.16"
|
anyscale/workspace/__init__.py
CHANGED
@@ -40,7 +40,12 @@ from anyscale.workspace.commands import (
|
|
40
40
|
update,
|
41
41
|
wait,
|
42
42
|
)
|
43
|
-
from anyscale.workspace.models import
|
43
|
+
from anyscale.workspace.models import (
|
44
|
+
UpdateWorkspaceConfig,
|
45
|
+
Workspace,
|
46
|
+
WorkspaceConfig,
|
47
|
+
WorkspaceState,
|
48
|
+
)
|
44
49
|
|
45
50
|
|
46
51
|
class WorkspaceSDK:
|
@@ -58,12 +63,12 @@ class WorkspaceSDK:
|
|
58
63
|
@sdk_docs(
|
59
64
|
doc_py_example=_CREATE_EXAMPLE, arg_docstrings=_CREATE_ARG_DOCSTRINGS,
|
60
65
|
)
|
61
|
-
def create(self, config: WorkspaceConfig) -> str: # noqa: F811
|
66
|
+
def create(self, config: Optional[WorkspaceConfig]) -> str: # noqa: F811
|
62
67
|
"""Create a workspace.
|
63
68
|
|
64
69
|
Returns the id of the workspace.
|
65
70
|
"""
|
66
|
-
return self._private_sdk.create(config=config)
|
71
|
+
return self._private_sdk.create(config=config) # type: ignore
|
67
72
|
|
68
73
|
@sdk_docs(
|
69
74
|
doc_py_example=_START_EXAMPLE, arg_docstrings=_START_ARG_DOCSTRINGS,
|
@@ -248,11 +253,11 @@ class WorkspaceSDK:
|
|
248
253
|
doc_py_example=_UPDATE_EXAMPLE, arg_docstrings=_UPDATE_ARG_DOCSTRINGS,
|
249
254
|
)
|
250
255
|
def update( # noqa: F811
|
251
|
-
self, *, id: str = None, config:
|
256
|
+
self, *, id: Optional[str] = None, config: UpdateWorkspaceConfig # noqa: A002
|
252
257
|
):
|
253
258
|
"""Update a workspace."""
|
254
259
|
self._private_sdk.update(
|
255
|
-
id=id, config=config,
|
260
|
+
id=id, config=config, # type: ignore
|
256
261
|
)
|
257
262
|
|
258
263
|
@sdk_docs(
|
@@ -113,7 +113,7 @@ class PrivateWorkspaceSDK(WorkloadSDK):
|
|
113
113
|
name = config.name
|
114
114
|
|
115
115
|
compute_config_id, cloud_id = self.resolve_compute_config_and_cloud_id(
|
116
|
-
compute_config=config.compute_config, cloud=config.cloud,
|
116
|
+
compute_config=config.compute_config, cloud=config.cloud, # type: ignore
|
117
117
|
)
|
118
118
|
|
119
119
|
project_id = self.client.get_project_id(
|
@@ -292,7 +292,7 @@ class PrivateWorkspaceSDK(WorkloadSDK):
|
|
292
292
|
f"Workspace '{workspace_id_or_name}' did not reach target state {state} within {timeout_s}s. Last seen state: {curr_state}."
|
293
293
|
)
|
294
294
|
|
295
|
-
def _get_workspace_status(self, workspace_id: str) -> WorkspaceState:
|
295
|
+
def _get_workspace_status(self, workspace_id: Optional[str]) -> WorkspaceState:
|
296
296
|
|
297
297
|
cluster = self.client.get_workspace_cluster(workspace_id)
|
298
298
|
if not cluster:
|
@@ -564,8 +564,10 @@ class PrivateWorkspaceSDK(WorkloadSDK):
|
|
564
564
|
delete=delete,
|
565
565
|
)
|
566
566
|
|
567
|
-
def update(
|
568
|
-
|
567
|
+
def update(
|
568
|
+
self, *, id: Optional[str], config: UpdateWorkspaceConfig # noqa: A002
|
569
|
+
) -> str:
|
570
|
+
workspace = self.client.get_workspace(id=id) # type: ignore
|
569
571
|
|
570
572
|
if not workspace:
|
571
573
|
raise ValueError(f"Workspace with id '{id}' was not found.")
|
@@ -581,7 +583,7 @@ class PrivateWorkspaceSDK(WorkloadSDK):
|
|
581
583
|
compute_config_id = None
|
582
584
|
if config.compute_config:
|
583
585
|
compute_config_id, _ = self.resolve_compute_config_and_cloud_id(
|
584
|
-
compute_config=config.compute_config, cloud=None,
|
586
|
+
compute_config=config.compute_config, cloud=None, # type: ignore
|
585
587
|
)
|
586
588
|
|
587
589
|
build_id = None
|
@@ -642,14 +644,14 @@ class PrivateWorkspaceSDK(WorkloadSDK):
|
|
642
644
|
)
|
643
645
|
self._logger.info(f"Applied environment variables to workspace id: {id}")
|
644
646
|
|
645
|
-
return id
|
647
|
+
return id # type: ignore
|
646
648
|
|
647
649
|
def _convert_cluster_state_to_workspace_state(
|
648
650
|
self, state: SessionState
|
649
651
|
) -> WorkspaceState:
|
650
652
|
return cast(
|
651
653
|
WorkspaceState,
|
652
|
-
self._BACKEND_SESSION_STATE_TO_WORKSPACE_STATE.get(
|
654
|
+
self._BACKEND_SESSION_STATE_TO_WORKSPACE_STATE.get( # type: ignore
|
653
655
|
state, WorkspaceState.UNKNOWN
|
654
656
|
),
|
655
657
|
)
|
anyscale/workspace/commands.py
CHANGED
@@ -34,12 +34,14 @@ _WAIT_TIMEOUT_SECONDS = 1800.0
|
|
34
34
|
doc_py_example=_CREATE_EXAMPLE,
|
35
35
|
arg_docstrings=_CREATE_ARG_DOCSTRINGS,
|
36
36
|
)
|
37
|
-
def create(
|
37
|
+
def create(
|
38
|
+
config: WorkspaceConfig, *, _private_sdk: Optional[PrivateWorkspaceSDK] = None
|
39
|
+
) -> str:
|
38
40
|
"""Create a workspace.
|
39
41
|
|
40
42
|
Returns the id of the created workspace.
|
41
43
|
"""
|
42
|
-
return
|
44
|
+
return _private_sdk.create(config) # type: ignore
|
43
45
|
|
44
46
|
|
45
47
|
_START_EXAMPLE = """
|
@@ -70,13 +72,13 @@ def start(
|
|
70
72
|
id: Optional[str] = None, # noqa: A002
|
71
73
|
cloud: Optional[str] = None,
|
72
74
|
project: Optional[str] = None,
|
73
|
-
|
75
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
74
76
|
) -> str:
|
75
77
|
"""Start a workspace.
|
76
78
|
|
77
79
|
Returns the id of the started workspace.
|
78
80
|
"""
|
79
|
-
return
|
81
|
+
return _private_sdk.start(name=name, id=id, cloud=cloud, project=project) # type: ignore
|
80
82
|
|
81
83
|
|
82
84
|
_TERMINATE_EXAMPLE = """
|
@@ -107,13 +109,13 @@ def terminate(
|
|
107
109
|
id: Optional[str] = None, # noqa: A002
|
108
110
|
cloud: Optional[str] = None,
|
109
111
|
project: Optional[str] = None,
|
110
|
-
|
112
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
111
113
|
) -> str:
|
112
114
|
"""Terminate a workspace.
|
113
115
|
|
114
116
|
Returns the id of the terminated workspace.
|
115
117
|
"""
|
116
|
-
return
|
118
|
+
return _private_sdk.terminate(name=name, id=id, cloud=cloud, project=project) # type: ignore
|
117
119
|
|
118
120
|
|
119
121
|
_STATUS_EXAMPLE = """
|
@@ -144,13 +146,13 @@ def status(
|
|
144
146
|
id: Optional[str] = None, # noqa: A002
|
145
147
|
cloud: Optional[str] = None,
|
146
148
|
project: Optional[str] = None,
|
147
|
-
|
149
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
148
150
|
) -> str:
|
149
151
|
"""Get the status of a workspace.
|
150
152
|
|
151
153
|
Returns the status of the workspace.
|
152
154
|
"""
|
153
|
-
return
|
155
|
+
return _private_sdk.status(name=name, id=id, cloud=cloud, project=project) # type: ignore
|
154
156
|
|
155
157
|
|
156
158
|
_WAIT_EXAMPLE = """
|
@@ -185,13 +187,13 @@ def wait(
|
|
185
187
|
project: Optional[str] = None,
|
186
188
|
timeout_s: float = _WAIT_TIMEOUT_SECONDS,
|
187
189
|
state: str = WorkspaceState.RUNNING,
|
188
|
-
|
190
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
189
191
|
) -> str:
|
190
192
|
"""Wait for a workspace to reach a terminal state.
|
191
193
|
|
192
194
|
Returns the status of the workspace.
|
193
195
|
"""
|
194
|
-
return
|
196
|
+
return _private_sdk.wait( # type: ignore
|
195
197
|
name=name,
|
196
198
|
id=id,
|
197
199
|
cloud=cloud,
|
@@ -235,13 +237,13 @@ def generate_ssh_config_file(
|
|
235
237
|
cloud: Optional[str] = None,
|
236
238
|
project: Optional[str] = None,
|
237
239
|
ssh_config_path: Optional[str] = None,
|
238
|
-
|
240
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
239
241
|
) -> Tuple[str, str]:
|
240
242
|
"""Generate an SSH config file for a workspace.
|
241
243
|
|
242
244
|
Returns the hostname and path to the generated config file.
|
243
245
|
"""
|
244
|
-
return
|
246
|
+
return _private_sdk.generate_ssh_config_file( # type: ignore
|
245
247
|
name=name, id=id, cloud=cloud, project=project, ssh_config_path=ssh_config_path,
|
246
248
|
)
|
247
249
|
|
@@ -281,14 +283,14 @@ def run_command(
|
|
281
283
|
cloud: Optional[str] = None,
|
282
284
|
project: Optional[str] = None,
|
283
285
|
command: str,
|
284
|
-
|
286
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
285
287
|
**kwargs: Dict[str, Any],
|
286
288
|
):
|
287
289
|
"""Run a command in a workspace.
|
288
290
|
|
289
291
|
Returns a subprocess.CompletedProcess object.
|
290
292
|
"""
|
291
|
-
return
|
293
|
+
return _private_sdk.run_command( # type: ignore
|
292
294
|
name=name, id=id, cloud=cloud, project=project, command=command, **kwargs,
|
293
295
|
)
|
294
296
|
|
@@ -328,13 +330,13 @@ def pull(
|
|
328
330
|
pull_git_state: bool = False,
|
329
331
|
rsync_args: Optional[List[str]] = None,
|
330
332
|
delete: bool = False,
|
331
|
-
|
333
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
332
334
|
) -> None:
|
333
335
|
"""Pull a workspace to a local directory.
|
334
336
|
|
335
337
|
Returns the path to the pulled workspace.
|
336
338
|
"""
|
337
|
-
|
339
|
+
_private_sdk.pull( # type: ignore
|
338
340
|
name=name,
|
339
341
|
id=id,
|
340
342
|
cloud=cloud,
|
@@ -383,13 +385,13 @@ def push(
|
|
383
385
|
push_git_state: bool = False,
|
384
386
|
rsync_args: Optional[List[str]] = None,
|
385
387
|
delete: bool = False,
|
386
|
-
|
388
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
387
389
|
) -> None:
|
388
390
|
"""Push a local directory to a workspace.
|
389
391
|
|
390
392
|
Returns the path to the pushed workspace.
|
391
393
|
"""
|
392
|
-
|
394
|
+
_private_sdk.push( # type: ignore
|
393
395
|
name=name,
|
394
396
|
id=id,
|
395
397
|
cloud=cloud,
|
@@ -427,12 +429,12 @@ _UPDATE_ARG_DOCSTRINGS = {
|
|
427
429
|
)
|
428
430
|
def update(
|
429
431
|
*,
|
430
|
-
id: str = None, # noqa: A002
|
432
|
+
id: Optional[str] = None, # noqa: A002
|
431
433
|
config: UpdateWorkspaceConfig,
|
432
|
-
|
434
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
433
435
|
) -> None:
|
434
436
|
"""Update a workspace."""
|
435
|
-
|
437
|
+
_private_sdk.update( # type: ignore
|
436
438
|
id=id, config=config,
|
437
439
|
)
|
438
440
|
|
@@ -466,7 +468,7 @@ def get(
|
|
466
468
|
id: Optional[str] = None, # noqa: A002
|
467
469
|
cloud: Optional[str] = None,
|
468
470
|
project: Optional[str] = None,
|
469
|
-
|
471
|
+
_private_sdk: Optional[PrivateWorkspaceSDK] = None,
|
470
472
|
) -> Workspace:
|
471
473
|
"""Get a workspace."""
|
472
|
-
return
|
474
|
+
return _private_sdk.get(name=name, id=id, cloud=cloud, project=project) # type: ignore
|