anyscale 0.26.19__py3-none-any.whl → 0.26.21__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.
Files changed (31) hide show
  1. anyscale/_private/docgen/models.md +1 -1
  2. anyscale/client/README.md +6 -10
  3. anyscale/client/openapi_client/__init__.py +3 -3
  4. anyscale/client/openapi_client/api/default_api.py +238 -671
  5. anyscale/client/openapi_client/models/__init__.py +3 -3
  6. anyscale/client/openapi_client/models/decorated_production_job_state_transition.py +2 -2
  7. anyscale/client/openapi_client/models/{organizationpublicidentifier_response.py → job_queue_sort_directive.py} +49 -22
  8. anyscale/client/openapi_client/models/{organization_response.py → job_queue_sort_field.py} +20 -34
  9. anyscale/client/openapi_client/models/job_queues_query.py +31 -3
  10. anyscale/client/openapi_client/models/production_job_state_transition.py +2 -2
  11. anyscale/client/openapi_client/models/{organization_public_identifier.py → update_job_queue_request.py} +51 -22
  12. anyscale/commands/cloud_commands.py +15 -4
  13. anyscale/commands/command_examples.py +58 -0
  14. anyscale/commands/job_commands.py +2 -2
  15. anyscale/commands/job_queue_commands.py +172 -0
  16. anyscale/controllers/cloud_controller.py +358 -49
  17. anyscale/controllers/job_controller.py +215 -3
  18. anyscale/scripts.py +3 -0
  19. anyscale/sdk/anyscale_client/models/production_job_state_transition.py +2 -2
  20. anyscale/util.py +3 -1
  21. anyscale/utils/connect_helpers.py +34 -0
  22. anyscale/utils/gcp_utils.py +20 -4
  23. anyscale/version.py +1 -1
  24. anyscale/workspace/_private/workspace_sdk.py +19 -6
  25. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/METADATA +1 -1
  26. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/RECORD +31 -30
  27. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/LICENSE +0 -0
  28. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/NOTICE +0 -0
  29. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/WHEEL +0 -0
  30. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/entry_points.txt +0 -0
  31. {anyscale-0.26.19.dist-info → anyscale-0.26.21.dist-info}/top_level.txt +0 -0
@@ -310,6 +310,8 @@ from openapi_client.models.job_details import JobDetails
310
310
  from openapi_client.models.job_queue import JobQueue
311
311
  from openapi_client.models.job_queue_config import JobQueueConfig
312
312
  from openapi_client.models.job_queue_execution_mode import JobQueueExecutionMode
313
+ from openapi_client.models.job_queue_sort_directive import JobQueueSortDirective
314
+ from openapi_client.models.job_queue_sort_field import JobQueueSortField
313
315
  from openapi_client.models.job_queue_spec import JobQueueSpec
314
316
  from openapi_client.models.job_queue_state import JobQueueState
315
317
  from openapi_client.models.job_queues_query import JobQueuesQuery
@@ -404,8 +406,6 @@ from openapi_client.models.organization_marketing_questions import OrganizationM
404
406
  from openapi_client.models.organization_permission_level import OrganizationPermissionLevel
405
407
  from openapi_client.models.organization_project_collaborator import OrganizationProjectCollaborator
406
408
  from openapi_client.models.organization_project_collaborator_value import OrganizationProjectCollaboratorValue
407
- from openapi_client.models.organization_public_identifier import OrganizationPublicIdentifier
408
- from openapi_client.models.organization_response import OrganizationResponse
409
409
  from openapi_client.models.organization_summary import OrganizationSummary
410
410
  from openapi_client.models.organization_usage_alert import OrganizationUsageAlert
411
411
  from openapi_client.models.organization_usage_alert_severity import OrganizationUsageAlertSeverity
@@ -416,7 +416,6 @@ from openapi_client.models.organizationinvitation_list_response import Organizat
416
416
  from openapi_client.models.organizationinvitation_response import OrganizationinvitationResponse
417
417
  from openapi_client.models.organizationinvitationbase_response import OrganizationinvitationbaseResponse
