anyscale 0.26.32__py3-none-any.whl → 0.26.33__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/api.py +22 -0
- anyscale/aws_iam_policies.py +0 -3
- anyscale/client/README.md +15 -1
- anyscale/client/openapi_client/__init__.py +11 -0
- anyscale/client/openapi_client/api/default_api.py +454 -114
- anyscale/client/openapi_client/models/__init__.py +11 -0
- anyscale/client/openapi_client/models/cli_usage_payload.py +440 -0
- anyscale/client/openapi_client/models/commit_ledger_item_type.py +111 -0
- anyscale/client/openapi_client/models/commit_ledger_record_v2.py +207 -0
- anyscale/client/openapi_client/models/complexity_level.py +101 -0
- anyscale/client/openapi_client/models/credit_grant_record_v2.py +181 -0
- anyscale/client/openapi_client/models/credit_ledger_item_type.py +104 -0
- anyscale/client/openapi_client/models/credit_ledger_record_v2.py +207 -0
- anyscale/client/openapi_client/models/credit_record_commit_v2.py +410 -0
- anyscale/client/openapi_client/models/credit_record_credit_v2.py +410 -0
- anyscale/client/openapi_client/models/credit_type.py +100 -0
- anyscale/client/openapi_client/models/credits_v2.py +355 -0
- anyscale/client/openapi_client/models/workspace_template.py +115 -3
- anyscale/client/openapi_client/models/workspace_template_readme.py +59 -3
- anyscale/commands/list_util.py +100 -38
- anyscale/integrations.py +0 -20
- anyscale/scripts.py +1 -0
- anyscale/shared_anyscale_utils/headers.py +4 -0
- anyscale/telemetry.py +424 -0
- anyscale/version.py +1 -1
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/METADATA +1 -1
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/RECORD +32 -20
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/LICENSE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/NOTICE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/WHEEL +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.33.dist-info}/top_level.txt +0 -0
anyscale/api.py
CHANGED
@@ -9,6 +9,7 @@ import click
|
|
9
9
|
from urllib3.connection import HTTPConnection
|
10
10
|
import wrapt
|
11
11
|
|
12
|
+
from anyscale.cli_logger import BlockLogger
|
12
13
|
from anyscale.client import openapi_client
|
13
14
|
from anyscale.client.openapi_client.api.default_api import DefaultApi
|
14
15
|
from anyscale.client.openapi_client.rest import ApiException as ApiExceptionInternal
|
@@ -16,9 +17,12 @@ from anyscale.sdk import anyscale_client
|
|
16
17
|
from anyscale.sdk.anyscale_client.api.default_api import DefaultApi as AnyscaleApi
|
17
18
|
from anyscale.sdk.anyscale_client.rest import ApiException as ApiExceptionExternal
|
18
19
|
from anyscale.shared_anyscale_utils.headers import RequestHeaders
|
20
|
+
from anyscale.telemetry import get_traceparent
|
19
21
|
from anyscale.version import __version__ as version
|
20
22
|
|
21
23
|
|
24
|
+
logger = BlockLogger()
|
25
|
+
|
22
26
|
# NOTE: Some OSes don't implement all of these, so only include those that the OS supports.
|
23
27
|
_SOCKET_OPTIONS = (
|
24
28
|
HTTPConnection.default_socket_options
|
@@ -115,6 +119,15 @@ class ApiClientWrapperInternal(openapi_client.ApiClient):
|
|
115
119
|
_request_timeout=None,
|
116
120
|
_host=None,
|
117
121
|
):
|
122
|
+
# Add tracing correlation info
|
123
|
+
traceparent = get_traceparent()
|
124
|
+
if traceparent:
|
125
|
+
if header_params is None:
|
126
|
+
header_params = {}
|
127
|
+
header_params[RequestHeaders.TRACEPARENT] = traceparent
|
128
|
+
|
129
|
+
logger.debug(f"[API Internal] {method} {resource_path} (trace: {traceparent})")
|
130
|
+
|
118
131
|
try:
|
119
132
|
return openapi_client.ApiClient.call_api(
|
120
133
|
self,
|
@@ -173,6 +186,15 @@ class ApiClientWrapperExternal(anyscale_client.ApiClient):
|
|
173
186
|
_request_timeout=None,
|
174
187
|
_host=None,
|
175
188
|
):
|
189
|
+
# Add tracing correlation info
|
190
|
+
traceparent = get_traceparent()
|
191
|
+
if traceparent:
|
192
|
+
if header_params is None:
|
193
|
+
header_params = {}
|
194
|
+
header_params[RequestHeaders.TRACEPARENT] = traceparent
|
195
|
+
|
196
|
+
logger.debug(f"[API External] {method} {resource_path} (trace: {traceparent})")
|
197
|
+
|
176
198
|
try:
|
177
199
|
return anyscale_client.ApiClient.call_api(
|
178
200
|
self,
|
anyscale/aws_iam_policies.py
CHANGED
@@ -303,9 +303,6 @@ ANYSCALE_IAM_PERMISSIONS_SERVICE_STEADY_STATE = {
|
|
303
303
|
"elasticloadbalancing:SetSubnets",
|
304
304
|
],
|
305
305
|
"Resource": "*",
|
306
|
-
"Condition": {
|
307
|
-
"StringEquals": {"aws:CalledViaFirst": "cloudformation.amazonaws.com"}
|
308
|
-
},
|
309
306
|
},
|
310
307
|
{
|
311
308
|
"Sid": "CreateELBServiceLinkedRole",
|
anyscale/client/README.md
CHANGED
@@ -88,7 +88,6 @@ Class | Method | HTTP request | Description
|
|
88
88
|
*DefaultApi* | [**archive_service_api_v2_services_v2_service_id_archive_post**](docs/DefaultApi.md#archive_service_api_v2_services_v2_service_id_archive_post) | **POST** /api/v2/services-v2/{service_id}/archive | Archive Service
|
89
89
|
*DefaultApi* | [**attach_machine_pool_to_cloud_api_v2_machine_pools_attach_post**](docs/DefaultApi.md#attach_machine_pool_to_cloud_api_v2_machine_pools_attach_post) | **POST** /api/v2/machine_pools/attach | Attach Machine Pool To Cloud
|
90
90
|
*DefaultApi* | [**aws_marketplace_registration_api_v2_organization_billing_aws_marketplace_registration_post**](docs/DefaultApi.md#aws_marketplace_registration_api_v2_organization_billing_aws_marketplace_registration_post) | **POST** /api/v2/organization_billing/aws_marketplace_registration | Aws Marketplace Registration
|
91
|
-
*DefaultApi* | [**ban_organization_api_v2_organizations_organization_id_ban_put**](docs/DefaultApi.md#ban_organization_api_v2_organizations_organization_id_ban_put) | **PUT** /api/v2/organizations/{organization_id}/ban | Ban Organization
|
92
91
|
*DefaultApi* | [**batch_create_cloud_collaborators_api_v2_clouds_cloud_id_collaborators_users_batch_create_post**](docs/DefaultApi.md#batch_create_cloud_collaborators_api_v2_clouds_cloud_id_collaborators_users_batch_create_post) | **POST** /api/v2/clouds/{cloud_id}/collaborators/users/batch_create | Batch Create Cloud Collaborators
|
93
92
|
*DefaultApi* | [**batch_create_invitations_api_v2_organization_invitations_batch_create_post**](docs/DefaultApi.md#batch_create_invitations_api_v2_organization_invitations_batch_create_post) | **POST** /api/v2/organization_invitations/batch_create | Batch Create Invitations
|
94
93
|
*DefaultApi* | [**batch_create_project_collaborators_api_v2_projects_project_id_collaborators_users_batch_create_post**](docs/DefaultApi.md#batch_create_project_collaborators_api_v2_projects_project_id_collaborators_users_batch_create_post) | **POST** /api/v2/projects/{project_id}/collaborators/users/batch_create | Batch Create Project Collaborators
|
@@ -179,6 +178,8 @@ Class | Method | HTTP request | Description
|
|
179
178
|
*DefaultApi* | [**get_cluster_access_token_api_v2_authentication_cluster_id_cluster_access_token_get**](docs/DefaultApi.md#get_cluster_access_token_api_v2_authentication_cluster_id_cluster_access_token_get) | **GET** /api/v2/authentication/{cluster_id}/cluster_access_token | Get Cluster Access Token
|
180
179
|
*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
|
181
180
|
*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
|
181
|
+
*DefaultApi* | [**get_credits_v2_api_v2_organization_billing_credits_v2_get**](docs/DefaultApi.md#get_credits_v2_api_v2_organization_billing_credits_v2_get) | **GET** /api/v2/organization_billing/credits_v2 | Get Credits V2
|
182
|
+
*DefaultApi* | [**get_credits_v2_by_organization_api_v2_organization_billing_credits_v2_organization_id_get**](docs/DefaultApi.md#get_credits_v2_by_organization_api_v2_organization_billing_credits_v2_organization_id_get) | **GET** /api/v2/organization_billing/credits_v2/{organization_id} | Get Credits V2 By Organization
|
182
183
|
*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
|
183
184
|
*DefaultApi* | [**get_dags_api_v2_dataset_runs_dags_get**](docs/DefaultApi.md#get_dags_api_v2_dataset_runs_dags_get) | **GET** /api/v2/dataset_runs/dags | Get Dags
|
184
185
|
*DefaultApi* | [**get_dashboard_api_v2_dataset_runs_get**](docs/DefaultApi.md#get_dashboard_api_v2_dataset_runs_get) | **GET** /api/v2/dataset_runs/ | Get Dashboard
|
@@ -213,6 +214,7 @@ Class | Method | HTTP request | Description
|
|
213
214
|
*DefaultApi* | [**get_operator_metrics_api_v2_dataset_runs_operator_get**](docs/DefaultApi.md#get_operator_metrics_api_v2_dataset_runs_operator_get) | **GET** /api/v2/dataset_runs/operator | Get Operator Metrics
|
214
215
|
*DefaultApi* | [**get_or_create_build_from_image_uri_api_v2_builds_get_or_create_build_from_image_uri_post**](docs/DefaultApi.md#get_or_create_build_from_image_uri_api_v2_builds_get_or_create_build_from_image_uri_post) | **POST** /api/v2/builds/get_or_create_build_from_image_uri | Get Or Create Build From Image Uri
|
215
216
|
*DefaultApi* | [**get_organization_metronome_usage_alerts_api_v2_organization_billing_alerts_get**](docs/DefaultApi.md#get_organization_metronome_usage_alerts_api_v2_organization_billing_alerts_get) | **GET** /api/v2/organization_billing/alerts | Get Organization Metronome Usage Alerts
|
217
|
+
*DefaultApi* | [**get_plan_status_api_v2_organization_billing_plan_status_get**](docs/DefaultApi.md#get_plan_status_api_v2_organization_billing_plan_status_get) | **GET** /api/v2/organization_billing/plan_status | Get Plan Status
|
216
218
|
*DefaultApi* | [**get_project_api_v2_projects_project_id_get**](docs/DefaultApi.md#get_project_api_v2_projects_project_id_get) | **GET** /api/v2/projects/{project_id} | Get Project
|
217
219
|
*DefaultApi* | [**get_project_default_session_name_api_v2_projects_project_id_default_session_name_get**](docs/DefaultApi.md#get_project_default_session_name_api_v2_projects_project_id_default_session_name_get) | **GET** /api/v2/projects/{project_id}/default_session_name | Get Project Default Session Name
|
218
220
|
*DefaultApi* | [**get_recent_cluster_compute_configs_api_v2_recent_activity_cluster_compute_configs_get**](docs/DefaultApi.md#get_recent_cluster_compute_configs_api_v2_recent_activity_cluster_compute_configs_get) | **GET** /api/v2/recent_activity/cluster_compute_configs | Get Recent Cluster Compute Configs
|
@@ -300,6 +302,7 @@ Class | Method | HTTP request | Description
|
|
300
302
|
*DefaultApi* | [**put_workspace_proxied_dataplane_artifacts_api_v2_experimental_workspaces_workspace_id_proxied_dataplane_artifacts_put**](docs/DefaultApi.md#put_workspace_proxied_dataplane_artifacts_api_v2_experimental_workspaces_workspace_id_proxied_dataplane_artifacts_put) | **PUT** /api/v2/experimental_workspaces/{workspace_id}/proxied_dataplane_artifacts | Put Workspace Proxied Dataplane Artifacts
|
301
303
|
*DefaultApi* | [**put_workspace_wandb_run_details_api_v2_integrations_workspace_wandb_run_details_workspace_id_put**](docs/DefaultApi.md#put_workspace_wandb_run_details_api_v2_integrations_workspace_wandb_run_details_workspace_id_put) | **PUT** /api/v2/integrations/workspace_wandb_run_details/{workspace_id} | Put Workspace Wandb Run Details
|
302
304
|
*DefaultApi* | [**query_aggregated_logs_api_v2_logs_query_aggregated_logs_get**](docs/DefaultApi.md#query_aggregated_logs_api_v2_logs_query_aggregated_logs_get) | **GET** /api/v2/logs/query_aggregated_logs | Query Aggregated Logs
|
305
|
+
*DefaultApi* | [**receive_cli_usage_api_v2_cli_usage_post**](docs/DefaultApi.md#receive_cli_usage_api_v2_cli_usage_post) | **POST** /api/v2/cli_usage/ | Receive Cli Usage
|
303
306
|
*DefaultApi* | [**redirect_to_service_api_v2_sessions_cluster_id_services_get**](docs/DefaultApi.md#redirect_to_service_api_v2_sessions_cluster_id_services_get) | **GET** /api/v2/sessions/{cluster_id}/services | Redirect To Service
|
304
307
|
*DefaultApi* | [**redirect_to_tools_api_v2_services_v2_service_id_tools_get**](docs/DefaultApi.md#redirect_to_tools_api_v2_services_v2_service_id_tools_get) | **GET** /api/v2/services-v2/{service_id}/tools | Redirect To Tools
|
305
308
|
*DefaultApi* | [**register_api_v2_kubernetes_manager_register_post**](docs/DefaultApi.md#register_api_v2_kubernetes_manager_register_post) | **POST** /api/v2/kubernetes_manager/register | Register
|
@@ -414,6 +417,7 @@ Class | Method | HTTP request | Description
|
|
414
417
|
- [BuildResponse](docs/BuildResponse.md)
|
415
418
|
- [BuildStatus](docs/BuildStatus.md)
|
416
419
|
- [BuildlogresponseResponse](docs/BuildlogresponseResponse.md)
|
420
|
+
- [CLIUsagePayload](docs/CLIUsagePayload.md)
|
417
421
|
- [ChangePasswordParams](docs/ChangePasswordParams.md)
|
418
422
|
- [CleanupLeakedGrafanaDashboardResponse](docs/CleanupLeakedGrafanaDashboardResponse.md)
|
419
423
|
- [CleanupleakedgrafanadashboardresponseResponse](docs/CleanupleakedgrafanadashboardresponseResponse.md)
|
@@ -489,6 +493,9 @@ Class | Method | HTTP request | Description
|
|
489
493
|
- [ClustereventListResponse](docs/ClustereventListResponse.md)
|
490
494
|
- [ClustereventsoutputResponse](docs/ClustereventsoutputResponse.md)
|
491
495
|
- [ClusteroperationResponse](docs/ClusteroperationResponse.md)
|
496
|
+
- [CommitLedgerItemType](docs/CommitLedgerItemType.md)
|
497
|
+
- [CommitLedgerRecordV2](docs/CommitLedgerRecordV2.md)
|
498
|
+
- [ComplexityLevel](docs/ComplexityLevel.md)
|
492
499
|
- [ComputeNodeType](docs/ComputeNodeType.md)
|
493
500
|
- [ComputeStack](docs/ComputeStack.md)
|
494
501
|
- [ComputeTemplate](docs/ComputeTemplate.md)
|
@@ -540,6 +547,13 @@ Class | Method | HTTP request | Description
|
|
540
547
|
- [CreatemachinepoolresponseResponse](docs/CreatemachinepoolresponseResponse.md)
|
541
548
|
- [CreatemachineresponseResponse](docs/CreatemachineresponseResponse.md)
|
542
549
|
- [CreateotpreturnapimodelResponse](docs/CreateotpreturnapimodelResponse.md)
|
550
|
+
- [CreditGrantRecordV2](docs/CreditGrantRecordV2.md)
|
551
|
+
- [CreditLedgerItemType](docs/CreditLedgerItemType.md)
|
552
|
+
- [CreditLedgerRecordV2](docs/CreditLedgerRecordV2.md)
|
553
|
+
- [CreditRecordCommitV2](docs/CreditRecordCommitV2.md)
|
554
|
+
- [CreditRecordCreditV2](docs/CreditRecordCreditV2.md)
|
555
|
+
- [CreditType](docs/CreditType.md)
|
556
|
+
- [CreditsV2](docs/CreditsV2.md)
|
543
557
|
- [CustomerAlertStatus](docs/CustomerAlertStatus.md)
|
544
558
|
- [DataplaneServices](docs/DataplaneServices.md)
|
545
559
|
- [Dataset](docs/Dataset.md)
|
@@ -77,6 +77,7 @@ from openapi_client.models.build_registration import BuildRegistration
|
|
77
77
|
from openapi_client.models.build_response import BuildResponse
|
78
78
|
from openapi_client.models.build_status import BuildStatus
|
79
79
|
from openapi_client.models.buildlogresponse_response import BuildlogresponseResponse
|
80
|
+
from openapi_client.models.cli_usage_payload import CLIUsagePayload
|
80
81
|
from openapi_client.models.change_password_params import ChangePasswordParams
|
81
82
|
from openapi_client.models.cleanup_leaked_grafana_dashboard_response import CleanupLeakedGrafanaDashboardResponse
|
82
83
|
from openapi_client.models.cleanupleakedgrafanadashboardresponse_response import CleanupleakedgrafanadashboardresponseResponse
|
@@ -152,6 +153,9 @@ from openapi_client.models.clusterauthresponse_response import Clusterauthrespon
|
|
152
153
|
from openapi_client.models.clusterevent_list_response import ClustereventListResponse
|
153
154
|
from openapi_client.models.clustereventsoutput_response import ClustereventsoutputResponse
|
154
155
|
from openapi_client.models.clusteroperation_response import ClusteroperationResponse
|
156
|
+
from openapi_client.models.commit_ledger_item_type import CommitLedgerItemType
|
157
|
+
from openapi_client.models.commit_ledger_record_v2 import CommitLedgerRecordV2
|
158
|
+
from openapi_client.models.complexity_level import ComplexityLevel
|
155
159
|
from openapi_client.models.compute_node_type import ComputeNodeType
|
156
160
|
from openapi_client.models.compute_stack import ComputeStack
|
157
161
|
from openapi_client.models.compute_template import ComputeTemplate
|
@@ -203,6 +207,13 @@ from openapi_client.models.createcomputetemplateconfig_response import Createcom
|
|
203
207
|
from openapi_client.models.createmachinepoolresponse_response import CreatemachinepoolresponseResponse
|
204
208
|
from openapi_client.models.createmachineresponse_response import CreatemachineresponseResponse
|
205
209
|
from openapi_client.models.createotpreturnapimodel_response import CreateotpreturnapimodelResponse
|
210
|
+
from openapi_client.models.credit_grant_record_v2 import CreditGrantRecordV2
|
211
|
+
from openapi_client.models.credit_ledger_item_type import CreditLedgerItemType
|
212
|
+
from openapi_client.models.credit_ledger_record_v2 import CreditLedgerRecordV2
|
213
|
+
from openapi_client.models.credit_record_commit_v2 import CreditRecordCommitV2
|
214
|
+
from openapi_client.models.credit_record_credit_v2 import CreditRecordCreditV2
|
215
|
+
from openapi_client.models.credit_type import CreditType
|
216
|
+
from openapi_client.models.credits_v2 import CreditsV2
|
206
217
|
from openapi_client.models.customer_alert_status import CustomerAlertStatus
|
207
218
|
from openapi_client.models.dataplane_services import DataplaneServices
|
208
219
|
from openapi_client.models.dataset import Dataset
|