anyscale 0.26.44__py3-none-any.whl → 0.26.45__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/client/README.md CHANGED
@@ -337,6 +337,7 @@ Class | Method | HTTP request | Description
337
337
  *DefaultApi* | [**sso_login_test_api_v2_users_sso_login_test_get**](docs/DefaultApi.md#sso_login_test_api_v2_users_sso_login_test_get) | **GET** /api/v2/users/sso_login_test | Sso Login Test
338
338
  *DefaultApi* | [**start_session_api_v2_sessions_session_id_start_post**](docs/DefaultApi.md#start_session_api_v2_sessions_session_id_start_post) | **POST** /api/v2/sessions/{session_id}/start | Start Session
339
339
  *DefaultApi* | [**stop_session_api_v2_sessions_session_id_stop_post**](docs/DefaultApi.md#stop_session_api_v2_sessions_session_id_stop_post) | **POST** /api/v2/sessions/{session_id}/stop | Stop Session
340
+ *DefaultApi* | [**stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post**](docs/DefaultApi.md#stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post) | **POST** /api/v2/organization_billing/stripe_success_webhook | Stripe Success Webhook
340
341
  *DefaultApi* | [**summarize_machine_pool_api_v2_machine_pools_summary_post**](docs/DefaultApi.md#summarize_machine_pool_api_v2_machine_pools_summary_post) | **POST** /api/v2/machine_pools/summary | Summarize Machine Pool
341
342
  *DefaultApi* | [**sync_organization_with_metronome_api_v2_organization_billing_organization_id_sync_with_metronome_post**](docs/DefaultApi.md#sync_organization_with_metronome_api_v2_organization_billing_organization_id_sync_with_metronome_post) | **POST** /api/v2/organization_billing/{organization_id}/sync_with_metronome | Sync Organization With Metronome
342
343
  *DefaultApi* | [**terminate_job_api_v2_decorated_ha_jobs_production_job_id_terminate_post**](docs/DefaultApi.md#terminate_job_api_v2_decorated_ha_jobs_production_job_id_terminate_post) | **POST** /api/v2/decorated_ha_jobs/{production_job_id}/terminate | Terminate Job
@@ -627,6 +628,7 @@ Class | Method | HTTP request | Description
627
628
  - [DescribeMachinePoolMachinesFilters](docs/DescribeMachinePoolMachinesFilters.md)
628
629
  - [DescribeMachinePoolMachinesRequest](docs/DescribeMachinePoolMachinesRequest.md)
629
630
  - [DescribeMachinePoolRequest](docs/DescribeMachinePoolRequest.md)
631
+ - [DescribeMachinePoolRequestsFilters](docs/DescribeMachinePoolRequestsFilters.md)
630
632
  - [DescribeMachinePoolRequestsRequest](docs/DescribeMachinePoolRequestsRequest.md)
631
633
  - [DescribeMachinePoolResponse](docs/DescribeMachinePoolResponse.md)
632
634
  - [DescribeMachinePoolWorkloadsFilters](docs/DescribeMachinePoolWorkloadsFilters.md)
@@ -799,6 +801,7 @@ Class | Method | HTTP request | Description
799
801
  - [PartitionInfo](docs/PartitionInfo.md)
800
802
  - [PauseSchedule](docs/PauseSchedule.md)
801
803
  - [PermissionLevel](docs/PermissionLevel.md)
804
+ - [PlanStatus](docs/PlanStatus.md)
802
805
  - [ProductionJob](docs/ProductionJob.md)
803
806
  - [ProductionJobConfig](docs/ProductionJobConfig.md)
804
807
  - [ProductionJobEvent](docs/ProductionJobEvent.md)
@@ -278,6 +278,7 @@ from openapi_client.models.deletemachinepoolresponse_response import Deletemachi
278
278
  from openapi_client.models.describe_machine_pool_machines_filters import DescribeMachinePoolMachinesFilters
279
279
  from openapi_client.models.describe_machine_pool_machines_request import DescribeMachinePoolMachinesRequest
280
280
  from openapi_client.models.describe_machine_pool_request import DescribeMachinePoolRequest
281
+ from openapi_client.models.describe_machine_pool_requests_filters import DescribeMachinePoolRequestsFilters
281
282
  from openapi_client.models.describe_machine_pool_requests_request import DescribeMachinePoolRequestsRequest
282
283
  from openapi_client.models.describe_machine_pool_response import DescribeMachinePoolResponse
283
284
  from openapi_client.models.describe_machine_pool_workloads_filters import DescribeMachinePoolWorkloadsFilters
@@ -450,6 +451,7 @@ from openapi_client.models.page_query import PageQuery
450
451
  from openapi_client.models.partition_info import PartitionInfo
451
452
  from openapi_client.models.pause_schedule import PauseSchedule
452
453
  from openapi_client.models.permission_level import PermissionLevel
454
+ from openapi_client.models.plan_status import PlanStatus
453
455
  from openapi_client.models.production_job import ProductionJob
454
456
  from openapi_client.models.production_job_config import ProductionJobConfig
455
457
  from openapi_client.models.production_job_event import ProductionJobEvent
@@ -17071,7 +17071,7 @@ class DefaultApi(object):
17071
17071
  def get_plan_status_api_v2_organization_billing_plan_status_get(self, **kwargs): # noqa: E501
17072
17072
  """Get Plan Status # noqa: E501
17073
17073
 
17074
- Returns the plan status for this user: True if the organization has ever been on a plan, False otherwise. # noqa: E501
17074
+ Returns the plan status for this user. # noqa: E501
17075
17075
  This method makes a synchronous HTTP request by default. To make an
17076
17076
  asynchronous HTTP request, please pass async_req=True
17077
17077
  >>> thread = api.get_plan_status_api_v2_organization_billing_plan_status_get(async_req=True)
@@ -17085,7 +17085,7 @@ class DefaultApi(object):
17085
17085
  number provided, it will be total request
17086
17086
  timeout. It can also be a pair (tuple) of
17087
17087
  (connection, read) timeouts.
17088
- :return: bool
17088
+ :return: PlanStatus
17089
17089
  If the method is called asynchronously,
17090
17090
  returns the request thread.
17091
17091
  """
@@ -17095,7 +17095,7 @@ class DefaultApi(object):
17095
17095
  def get_plan_status_api_v2_organization_billing_plan_status_get_with_http_info(self, **kwargs): # noqa: E501
17096
17096
  """Get Plan Status # noqa: E501
17097
17097
 
17098
- Returns the plan status for this user: True if the organization has ever been on a plan, False otherwise. # noqa: E501
17098
+ Returns the plan status for this user. # noqa: E501
17099
17099
  This method makes a synchronous HTTP request by default. To make an
17100
17100
  asynchronous HTTP request, please pass async_req=True
17101
17101
  >>> thread = api.get_plan_status_api_v2_organization_billing_plan_status_get_with_http_info(async_req=True)
@@ -17111,7 +17111,7 @@ class DefaultApi(object):
17111
17111
  number provided, it will be total request
17112
17112
  timeout. It can also be a pair (tuple) of
17113
17113
  (connection, read) timeouts.
17114
- :return: tuple(bool, status_code(int), headers(HTTPHeaderDict))
17114
+ :return: tuple(PlanStatus, status_code(int), headers(HTTPHeaderDict))
17115
17115
  If the method is called asynchronously,
17116
17116
  returns the request thread.
17117
17117
  """
@@ -17165,7 +17165,7 @@ class DefaultApi(object):
17165
17165
  body=body_params,
17166
17166
  post_params=form_params,
17167
17167
  files=local_var_files,
17168
- response_type='bool', # noqa: E501
17168
+ response_type='PlanStatus', # noqa: E501
17169
17169
  auth_settings=auth_settings,
17170
17170
  async_req=local_var_params.get('async_req'),
17171
17171
  _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
@@ -31704,6 +31704,107 @@ class DefaultApi(object):
31704
31704
  _request_timeout=local_var_params.get('_request_timeout'),
31705
31705
  collection_formats=collection_formats)
31706
31706
 
31707
+ def stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post(self, **kwargs): # noqa: E501
31708
+ """Stripe Success Webhook # noqa: E501
31709
+
31710
+ Adds payment info for the first time or updates existing payment info. # noqa: E501
31711
+ This method makes a synchronous HTTP request by default. To make an
31712
+ asynchronous HTTP request, please pass async_req=True
31713
+ >>> thread = api.stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post(async_req=True)
31714
+ >>> result = thread.get()
31715
+
31716
+ :param async_req bool: execute request asynchronously
31717
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
31718
+ be returned without reading/decoding response
31719
+ data. Default is True.
31720
+ :param _request_timeout: timeout setting for this request. If one
31721
+ number provided, it will be total request
31722
+ timeout. It can also be a pair (tuple) of
31723
+ (connection, read) timeouts.
31724
+ :return: None
31725
+ If the method is called asynchronously,
31726
+ returns the request thread.
31727
+ """
31728
+ kwargs['_return_http_data_only'] = True
31729
+ return self.stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post_with_http_info(**kwargs) # noqa: E501
31730
+
31731
+ def stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post_with_http_info(self, **kwargs): # noqa: E501
31732
+ """Stripe Success Webhook # noqa: E501
31733
+
31734
+ Adds payment info for the first time or updates existing payment info. # noqa: E501
31735
+ This method makes a synchronous HTTP request by default. To make an
31736
+ asynchronous HTTP request, please pass async_req=True
31737
+ >>> thread = api.stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post_with_http_info(async_req=True)
31738
+ >>> result = thread.get()
31739
+
31740
+ :param async_req bool: execute request asynchronously
31741
+ :param _return_http_data_only: response data without head status code
31742
+ and headers
31743
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
31744
+ be returned without reading/decoding response
31745
+ data. Default is True.
31746
+ :param _request_timeout: timeout setting for this request. If one
31747
+ number provided, it will be total request
31748
+ timeout. It can also be a pair (tuple) of
31749
+ (connection, read) timeouts.
31750
+ :return: None
31751
+ If the method is called asynchronously,
31752
+ returns the request thread.
31753
+ """
31754
+
31755
+ local_var_params = locals()
31756
+
31757
+ all_params = [
31758
+ ]
31759
+ all_params.extend(
31760
+ [
31761
+ 'async_req',
31762
+ '_return_http_data_only',
31763
+ '_preload_content',
31764
+ '_request_timeout'
31765
+ ]
31766
+ )
31767
+
31768
+ for key, val in six.iteritems(local_var_params['kwargs']):
31769
+ if key not in all_params:
31770
+ raise ApiTypeError(
31771
+ "Got an unexpected keyword argument '%s'"
31772
+ " to method stripe_success_webhook_api_v2_organization_billing_stripe_success_webhook_post" % key
31773
+ )
31774
+ local_var_params[key] = val
31775
+ del local_var_params['kwargs']
31776
+
31777
+ collection_formats = {}
31778
+
31779
+ path_params = {}
31780
+
31781
+ query_params = []
31782
+
31783
+ header_params = {}
31784
+
31785
+ form_params = []
31786
+ local_var_files = {}
31787
+
31788
+ body_params = None
31789
+ # Authentication setting
31790
+ auth_settings = [] # noqa: E501
31791
+
31792
+ return self.api_client.call_api(
31793
+ '/api/v2/organization_billing/stripe_success_webhook', 'POST',
31794
+ path_params,
31795
+ query_params,
31796
+ header_params,
31797
+ body=body_params,
31798
+ post_params=form_params,
31799
+ files=local_var_files,
31800
+ response_type=None, # noqa: E501
31801
+ auth_settings=auth_settings,
31802
+ async_req=local_var_params.get('async_req'),
31803
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
31804
+ _preload_content=local_var_params.get('_preload_content', True),
31805
+ _request_timeout=local_var_params.get('_request_timeout'),
31806
+ collection_formats=collection_formats)
31807
+
31707
31808
  def summarize_machine_pool_api_v2_machine_pools_summary_post(self, summarize_machine_pool_request, **kwargs): # noqa: E501
31708
31809
  """Summarize Machine Pool # noqa: E501
31709
31810
 
@@ -264,6 +264,7 @@ from openapi_client.models.deletemachinepoolresponse_response import Deletemachi
264
264
  from openapi_client.models.describe_machine_pool_machines_filters import DescribeMachinePoolMachinesFilters
265
265
  from openapi_client.models.describe_machine_pool_machines_request import DescribeMachinePoolMachinesRequest
266
266
  from openapi_client.models.describe_machine_pool_request import DescribeMachinePoolRequest
267
+ from openapi_client.models.describe_machine_pool_requests_filters import DescribeMachinePoolRequestsFilters
267
268
  from openapi_client.models.describe_machine_pool_requests_request import DescribeMachinePoolRequestsRequest
268
269
  from openapi_client.models.describe_machine_pool_response import DescribeMachinePoolResponse
269
270
  from openapi_client.models.describe_machine_pool_workloads_filters import DescribeMachinePoolWorkloadsFilters
@@ -436,6 +437,7 @@ from openapi_client.models.page_query import PageQuery
436
437
  from openapi_client.models.partition_info import PartitionInfo
437
438
  from openapi_client.models.pause_schedule import PauseSchedule
438
439
  from openapi_client.models.permission_level import PermissionLevel
440
+ from openapi_client.models.plan_status import PlanStatus
439
441
  from openapi_client.models.production_job import ProductionJob
440
442
  from openapi_client.models.production_job_config import ProductionJobConfig
441
443
  from openapi_client.models.production_job_event import ProductionJobEvent
@@ -0,0 +1,150 @@
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 DescribeMachinePoolRequestsFilters(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
+ Attributes:
30
+ openapi_types (dict): The key is attribute name
31
+ and the value is attribute type.
32
+ attribute_map (dict): The key is attribute name
33
+ and the value is json key in definition.
34
+ """
35
+ openapi_types = {
36
+ 'partitions': 'list[str]',
37
+ 'workload_name': 'TextQuery'
38
+ }
39
+
40
+ attribute_map = {
41
+ 'partitions': 'partitions',
42
+ 'workload_name': 'workload_name'
43
+ }
44
+
45
+ def __init__(self, partitions=None, workload_name=None, local_vars_configuration=None): # noqa: E501
46
+ """DescribeMachinePoolRequestsFilters - a model defined in OpenAPI""" # noqa: E501
47
+ if local_vars_configuration is None:
48
+ local_vars_configuration = Configuration()
49
+ self.local_vars_configuration = local_vars_configuration
50
+
51
+ self._partitions = None
52
+ self._workload_name = None
53
+ self.discriminator = None
54
+
55
+ if partitions is not None:
56
+ self.partitions = partitions
57
+ if workload_name is not None:
58
+ self.workload_name = workload_name
59
+
60
+ @property
61
+ def partitions(self):
62
+ """Gets the partitions of this DescribeMachinePoolRequestsFilters. # noqa: E501
63
+
64
+ The partitions to filter by. # noqa: E501
65
+
66
+ :return: The partitions of this DescribeMachinePoolRequestsFilters. # noqa: E501
67
+ :rtype: list[str]
68
+ """
69
+ return self._partitions
70
+
71
+ @partitions.setter
72
+ def partitions(self, partitions):
73
+ """Sets the partitions of this DescribeMachinePoolRequestsFilters.
74
+
75
+ The partitions to filter by. # noqa: E501
76
+
77
+ :param partitions: The partitions of this DescribeMachinePoolRequestsFilters. # noqa: E501
78
+ :type: list[str]
79
+ """
80
+
81
+ self._partitions = partitions
82
+
83
+ @property
84
+ def workload_name(self):
85
+ """Gets the workload_name of this DescribeMachinePoolRequestsFilters. # noqa: E501
86
+
87
+ Filters requests by workload name. If this field is absent, no filtering is done. # noqa: E501
88
+
89
+ :return: The workload_name of this DescribeMachinePoolRequestsFilters. # noqa: E501
90
+ :rtype: TextQuery
91
+ """
92
+ return self._workload_name
93
+
94
+ @workload_name.setter
95
+ def workload_name(self, workload_name):
96
+ """Sets the workload_name of this DescribeMachinePoolRequestsFilters.
97
+
98
+ Filters requests by workload name. If this field is absent, no filtering is done. # noqa: E501
99
+
100
+ :param workload_name: The workload_name of this DescribeMachinePoolRequestsFilters. # noqa: E501
101
+ :type: TextQuery
102
+ """
103
+
104
+ self._workload_name = workload_name
105
+
106
+ def to_dict(self):
107
+ """Returns the model properties as a dict"""
108
+ result = {}
109
+
110
+ for attr, _ in six.iteritems(self.openapi_types):
111
+ value = getattr(self, attr)
112
+ if isinstance(value, list):
113
+ result[attr] = list(map(
114
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
115
+ value
116
+ ))
117
+ elif hasattr(value, "to_dict"):
118
+ result[attr] = value.to_dict()
119
+ elif isinstance(value, dict):
120
+ result[attr] = dict(map(
121
+ lambda item: (item[0], item[1].to_dict())
122
+ if hasattr(item[1], "to_dict") else item,
123
+ value.items()
124
+ ))
125
+ else:
126
+ result[attr] = value
127
+
128
+ return result
129
+
130
+ def to_str(self):
131
+ """Returns the string representation of the model"""
132
+ return pprint.pformat(self.to_dict())
133
+
134
+ def __repr__(self):
135
+ """For `print` and `pprint`"""
136
+ return self.to_str()
137
+
138
+ def __eq__(self, other):
139
+ """Returns true if both objects are equal"""
140
+ if not isinstance(other, DescribeMachinePoolRequestsFilters):
141
+ return False
142
+
143
+ return self.to_dict() == other.to_dict()
144
+
145
+ def __ne__(self, other):
146
+ """Returns true if both objects are not equal"""
147
+ if not isinstance(other, DescribeMachinePoolRequestsFilters):
148
+ return True
149
+
150
+ return self.to_dict() != other.to_dict()
@@ -34,27 +34,27 @@ class DescribeMachinePoolRequestsRequest(object):
34
34
  """
35
35
  openapi_types = {
36
36
  'machine_pool_name': 'str',
37
- 'workload_name': 'TextQuery'
37
+ 'filters': 'DescribeMachinePoolRequestsFilters'
38
38
  }
39
39
 
40
40
  attribute_map = {
41
41
  'machine_pool_name': 'machine_pool_name',
42
- 'workload_name': 'workload_name'
42
+ 'filters': 'filters'
43
43
  }
44
44
 
45
- def __init__(self, machine_pool_name=None, workload_name=None, local_vars_configuration=None): # noqa: E501
45
+ def __init__(self, machine_pool_name=None, filters=None, local_vars_configuration=None): # noqa: E501
46
46
  """DescribeMachinePoolRequestsRequest - a model defined in OpenAPI""" # noqa: E501
47
47
  if local_vars_configuration is None:
48
48
  local_vars_configuration = Configuration()
49
49
  self.local_vars_configuration = local_vars_configuration
50
50
 
51
51
  self._machine_pool_name = None
52
- self._workload_name = None
52
+ self._filters = None
53
53
  self.discriminator = None
54
54
 
55
55
  self.machine_pool_name = machine_pool_name
56
- if workload_name is not None:
57
- self.workload_name = workload_name
56
+ if filters is not None:
57
+ self.filters = filters
58
58
 
59
59
  @property
60
60
  def machine_pool_name(self):
@@ -82,27 +82,27 @@ class DescribeMachinePoolRequestsRequest(object):
82
82
  self._machine_pool_name = machine_pool_name
83
83
 
84
84
  @property
85
- def workload_name(self):
86
- """Gets the workload_name of this DescribeMachinePoolRequestsRequest. # noqa: E501
85
+ def filters(self):
86
+ """Gets the filters of this DescribeMachinePoolRequestsRequest. # noqa: E501
87
87
 
88
- Filters requests by workload name. If this field is absent, no filtering is done. # noqa: E501
88
+ Filters to apply to the requests. # noqa: E501
89
89
 
90
- :return: The workload_name of this DescribeMachinePoolRequestsRequest. # noqa: E501
91
- :rtype: TextQuery
90
+ :return: The filters of this DescribeMachinePoolRequestsRequest. # noqa: E501
91
+ :rtype: DescribeMachinePoolRequestsFilters
92
92
  """
93
- return self._workload_name
93
+ return self._filters
94
94
 
95
- @workload_name.setter
96
- def workload_name(self, workload_name):
97
- """Sets the workload_name of this DescribeMachinePoolRequestsRequest.
95
+ @filters.setter
96
+ def filters(self, filters):
97
+ """Sets the filters of this DescribeMachinePoolRequestsRequest.
98
98
 
99
- Filters requests by workload name. If this field is absent, no filtering is done. # noqa: E501
99
+ Filters to apply to the requests. # noqa: E501
100
100
 
101
- :param workload_name: The workload_name of this DescribeMachinePoolRequestsRequest. # noqa: E501
102
- :type: TextQuery
101
+ :param filters: The filters of this DescribeMachinePoolRequestsRequest. # noqa: E501
102
+ :type: DescribeMachinePoolRequestsFilters
103
103
  """
104
104
 
105
- self._workload_name = workload_name
105
+ self._filters = filters
106
106
 
107
107
  def to_dict(self):
108
108
  """Returns the model properties as a dict"""
@@ -0,0 +1,123 @@
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 PlanStatus(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
+ Attributes:
30
+ openapi_types (dict): The key is attribute name
31
+ and the value is attribute type.
32
+ attribute_map (dict): The key is attribute name
33
+ and the value is json key in definition.
34
+ """
35
+ openapi_types = {
36
+ 'has_ever_had_a_plan': 'bool'
37
+ }
38
+
39
+ attribute_map = {
40
+ 'has_ever_had_a_plan': 'has_ever_had_a_plan'
41
+ }
42
+
43
+ def __init__(self, has_ever_had_a_plan=None, local_vars_configuration=None): # noqa: E501
44
+ """PlanStatus - a model defined in OpenAPI""" # noqa: E501
45
+ if local_vars_configuration is None:
46
+ local_vars_configuration = Configuration()
47
+ self.local_vars_configuration = local_vars_configuration
48
+
49
+ self._has_ever_had_a_plan = None
50
+ self.discriminator = None
51
+
52
+ self.has_ever_had_a_plan = has_ever_had_a_plan
53
+
54
+ @property
55
+ def has_ever_had_a_plan(self):
56
+ """Gets the has_ever_had_a_plan of this PlanStatus. # noqa: E501
57
+
58
+ Whether the organization has ever had a plan. # noqa: E501
59
+
60
+ :return: The has_ever_had_a_plan of this PlanStatus. # noqa: E501
61
+ :rtype: bool
62
+ """
63
+ return self._has_ever_had_a_plan
64
+
65
+ @has_ever_had_a_plan.setter
66
+ def has_ever_had_a_plan(self, has_ever_had_a_plan):
67
+ """Sets the has_ever_had_a_plan of this PlanStatus.
68
+
69
+ Whether the organization has ever had a plan. # noqa: E501
70
+
71
+ :param has_ever_had_a_plan: The has_ever_had_a_plan of this PlanStatus. # noqa: E501
72
+ :type: bool
73
+ """
74
+ if self.local_vars_configuration.client_side_validation and has_ever_had_a_plan is None: # noqa: E501
75
+ raise ValueError("Invalid value for `has_ever_had_a_plan`, must not be `None`") # noqa: E501
76
+
77
+ self._has_ever_had_a_plan = has_ever_had_a_plan
78
+
79
+ def to_dict(self):
80
+ """Returns the model properties as a dict"""
81
+ result = {}
82
+
83
+ for attr, _ in six.iteritems(self.openapi_types):
84
+ value = getattr(self, attr)
85
+ if isinstance(value, list):
86
+ result[attr] = list(map(
87
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88
+ value
89
+ ))
90
+ elif hasattr(value, "to_dict"):
91
+ result[attr] = value.to_dict()
92
+ elif isinstance(value, dict):
93
+ result[attr] = dict(map(
94
+ lambda item: (item[0], item[1].to_dict())
95
+ if hasattr(item[1], "to_dict") else item,
96
+ value.items()
97
+ ))
98
+ else:
99
+ result[attr] = value
100
+
101
+ return result
102
+
103
+ def to_str(self):
104
+ """Returns the string representation of the model"""
105
+ return pprint.pformat(self.to_dict())
106
+
107
+ def __repr__(self):
108
+ """For `print` and `pprint`"""
109
+ return self.to_str()
110
+
111
+ def __eq__(self, other):
112
+ """Returns true if both objects are equal"""
113
+ if not isinstance(other, PlanStatus):
114
+ return False
115
+
116
+ return self.to_dict() == other.to_dict()
117
+
118
+ def __ne__(self, other):
119
+ """Returns true if both objects are not equal"""
120
+ if not isinstance(other, PlanStatus):
121
+ return True
122
+
123
+ return self.to_dict() != other.to_dict()
anyscale/telemetry.py CHANGED
@@ -366,55 +366,47 @@ def _patch_click() -> None:
366
366
 
367
367
  @functools.wraps(original_invoke)
368
368
  def instrumented_invoke(self, ctx, *args, **kwargs):
369
- try:
370
- # Sampling
371
- if SAMPLE_RATE <= 0 or random.random() > SAMPLE_RATE:
372
- return original_invoke(self, ctx, *args, **kwargs)
373
- # Only instrument leaf commands
374
- if isinstance(self, click.Group):
375
- return original_invoke(self, ctx, *args, **kwargs)
369
+ if (
370
+ isinstance(self, click.Group)
371
+ or SAMPLE_RATE <= 0
372
+ or random.random() > SAMPLE_RATE
373
+ ):
374
+ return original_invoke(self, ctx, *args, **kwargs)
376
375
 
376
+ try:
377
377
  trace_id = _setup_trace_context()
378
- start = time.perf_counter()
379
-
380
- # Store start time in context for interactive commands
381
- ctx.telemetry_start_time = start
382
-
383
- code, exc = 0, None
384
- should_emit_telemetry = True
385
-
386
- try:
387
- result = original_invoke(self, ctx, *args, **kwargs)
388
- return result
389
- except Exception as e:
390
- code, exc = 1, e.__class__.__name__
391
- raise
392
- finally:
393
- # Only emit telemetry once per command invocation
394
- if _skip_click_patch_var.get():
395
- should_emit_telemetry = False
396
-
397
- if should_emit_telemetry:
398
- try:
399
- # Use actual end time for non-interactive commands
400
- dur = (time.perf_counter() - start) * 1_000
401
- body = _create_payload(
402
- trace_id=trace_id,
403
- ctx=ctx,
404
- duration_ms=dur,
405
- exit_code=code,
406
- exception_type=exc,
407
- event_type="command",
408
- )
409
- _emit_telemetry(body)
410
- _skip_click_patch_var.set(True)
411
- except Exception: # noqa: BLE001
412
- # Telemetry should never crash the CLI
413
- pass
414
378
  except Exception: # noqa: BLE001
415
- # If telemetry setup fails, just run the original command
416
379
  return original_invoke(self, ctx, *args, **kwargs)
417
380
 
381
+ start = time.perf_counter()
382
+ ctx.telemetry_start_time = start
383
+ exit_code, exc_name = 0, None
384
+
385
+ try:
386
+ result = original_invoke(self, ctx, *args, **kwargs)
387
+ return result
388
+ except Exception as e: # noqa: BLE001
389
+ exit_code, exc_name = 1, e.__class__.__name__
390
+ raise
391
+ finally:
392
+ # Only emit telemetry once per command invocation
393
+ if not _skip_click_patch_var.get():
394
+ try:
395
+ duration_ms = (time.perf_counter() - start) * 1000
396
+ body = _create_payload(
397
+ trace_id=trace_id,
398
+ ctx=ctx,
399
+ duration_ms=duration_ms,
400
+ exit_code=exit_code,
401
+ exception_type=exc_name,
402
+ event_type="command",
403
+ )
404
+ _emit_telemetry(body)
405
+ # Prevent Click patch from emitting again
406
+ _skip_click_patch_var.set(True)
407
+ except Exception: # noqa: BLE001
408
+ pass
409
+
418
410
  click.Command.invoke = instrumented_invoke
419
411
  click._anyscale_telemetry_patched = ( # noqa: SLF001 # type: ignore[attr-defined]
420
412
  True
anyscale/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.26.44"
1
+ __version__ = "0.26.45"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: anyscale
3
- Version: 0.26.44
3
+ Version: 0.26.45
4
4
  Summary: Command Line Interface for Anyscale
5
5
  Author: Anyscale Inc.
6
6
  License: AS License
@@ -26,9 +26,9 @@ anyscale/project_utils.py,sha256=SBwkD5B10ku2kkmp6y-Cr5RL7xf52b9zELP35kfg2PE,176
26
26
  anyscale/scripts.py,sha256=dG_JgWuq8TrM4XLRCCXhccka41qn95qbEgt0GG_1x5M,5678
27
27
  anyscale/snapshot.py,sha256=UGJT5C1s_4xmQxjWODK5DFpGxHRBX5jOCdSCqXESH8E,1685
28
28
  anyscale/tables.py,sha256=TV4F2uLnwehvbkAfaP7iuLlT2wLIo6ORH2LVdRGXW5g,2840
29
- anyscale/telemetry.py,sha256=wklWABN8wtq8Cq3ptPFEeQQC9xjKP5ytxybCuWAvNI0,15229
29
+ anyscale/telemetry.py,sha256=U90C2Vgx48z9PMTI6EbzHFbP3jWnDUutbIfMPBb8-SI,14711
30
30
  anyscale/util.py,sha256=0iSmKKsDFV0i2eRmVQ1W60Sgh2g-vPeBoBw3ra3m6eI,42782
31
- anyscale/version.py,sha256=kFdTi66Rz_z8qEhFVAixi2LQhtItihocbCWXIM2RhBw,24
31
+ anyscale/version.py,sha256=54xC63YC2aqC0E8WKTGvo_4_EUotBQoaAqxATidvy4k,24
32
32
  anyscale/workspace_utils.py,sha256=OViE88CnIF5ruVxd3kazQ0Mf2BxqtMq6wx-XQ5A2cp8,1204
33
33
  anyscale/_private/anyscale_client/README.md,sha256=gk8obk7kqg6VWoUHcqDMwJULh35tYKEZFC0UF_dixGA,718
34
34
  anyscale/_private/anyscale_client/__init__.py,sha256=807Blx3RHQeS8BmKZcsOQQ4dYoKlCnpm6Bdsif2CrHg,337
@@ -106,7 +106,7 @@ anyscale/background/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
106
106
  anyscale/background/job_runner.py,sha256=LTuv9JOahyv6C9i7DLQAONgQF6--FfYZEmJrKy-sUG8,2687
107
107
  anyscale/client/.gitignore,sha256=JZyvYEtT2DCSK9V5Joi6lQofhMik4PXiJRCWsg7SvqI,807
108
108
  anyscale/client/.openapi-generator-ignore,sha256=pu2PTide7pJtJ-DFLzDy0cTYQJRlrB-8RRH3zGLeUds,1040
109
- anyscale/client/README.md,sha256=SKPbFw_-rfKiUbNU9saO9ALTxcsDROcMHxu7n5rzJ4A,113443
109
+ anyscale/client/README.md,sha256=AyYt2MgcDjh43zpzdCsNF4XP6r9ZLxidYBiw0DLbB48,113850
110
110
  anyscale/client/git_push.sh,sha256=EDCZOTTiLxbtPHmiU63qC99rGH67B7dhdPZdNUKivF0,1827
111
111
  anyscale/client/requirements.txt,sha256=dkVKYUStC5h_g_87SH7pRdhXCj7ySozAJMGAFEzGgFc,126
112
112
  anyscale/client/setup.cfg,sha256=l7bdKSIedeBhhoDtupsBwx1xPrlBf2yYeTH7a8kMga4,28
@@ -114,14 +114,14 @@ anyscale/client/setup.py,sha256=tSxqw1kAL1B9adnrnOarjnQfSbwGmnTr_kg8ZXhlm5A,1109
114
114
  anyscale/client/test-requirements.txt,sha256=sTjmDTj5W9fh1ZAeo8UT2EBdeGDBNttj_PHiPBXg1D4,111
115
115
  anyscale/client/tox.ini,sha256=M6L3UmvAdvU65LsoAF-Oi7oRjwZlCJZn8I7ofdXn5Ok,156
116
116
  anyscale/client/.openapi-generator/VERSION,sha256=J0RzX-4u4jfin1kviKtmncjUePyjHm2kyvmkobOrt_E,5
117
- anyscale/client/openapi_client/__init__.py,sha256=0jf4aDO7V9rqC52onEAovmFnQqyrLoblVABTXB0uG9I,51402
117
+ anyscale/client/openapi_client/__init__.py,sha256=FSu4sK3Ahq7O-DCpSnYufPH7m2pxvmNlJyqxAAY58lc,51567
118
118
  anyscale/client/openapi_client/api_client.py,sha256=d8Un6j2Ny2vlS2qBXPVFj6_ql0k36DFahpWt_28TfCk,25563
119
119
  anyscale/client/openapi_client/configuration.py,sha256=Dd5XrlHwv-wxnf0C35PG_-HBQoY3Yaz6hKrmkZz-m0E,12363
120
120
  anyscale/client/openapi_client/exceptions.py,sha256=3egwsXQG2j_vARbqgBxUO1xSltAhpfiHTYVP7VXTvU0,3792
121
121
  anyscale/client/openapi_client/rest.py,sha256=Ehj37v7GHW6SXV067Hze5HE42ayKaGi6a6ZlkR7u3Lg,12501
122
122
  anyscale/client/openapi_client/api/__init__.py,sha256=i8u7BI2xX1GrXTL3hN0pKpYIlnT-D_uDxH2ElOfYG1I,141
123
- anyscale/client/openapi_client/api/default_api.py,sha256=cIVbFBzkYTExvbetShjCJ_B3yTm1Vsl6-wFTTe2QuaI,1816202
124
- anyscale/client/openapi_client/models/__init__.py,sha256=FM3XoQvOenXjSpH4qmavVIyjn9OHckwKl3abpzargK8,50912
123
+ anyscale/client/openapi_client/api/default_api.py,sha256=Q2LJZhR5tZUkQXXTW1EcRGWd7YeN5JQ7eEK3aI5lpDw,1820642
124
+ anyscale/client/openapi_client/models/__init__.py,sha256=lR19uidnrUeHLq9PwBMcAOCJBKcmFaa7dIruhe29RpQ,51077
125
125
  anyscale/client/openapi_client/models/access_config.py,sha256=b2mA0qtuTA5PFbp6C61Jc_T2zUMaojM1v32IhZo0MfY,3648
126
126
  anyscale/client/openapi_client/models/actor_status.py,sha256=6xyX_aIqURj2raBdY9DmBxsdDACFrqqYvElGiM6YG2E,2813
127
127
  anyscale/client/openapi_client/models/admin_create_user.py,sha256=9DPr8D0lKgoEZ3Z2kGsAd8L7ocFCiP6woOGLVs8SRb8,7251
@@ -372,7 +372,8 @@ anyscale/client/openapi_client/models/deletemachinepoolresponse_response.py,sha2
372
372
  anyscale/client/openapi_client/models/describe_machine_pool_machines_filters.py,sha256=o1wQrxdp8JBvjNsagCPlInhQ3KmsMMm5oW8h2FrvYXk,4795
373
373
  anyscale/client/openapi_client/models/describe_machine_pool_machines_request.py,sha256=2hDulfPYPu92gM_3-2z53sHwnKj3tDChtkA1UJdLbSk,4924
374
374
  anyscale/client/openapi_client/models/describe_machine_pool_request.py,sha256=7ECyUCAlwLFLdcIQrvyNiAOILBzNGUTN5_nK7EN84yg,3739
375
- anyscale/client/openapi_client/models/describe_machine_pool_requests_request.py,sha256=HfYseu-BjeZpbAb49AlFeH-be8mTSvYmOXJpHZm_XHc,5065
375
+ anyscale/client/openapi_client/models/describe_machine_pool_requests_filters.py,sha256=W8B_a34oWMaZcC2K13XDD8qdnlQICqLkPNu6_RQtu0c,4750
376
+ anyscale/client/openapi_client/models/describe_machine_pool_requests_request.py,sha256=z39iFIWq9tMz7A0sB9rw0oEwl3VTLD2K3p7R9YUFi9E,4924
376
377
  anyscale/client/openapi_client/models/describe_machine_pool_response.py,sha256=dtcGBS48Vz07CbIVPfeU4XBS9aQMpt9ADEhG_KCNl48,3887
377
378
  anyscale/client/openapi_client/models/describe_machine_pool_workloads_filters.py,sha256=5AFLJDmIdhWn6khTjWhiQSa4JLUCNEsF4DD10_UFAhQ,4876
378
379
  anyscale/client/openapi_client/models/describe_machine_pool_workloads_request.py,sha256=J4T9L1sEGPBkufc74W6z3QvZyPQ3_5QDXKlrOjkc6YA,4941
@@ -544,6 +545,7 @@ anyscale/client/openapi_client/models/page_query.py,sha256=dw5HgH5gVYi2OcLW3Kg0Z
544
545
  anyscale/client/openapi_client/models/partition_info.py,sha256=XaAsTffyjTxdCZN3wQtLxUch5oFs3XwqOtaeHjyEt14,4916
545
546
  anyscale/client/openapi_client/models/pause_schedule.py,sha256=ru7_OzH7oDw5y2h1o5QNfKW8TXbkF1h-NDwccbUDRd0,3661
546
547
  anyscale/client/openapi_client/models/permission_level.py,sha256=fGnBgKrcZkGLYl7RpQQm0_gaGzkTehnJjOnIX8G4jAw,2868
548
+ anyscale/client/openapi_client/models/plan_status.py,sha256=4Gl0dZDiPeP4ar87viHvggfjZwQeqWuMZ78i8bRWV9k,3855
547
549
  anyscale/client/openapi_client/models/production_job.py,sha256=fVDrDRonEiH6OVfKl3Xwc1RPaPs0S4EKLqBEzvRIraY,13672
548
550
  anyscale/client/openapi_client/models/production_job_config.py,sha256=cW2TxSTUw-dDm3kGWa_tNet7dmJM3VVPJ75pWumosiA,12527
549
551
  anyscale/client/openapi_client/models/production_job_event.py,sha256=VljH0Qm09GbEHsb9je3LDcENu9MwD3pRISRJipwrV_s,11432
@@ -1098,10 +1100,10 @@ anyscale/workspace/__init__.py,sha256=Innbm5ZhCyADEVBiYSo_vbpKwUNcMzVSAfxIGKOYe6
1098
1100
  anyscale/workspace/commands.py,sha256=b1sqNseoPj-1VXznqQOLe0V_a663bOTvJX-TaOMJa1Y,14590
1099
1101
  anyscale/workspace/models.py,sha256=HBvM9ybOdJjqQeViQ30C36gdKT_AwH_JHPoL-DTkESo,9841
1100
1102
  anyscale/workspace/_private/workspace_sdk.py,sha256=2CMeYfJt0UtIFCocDn1ukw1iI5esKHdopLe6duEs-qE,27599
1101
- anyscale-0.26.44.dist-info/LICENSE,sha256=UOPu974Wzsna6frFv1mu4VrZgNdZT7lbcNPzo5ue3qs,3494
1102
- anyscale-0.26.44.dist-info/METADATA,sha256=ThYc65jtlZTAKd8MRW7YeqORkhHCxW8kT8F9zu51yyg,3032
1103
- anyscale-0.26.44.dist-info/NOTICE,sha256=gHqDhSnUYlRXX-mDOL5FtE7774oiKyV_HO80qM3r9Xo,196
1104
- anyscale-0.26.44.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
1105
- anyscale-0.26.44.dist-info/entry_points.txt,sha256=NqO18sCZn6zG6J0S38itjcN00s7aE3C3v3k5lMAfCLk,51
1106
- anyscale-0.26.44.dist-info/top_level.txt,sha256=g3NVNS8Oh0NZwbFFgeX696C5MZZkS5dqV2NqcsbDRJE,9
1107
- anyscale-0.26.44.dist-info/RECORD,,
1103
+ anyscale-0.26.45.dist-info/LICENSE,sha256=UOPu974Wzsna6frFv1mu4VrZgNdZT7lbcNPzo5ue3qs,3494
1104
+ anyscale-0.26.45.dist-info/METADATA,sha256=7cVr8LcD7lkncSk24pvdzWEYUmXYoPRPPDfp-V27xtg,3032
1105
+ anyscale-0.26.45.dist-info/NOTICE,sha256=gHqDhSnUYlRXX-mDOL5FtE7774oiKyV_HO80qM3r9Xo,196
1106
+ anyscale-0.26.45.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
1107
+ anyscale-0.26.45.dist-info/entry_points.txt,sha256=NqO18sCZn6zG6J0S38itjcN00s7aE3C3v3k5lMAfCLk,51
1108
+ anyscale-0.26.45.dist-info/top_level.txt,sha256=g3NVNS8Oh0NZwbFFgeX696C5MZZkS5dqV2NqcsbDRJE,9
1109
+ anyscale-0.26.45.dist-info/RECORD,,