418
418
  from openapi_client.models.organizationprojectcollaborator_list_response import OrganizationprojectcollaboratorListResponse
419
- from openapi_client.models.organizationpublicidentifier_response import OrganizationpublicidentifierResponse
420
419
  from openapi_client.models.organizationusagealert_list_response import OrganizationusagealertListResponse
421
420
  from openapi_client.models.pcp_config import PCPConfig
422
421
  from openapi_client.models.page_query import PageQuery
@@ -560,6 +559,7 @@ from openapi_client.models.update_cloud_collaborator import UpdateCloudCollabora
560
559
  from openapi_client.models.update_cloud_with_cloud_resource import UpdateCloudWithCloudResource
561
560
  from openapi_client.models.update_cloud_with_cloud_resource_gcp import UpdateCloudWithCloudResourceGCP
562
561
  from openapi_client.models.update_cluster_dns import UpdateClusterDns
562
+ from openapi_client.models.update_job_queue_request import UpdateJobQueueRequest
563
563
  from openapi_client.models.update_machine_pool_request import UpdateMachinePoolRequest
564
564
  from openapi_client.models.update_organization_collaborator import UpdateOrganizationCollaborator
565
565
  from openapi_client.models.update_project_collaborator import UpdateProjectCollaborator
@@ -113,7 +113,7 @@ class DecoratedProductionJobStateTransition(object):
113
113
  def state_transitioned_at(self):
114
114
  """Gets the state_transitioned_at of this DecoratedProductionJobStateTransition. # noqa: E501
115
115
 
116
- The last time the state of this job was updated. This includes updates to the state and to the goal state # noqa: E501
116
+ The last time the state of this job was updated # noqa: E501
117
117
 
118
118
  :return: The state_transitioned_at of this DecoratedProductionJobStateTransition. # noqa: E501
119
119
  :rtype: datetime
@@ -124,7 +124,7 @@ class DecoratedProductionJobStateTransition(object):
124
124
  def state_transitioned_at(self, state_transitioned_at):
125
125
  """Sets the state_transitioned_at of this DecoratedProductionJobStateTransition.
126
126
 
127
- The last time the state of this job was updated. This includes updates to the state and to the goal state # noqa: E501
127
+ The last time the state of this job was updated # noqa: E501
128
128
 
129
129
  :param state_transitioned_at: The state_transitioned_at of this DecoratedProductionJobStateTransition. # noqa: E501
130
130
  :type: datetime
@@ -18,7 +18,7 @@ import six
18
18
  from openapi_client.configuration import Configuration
19
19
 
20
20
 
21
- class OrganizationpublicidentifierResponse(object):
21
+ class JobQueueSortDirective(object):
22
22
  """NOTE: This class is auto generated by OpenAPI Generator.
23
23
  Ref: https://openapi-generator.tech
24
24
 
@@ -33,46 +33,73 @@ class OrganizationpublicidentifierResponse(object):
33
33
  and the value is json key in definition.
34
34
  """
35
35
  openapi_types = {
36
- 'result': 'OrganizationPublicIdentifier'
36
+ 'sort_field': 'JobQueueSortField',
37
+ 'sort_order': 'SortOrder'
37
38
  }
38
39
 
39
40
  attribute_map = {
40
- 'result': 'result'
41
+ 'sort_field': 'sort_field',
42
+ 'sort_order': 'sort_order'
41
43
  }
42
44
 
43
- def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
44
- """OrganizationpublicidentifierResponse - a model defined in OpenAPI""" # noqa: E501
45
+ def __init__(self, sort_field=None, sort_order=None, local_vars_configuration=None): # noqa: E501
46
+ """JobQueueSortDirective - a model defined in OpenAPI""" # noqa: E501
45
47
  if local_vars_configuration is None:
46
48
  local_vars_configuration = Configuration()
47
49
  self.local_vars_configuration = local_vars_configuration
48
50
 
49
- self._result = None
51
+ self._sort_field = None
52
+ self._sort_order = None
50
53
  self.discriminator = None
51
54
 
52
- self.result = result
55
+ self.sort_field = sort_field
56
+ self.sort_order = sort_order
53
57
 
