anyscale 0.26.51__py3-none-any.whl → 0.26.52__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/README.md +1 -1
- anyscale/_private/anyscale_client/anyscale_client.py +178 -46
- anyscale/_private/anyscale_client/common.py +61 -2
- anyscale/_private/anyscale_client/fake_anyscale_client.py +145 -8
- anyscale/_private/docgen/__main__.py +34 -23
- anyscale/_private/docgen/generator.py +15 -18
- anyscale/_private/docgen/models.md +4 -2
- anyscale/_private/workload/workload_sdk.py +103 -8
- anyscale/client/README.md +3 -0
- anyscale/client/openapi_client/__init__.py +1 -0
- anyscale/client/openapi_client/api/default_api.py +249 -0
- anyscale/client/openapi_client/models/__init__.py +1 -0
- anyscale/client/openapi_client/models/baseimagesenum.py +83 -1
- anyscale/client/openapi_client/models/cloud_resource.py +59 -3
- anyscale/client/openapi_client/models/cloud_resource_gcp.py +59 -3
- anyscale/client/openapi_client/models/clouddeployment_response.py +121 -0
- anyscale/client/openapi_client/models/create_cloud_resource.py +59 -3
- anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +59 -3
- anyscale/client/openapi_client/models/object_storage.py +2 -2
- anyscale/client/openapi_client/models/ray_runtime_env_config.py +57 -1
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +80 -1
- anyscale/cloud/models.py +1 -1
- anyscale/commands/cloud_commands.py +73 -70
- anyscale/commands/command_examples.py +28 -40
- anyscale/commands/project_commands.py +377 -106
- anyscale/controllers/cloud_controller.py +81 -86
- anyscale/job/_private/job_sdk.py +38 -20
- anyscale/project/__init__.py +101 -1
- anyscale/project/_private/project_sdk.py +90 -2
- anyscale/project/commands.py +188 -1
- anyscale/project/models.py +198 -2
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +83 -1
- anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +57 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +80 -1
- anyscale/service/_private/service_sdk.py +2 -1
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/util.py +3 -0
- anyscale/utils/runtime_env.py +3 -1
- anyscale/version.py +1 -1
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/METADATA +1 -1
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/RECORD +46 -45
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/WHEEL +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/licenses/LICENSE +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/licenses/NOTICE +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.52.dist-info}/top_level.txt +0 -0
@@ -112,7 +112,7 @@ class WorkloadSDK(BaseSDK):
|
|
112
112
|
|
113
113
|
return new_runtime_envs
|
114
114
|
|
115
|
-
def
|
115
|
+
def override_and_upload_local_dirs_single_deployment( # noqa: PLR0912
|
116
116
|
self,
|
117
117
|
runtime_envs: List[Dict[str, Any]],
|
118
118
|
*,
|
@@ -122,7 +122,7 @@ class WorkloadSDK(BaseSDK):
|
|
122
122
|
autopopulate_in_workspace: bool = True,
|
123
123
|
additional_py_modules: Optional[List[str]] = None,
|
124
124
|
py_executable_override: Optional[str] = None,
|
125
|
-
|
125
|
+
cloud_deployment: Optional[str] = None,
|
126
126
|
) -> List[Dict[str, Any]]:
|
127
127
|
"""Returns modified runtime_envs with all local dirs converted to remote URIs.
|
128
128
|
|
@@ -142,15 +142,13 @@ class WorkloadSDK(BaseSDK):
|
|
142
142
|
if target in local_path_to_uri:
|
143
143
|
return local_path_to_uri[target]
|
144
144
|
|
145
|
-
if has_multiple_cloud_deployments:
|
146
|
-
self.logger.warning(
|
147
|
-
"For compute configurations with multiple cloud deployments, local directories will only be uploaded to the object storage of the primary cloud deployment."
|
148
|
-
)
|
149
|
-
|
150
145
|
self.logger.info(f"Uploading local dir '{target}' to cloud storage.")
|
151
146
|
assert cloud_id is not None
|
152
147
|
uri = self._client.upload_local_dir_to_cloud_storage(
|
153
|
-
target,
|
148
|
+
target,
|
149
|
+
cloud_id=cloud_id,
|
150
|
+
excludes=excludes,
|
151
|
+
cloud_deployment=cloud_deployment,
|
154
152
|
)
|
155
153
|
local_path_to_uri[target] = uri
|
156
154
|
return uri
|
@@ -192,6 +190,103 @@ class WorkloadSDK(BaseSDK):
|
|
192
190
|
|
193
191
|
return new_runtime_envs
|
194
192
|
|
193
|
+
def override_and_upload_local_dirs_multi_deployment( # noqa: PLR0912
|
194
|
+
self,
|
195
|
+
runtime_envs: List[Dict[str, Any]],
|
196
|
+
*,
|
197
|
+
working_dir_override: Optional[str],
|
198
|
+
excludes_override: Optional[List[str]],
|
199
|
+
cloud_deployments: List[Optional[str]],
|
200
|
+
cloud_id: Optional[str] = None,
|
201
|
+
autopopulate_in_workspace: bool = True,
|
202
|
+
additional_py_modules: Optional[List[str]] = None,
|
203
|
+
py_executable_override: Optional[str] = None,
|
204
|
+
) -> List[Dict[str, Any]]:
|
205
|
+
"""Returns modified runtime_envs with all local dirs converted to remote bucket paths,
|
206
|
+
stored in the "relative_working_dir" and "relative_py_modules" fields.
|
207
|
+
|
208
|
+
The precedence for overrides is: explicit overrides passed in > fields in the existing
|
209
|
+
runtime_envs > workspace defaults (if `autopopulate_in_workspace == True`).
|
210
|
+
|
211
|
+
Each unique local directory across these fields will be uploaded once to cloud storage,
|
212
|
+
then all occurrences of it in the config will be replaced with the corresponding remote URI.
|
213
|
+
"""
|
214
|
+
new_runtime_envs = copy.deepcopy(runtime_envs)
|
215
|
+
|
216
|
+
local_path_to_bucket_path: Dict[str, str] = {}
|
217
|
+
|
218
|
+
def _upload_dir_memoized(target: str, *, excludes: Optional[List[str]]) -> str:
|
219
|
+
if target in local_path_to_bucket_path:
|
220
|
+
return local_path_to_bucket_path[target]
|
221
|
+
|
222
|
+
self.logger.info(
|
223
|
+
f"Uploading local dir '{target}' to object storage for all {len(cloud_deployments)} cloud deployments in the compute config."
|
224
|
+
)
|
225
|
+
assert cloud_id is not None
|
226
|
+
bucket_path = self._client.upload_local_dir_to_cloud_storage_multi_deployment(
|
227
|
+
target,
|
228
|
+
cloud_id=cloud_id,
|
229
|
+
excludes=excludes,
|
230
|
+
cloud_deployments=cloud_deployments,
|
231
|
+
)
|
232
|
+
local_path_to_bucket_path[target] = bucket_path
|
233
|
+
return bucket_path
|
234
|
+
|
235
|
+
for runtime_env in new_runtime_envs:
|
236
|
+
# Extend, don't overwrite, excludes if it's provided.
|
237
|
+
if excludes_override is not None:
|
238
|
+
existing_excludes = runtime_env.get("excludes", None) or []
|
239
|
+
runtime_env["excludes"] = existing_excludes + excludes_override
|
240
|
+
|
241
|
+
final_excludes = runtime_env.get("excludes", [])
|
242
|
+
|
243
|
+
new_working_dir = None
|
244
|
+
if working_dir_override is not None:
|
245
|
+
new_working_dir = working_dir_override
|
246
|
+
elif "working_dir" in runtime_env:
|
247
|
+
new_working_dir = runtime_env["working_dir"]
|
248
|
+
elif autopopulate_in_workspace and self._client.inside_workspace():
|
249
|
+
new_working_dir = "."
|
250
|
+
|
251
|
+
if new_working_dir is not None:
|
252
|
+
if is_dir_remote_uri(new_working_dir):
|
253
|
+
runtime_env["working_dir"] = new_working_dir
|
254
|
+
else:
|
255
|
+
runtime_env["relative_working_dir"] = _upload_dir_memoized(
|
256
|
+
new_working_dir, excludes=final_excludes
|
257
|
+
)
|
258
|
+
runtime_env.pop("working_dir", None)
|
259
|
+
|
260
|
+
if additional_py_modules:
|
261
|
+
existing_py_modules = runtime_env.get("py_modules", [])
|
262
|
+
runtime_env["py_modules"] = existing_py_modules + additional_py_modules
|
263
|
+
|
264
|
+
final_py_modules = runtime_env.get("py_modules", None)
|
265
|
+
if final_py_modules is not None:
|
266
|
+
py_modules = [
|
267
|
+
py_module
|
268
|
+
for py_module in final_py_modules
|
269
|
+
if is_dir_remote_uri(py_module)
|
270
|
+
]
|
271
|
+
if len(py_modules) > 0:
|
272
|
+
runtime_env["py_modules"] = py_modules
|
273
|
+
else:
|
274
|
+
# If there are no py_modules, remove the field.
|
275
|
+
runtime_env.pop("py_modules", None)
|
276
|
+
|
277
|
+
relative_py_modules = [
|
278
|
+
_upload_dir_memoized(py_module, excludes=final_excludes)
|
279
|
+
for py_module in final_py_modules
|
280
|
+
if not is_dir_remote_uri(py_module)
|
281
|
+
]
|
282
|
+
if len(relative_py_modules) > 0:
|
283
|
+
runtime_env["relative_py_modules"] = relative_py_modules
|
284
|
+
|
285
|
+
if py_executable_override:
|
286
|
+
runtime_env["py_executable"] = py_executable_override
|
287
|
+
|
288
|
+
return new_runtime_envs
|
289
|
+
|
195
290
|
def _resolve_compute_config_id(
|
196
291
|
self,
|
197
292
|
compute_config: Union[str, ComputeConfigType, None],
|
anyscale/client/README.md
CHANGED
@@ -209,10 +209,12 @@ Class | Method | HTTP request | Description
|
|
209
209
|
*DefaultApi* | [**get_job_logs_download_v2_api_v2_logs_job_logs_download_v2_job_id_get**](docs/DefaultApi.md#get_job_logs_download_v2_api_v2_logs_job_logs_download_v2_job_id_get) | **GET** /api/v2/logs/job_logs_download_v2/{job_id} | Get Job Logs Download V2
|
210
210
|
*DefaultApi* | [**get_job_queue_api_v2_job_queues_job_queue_id_get**](docs/DefaultApi.md#get_job_queue_api_v2_job_queues_job_queue_id_get) | **GET** /api/v2/job_queues/{job_queue_id} | Get Job Queue
|
211
211
|
*DefaultApi* | [**get_jobs_api_v2_dataset_runs_jobs_get**](docs/DefaultApi.md#get_jobs_api_v2_dataset_runs_jobs_get) | **GET** /api/v2/dataset_runs/jobs | Get Jobs
|
212
|
+
*DefaultApi* | [**get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get**](docs/DefaultApi.md#get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get) | **GET** /api/v2/sessions/{cluster_id}/latest_cloud_deployment | Get Latest Cloud Deployment
|
212
213
|
*DefaultApi* | [**get_lb_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get_lb_resource_post**](docs/DefaultApi.md#get_lb_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get_lb_resource_post) | **POST** /api/v2/clouds_with_cloud_resource_gcp_router/{cloud_id}/get_lb_resource | Get Lb Resource
|
213
214
|
*DefaultApi* | [**get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post**](docs/DefaultApi.md#get_lb_resource_api_v2_clouds_with_cloud_resource_router_cloud_id_get_lb_resource_post) | **POST** /api/v2/clouds_with_cloud_resource_router/{cloud_id}/get_lb_resource | Get Lb Resource
|
214
215
|
*DefaultApi* | [**get_log_files_api_v2_logs_get_log_files_post**](docs/DefaultApi.md#get_log_files_api_v2_logs_get_log_files_post) | **POST** /api/v2/logs/get_log_files | Get Log Files
|
215
216
|
*DefaultApi* | [**get_manage_billing_url_api_v2_organization_billing_manage_billing_url_get**](docs/DefaultApi.md#get_manage_billing_url_api_v2_organization_billing_manage_billing_url_get) | **GET** /api/v2/organization_billing/manage_billing_url | Get Manage Billing Url
|
217
|
+
*DefaultApi* | [**get_metric_names_api_v2_metrics_names_get**](docs/DefaultApi.md#get_metric_names_api_v2_metrics_names_get) | **GET** /api/v2/metrics/names | Get Metric Names
|
216
218
|
*DefaultApi* | [**get_metronome_customer_info_api_v2_metronome_customer_info_organization_id_get**](docs/DefaultApi.md#get_metronome_customer_info_api_v2_metronome_customer_info_organization_id_get) | **GET** /api/v2/metronome_customer_info/{organization_id} | Get Metronome Customer Info
|
217
219
|
*DefaultApi* | [**get_metronome_embedded_usage_dashboard_api_v2_organization_billing_metronome_embedded_dashboard_url_dashboard_type_get**](docs/DefaultApi.md#get_metronome_embedded_usage_dashboard_api_v2_organization_billing_metronome_embedded_dashboard_url_dashboard_type_get) | **GET** /api/v2/organization_billing/metronome_embedded_dashboard_url/{dashboard_type} | Get Metronome Embedded Usage Dashboard
|
218
220
|
*DefaultApi* | [**get_metronome_embedded_usage_dashboard_by_organization_api_v2_organization_billing_organization_id_metronome_embedded_dashboard_url_dashboard_type_get**](docs/DefaultApi.md#get_metronome_embedded_usage_dashboard_by_organization_api_v2_organization_billing_organization_id_metronome_embedded_dashboard_url_dashboard_type_get) | **GET** /api/v2/organization_billing/{organization_id}/metronome_embedded_dashboard_url/{dashboard_type} | Get Metronome Embedded Usage Dashboard By Organization
|
@@ -488,6 +490,7 @@ Class | Method | HTTP request | Description
|
|
488
490
|
- [ClouddatabucketpresigneduploadinfoResponse](docs/ClouddatabucketpresigneduploadinfoResponse.md)
|
489
491
|
- [ClouddatabucketpresignedurlresponseResponse](docs/ClouddatabucketpresignedurlresponseResponse.md)
|
490
492
|
- [ClouddeploymentListResponse](docs/ClouddeploymentListResponse.md)
|
493
|
+
- [ClouddeploymentResponse](docs/ClouddeploymentResponse.md)
|
491
494
|
- [ClouddeploymentconfigResponse](docs/ClouddeploymentconfigResponse.md)
|
492
495
|
- [CloudoverviewdashboardResponse](docs/CloudoverviewdashboardResponse.md)
|
493
496
|
- [CloudregionandzonesResponse](docs/CloudregionandzonesResponse.md)
|
@@ -130,6 +130,7 @@ from openapi_client.models.cloudcollaborator_list_response import Cloudcollabora
|
|
130
130
|
from openapi_client.models.clouddatabucketpresigneduploadinfo_response import ClouddatabucketpresigneduploadinfoResponse
|
131
131
|
from openapi_client.models.clouddatabucketpresignedurlresponse_response import ClouddatabucketpresignedurlresponseResponse
|
132
132
|
from openapi_client.models.clouddeployment_list_response import ClouddeploymentListResponse
|
133
|
+
from openapi_client.models.clouddeployment_response import ClouddeploymentResponse
|
133
134
|
from openapi_client.models.clouddeploymentconfig_response import ClouddeploymentconfigResponse
|
134
135
|
from openapi_client.models.cloudoverviewdashboard_response import CloudoverviewdashboardResponse
|
135
136
|
from openapi_client.models.cloudregionandzones_response import CloudregionandzonesResponse
|
@@ -15899,6 +15899,120 @@ class DefaultApi(object):
|
|
15899
15899
|
_request_timeout=local_var_params.get('_request_timeout'),
|
15900
15900
|
collection_formats=collection_formats)
|
15901
15901
|
|
15902
|
+
def get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get(self, cluster_id, **kwargs): # noqa: E501
|
15903
|
+
"""Get Latest Cloud Deployment # noqa: E501
|
15904
|
+
|
15905
|
+
Fetches the current cloud deployment of a cluster. # noqa: E501
|
15906
|
+
This method makes a synchronous HTTP request by default. To make an
|
15907
|
+
asynchronous HTTP request, please pass async_req=True
|
15908
|
+
>>> thread = api.get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get(cluster_id, async_req=True)
|
15909
|
+
>>> result = thread.get()
|
15910
|
+
|
15911
|
+
:param async_req bool: execute request asynchronously
|
15912
|
+
:param str cluster_id: (required)
|
15913
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
15914
|
+
be returned without reading/decoding response
|
15915
|
+
data. Default is True.
|
15916
|
+
:param _request_timeout: timeout setting for this request. If one
|
15917
|
+
number provided, it will be total request
|
15918
|
+
timeout. It can also be a pair (tuple) of
|
15919
|
+
(connection, read) timeouts.
|
15920
|
+
:return: ClouddeploymentResponse
|
15921
|
+
If the method is called asynchronously,
|
15922
|
+
returns the request thread.
|
15923
|
+
"""
|
15924
|
+
kwargs['_return_http_data_only'] = True
|
15925
|
+
return self.get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get_with_http_info(cluster_id, **kwargs) # noqa: E501
|
15926
|
+
|
15927
|
+
def get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get_with_http_info(self, cluster_id, **kwargs): # noqa: E501
|
15928
|
+
"""Get Latest Cloud Deployment # noqa: E501
|
15929
|
+
|
15930
|
+
Fetches the current cloud deployment of a cluster. # noqa: E501
|
15931
|
+
This method makes a synchronous HTTP request by default. To make an
|
15932
|
+
asynchronous HTTP request, please pass async_req=True
|
15933
|
+
>>> thread = api.get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get_with_http_info(cluster_id, async_req=True)
|
15934
|
+
>>> result = thread.get()
|
15935
|
+
|
15936
|
+
:param async_req bool: execute request asynchronously
|
15937
|
+
:param str cluster_id: (required)
|
15938
|
+
:param _return_http_data_only: response data without head status code
|
15939
|
+
and headers
|
15940
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
15941
|
+
be returned without reading/decoding response
|
15942
|
+
data. Default is True.
|
15943
|
+
:param _request_timeout: timeout setting for this request. If one
|
15944
|
+
number provided, it will be total request
|
15945
|
+
timeout. It can also be a pair (tuple) of
|
15946
|
+
(connection, read) timeouts.
|
15947
|
+
:return: tuple(ClouddeploymentResponse, status_code(int), headers(HTTPHeaderDict))
|
15948
|
+
If the method is called asynchronously,
|
15949
|
+
returns the request thread.
|
15950
|
+
"""
|
15951
|
+
|
15952
|
+
local_var_params = locals()
|
15953
|
+
|
15954
|
+
all_params = [
|
15955
|
+
'cluster_id'
|
15956
|
+
]
|
15957
|
+
all_params.extend(
|
15958
|
+
[
|
15959
|
+
'async_req',
|
15960
|
+
'_return_http_data_only',
|
15961
|
+
'_preload_content',
|
15962
|
+
'_request_timeout'
|
15963
|
+
]
|
15964
|
+
)
|
15965
|
+
|
15966
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
15967
|
+
if key not in all_params:
|
15968
|
+
raise ApiTypeError(
|
15969
|
+
"Got an unexpected keyword argument '%s'"
|
15970
|
+
" to method get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get" % key
|
15971
|
+
)
|
15972
|
+
local_var_params[key] = val
|
15973
|
+
del local_var_params['kwargs']
|
15974
|
+
# verify the required parameter 'cluster_id' is set
|
15975
|
+
if self.api_client.client_side_validation and ('cluster_id' not in local_var_params or # noqa: E501
|
15976
|
+
local_var_params['cluster_id'] is None): # noqa: E501
|
15977
|
+
raise ApiValueError("Missing the required parameter `cluster_id` when calling `get_latest_cloud_deployment_api_v2_sessions_cluster_id_latest_cloud_deployment_get`") # noqa: E501
|
15978
|
+
|
15979
|
+
collection_formats = {}
|
15980
|
+
|
15981
|
+
path_params = {}
|
15982
|
+
if 'cluster_id' in local_var_params:
|
15983
|
+
path_params['cluster_id'] = local_var_params['cluster_id'] # noqa: E501
|
15984
|
+
|
15985
|
+
query_params = []
|
15986
|
+
|
15987
|
+
header_params = {}
|
15988
|
+
|
15989
|
+
form_params = []
|
15990
|
+
local_var_files = {}
|
15991
|
+
|
15992
|
+
body_params = None
|
15993
|
+
# HTTP header `Accept`
|
15994
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
15995
|
+
['application/json']) # noqa: E501
|
15996
|
+
|
15997
|
+
# Authentication setting
|
15998
|
+
auth_settings = [] # noqa: E501
|
15999
|
+
|
16000
|
+
return self.api_client.call_api(
|
16001
|
+
'/api/v2/sessions/{cluster_id}/latest_cloud_deployment', 'GET',
|
16002
|
+
path_params,
|
16003
|
+
query_params,
|
16004
|
+
header_params,
|
16005
|
+
body=body_params,
|
16006
|
+
post_params=form_params,
|
16007
|
+
files=local_var_files,
|
16008
|
+
response_type='ClouddeploymentResponse', # noqa: E501
|
16009
|
+
auth_settings=auth_settings,
|
16010
|
+
async_req=local_var_params.get('async_req'),
|
16011
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
16012
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
16013
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
16014
|
+
collection_formats=collection_formats)
|
16015
|
+
|
15902
16016
|
def get_lb_resource_api_v2_clouds_with_cloud_resource_gcp_router_cloud_id_get_lb_resource_post(self, cloud_id, **kwargs): # noqa: E501
|
15903
16017
|
"""Get Lb Resource # noqa: E501
|
15904
16018
|
|
@@ -16346,6 +16460,141 @@ class DefaultApi(object):
|
|
16346
16460
|
_request_timeout=local_var_params.get('_request_timeout'),
|
16347
16461
|
collection_formats=collection_formats)
|
16348
16462
|
|
16463
|
+
def get_metric_names_api_v2_metrics_names_get(self, **kwargs): # noqa: E501
|
16464
|
+
"""Get Metric Names # noqa: E501
|
16465
|
+
|
16466
|
+
Return all available metric names for the specified resource # noqa: E501
|
16467
|
+
This method makes a synchronous HTTP request by default. To make an
|
16468
|
+
asynchronous HTTP request, please pass async_req=True
|
16469
|
+
>>> thread = api.get_metric_names_api_v2_metrics_names_get(async_req=True)
|
16470
|
+
>>> result = thread.get()
|
16471
|
+
|
16472
|
+
:param async_req bool: execute request asynchronously
|
16473
|
+
:param str cluster_id: The cluster id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16474
|
+
:param str workspace_id: The workspace id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16475
|
+
:param str ha_job_id: The production job id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16476
|
+
:param str service_id: The service id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16477
|
+
:param float start: Optional start timestamp (Unix). If provided, filters metric names to those present in [start, end].
|
16478
|
+
:param float end: Optional end timestamp (Unix). If provided with start, filters metric names present in [start, end].
|
16479
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
16480
|
+
be returned without reading/decoding response
|
16481
|
+
data. Default is True.
|
16482
|
+
:param _request_timeout: timeout setting for this request. If one
|
16483
|
+
number provided, it will be total request
|
16484
|
+
timeout. It can also be a pair (tuple) of
|
16485
|
+
(connection, read) timeouts.
|
16486
|
+
:return: MetricsqueryresponseResponse
|
16487
|
+
If the method is called asynchronously,
|
16488
|
+
returns the request thread.
|
16489
|
+
"""
|
16490
|
+
kwargs['_return_http_data_only'] = True
|
16491
|
+
return self.get_metric_names_api_v2_metrics_names_get_with_http_info(**kwargs) # noqa: E501
|
16492
|
+
|
16493
|
+
def get_metric_names_api_v2_metrics_names_get_with_http_info(self, **kwargs): # noqa: E501
|
16494
|
+
"""Get Metric Names # noqa: E501
|
16495
|
+
|
16496
|
+
Return all available metric names for the specified resource # noqa: E501
|
16497
|
+
This method makes a synchronous HTTP request by default. To make an
|
16498
|
+
asynchronous HTTP request, please pass async_req=True
|
16499
|
+
>>> thread = api.get_metric_names_api_v2_metrics_names_get_with_http_info(async_req=True)
|
16500
|
+
>>> result = thread.get()
|
16501
|
+
|
16502
|
+
:param async_req bool: execute request asynchronously
|
16503
|
+
:param str cluster_id: The cluster id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16504
|
+
:param str workspace_id: The workspace id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16505
|
+
:param str ha_job_id: The production job id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16506
|
+
:param str service_id: The service id used to query metrics. Exactly one of cluster_id, workspace_id, ha_job_id, or service_id must be set.
|
16507
|
+
:param float start: Optional start timestamp (Unix). If provided, filters metric names to those present in [start, end].
|
16508
|
+
:param float end: Optional end timestamp (Unix). If provided with start, filters metric names present in [start, end].
|
16509
|
+
:param _return_http_data_only: response data without head status code
|
16510
|
+
and headers
|
16511
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
16512
|
+
be returned without reading/decoding response
|
16513
|
+
data. Default is True.
|
16514
|
+
:param _request_timeout: timeout setting for this request. If one
|
16515
|
+
number provided, it will be total request
|
16516
|
+
timeout. It can also be a pair (tuple) of
|
16517
|
+
(connection, read) timeouts.
|
16518
|
+
:return: tuple(MetricsqueryresponseResponse, status_code(int), headers(HTTPHeaderDict))
|
16519
|
+
If the method is called asynchronously,
|
16520
|
+
returns the request thread.
|
16521
|
+
"""
|
16522
|
+
|
16523
|
+
local_var_params = locals()
|
16524
|
+
|
16525
|
+
all_params = [
|
16526
|
+
'cluster_id',
|
16527
|
+
'workspace_id',
|
16528
|
+
'ha_job_id',
|
16529
|
+
'service_id',
|
16530
|
+
'start',
|
16531
|
+
'end'
|
16532
|
+
]
|
16533
|
+
all_params.extend(
|
16534
|
+
[
|
16535
|
+
'async_req',
|
16536
|
+
'_return_http_data_only',
|
16537
|
+
'_preload_content',
|
16538
|
+
'_request_timeout'
|
16539
|
+
]
|
16540
|
+
)
|
16541
|
+
|
16542
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
16543
|
+
if key not in all_params:
|
16544
|
+
raise ApiTypeError(
|
16545
|
+
"Got an unexpected keyword argument '%s'"
|
16546
|
+
" to method get_metric_names_api_v2_metrics_names_get" % key
|
16547
|
+
)
|
16548
|
+
local_var_params[key] = val
|
16549
|
+
del local_var_params['kwargs']
|
16550
|
+
|
16551
|
+
collection_formats = {}
|
16552
|
+
|
16553
|
+
path_params = {}
|
16554
|
+
|
16555
|
+
query_params = []
|
16556
|
+
if 'cluster_id' in local_var_params and local_var_params['cluster_id'] is not None: # noqa: E501
|
16557
|
+
query_params.append(('cluster_id', local_var_params['cluster_id'])) # noqa: E501
|
16558
|
+
if 'workspace_id' in local_var_params and local_var_params['workspace_id'] is not None: # noqa: E501
|
16559
|
+
query_params.append(('workspace_id', local_var_params['workspace_id'])) # noqa: E501
|
16560
|
+
if 'ha_job_id' in local_var_params and local_var_params['ha_job_id'] is not None: # noqa: E501
|
16561
|
+
query_params.append(('ha_job_id', local_var_params['ha_job_id'])) # noqa: E501
|
16562
|
+
if 'service_id' in local_var_params and local_var_params['service_id'] is not None: # noqa: E501
|
16563
|
+
query_params.append(('service_id', local_var_params['service_id'])) # noqa: E501
|
16564
|
+
if 'start' in local_var_params and local_var_params['start'] is not None: # noqa: E501
|
16565
|
+
query_params.append(('start', local_var_params['start'])) # noqa: E501
|
16566
|
+
if 'end' in local_var_params and local_var_params['end'] is not None: # noqa: E501
|
16567
|
+
query_params.append(('end', local_var_params['end'])) # noqa: E501
|
16568
|
+
|
16569
|
+
header_params = {}
|
16570
|
+
|
16571
|
+
form_params = []
|
16572
|
+
local_var_files = {}
|
16573
|
+
|
16574
|
+
body_params = None
|
16575
|
+
# HTTP header `Accept`
|
16576
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
16577
|
+
['application/json']) # noqa: E501
|
16578
|
+
|
16579
|
+
# Authentication setting
|
16580
|
+
auth_settings = [] # noqa: E501
|
16581
|
+
|
16582
|
+
return self.api_client.call_api(
|
16583
|
+
'/api/v2/metrics/names', 'GET',
|
16584
|
+
path_params,
|
16585
|
+
query_params,
|
16586
|
+
header_params,
|
16587
|
+
body=body_params,
|
16588
|
+
post_params=form_params,
|
16589
|
+
files=local_var_files,
|
16590
|
+
response_type='MetricsqueryresponseResponse', # noqa: E501
|
16591
|
+
auth_settings=auth_settings,
|
16592
|
+
async_req=local_var_params.get('async_req'),
|
16593
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
16594
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
16595
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
16596
|
+
collection_formats=collection_formats)
|
16597
|
+
|
16349
16598
|
def get_metronome_customer_info_api_v2_metronome_customer_info_organization_id_get(self, organization_id, **kwargs): # noqa: E501
|
16350
16599
|
"""Get Metronome Customer Info # noqa: E501
|
16351
16600
|
|
@@ -116,6 +116,7 @@ from openapi_client.models.cloudcollaborator_list_response import Cloudcollabora
|
|
116
116
|
from openapi_client.models.clouddatabucketpresigneduploadinfo_response import ClouddatabucketpresigneduploadinfoResponse
|
117
117
|
from openapi_client.models.clouddatabucketpresignedurlresponse_response import ClouddatabucketpresignedurlresponseResponse
|
118
118
|
from openapi_client.models.clouddeployment_list_response import ClouddeploymentListResponse
|
119
|
+
from openapi_client.models.clouddeployment_response import ClouddeploymentResponse
|
119
120
|
from openapi_client.models.clouddeploymentconfig_response import ClouddeploymentconfigResponse
|
120
121
|
from openapi_client.models.cloudoverviewdashboard_response import CloudoverviewdashboardResponse
|
121
122
|
from openapi_client.models.cloudregionandzones_response import CloudregionandzonesResponse
|