anyscale 0.25.2__py3-none-any.whl → 0.25.3__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 +5 -0
- anyscale/_private/anyscale_client/common.py +5 -0
- anyscale/_private/anyscale_client/fake_anyscale_client.py +11 -0
- anyscale/_private/workload/workload_config.py +20 -6
- anyscale/client/README.md +5 -0
- anyscale/client/openapi_client/__init__.py +3 -0
- anyscale/client/openapi_client/api/default_api.py +272 -2
- anyscale/client/openapi_client/models/__init__.py +3 -0
- anyscale/client/openapi_client/models/cluster_event_source.py +105 -0
- anyscale/client/openapi_client/models/clusterevent_list_response.py +147 -0
- anyscale/client/openapi_client/models/update_cloud_collaborator.py +121 -0
- anyscale/commands/cloud_commands.py +24 -4
- anyscale/commands/command_examples.py +4 -0
- anyscale/commands/service_commands.py +60 -0
- anyscale/controllers/cloud_controller.py +29 -4
- anyscale/service/__init__.py +21 -0
- anyscale/service/_private/service_sdk.py +13 -0
- anyscale/service/commands.py +35 -0
- anyscale/shared_anyscale_utils/utils/id_gen.py +1 -0
- anyscale/version.py +1 -1
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/METADATA +1 -1
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/RECORD +27 -24
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/LICENSE +0 -0
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/NOTICE +0 -0
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/WHEEL +0 -0
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/entry_points.txt +0 -0
- {anyscale-0.25.2.dist-info → anyscale-0.25.3.dist-info}/top_level.txt +0 -0
@@ -1095,6 +1095,11 @@ class AnyscaleClient(AnyscaleClientInterface):
|
|
1095
1095
|
result: ServiceModel = self._external_api_client.terminate_service(service_id)
|
1096
1096
|
return result
|
1097
1097
|
|
1098
|
+
@handle_api_exceptions
|
1099
|
+
def archive_service(self, service_id: str) -> ServiceModel:
|
1100
|
+
result: ServiceModel = self._external_api_client.archive_service(service_id)
|
1101
|
+
return result
|
1102
|
+
|
1098
1103
|
@handle_api_exceptions
|
1099
1104
|
def submit_job(self, model: CreateInternalProductionJob) -> InternalProductionJob:
|
1100
1105
|
job: InternalProductionJob = self._internal_api_client.create_job_api_v2_decorated_ha_jobs_create_post(
|
@@ -353,6 +353,11 @@ class AnyscaleClientInterface(ABC):
|
|
353
353
|
"""Mark the service to be terminated asynchronously."""
|
354
354
|
raise NotImplementedError
|
355
355
|
|
356
|
+
@abstractmethod
|
357
|
+
def archive_service(self, service_id: str):
|
358
|
+
"""Mark the service to be archived asynchronously."""
|
359
|
+
raise NotImplementedError
|
360
|
+
|
356
361
|
@abstractmethod
|
357
362
|
def submit_job(self, model: CreateInternalProductionJob) -> InternalProductionJob:
|
358
363
|
"""Submit the job to run."""
|
@@ -144,6 +144,7 @@ class FakeAnyscaleClient(AnyscaleClientInterface):
|
|
144
144
|
self._workspace_cluster: Optional[Cluster] = None
|
145
145
|
self._workspace_dependency_tracking_enabled: bool = False
|
146
146
|
self._services: Dict[str, ServiceModel] = {}
|
147
|
+
self._archived_services: Dict[str, ServiceModel] = {}
|
147
148
|
self._jobs: Dict[str, ProductionJob] = {}
|
148
149
|
self._job_runs: Dict[str, List[APIJobRun]] = defaultdict(list)
|
149
150
|
self._project_to_id: Dict[Optional[str] : Dict[Optional[str], str]] = {}
|
@@ -763,6 +764,16 @@ class FakeAnyscaleClient(AnyscaleClientInterface):
|
|
763
764
|
service_id
|
764
765
|
].primary_version.current_state = ServiceVersionState.TERMINATED
|
765
766
|
|
767
|
+
@property
|
768
|
+
def archived_services(self) -> Dict[str, ServiceModel]:
|
769
|
+
return self._archived_services
|
770
|
+
|
771
|
+
def archive_service(self, service_id: str):
|
772
|
+
self._archived_services[service_id] = self._services.pop(service_id)
|
773
|
+
|
774
|
+
def is_archived_service(self, service_id: str) -> bool:
|
775
|
+
return service_id in self._archived_services
|
776
|
+
|
766
777
|
@property
|
767
778
|
def submitted_job(self) -> Optional[CreateInternalProductionJob]:
|
768
779
|
return self._submitted_job
|
@@ -117,13 +117,27 @@ class WorkloadConfig(ModelBase):
|
|
117
117
|
)
|
118
118
|
|
119
119
|
def _validate_env_vars(self, env_vars: Optional[Dict[str, str]]):
|
120
|
-
if env_vars is
|
121
|
-
|
122
|
-
|
123
|
-
|
120
|
+
if env_vars is None:
|
121
|
+
return
|
122
|
+
|
123
|
+
if not isinstance(env_vars, dict):
|
124
|
+
raise TypeError(
|
125
|
+
"'env_vars' must be a Dict[str, str], "
|
126
|
+
f"but got type {type(env_vars)}."
|
124
127
|
)
|
125
|
-
|
126
|
-
|
128
|
+
|
129
|
+
for k, v in env_vars.items():
|
130
|
+
if not isinstance(k, str):
|
131
|
+
raise TypeError(
|
132
|
+
"'env_vars' must be a Dict[str, str], "
|
133
|
+
f"but got key of type {type(k)}: {k}."
|
134
|
+
)
|
135
|
+
|
136
|
+
if not isinstance(v, str):
|
137
|
+
raise TypeError(
|
138
|
+
"'env_vars' must be a Dict[str, str], "
|
139
|
+
f"but got value of type {type(v)} for key '{k}': {v}."
|
140
|
+
)
|
127
141
|
|
128
142
|
py_modules: Optional[List[str]] = field(
|
129
143
|
default=None,
|
anyscale/client/README.md
CHANGED
@@ -78,6 +78,7 @@ Class | Method | HTTP request | Description
|
|
78
78
|
*DefaultApi* | [**add_to_waitlist_api_v2_aioa_cloud_waitlist_post**](docs/DefaultApi.md#add_to_waitlist_api_v2_aioa_cloud_waitlist_post) | **POST** /api/v2/aioa_cloud_waitlist/ | Add To Waitlist
|
79
79
|
*DefaultApi* | [**admin_batch_create_users_api_v2_users_admin_batch_create_post**](docs/DefaultApi.md#admin_batch_create_users_api_v2_users_admin_batch_create_post) | **POST** /api/v2/users/admin_batch_create | Admin Batch Create Users
|
80
80
|
*DefaultApi* | [**admission_api_v2_kubernetes_manager_admission_cloud_resource_id_post**](docs/DefaultApi.md#admission_api_v2_kubernetes_manager_admission_cloud_resource_id_post) | **POST** /api/v2/kubernetes_manager/admission/{cloud_resource_id} | Admission
|
81
|
+
*DefaultApi* | [**alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put**](docs/DefaultApi.md#alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put) | **PUT** /api/v2/clouds/{cloud_id}/collaborators/users/{identity_id} | Alter Cloud Collaborator
|
81
82
|
*DefaultApi* | [**alter_organization_collaborator_api_v2_organization_collaborators_identity_id_put**](docs/DefaultApi.md#alter_organization_collaborator_api_v2_organization_collaborators_identity_id_put) | **PUT** /api/v2/organization_collaborators/{identity_id} | Alter Organization Collaborator
|
82
83
|
*DefaultApi* | [**alter_project_collaborator_api_v2_projects_project_id_collaborators_role_or_identity_id_put**](docs/DefaultApi.md#alter_project_collaborator_api_v2_projects_project_id_collaborators_role_or_identity_id_put) | **PUT** /api/v2/projects/{project_id}/collaborators/{role_or_identity_id} | Alter Project Collaborator
|
83
84
|
*DefaultApi* | [**apply_service_api_v2_services_v2_apply_put**](docs/DefaultApi.md#apply_service_api_v2_services_v2_apply_put) | **PUT** /api/v2/services-v2/apply | Apply Service
|
@@ -195,6 +196,7 @@ Class | Method | HTTP request | Description
|
|
195
196
|
*DefaultApi* | [**get_cloud_project_collaborator_api_v2_projects_project_id_collaborators_clouds_get**](docs/DefaultApi.md#get_cloud_project_collaborator_api_v2_projects_project_id_collaborators_clouds_get) | **GET** /api/v2/projects/{project_id}/collaborators/clouds | Get Cloud Project Collaborator
|
196
197
|
*DefaultApi* | [**get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get**](docs/DefaultApi.md#get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get) | **GET** /api/v2/clouds_with_cloud_resource_gcp_router/{cloud_id} | Get Cloud With Cloud Resource
|
197
198
|
*DefaultApi* | [**get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get**](docs/DefaultApi.md#get_cloud_with_cloud_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get) | **GET** /api/v2/clouds_with_cloud_resource_router/{cloud_id} | Get Cloud With Cloud Resource
|
199
|
+
*DefaultApi* | [**get_cluster_events_api_v2_sessions_session_id_cluster_events_get**](docs/DefaultApi.md#get_cluster_events_api_v2_sessions_session_id_cluster_events_get) | **GET** /api/v2/sessions/{session_id}/cluster_events | Get Cluster Events
|
198
200
|
*DefaultApi* | [**get_cluster_product_autoscaler_flag_api_v2_logs_cluster_product_autoscaler_flag_session_id_get**](docs/DefaultApi.md#get_cluster_product_autoscaler_flag_api_v2_logs_cluster_product_autoscaler_flag_session_id_get) | **GET** /api/v2/logs/cluster_product_autoscaler_flag/{session_id} | Get Cluster Product Autoscaler Flag
|
199
201
|
*DefaultApi* | [**get_compute_template_api_v2_compute_templates_template_id_get**](docs/DefaultApi.md#get_compute_template_api_v2_compute_templates_template_id_get) | **GET** /api/v2/compute_templates/{template_id} | Get Compute Template
|
200
202
|
*DefaultApi* | [**get_cron_job_api_v2_experimental_cron_jobs_cron_job_id_get**](docs/DefaultApi.md#get_cron_job_api_v2_experimental_cron_jobs_cron_job_id_get) | **GET** /api/v2/experimental_cron_jobs/{cron_job_id} | Get Cron Job
|
@@ -559,6 +561,7 @@ Class | Method | HTTP request | Description
|
|
559
561
|
- [ClusterConfigWithSessionIdleTimeout](docs/ClusterConfigWithSessionIdleTimeout.md)
|
560
562
|
- [ClusterEnvironmentsQuery](docs/ClusterEnvironmentsQuery.md)
|
561
563
|
- [ClusterEvent](docs/ClusterEvent.md)
|
564
|
+
- [ClusterEventSource](docs/ClusterEventSource.md)
|
562
565
|
- [ClusterEventsOutput](docs/ClusterEventsOutput.md)
|
563
566
|
- [ClusterFeatures](docs/ClusterFeatures.md)
|
564
567
|
- [ClusterManagementStackVersions](docs/ClusterManagementStackVersions.md)
|
@@ -569,6 +572,7 @@ Class | Method | HTTP request | Description
|
|
569
572
|
- [ClusterauthresponseResponse](docs/ClusterauthresponseResponse.md)
|
570
573
|
- [ClusterconfigResponse](docs/ClusterconfigResponse.md)
|
571
574
|
- [ClusterconfigwithsessionidletimeoutResponse](docs/ClusterconfigwithsessionidletimeoutResponse.md)
|
575
|
+
- [ClustereventListResponse](docs/ClustereventListResponse.md)
|
572
576
|
- [ClustereventsoutputResponse](docs/ClustereventsoutputResponse.md)
|
573
577
|
- [ClusterfeaturesResponse](docs/ClusterfeaturesResponse.md)
|
574
578
|
- [ComputeNodeType](docs/ComputeNodeType.md)
|
@@ -1012,6 +1016,7 @@ Class | Method | HTTP request | Description
|
|
1012
1016
|
- [UnifiedJobSortField](docs/UnifiedJobSortField.md)
|
1013
1017
|
- [UnifiedJobStatus](docs/UnifiedJobStatus.md)
|
1014
1018
|
- [UnifiedJobType](docs/UnifiedJobType.md)
|
1019
|
+
- [UpdateCloudCollaborator](docs/UpdateCloudCollaborator.md)
|
1015
1020
|
- [UpdateCloudWithCloudResource](docs/UpdateCloudWithCloudResource.md)
|
1016
1021
|
- [UpdateCloudWithCloudResourceGCP](docs/UpdateCloudWithCloudResourceGCP.md)
|
1017
1022
|
- [UpdateClusterDns](docs/UpdateClusterDns.md)
|
@@ -160,6 +160,7 @@ from openapi_client.models.cluster_config import ClusterConfig
|
|
160
160
|
from openapi_client.models.cluster_config_with_session_idle_timeout import ClusterConfigWithSessionIdleTimeout
|
161
161
|
from openapi_client.models.cluster_environments_query import ClusterEnvironmentsQuery
|
162
162
|
from openapi_client.models.cluster_event import ClusterEvent
|
163
|
+
from openapi_client.models.cluster_event_source import ClusterEventSource
|
163
164
|
from openapi_client.models.cluster_events_output import ClusterEventsOutput
|
164
165
|
from openapi_client.models.cluster_features import ClusterFeatures
|
165
166
|
from openapi_client.models.cluster_management_stack_versions import ClusterManagementStackVersions
|
@@ -170,6 +171,7 @@ from openapi_client.models.cluster_status_details import ClusterStatusDetails
|
|
170
171
|
from openapi_client.models.clusterauthresponse_response import ClusterauthresponseResponse
|
171
172
|
from openapi_client.models.clusterconfig_response import ClusterconfigResponse
|
172
173
|
from openapi_client.models.clusterconfigwithsessionidletimeout_response import ClusterconfigwithsessionidletimeoutResponse
|
174
|
+
from openapi_client.models.clusterevent_list_response import ClustereventListResponse
|
173
175
|
from openapi_client.models.clustereventsoutput_response import ClustereventsoutputResponse
|
174
176
|
from openapi_client.models.clusterfeatures_response import ClusterfeaturesResponse
|
175
177
|
from openapi_client.models.compute_node_type import ComputeNodeType
|
@@ -613,6 +615,7 @@ from openapi_client.models.ux_instance import UXInstance
|
|
613
615
|
from openapi_client.models.unified_job_sort_field import UnifiedJobSortField
|
614
616
|
from openapi_client.models.unified_job_status import UnifiedJobStatus
|
615
617
|
from openapi_client.models.unified_job_type import UnifiedJobType
|
618
|
+
from openapi_client.models.update_cloud_collaborator import UpdateCloudCollaborator
|
616
619
|
from openapi_client.models.update_cloud_with_cloud_resource import UpdateCloudWithCloudResource
|
617
620
|
from openapi_client.models.update_cloud_with_cloud_resource_gcp import UpdateCloudWithCloudResourceGCP
|
618
621
|
from openapi_client.models.update_cluster_dns import UpdateClusterDns
|
@@ -382,6 +382,140 @@ class DefaultApi(object):
|
|
382
382
|
_request_timeout=local_var_params.get('_request_timeout'),
|
383
383
|
collection_formats=collection_formats)
|
384
384
|
|
385
|
+
def alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put(self, cloud_id, identity_id, update_cloud_collaborator, **kwargs): # noqa: E501
|
386
|
+
"""Alter Cloud Collaborator # noqa: E501
|
387
|
+
|
388
|
+
This method makes a synchronous HTTP request by default. To make an
|
389
|
+
asynchronous HTTP request, please pass async_req=True
|
390
|
+
>>> thread = api.alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put(cloud_id, identity_id, update_cloud_collaborator, async_req=True)
|
391
|
+
>>> result = thread.get()
|
392
|
+
|
393
|
+
:param async_req bool: execute request asynchronously
|
394
|
+
:param str cloud_id: (required)
|
395
|
+
:param str identity_id: (required)
|
396
|
+
:param UpdateCloudCollaborator update_cloud_collaborator: (required)
|
397
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
398
|
+
be returned without reading/decoding response
|
399
|
+
data. Default is True.
|
400
|
+
:param _request_timeout: timeout setting for this request. If one
|
401
|
+
number provided, it will be total request
|
402
|
+
timeout. It can also be a pair (tuple) of
|
403
|
+
(connection, read) timeouts.
|
404
|
+
:return: None
|
405
|
+
If the method is called asynchronously,
|
406
|
+
returns the request thread.
|
407
|
+
"""
|
408
|
+
kwargs['_return_http_data_only'] = True
|
409
|
+
return self.alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put_with_http_info(cloud_id, identity_id, update_cloud_collaborator, **kwargs) # noqa: E501
|
410
|
+
|
411
|
+
def alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put_with_http_info(self, cloud_id, identity_id, update_cloud_collaborator, **kwargs): # noqa: E501
|
412
|
+
"""Alter Cloud Collaborator # noqa: E501
|
413
|
+
|
414
|
+
This method makes a synchronous HTTP request by default. To make an
|
415
|
+
asynchronous HTTP request, please pass async_req=True
|
416
|
+
>>> thread = api.alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put_with_http_info(cloud_id, identity_id, update_cloud_collaborator, async_req=True)
|
417
|
+
>>> result = thread.get()
|
418
|
+
|
419
|
+
:param async_req bool: execute request asynchronously
|
420
|
+
:param str cloud_id: (required)
|
421
|
+
:param str identity_id: (required)
|
422
|
+
:param UpdateCloudCollaborator update_cloud_collaborator: (required)
|
423
|
+
:param _return_http_data_only: response data without head status code
|
424
|
+
and headers
|
425
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
426
|
+
be returned without reading/decoding response
|
427
|
+
data. Default is True.
|
428
|
+
:param _request_timeout: timeout setting for this request. If one
|
429
|
+
number provided, it will be total request
|
430
|
+
timeout. It can also be a pair (tuple) of
|
431
|
+
(connection, read) timeouts.
|
432
|
+
:return: None
|
433
|
+
If the method is called asynchronously,
|
434
|
+
returns the request thread.
|
435
|
+
"""
|
436
|
+
|
437
|
+
local_var_params = locals()
|
438
|
+
|
439
|
+
all_params = [
|
440
|
+
'cloud_id',
|
441
|
+
'identity_id',
|
442
|
+
'update_cloud_collaborator'
|
443
|
+
]
|
444
|
+
all_params.extend(
|
445
|
+
[
|
446
|
+
'async_req',
|
447
|
+
'_return_http_data_only',
|
448
|
+
'_preload_content',
|
449
|
+
'_request_timeout'
|
450
|
+
]
|
451
|
+
)
|
452
|
+
|
453
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
454
|
+
if key not in all_params:
|
455
|
+
raise ApiTypeError(
|
456
|
+
"Got an unexpected keyword argument '%s'"
|
457
|
+
" to method alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put" % key
|
458
|
+
)
|
459
|
+
local_var_params[key] = val
|
460
|
+
del local_var_params['kwargs']
|
461
|
+
# verify the required parameter 'cloud_id' is set
|
462
|
+
if self.api_client.client_side_validation and ('cloud_id' not in local_var_params or # noqa: E501
|
463
|
+
local_var_params['cloud_id'] is None): # noqa: E501
|
464
|
+
raise ApiValueError("Missing the required parameter `cloud_id` when calling `alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put`") # noqa: E501
|
465
|
+
# verify the required parameter 'identity_id' is set
|
466
|
+
if self.api_client.client_side_validation and ('identity_id' not in local_var_params or # noqa: E501
|
467
|
+
local_var_params['identity_id'] is None): # noqa: E501
|
468
|
+
raise ApiValueError("Missing the required parameter `identity_id` when calling `alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put`") # noqa: E501
|
469
|
+
# verify the required parameter 'update_cloud_collaborator' is set
|
470
|
+
if self.api_client.client_side_validation and ('update_cloud_collaborator' not in local_var_params or # noqa: E501
|
471
|
+
local_var_params['update_cloud_collaborator'] is None): # noqa: E501
|
472
|
+
raise ApiValueError("Missing the required parameter `update_cloud_collaborator` when calling `alter_cloud_collaborator_api_v2_clouds_cloud_id_collaborators_users_identity_id_put`") # noqa: E501
|
473
|
+
|
474
|
+
collection_formats = {}
|
475
|
+
|
476
|
+
path_params = {}
|
477
|
+
if 'cloud_id' in local_var_params:
|
478
|
+
path_params['cloud_id'] = local_var_params['cloud_id'] # noqa: E501
|
479
|
+
if 'identity_id' in local_var_params:
|
480
|
+
path_params['identity_id'] = local_var_params['identity_id'] # noqa: E501
|
481
|
+
|
482
|
+
query_params = []
|
483
|
+
|
484
|
+
header_params = {}
|
485
|
+
|
486
|
+
form_params = []
|
487
|
+
local_var_files = {}
|
488
|
+
|
489
|
+
body_params = None
|
490
|
+
if 'update_cloud_collaborator' in local_var_params:
|
491
|
+
body_params = local_var_params['update_cloud_collaborator']
|
492
|
+
# HTTP header `Accept`
|
493
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
494
|
+
['application/json']) # noqa: E501
|
495
|
+
|
496
|
+
# HTTP header `Content-Type`
|
497
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
498
|
+
['application/json']) # noqa: E501
|
499
|
+
|
500
|
+
# Authentication setting
|
501
|
+
auth_settings = [] # noqa: E501
|
502
|
+
|
503
|
+
return self.api_client.call_api(
|
504
|
+
'/api/v2/clouds/{cloud_id}/collaborators/users/{identity_id}', 'PUT',
|
505
|
+
path_params,
|
506
|
+
query_params,
|
507
|
+
header_params,
|
508
|
+
body=body_params,
|
509
|
+
post_params=form_params,
|
510
|
+
files=local_var_files,
|
511
|
+
response_type=None, # noqa: E501
|
512
|
+
auth_settings=auth_settings,
|
513
|
+
async_req=local_var_params.get('async_req'),
|
514
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
515
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
516
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
517
|
+
collection_formats=collection_formats)
|
518
|
+
|
385
519
|
def alter_organization_collaborator_api_v2_organization_collaborators_identity_id_put(self, identity_id, update_organization_collaborator, **kwargs): # noqa: E501
|
386
520
|
"""Alter Organization Collaborator # noqa: E501
|
387
521
|
|
@@ -14147,6 +14281,142 @@ class DefaultApi(object):
|
|
14147
14281
|
_request_timeout=local_var_params.get('_request_timeout'),
|
14148
14282
|
collection_formats=collection_formats)
|
14149
14283
|
|
14284
|
+
def get_cluster_events_api_v2_sessions_session_id_cluster_events_get(self, session_id, **kwargs): # noqa: E501
|
14285
|
+
"""Get Cluster Events # noqa: E501
|
14286
|
+
|
14287
|
+
Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the UI to fetch events. This should power general observability event views shared by different workload types. Like the task view or the Train dashboard view. The /events endpoint is used by the dataplane to fetch events and has cluster auth requirements. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
|
14288
|
+
This method makes a synchronous HTTP request by default. To make an
|
14289
|
+
asynchronous HTTP request, please pass async_req=True
|
14290
|
+
>>> thread = api.get_cluster_events_api_v2_sessions_session_id_cluster_events_get(session_id, async_req=True)
|
14291
|
+
>>> result = thread.get()
|
14292
|
+
|
14293
|
+
:param async_req bool: execute request asynchronously
|
14294
|
+
:param str session_id: (required)
|
14295
|
+
:param datetime start_time: Filter for events that have occurred since this value
|
14296
|
+
:param datetime end_time: Filter for events that have occurred before this value
|
14297
|
+
:param list[ClusterEventSource] sources: Filter for events from these sources
|
14298
|
+
:param list[str] autoscaler_resource_bundles: Filter for autoscaler events relevant to specific resource bundles.Each string should be a JSON-encoded resource bundle. We accept a string here because query params do not support dictionaries. Ex: ['{\"CPU\": 1, \"GPU\": 1}', '{\"GPU\": 1}']
|
14299
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
14300
|
+
be returned without reading/decoding response
|
14301
|
+
data. Default is True.
|
14302
|
+
:param _request_timeout: timeout setting for this request. If one
|
14303
|
+
number provided, it will be total request
|
14304
|
+
timeout. It can also be a pair (tuple) of
|
14305
|
+
(connection, read) timeouts.
|
14306
|
+
:return: ClustereventListResponse
|
14307
|
+
If the method is called asynchronously,
|
14308
|
+
returns the request thread.
|
14309
|
+
"""
|
14310
|
+
kwargs['_return_http_data_only'] = True
|
14311
|
+
return self.get_cluster_events_api_v2_sessions_session_id_cluster_events_get_with_http_info(session_id, **kwargs) # noqa: E501
|
14312
|
+
|
14313
|
+
def get_cluster_events_api_v2_sessions_session_id_cluster_events_get_with_http_info(self, session_id, **kwargs): # noqa: E501
|
14314
|
+
"""Get Cluster Events # noqa: E501
|
14315
|
+
|
14316
|
+
Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the UI to fetch events. This should power general observability event views shared by different workload types. Like the task view or the Train dashboard view. The /events endpoint is used by the dataplane to fetch events and has cluster auth requirements. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
|
14317
|
+
This method makes a synchronous HTTP request by default. To make an
|
14318
|
+
asynchronous HTTP request, please pass async_req=True
|
14319
|
+
>>> thread = api.get_cluster_events_api_v2_sessions_session_id_cluster_events_get_with_http_info(session_id, async_req=True)
|
14320
|
+
>>> result = thread.get()
|
14321
|
+
|
14322
|
+
:param async_req bool: execute request asynchronously
|
14323
|
+
:param str session_id: (required)
|
14324
|
+
:param datetime start_time: Filter for events that have occurred since this value
|
14325
|
+
:param datetime end_time: Filter for events that have occurred before this value
|
14326
|
+
:param list[ClusterEventSource] sources: Filter for events from these sources
|
14327
|
+
:param list[str] autoscaler_resource_bundles: Filter for autoscaler events relevant to specific resource bundles.Each string should be a JSON-encoded resource bundle. We accept a string here because query params do not support dictionaries. Ex: ['{\"CPU\": 1, \"GPU\": 1}', '{\"GPU\": 1}']
|
14328
|
+
:param _return_http_data_only: response data without head status code
|
14329
|
+
and headers
|
14330
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
14331
|
+
be returned without reading/decoding response
|
14332
|
+
data. Default is True.
|
14333
|
+
:param _request_timeout: timeout setting for this request. If one
|
14334
|
+
number provided, it will be total request
|
14335
|
+
timeout. It can also be a pair (tuple) of
|
14336
|
+
(connection, read) timeouts.
|
14337
|
+
:return: tuple(ClustereventListResponse, status_code(int), headers(HTTPHeaderDict))
|
14338
|
+
If the method is called asynchronously,
|
14339
|
+
returns the request thread.
|
14340
|
+
"""
|
14341
|
+
|
14342
|
+
local_var_params = locals()
|
14343
|
+
|
14344
|
+
all_params = [
|
14345
|
+
'session_id',
|
14346
|
+
'start_time',
|
14347
|
+
'end_time',
|
14348
|
+
'sources',
|
14349
|
+
'autoscaler_resource_bundles'
|
14350
|
+
]
|
14351
|
+
all_params.extend(
|
14352
|
+
[
|
14353
|
+
'async_req',
|
14354
|
+
'_return_http_data_only',
|
14355
|
+
'_preload_content',
|
14356
|
+
'_request_timeout'
|
14357
|
+
]
|
14358
|
+
)
|
14359
|
+
|
14360
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
14361
|
+
if key not in all_params:
|
14362
|
+
raise ApiTypeError(
|
14363
|
+
"Got an unexpected keyword argument '%s'"
|
14364
|
+
" to method get_cluster_events_api_v2_sessions_session_id_cluster_events_get" % key
|
14365
|
+
)
|
14366
|
+
local_var_params[key] = val
|
14367
|
+
del local_var_params['kwargs']
|
14368
|
+
# verify the required parameter 'session_id' is set
|
14369
|
+
if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
|
14370
|
+
local_var_params['session_id'] is None): # noqa: E501
|
14371
|
+
raise ApiValueError("Missing the required parameter `session_id` when calling `get_cluster_events_api_v2_sessions_session_id_cluster_events_get`") # noqa: E501
|
14372
|
+
|
14373
|
+
collection_formats = {}
|
14374
|
+
|
14375
|
+
path_params = {}
|
14376
|
+
if 'session_id' in local_var_params:
|
14377
|
+
path_params['session_id'] = local_var_params['session_id'] # noqa: E501
|
14378
|
+
|
14379
|
+
query_params = []
|
14380
|
+
if 'start_time' in local_var_params and local_var_params['start_time'] is not None: # noqa: E501
|
14381
|
+
query_params.append(('start_time', local_var_params['start_time'])) # noqa: E501
|
14382
|
+
if 'end_time' in local_var_params and local_var_params['end_time'] is not None: # noqa: E501
|
14383
|
+
query_params.append(('end_time', local_var_params['end_time'])) # noqa: E501
|
14384
|
+
if 'sources' in local_var_params and local_var_params['sources'] is not None: # noqa: E501
|
14385
|
+
query_params.append(('sources', local_var_params['sources'])) # noqa: E501
|
14386
|
+
collection_formats['sources'] = 'multi' # noqa: E501
|
14387
|
+
if 'autoscaler_resource_bundles' in local_var_params and local_var_params['autoscaler_resource_bundles'] is not None: # noqa: E501
|
14388
|
+
query_params.append(('autoscaler_resource_bundles', local_var_params['autoscaler_resource_bundles'])) # noqa: E501
|
14389
|
+
collection_formats['autoscaler_resource_bundles'] = 'multi' # noqa: E501
|
14390
|
+
|
14391
|
+
header_params = {}
|
14392
|
+
|
14393
|
+
form_params = []
|
14394
|
+
local_var_files = {}
|
14395
|
+
|
14396
|
+
body_params = None
|
14397
|
+
# HTTP header `Accept`
|
14398
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
14399
|
+
['application/json']) # noqa: E501
|
14400
|
+
|
14401
|
+
# Authentication setting
|
14402
|
+
auth_settings = [] # noqa: E501
|
14403
|
+
|
14404
|
+
return self.api_client.call_api(
|
14405
|
+
'/api/v2/sessions/{session_id}/cluster_events', 'GET',
|
14406
|
+
path_params,
|
14407
|
+
query_params,
|
14408
|
+
header_params,
|
14409
|
+
body=body_params,
|
14410
|
+
post_params=form_params,
|
14411
|
+
files=local_var_files,
|
14412
|
+
response_type='ClustereventListResponse', # noqa: E501
|
14413
|
+
auth_settings=auth_settings,
|
14414
|
+
async_req=local_var_params.get('async_req'),
|
14415
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
14416
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
14417
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
14418
|
+
collection_formats=collection_formats)
|
14419
|
+
|
14150
14420
|
def get_cluster_product_autoscaler_flag_api_v2_logs_cluster_product_autoscaler_flag_session_id_get(self, session_id, **kwargs): # noqa: E501
|
14151
14421
|
"""Get Cluster Product Autoscaler Flag # noqa: E501
|
14152
14422
|
|
@@ -16783,7 +17053,7 @@ class DefaultApi(object):
|
|
16783
17053
|
def get_events_api_v2_sessions_session_id_events_get(self, session_id, start_index, end_index, **kwargs): # noqa: E501
|
16784
17054
|
"""Get Events # noqa: E501
|
16785
17055
|
|
16786
|
-
Return events for this cluster. # noqa: E501
|
17056
|
+
Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the dataplane to fetch events to power the oss ray dashboard. The /cluster_events endpoint is used by the UI to fetch events to power general debugging UI features like train dashboard. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
|
16787
17057
|
This method makes a synchronous HTTP request by default. To make an
|
16788
17058
|
asynchronous HTTP request, please pass async_req=True
|
16789
17059
|
>>> thread = api.get_events_api_v2_sessions_session_id_events_get(session_id, start_index, end_index, async_req=True)
|
@@ -16811,7 +17081,7 @@ class DefaultApi(object):
|
|
16811
17081
|
def get_events_api_v2_sessions_session_id_events_get_with_http_info(self, session_id, start_index, end_index, **kwargs): # noqa: E501
|
16812
17082
|
"""Get Events # noqa: E501
|
16813
17083
|
|
16814
|
-
Return events for this cluster. # noqa: E501
|
17084
|
+
Return events for this cluster. There are multiple endpoints to return events. This endpoint is for the dataplane to fetch events to power the oss ray dashboard. The /cluster_events endpoint is used by the UI to fetch events to power general debugging UI features like train dashboard. Finally, there are events endpoints for each workload type (workspaces, jobs, services). Those endpoints have some additional logic to stitch together cluster events with workload-specific events. # noqa: E501
|
16815
17085
|
This method makes a synchronous HTTP request by default. To make an
|
16816
17086
|
asynchronous HTTP request, please pass async_req=True
|
16817
17087
|
>>> thread = api.get_events_api_v2_sessions_session_id_events_get_with_http_info(session_id, start_index, end_index, async_req=True)
|
@@ -146,6 +146,7 @@ from openapi_client.models.cluster_config import ClusterConfig
|
|
146
146
|
from openapi_client.models.cluster_config_with_session_idle_timeout import ClusterConfigWithSessionIdleTimeout
|
147
147
|
from openapi_client.models.cluster_environments_query import ClusterEnvironmentsQuery
|
148
148
|
from openapi_client.models.cluster_event import ClusterEvent
|
149
|
+
from openapi_client.models.cluster_event_source import ClusterEventSource
|
149
150
|
from openapi_client.models.cluster_events_output import ClusterEventsOutput
|
150
151
|
from openapi_client.models.cluster_features import ClusterFeatures
|
151
152
|
from openapi_client.models.cluster_management_stack_versions import ClusterManagementStackVersions
|
@@ -156,6 +157,7 @@ from openapi_client.models.cluster_status_details import ClusterStatusDetails
|
|
156
157
|
from openapi_client.models.clusterauthresponse_response import ClusterauthresponseResponse
|
157
158
|
from openapi_client.models.clusterconfig_response import ClusterconfigResponse
|
158
159
|
from openapi_client.models.clusterconfigwithsessionidletimeout_response import ClusterconfigwithsessionidletimeoutResponse
|
160
|
+
from openapi_client.models.clusterevent_list_response import ClustereventListResponse
|
159
161
|
from openapi_client.models.clustereventsoutput_response import ClustereventsoutputResponse
|
160
162
|
from openapi_client.models.clusterfeatures_response import ClusterfeaturesResponse
|
161
163
|
from openapi_client.models.compute_node_type import ComputeNodeType
|
@@ -599,6 +601,7 @@ from openapi_client.models.ux_instance import UXInstance
|
|
599
601
|
from openapi_client.models.unified_job_sort_field import UnifiedJobSortField
|
600
602
|
from openapi_client.models.unified_job_status import UnifiedJobStatus
|
601
603
|
from openapi_client.models.unified_job_type import UnifiedJobType
|
604
|
+
from openapi_client.models.update_cloud_collaborator import UpdateCloudCollaborator
|
602
605
|
from openapi_client.models.update_cloud_with_cloud_resource import UpdateCloudWithCloudResource
|
603
606
|
from openapi_client.models.update_cloud_with_cloud_resource_gcp import UpdateCloudWithCloudResourceGCP
|
604
607
|
from openapi_client.models.update_cluster_dns import UpdateClusterDns
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Managed Ray API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by: https://openapi-generator.tech
|
10
|
+
"""
|
11
|
+
|
12
|
+
|
13
|
+
import pprint
|
14
|
+
import re # noqa: F401
|
15
|
+
|
16
|
+
import six
|
17
|
+
|
18
|
+
from openapi_client.configuration import Configuration
|
19
|
+
|
20
|
+
|
21
|
+
class ClusterEventSource(object):
|
22
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
+
Ref: https://openapi-generator.tech
|
24
|
+
|
25
|
+
Do not edit the class manually.
|
26
|
+
"""
|
27
|
+
|
28
|
+
"""
|
29
|
+
allowed enum values
|
30
|
+
"""
|
31
|
+
AUTOSCALER = "AUTOSCALER"
|
32
|
+
CLUSTER_LIFECYCLE = "CLUSTER_LIFECYCLE"
|
33
|
+
IDLE_TERMINATION = "IDLE_TERMINATION"
|
34
|
+
JOBS = "JOBS"
|
35
|
+
WORKSPACE_SNAPSHOT = "WORKSPACE_SNAPSHOT"
|
36
|
+
OS = "OS"
|
37
|
+
UNKNOWN = "UNKNOWN"
|
38
|
+
|
39
|
+
allowable_values = [AUTOSCALER, CLUSTER_LIFECYCLE, IDLE_TERMINATION, JOBS, WORKSPACE_SNAPSHOT, OS, UNKNOWN] # noqa: E501
|
40
|
+
|
41
|
+
"""
|
42
|
+
Attributes:
|
43
|
+
openapi_types (dict): The key is attribute name
|
44
|
+
and the value is attribute type.
|
45
|
+
attribute_map (dict): The key is attribute name
|
46
|
+
and the value is json key in definition.
|
47
|
+
"""
|
48
|
+
openapi_types = {
|
49
|
+
}
|
50
|
+
|
51
|
+
attribute_map = {
|
52
|
+
}
|
53
|
+
|
54
|
+
def __init__(self, local_vars_configuration=None): # noqa: E501
|
55
|
+
"""ClusterEventSource - a model defined in OpenAPI""" # noqa: E501
|
56
|
+
if local_vars_configuration is None:
|
57
|
+
local_vars_configuration = Configuration()
|
58
|
+
self.local_vars_configuration = local_vars_configuration
|
59
|
+
self.discriminator = None
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the model properties as a dict"""
|
63
|
+
result = {}
|
64
|
+
|
65
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
66
|
+
value = getattr(self, attr)
|
67
|
+
if isinstance(value, list):
|
68
|
+
result[attr] = list(map(
|
69
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
70
|
+
value
|
71
|
+
))
|
72
|
+
elif hasattr(value, "to_dict"):
|
73
|
+
result[attr] = value.to_dict()
|
74
|
+
elif isinstance(value, dict):
|
75
|
+
result[attr] = dict(map(
|
76
|
+
lambda item: (item[0], item[1].to_dict())
|
77
|
+
if hasattr(item[1], "to_dict") else item,
|
78
|
+
value.items()
|
79
|
+
))
|
80
|
+
else:
|
81
|
+
result[attr] = value
|
82
|
+
|
83
|
+
return result
|
84
|
+
|
85
|
+
def to_str(self):
|
86
|
+
"""Returns the string representation of the model"""
|
87
|
+
return pprint.pformat(self.to_dict())
|
88
|
+
|
89
|
+
def __repr__(self):
|
90
|
+
"""For `print` and `pprint`"""
|
91
|
+
return self.to_str()
|
92
|
+
|
93
|
+
def __eq__(self, other):
|
94
|
+
"""Returns true if both objects are equal"""
|
95
|
+
if not isinstance(other, ClusterEventSource):
|
96
|
+
return False
|
97
|
+
|
98
|
+
return self.to_dict() == other.to_dict()
|
99
|
+
|
100
|
+
def __ne__(self, other):
|
101
|
+
"""Returns true if both objects are not equal"""
|
102
|
+
if not isinstance(other, ClusterEventSource):
|
103
|
+
return True
|
104
|
+
|
105
|
+
return self.to_dict() != other.to_dict()
|