54
58
  @property
55
- def result(self):
56
- """Gets the result of this OrganizationpublicidentifierResponse. # noqa: E501
59
+ def sort_field(self):
60
+ """Gets the sort_field of this JobQueueSortDirective. # noqa: E501
57
61
 
58
62
 
59
- :return: The result of this OrganizationpublicidentifierResponse. # noqa: E501
60
- :rtype: OrganizationPublicIdentifier
63
+ :return: The sort_field of this JobQueueSortDirective. # noqa: E501
64
+ :rtype: JobQueueSortField
61
65
  """
62
- return self._result
66
+ return self._sort_field
63
67
 
64
- @result.setter
65
- def result(self, result):
66
- """Sets the result of this OrganizationpublicidentifierResponse.
68
+ @sort_field.setter
69
+ def sort_field(self, sort_field):
70
+ """Sets the sort_field of this JobQueueSortDirective.
67
71
 
68
72
 
69
- :param result: The result of this OrganizationpublicidentifierResponse. # noqa: E501
70
- :type: OrganizationPublicIdentifier
73
+ :param sort_field: The sort_field of this JobQueueSortDirective. # noqa: E501
74
+ :type: JobQueueSortField
71
75
  """
72
- if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501
73
- raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
76
+ if self.local_vars_configuration.client_side_validation and sort_field is None: # noqa: E501
77
+ raise ValueError("Invalid value for `sort_field`, must not be `None`") # noqa: E501
74
78
 
75
- self._result = result
79
+ self._sort_field = sort_field
80
+
81
+ @property
82
+ def sort_order(self):
83
+ """Gets the sort_order of this JobQueueSortDirective. # noqa: E501
84
+
85
+
86
+ :return: The sort_order of this JobQueueSortDirective. # noqa: E501
87
+ :rtype: SortOrder
88
+ """
89
+ return self._sort_order
90
+
91
+ @sort_order.setter
92
+ def sort_order(self, sort_order):
93
+ """Sets the sort_order of this JobQueueSortDirective.
94
+
95
+
96
+ :param sort_order: The sort_order of this JobQueueSortDirective. # noqa: E501
97
+ :type: SortOrder
98
+ """
99
+ if self.local_vars_configuration.client_side_validation and sort_order is None: # noqa: E501
100
+ raise ValueError("Invalid value for `sort_order`, must not be `None`") # noqa: E501
101
+
102
+ self._sort_order = sort_order
76
103
 
77
104
  def to_dict(self):
78
105
  """Returns the model properties as a dict"""
@@ -108,14 +135,14 @@ class OrganizationpublicidentifierResponse(object):
108
135
 
109
136
  def __eq__(self, other):
110
137
  """Returns true if both objects are equal"""
111
- if not isinstance(other, OrganizationpublicidentifierResponse):
138
+ if not isinstance(other, JobQueueSortDirective):
112
139
  return False
113
140
 
114
141
  return self.to_dict() == other.to_dict()
115
142
 
116
143
  def __ne__(self, other):
117
144
  """Returns true if both objects are not equal"""
118
- if not isinstance(other, OrganizationpublicidentifierResponse):
145
+ if not isinstance(other, JobQueueSortDirective):
119
146
  return True
120
147
 
121
148
  return self.to_dict() != other.to_dict()
@@ -18,13 +18,28 @@ import six
18
18
  from openapi_client.configuration import Configuration
19
19
 
20
20
 
21
- class OrganizationResponse(object):
21
+ class JobQueueSortField(object):
22
22
  """NOTE: This class is auto generated by OpenAPI Generator.
23
23
  Ref: https://openapi-generator.tech
24
24
 
25
25
  Do not edit the class manually.
26
26
  """
27
27
 
28
+ """
29
+ allowed enum values
30
+ """
31
+ ID = "ID"
32
+ NAME = "NAME"
33
+ CREATED_AT = "CREATED_AT"
34
+ CREATOR_ID = "CREATOR_ID"
35
+ CREATOR_EMAIL = "CREATOR_EMAIL"
36
+ PROJECT_ID = "PROJECT_ID"
37
+ CLOUD_ID = "CLOUD_ID"
38
+ QUEUE_STATE = "QUEUE_STATE"
39
+ CLUSTER_STATE = "CLUSTER_STATE"
40
+
41
+ allowable_values = [ID, NAME, CREATED_AT, CREATOR_ID, CREATOR_EMAIL, PROJECT_ID, CLOUD_ID, QUEUE_STATE, CLUSTER_STATE] # noqa: E501
42
+
28
43
  """
29
44
  Attributes:
30
45
  openapi_types (dict): The key is attribute name
@@ -33,47 +48,18 @@ class OrganizationResponse(object):
33
48
  and the value is json key in definition.
34
49
  """
35
50
  openapi_types = {
36
- 'result': 'Organization'
37
51
  }
38
52
 
39
53
  attribute_map = {
40
- 'result': 'result'
41
54
  }
42
55
 
43
- def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
44
- """OrganizationResponse - a model defined in OpenAPI""" # noqa: E501
56
+ def __init__(self, local_vars_configuration=None): # noqa: E501
57
+ """JobQueueSortField - a model defined in OpenAPI""" # noqa: E501
45
58
  if local_vars_configuration is None:
46
59
  local_vars_configuration = Configuration()
47
60
  self.local_vars_configuration = local_vars_configuration
48
-
49
- self._result = None
50
61
  self.discriminator = None
51
62
 
52
- self.result = result
53
-
54
- @property
55
- def result(self):
56
- """Gets the result of this OrganizationResponse. # noqa: E501
57
-
58
-
59
- :return: The result of this OrganizationResponse. # noqa: E501
60
- :rtype: Organization
61
- """
62
- return self._result
63
-
64
- @result.setter
65
- def result(self, result):
66
- """Sets the result of this OrganizationResponse.
67
-
68
-
69
- :param result: The result of this OrganizationResponse. # noqa: E501
70
- :type: Organization
71
- """
72
- if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501
73
- raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
74
-
75
- self._result = result
76
-
77
63
  def to_dict(self):
78
64
  """Returns the model properties as a dict"""
79
65
  result = {}
@@ -108,14 +94,14 @@ class OrganizationResponse(object):
108
94
 
109
95
  def __eq__(self, other):
110
96
  """Returns true if both objects are equal"""
111
- if not isinstance(other, OrganizationResponse):
97
+ if not isinstance(other, JobQueueSortField):
112
98
  return False
113
99
 
114
100
  return self.to_dict() == other.to_dict()
115
101
 
116
102
  def __ne__(self, other):
117
103
  """Returns true if both objects are not equal"""
118
- if not isinstance(other, OrganizationResponse):
104
+ if not isinstance(other, JobQueueSortField):
119
105
  return True
120
106
 
121
107
  return self.to_dict() != other.to_dict()
@@ -38,7 +38,8 @@ class JobQueuesQuery(object):
38
38
  'cluster_status': 'SessionState',
39
39
  'project_id': 'str',
40
40
  'cloud_id': 'str',
41
- 'paging': 'PageQuery'
41
+ 'paging': 'PageQuery',
42
+ 'sorting_directives': 'list[JobQueueSortDirective]'
42
43
  }
43
44
 
44
45
  attribute_map = {
@@ -47,10 +48,11 @@ class JobQueuesQuery(object):
47
48
  'cluster_status': 'cluster_status',
48
49
  'project_id': 'project_id',
49
50
  'cloud_id': 'cloud_id',
50
- 'paging': 'paging'
51
+ 'paging': 'paging',
52
+ 'sorting_directives': 'sorting_directives'
51
53
  }
52
54
 
53
- def __init__(self, name=None, creator_id=None, cluster_status=None, project_id=None, cloud_id=None, paging=None, local_vars_configuration=None): # noqa: E501
55
+ def __init__(self, name=None, creator_id=None, cluster_status=None, project_id=None, cloud_id=None, paging=None, sorting_directives=None, local_vars_configuration=None): # noqa: E501
54
56
  """JobQueuesQuery - a model defined in OpenAPI""" # noqa: E501
55
57
  if local_vars_configuration is None:
56
58
  local_vars_configuration = Configuration()
@@ -62,6 +64,7 @@ class JobQueuesQuery(object):
62
64
  self._project_id = None
63
65
  self._cloud_id = None
64
66
  self._paging = None
67
+ self._sorting_directives = None
65
68
  self.discriminator = None
66
69
 
67
70
  if name is not None:
@@ -76,6 +79,8 @@ class JobQueuesQuery(object):
76
79
  self.cloud_id = cloud_id
77
80
  if paging is not None:
78
81
  self.paging = paging
82
+ if sorting_directives is not None:
83
+ self.sorting_directives = sorting_directives
79
84
 
80
85
  @property
81
86
  def name(self):
@@ -215,6 +220,29 @@ class JobQueuesQuery(object):
215
220
 
216
221
  self._paging = paging
217
222
 
223
+ @property
224
+ def sorting_directives(self):
225
+ """Gets the sorting_directives of this JobQueuesQuery. # noqa: E501
226
+
227
+ List of sorting criteria (multi-field sort supported). # noqa: E501
228
+
229
+ :return: The sorting_directives of this JobQueuesQuery. # noqa: E501
230
+ :rtype: list[JobQueueSortDirective]
231
+ """
232
+ return self._sorting_directives
233
+
234
+ @sorting_directives.setter
235
+ def sorting_directives(self, sorting_directives):
236
+ """Sets the sorting_directives of this JobQueuesQuery.
237
+
238
+ List of sorting criteria (multi-field sort supported). # noqa: E501
239
+
240
+ :param sorting_directives: The sorting_directives of this JobQueuesQuery. # noqa: E501
241
+ :type: list[JobQueueSortDirective]
242
+ """
243
+
244
+ self._sorting_directives = sorting_directives
245
+
218
246
  def to_dict(self):
219
247
  """Returns the model properties as a dict"""
220
248
  result = {}
@@ -108,7 +108,7 @@ class ProductionJobStateTransition(object):
108
108
  def state_transitioned_at(self):
109
109
  """Gets the state_transitioned_at of this ProductionJobStateTransition. # noqa: E501
110
110
 
111
- The last time the state of this job was updated. This includes updates to the state and to the goal state # noqa: E501
111
+ The last time the state of this job was updated # noqa: E501
112
112
 
113
113
  :return: The state_transitioned_at of this ProductionJobStateTransition. # noqa: E501
114
114
  :rtype: datetime
@@ -119,7 +119,7 @@ class ProductionJobStateTransition(object):
119
119
  def state_transitioned_at(self, state_transitioned_at):
120
120
  """Sets the state_transitioned_at of this ProductionJobStateTransition.
121
121
 
122
- The last time the state of this job was updated. This includes updates to the state and to the goal state # noqa: E501
122
+ The last time the state of this job was updated # noqa: E501
123
123
 
124
124
  :param state_transitioned_at: The state_transitioned_at of this ProductionJobStateTransition. # noqa: E501
125
125
  :type: datetime
@@ -18,7 +18,7 @@ import six
18
18
  from openapi_client.configuration import Configuration
19
19
 
20
20
 
21
- class OrganizationPublicIdentifier(object):
21
+ class UpdateJobQueueRequest(object):
22
22
  """NOTE: This class is auto generated by OpenAPI Generator.
23
23
  Ref: https://openapi-generator.tech
24
24
 
@@ -33,46 +33,75 @@ class OrganizationPublicIdentifier(object):
33
33
  and the value is json key in definition.
34
34
  """
35
35
  openapi_types = {
36
- 'public_identifier': 'str'
36
+ 'idle_timeout_sec': 'int',
37
+ 'max_concurrency': 'int'
37
38
  }
38
39
 
39
40
  attribute_map = {
40
- 'public_identifier': 'public_identifier'
41
+ 'idle_timeout_sec': 'idle_timeout_sec',
42
+ 'max_concurrency': 'max_concurrency'
41
43
  }
42
44
 
43
- def __init__(self, public_identifier=None, local_vars_configuration=None): # noqa: E501
44
- """OrganizationPublicIdentifier - a model defined in OpenAPI""" # noqa: E501
45
+ def __init__(self, idle_timeout_sec=None, max_concurrency=None, local_vars_configuration=None): # noqa: E501
46
+ """UpdateJobQueueRequest - a model defined in OpenAPI""" # noqa: E501
45
47
  if local_vars_configuration is None:
46
48
  local_vars_configuration = Configuration()
47
49
  self.local_vars_configuration = local_vars_configuration
48
50
 
49
- self._public_identifier = None
51
+ self._idle_timeout_sec = None
52
+ self._max_concurrency = None
50
53
  self.discriminator = None
51
54
 
52
- self.public_identifier = public_identifier
55
+ if idle_timeout_sec is not None:
56
+ self.idle_timeout_sec = idle_timeout_sec
57
+ if max_concurrency is not None:
58
+ self.max_concurrency = max_concurrency
53
59
 
54
60
  @property
55
- def public_identifier(self):
56
- """Gets the public_identifier of this OrganizationPublicIdentifier. # noqa: E501
61
+ def idle_timeout_sec(self):
62
+ """Gets the idle_timeout_sec of this UpdateJobQueueRequest. # noqa: E501
57
63
 
64
+ Max number of jobs to be run concurrently. # noqa: E501
58
65
 
59
- :return: The public_identifier of this OrganizationPublicIdentifier. # noqa: E501
60
- :rtype: str
66
+ :return: The idle_timeout_sec of this UpdateJobQueueRequest. # noqa: E501
67
+ :rtype: int
61
68
  """
62
- return self._public_identifier
69
+ return self._idle_timeout_sec
63
70
 
64
- @public_identifier.setter
65
- def public_identifier(self, public_identifier):
66
- """Sets the public_identifier of this OrganizationPublicIdentifier.
71
+ @idle_timeout_sec.setter
72
+ def idle_timeout_sec(self, idle_timeout_sec):
73
+ """Sets the idle_timeout_sec of this UpdateJobQueueRequest.
67
74
 
75
+ Max number of jobs to be run concurrently. # noqa: E501
68
76
 
69
- :param public_identifier: The public_identifier of this OrganizationPublicIdentifier. # noqa: E501
70
- :type: str
77
+ :param idle_timeout_sec: The idle_timeout_sec of this UpdateJobQueueRequest. # noqa: E501
78
+ :type: int
71
79
  """
72
- if self.local_vars_configuration.client_side_validation and public_identifier is None: # noqa: E501
73
- raise ValueError("Invalid value for `public_identifier`, must not be `None`") # noqa: E501
74
80
 
75
- self._public_identifier = public_identifier
81
+ self._idle_timeout_sec = idle_timeout_sec
82
+
83
+ @property
84
+ def max_concurrency(self):
85
+ """Gets the max_concurrency of this UpdateJobQueueRequest. # noqa: E501
86
+
87
+ Max period of time queue will be accepting new jobs, before being sealed off and its associated cluster being shutdown # noqa: E501
88
+
89
+ :return: The max_concurrency of this UpdateJobQueueRequest. # noqa: E501
90
+ :rtype: int
91
+ """
92
+ return self._max_concurrency
93
+
94
+ @max_concurrency.setter
95
+ def max_concurrency(self, max_concurrency):
96
+ """Sets the max_concurrency of this UpdateJobQueueRequest.
97
+
98
+ Max period of time queue will be accepting new jobs, before being sealed off and its associated cluster being shutdown # noqa: E501
99
+
100
+ :param max_concurrency: The max_concurrency of this UpdateJobQueueRequest. # noqa: E501
101
+ :type: int
102
+ """
103
+
104
+ self._max_concurrency = max_concurrency
76
105
 
77
106
  def to_dict(self):
78
107
  """Returns the model properties as a dict"""
@@ -108,14 +137,14 @@ class OrganizationPublicIdentifier(object):
108
137
 
109
138
  def __eq__(self, other):
110
139
  """Returns true if both objects are equal"""
111
- if not isinstance(other, OrganizationPublicIdentifier):
140
+ if not isinstance(other, UpdateJobQueueRequest):
112
141
  return False
113
142
 
114
143
  return self.to_dict() == other.to_dict()
115
144
 
116
145
  def __ne__(self, other):
117
146
  """Returns true if both objects are not equal"""
118
- if not isinstance(other, OrganizationPublicIdentifier):
147
+ if not isinstance(other, UpdateJobQueueRequest):
119
148
  return True
120
149
 
121
150
  return self.to_dict() != other.to_dict()
@@ -237,6 +237,7 @@ def cloud_config_group() -> None:
237
237
  @cloud_cli.command(
238
238
  name="update",
239
239
  help=(
240
+ # TODO(janet): Update this help text when the -o option is un-hidden.
240
241
  "Update a managed cloud to the latest configuration. Only applicable for anyscale managed clouds."
241
242
  ),
242
243
  )
@@ -275,7 +276,14 @@ def cloud_config_group() -> None:
275
276
  "are manually granted permissions to access the cloud. No existing cloud permissions are altered by specifying this flag."
276
277
  ),
277
278
  )
278
- def cloud_update(
279
+ @click.option(
280
+ "--file",
281
+ "-f",
282
+ help="YAML file containing the updated cloud spec.",
283
+ required=False,
284
+ hidden=True,
285
+ )
286
+ def cloud_update( # noqa: PLR0913
279
287
  cloud_name: Optional[str],
280
288
  name: Optional[str],
281
289
  cloud_id: Optional[str],
@@ -283,7 +291,12 @@ def cloud_update(
283
291
  enable_head_node_fault_tolerance: bool,
284
292
  yes: bool,
285
293
  enable_auto_add_user: Optional[bool],
294
+ file: Optional[str],
286
295
  ) -> None:
296
+ if file:
297
+ CloudController().update_cloud_deployments(file)
298
+ return
299
+
287
300
  if cloud_name and name and cloud_name != name:
288
301
  raise click.ClickException(
289
302
  "The positional argument CLOUD_NAME and the keyword argument --name "
@@ -1142,9 +1155,7 @@ def get_cloud(
1142
1155
 
1143
1156
  if output:
1144
1157
  # Include all cloud deployments for the cloud.
1145
- result = CloudController().get_cloud_deployments(
1146
- cloud_id=cloud.id, cloud_name=cloud.name
1147
- )
1158
+ result = CloudController().get_cloud_deployments(cloud_id=cloud.id)
1148
1159
 
1149
1160
  with open(output, "w") as f:
1150
1161
  yaml.dump(result, f, sort_keys=False)
@@ -77,6 +77,64 @@ NAME ID COST PROJECT NAME CLUSTER NAME
77
77
  my-job prodjob_s9x4uzc5jnkt5z53g4tujb3y2e 0 default cluster_for_prodjob_s9x4uzc5jnkt5z53g4tujb3y2e SUCCESS doc@anyscale.com python main.py
78
78
  """
79
79
 
80
+ JOB_QUEUE_LIST = """\
81
+ $ anyscale job-queue list
82
+ Output
83
+ JOB QUEUES:
84
+ ID NAME CLUSTER ID CREATOR ID MAX CONCURRENCY IDLE TIMEOUT SEC CURRENT CLUSTER STATE
85
+ jq_h8fcze2qkr8wttuuvapi1hvyuc queue_3 ses_cjr7uaf1yh2ue5uzvd11p24p4u usr_we8x7d7u8hq8mj2488ed9x47n6 3 5000 Terminated
86
+ jq_v5bx9z1sd4pbxasxhdms37j4gi queue_2 ses_k86raeu6k1t6z1bvyejn3vblad usr_we8x7d7u8hq8mj2488ed9x47n6 10 5000 Terminated
87
+ jq_ni6hk66nt3194msr7hzzj9daun queue_1 ses_uhb8a9gamtarz68kcurpjh86sa usr_we8x7d7u8hq8mj2488ed9x47n6 10 5000 Terminated
88
+ """
89
+
90
+ JOB_QUEUE_INFO = """\
91
+ $ anyscale job-queue info --id jq_h8fcze2qkr8wttuuvapi1hvyuc
92
+ Output
93
+ ID : jq_h8fcze2qkr8wttuuvapi1hvyuc
94
+ USER PROVIDED ID : queue_3
95
+ NAME : queue_3
96
+ CURRENT JOB QUEUE STATE : ACTIVE
97
+ EXECUTION MODE : PRIORITY
98
+ MAX CONCURRENCY : 3
99
+ IDLE TIMEOUT SEC : 5000
100
+ CREATED AT : 2025-04-15 20:40:44
101
+ CREATOR ID : usr_we8x7d7u8hq8mj2488ed9x47n6
102
+ CREATOR EMAIL : test@anyscale.com
103
+ COMPUTE CONFIG ID : cpt_8hzsv1t4jvb6kwjhfqbfjw5i6b
104
+ CURRENT CLUSTER STATE : Terminated
105
+ CLUSTER ID : ses_cjr7uaf1yh2ue5uzvd11p24p4u
106
+ PROJECT ID : prj_7FWKGPGPaD3Q5mvk9zK2viBD
107
+ CLOUD ID : cld_kvedZWag2qA8i5BjxUevf5i7
108
+ TOTAL JOBS : 6
109
+ SUCCESSFUL JOBS : 6
110
+ FAILED JOBS : 0
111
+ ACTIVE JOBS : 0
112
+ """
113
+
114
+ JOB_QUEUE_UPDATE = """\
115
+ $ anyscale job-queue update --id jq_h8fcze2qkr8wttuuvapi1hvyuc --max-concurrency 5
116
+ Output
117
+ ID : jq_h8fcze2qkr8wttuuvapi1hvyuc
118
+ USER PROVIDED ID : queue_3
119
+ NAME : queue_3
120
+ CURRENT JOB QUEUE STATE : ACTIVE
121
+ EXECUTION MODE : PRIORITY
122
+ MAX CONCURRENCY : 5
123
+ IDLE TIMEOUT SEC : 5000
124
+ CREATED AT : 2025-04-15 20:40:44
125
+ CREATOR ID : usr_we8x7d7u8hq8mj2488ed9x47n6
126
+ CREATOR EMAIL : test@anyscale.com
127
+ COMPUTE CONFIG ID : cpt_8hzsv1t4jvb6kwjhfqbfjw5i6b
128
+ CURRENT CLUSTER STATE : Terminated
129
+ CLUSTER ID : ses_cjr7uaf1yh2ue5uzvd11p24p4u
130
+ PROJECT ID : prj_7FWKGPGPaD3Q5mvk9zK2viBD
131
+ CLOUD ID : cld_kvedZWag2qA8i5BjxUevf5i7
132
+ TOTAL JOBS : 6
133
+ SUCCESSFUL JOBS : 6
134
+ FAILED JOBS : 0
135
+ ACTIVE JOBS : 0
136
+ """
137
+
80
138
  SCHEDULE_APPLY_EXAMPLE = """\
81
139
  $ anyscale schedule apply -n my-schedule -f my-schedule.yaml
82
140
  (anyscale +0.5s) Applying schedule with config ScheduleConfig(job_config=JobConfig(name='my-schedule', image_uri=None, compute_config=None, env_vars=None, py_modules=None, cloud=None, project=None, ray_version=None, job_queue_config=None), cron_expression='0 0 * * * *', timezone='UTC').
@@ -396,14 +396,14 @@ and override the entrypoint with `python main.py`.
396
396
  help=f"Filter jobs by state. Accepts one or more states. Allowed states: {', '.join(HaJobStates.allowable_values)}",
397
397
  callback=validate_list_jobs_state_filter,
398
398
  )
399
- def list( # noqa: A001
399
+ def list( # noqa: A001 PLR0913
400
400
  name: Optional[str],
401
401
  id: Optional[str], # noqa: A002
402
402
  project_id: Optional[str],
403
403
  include_all_users: bool,
404
404
  include_archived: bool,
405
405
  max_items: int,
406
- states: List[str],
406
+ states: List[HaJobStates],
407
407
  ) -> None:
408
408
  job_controller = JobController()
409
409
  job_controller.list(