anyscale 0.26.32__py3-none-any.whl → 0.26.34__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 +20 -2
- anyscale/client/openapi_client/__init__.py +15 -1
- anyscale/client/openapi_client/api/default_api.py +625 -167
- anyscale/client/openapi_client/models/__init__.py +15 -1
- anyscale/client/openapi_client/models/cli_usage_payload.py +440 -0
- anyscale/client/openapi_client/models/cloud_deployment.py +31 -30
- 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/partition_info.py +152 -0
- anyscale/client/openapi_client/models/{pcp_config.py → summarize_machine_pool_request.py} +13 -12
- anyscale/client/openapi_client/models/summarize_machine_pool_response.py +181 -0
- anyscale/client/openapi_client/models/summarizemachinepoolresponse_response.py +121 -0
- anyscale/client/openapi_client/models/workspace_template.py +115 -3
- anyscale/client/openapi_client/models/workspace_template_readme.py +88 -3
- anyscale/commands/cloud_commands.py +12 -9
- anyscale/commands/command_examples.py +23 -6
- 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.34.dist-info}/METADATA +1 -1
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/RECORD +39 -24
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/LICENSE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/NOTICE +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/WHEEL +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.32.dist-info → anyscale-0.26.34.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,181 @@
|
|
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 SummarizeMachinePoolResponse(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[PartitionInfo]',
|
37
|
+
'running_workloads': 'int',
|
38
|
+
'queued_workloads': 'int'
|
39
|
+
}
|
40
|
+
|
41
|
+
attribute_map = {
|
42
|
+
'partitions': 'partitions',
|
43
|
+
'running_workloads': 'running_workloads',
|
44
|
+
'queued_workloads': 'queued_workloads'
|
45
|
+
}
|
46
|
+
|
47
|
+
def __init__(self, partitions=None, running_workloads=None, queued_workloads=None, local_vars_configuration=None): # noqa: E501
|
48
|
+
"""SummarizeMachinePoolResponse - a model defined in OpenAPI""" # noqa: E501
|
49
|
+
if local_vars_configuration is None:
|
50
|
+
local_vars_configuration = Configuration()
|
51
|
+
self.local_vars_configuration = local_vars_configuration
|
52
|
+
|
53
|
+
self._partitions = None
|
54
|
+
self._running_workloads = None
|
55
|
+
self._queued_workloads = None
|
56
|
+
self.discriminator = None
|
57
|
+
|
58
|
+
self.partitions = partitions
|
59
|
+
self.running_workloads = running_workloads
|
60
|
+
self.queued_workloads = queued_workloads
|
61
|
+
|
62
|
+
@property
|
63
|
+
def partitions(self):
|
64
|
+
"""Gets the partitions of this SummarizeMachinePoolResponse. # noqa: E501
|
65
|
+
|
66
|
+
Summary for each partition in the machine pool. # noqa: E501
|
67
|
+
|
68
|
+
:return: The partitions of this SummarizeMachinePoolResponse. # noqa: E501
|
69
|
+
:rtype: list[PartitionInfo]
|
70
|
+
"""
|
71
|
+
return self._partitions
|
72
|
+
|
73
|
+
@partitions.setter
|
74
|
+
def partitions(self, partitions):
|
75
|
+
"""Sets the partitions of this SummarizeMachinePoolResponse.
|
76
|
+
|
77
|
+
Summary for each partition in the machine pool. # noqa: E501
|
78
|
+
|
79
|
+
:param partitions: The partitions of this SummarizeMachinePoolResponse. # noqa: E501
|
80
|
+
:type: list[PartitionInfo]
|
81
|
+
"""
|
82
|
+
if self.local_vars_configuration.client_side_validation and partitions is None: # noqa: E501
|
83
|
+
raise ValueError("Invalid value for `partitions`, must not be `None`") # noqa: E501
|
84
|
+
|
85
|
+
self._partitions = partitions
|
86
|
+
|
87
|
+
@property
|
88
|
+
def running_workloads(self):
|
89
|
+
"""Gets the running_workloads of this SummarizeMachinePoolResponse. # noqa: E501
|
90
|
+
|
91
|
+
The number of running workloads. # noqa: E501
|
92
|
+
|
93
|
+
:return: The running_workloads of this SummarizeMachinePoolResponse. # noqa: E501
|
94
|
+
:rtype: int
|
95
|
+
"""
|
96
|
+
return self._running_workloads
|
97
|
+
|
98
|
+
@running_workloads.setter
|
99
|
+
def running_workloads(self, running_workloads):
|
100
|
+
"""Sets the running_workloads of this SummarizeMachinePoolResponse.
|
101
|
+
|
102
|
+
The number of running workloads. # noqa: E501
|
103
|
+
|
104
|
+
:param running_workloads: The running_workloads of this SummarizeMachinePoolResponse. # noqa: E501
|
105
|
+
:type: int
|
106
|
+
"""
|
107
|
+
if self.local_vars_configuration.client_side_validation and running_workloads is None: # noqa: E501
|
108
|
+
raise ValueError("Invalid value for `running_workloads`, must not be `None`") # noqa: E501
|
109
|
+
|
110
|
+
self._running_workloads = running_workloads
|
111
|
+
|
112
|
+
@property
|
113
|
+
def queued_workloads(self):
|
114
|
+
"""Gets the queued_workloads of this SummarizeMachinePoolResponse. # noqa: E501
|
115
|
+
|
116
|
+
The number of queued workloads. # noqa: E501
|
117
|
+
|
118
|
+
:return: The queued_workloads of this SummarizeMachinePoolResponse. # noqa: E501
|
119
|
+
:rtype: int
|
120
|
+
"""
|
121
|
+
return self._queued_workloads
|
122
|
+
|
123
|
+
@queued_workloads.setter
|
124
|
+
def queued_workloads(self, queued_workloads):
|
125
|
+
"""Sets the queued_workloads of this SummarizeMachinePoolResponse.
|
126
|
+
|
127
|
+
The number of queued workloads. # noqa: E501
|
128
|
+
|
129
|
+
:param queued_workloads: The queued_workloads of this SummarizeMachinePoolResponse. # noqa: E501
|
130
|
+
:type: int
|
131
|
+
"""
|
132
|
+
if self.local_vars_configuration.client_side_validation and queued_workloads is None: # noqa: E501
|
133
|
+
raise ValueError("Invalid value for `queued_workloads`, must not be `None`") # noqa: E501
|
134
|
+
|
135
|
+
self._queued_workloads = queued_workloads
|
136
|
+
|
137
|
+
def to_dict(self):
|
138
|
+
"""Returns the model properties as a dict"""
|
139
|
+
result = {}
|
140
|
+
|
141
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
142
|
+
value = getattr(self, attr)
|
143
|
+
if isinstance(value, list):
|
144
|
+
result[attr] = list(map(
|
145
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
146
|
+
value
|
147
|
+
))
|
148
|
+
elif hasattr(value, "to_dict"):
|
149
|
+
result[attr] = value.to_dict()
|
150
|
+
elif isinstance(value, dict):
|
151
|
+
result[attr] = dict(map(
|
152
|
+
lambda item: (item[0], item[1].to_dict())
|
153
|
+
if hasattr(item[1], "to_dict") else item,
|
154
|
+
value.items()
|
155
|
+
))
|
156
|
+
else:
|
157
|
+
result[attr] = value
|
158
|
+
|
159
|
+
return result
|
160
|
+
|
161
|
+
def to_str(self):
|
162
|
+
"""Returns the string representation of the model"""
|
163
|
+
return pprint.pformat(self.to_dict())
|
164
|
+
|
165
|
+
def __repr__(self):
|
166
|
+
"""For `print` and `pprint`"""
|
167
|
+
return self.to_str()
|
168
|
+
|
169
|
+
def __eq__(self, other):
|
170
|
+
"""Returns true if both objects are equal"""
|
171
|
+
if not isinstance(other, SummarizeMachinePoolResponse):
|
172
|
+
return False
|
173
|
+
|
174
|
+
return self.to_dict() == other.to_dict()
|
175
|
+
|
176
|
+
def __ne__(self, other):
|
177
|
+
"""Returns true if both objects are not equal"""
|
178
|
+
if not isinstance(other, SummarizeMachinePoolResponse):
|
179
|
+
return True
|
180
|
+
|
181
|
+
return self.to_dict() != other.to_dict()
|
@@ -0,0 +1,121 @@
|
|
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 SummarizemachinepoolresponseResponse(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
|
+
'result': 'SummarizeMachinePoolResponse'
|
37
|
+
}
|
38
|
+
|
39
|
+
attribute_map = {
|
40
|
+
'result': 'result'
|
41
|
+
}
|
42
|
+
|
43
|
+
def __init__(self, result=None, local_vars_configuration=None): # noqa: E501
|
44
|
+
"""SummarizemachinepoolresponseResponse - 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._result = None
|
50
|
+
self.discriminator = None
|
51
|
+
|
52
|
+
self.result = result
|
53
|
+
|
54
|
+
@property
|
55
|
+
def result(self):
|
56
|
+
"""Gets the result of this SummarizemachinepoolresponseResponse. # noqa: E501
|
57
|
+
|
58
|
+
|
59
|
+
:return: The result of this SummarizemachinepoolresponseResponse. # noqa: E501
|
60
|
+
:rtype: SummarizeMachinePoolResponse
|
61
|
+
"""
|
62
|
+
return self._result
|
63
|
+
|
64
|
+
@result.setter
|
65
|
+
def result(self, result):
|
66
|
+
"""Sets the result of this SummarizemachinepoolresponseResponse.
|
67
|
+
|
68
|
+
|
69
|
+
:param result: The result of this SummarizemachinepoolresponseResponse. # noqa: E501
|
70
|
+
:type: SummarizeMachinePoolResponse
|
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
|
+
def to_dict(self):
|
78
|
+
"""Returns the model properties as a dict"""
|
79
|
+
result = {}
|
80
|
+
|
81
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
82
|
+
value = getattr(self, attr)
|
83
|
+
if isinstance(value, list):
|
84
|
+
result[attr] = list(map(
|
85
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
86
|
+
value
|
87
|
+
))
|
88
|
+
elif hasattr(value, "to_dict"):
|
89
|
+
result[attr] = value.to_dict()
|
90
|
+
elif isinstance(value, dict):
|
91
|
+
result[attr] = dict(map(
|
92
|
+
lambda item: (item[0], item[1].to_dict())
|
93
|
+
if hasattr(item[1], "to_dict") else item,
|
94
|
+
value.items()
|
95
|
+
))
|
96
|
+
else:
|
97
|
+
result[attr] = value
|
98
|
+
|
99
|
+
return result
|
100
|
+
|
101
|
+
def to_str(self):
|
102
|
+
"""Returns the string representation of the model"""
|
103
|
+
return pprint.pformat(self.to_dict())
|
104
|
+
|
105
|
+
def __repr__(self):
|
106
|
+
"""For `print` and `pprint`"""
|
107
|
+
return self.to_str()
|
108
|
+
|
109
|
+
def __eq__(self, other):
|
110
|
+
"""Returns true if both objects are equal"""
|
111
|
+
if not isinstance(other, SummarizemachinepoolresponseResponse):
|
112
|
+
return False
|
113
|
+
|
114
|
+
return self.to_dict() == other.to_dict()
|
115
|
+
|
116
|
+
def __ne__(self, other):
|
117
|
+
"""Returns true if both objects are not equal"""
|
118
|
+
if not isinstance(other, SummarizemachinepoolresponseResponse):
|
119
|
+
return True
|
120
|
+
|
121
|
+
return self.to_dict() != other.to_dict()
|
@@ -41,7 +41,11 @@ class WorkspaceTemplate(object):
|
|
41
41
|
'url': 'str',
|
42
42
|
'maximum_uptime_minutes': 'int',
|
43
43
|
'logo_ids': 'list[str]',
|
44
|
-
'oa_group_name': 'str'
|
44
|
+
'oa_group_name': 'str',
|
45
|
+
'icon_type': 'str',
|
46
|
+
'icon_bg_color': 'str',
|
47
|
+
'mins_to_complete': 'int',
|
48
|
+
'complexity': 'ComplexityLevel'
|
45
49
|
}
|
46
50
|
|
47
51
|
attribute_map = {
|
@@ -53,10 +57,14 @@ class WorkspaceTemplate(object):
|
|
53
57
|
'url': 'url',
|
54
58
|
'maximum_uptime_minutes': 'maximum_uptime_minutes',
|
55
59
|
'logo_ids': 'logo_ids',
|
56
|
-
'oa_group_name': 'oa_group_name'
|
60
|
+
'oa_group_name': 'oa_group_name',
|
61
|
+
'icon_type': 'icon_type',
|
62
|
+
'icon_bg_color': 'icon_bg_color',
|
63
|
+
'mins_to_complete': 'mins_to_complete',
|
64
|
+
'complexity': 'complexity'
|
57
65
|
}
|
58
66
|
|
59
|
-
def __init__(self, id=None, title=None, description=None, emoji=None, labels=None, url=None, maximum_uptime_minutes=None, logo_ids=None, oa_group_name=None, local_vars_configuration=None): # noqa: E501
|
67
|
+
def __init__(self, id=None, title=None, description=None, emoji=None, labels=None, url=None, maximum_uptime_minutes=None, logo_ids=None, oa_group_name=None, icon_type=None, icon_bg_color=None, mins_to_complete=None, complexity=None, local_vars_configuration=None): # noqa: E501
|
60
68
|
"""WorkspaceTemplate - a model defined in OpenAPI""" # noqa: E501
|
61
69
|
if local_vars_configuration is None:
|
62
70
|
local_vars_configuration = Configuration()
|
@@ -71,6 +79,10 @@ class WorkspaceTemplate(object):
|
|
71
79
|
self._maximum_uptime_minutes = None
|
72
80
|
self._logo_ids = None
|
73
81
|
self._oa_group_name = None
|
82
|
+
self._icon_type = None
|
83
|
+
self._icon_bg_color = None
|
84
|
+
self._mins_to_complete = None
|
85
|
+
self._complexity = None
|
74
86
|
self.discriminator = None
|
75
87
|
|
76
88
|
self.id = id
|
@@ -84,6 +96,14 @@ class WorkspaceTemplate(object):
|
|
84
96
|
self.logo_ids = logo_ids
|
85
97
|
if oa_group_name is not None:
|
86
98
|
self.oa_group_name = oa_group_name
|
99
|
+
if icon_type is not None:
|
100
|
+
self.icon_type = icon_type
|
101
|
+
if icon_bg_color is not None:
|
102
|
+
self.icon_bg_color = icon_bg_color
|
103
|
+
if mins_to_complete is not None:
|
104
|
+
self.mins_to_complete = mins_to_complete
|
105
|
+
if complexity is not None:
|
106
|
+
self.complexity = complexity
|
87
107
|
|
88
108
|
@property
|
89
109
|
def id(self):
|
@@ -306,6 +326,98 @@ class WorkspaceTemplate(object):
|
|
306
326
|
|
307
327
|
self._oa_group_name = oa_group_name
|
308
328
|
|
329
|
+
@property
|
330
|
+
def icon_type(self):
|
331
|
+
"""Gets the icon_type of this WorkspaceTemplate. # noqa: E501
|
332
|
+
|
333
|
+
The type of the icon for the workspace template # noqa: E501
|
334
|
+
|
335
|
+
:return: The icon_type of this WorkspaceTemplate. # noqa: E501
|
336
|
+
:rtype: str
|
337
|
+
"""
|
338
|
+
return self._icon_type
|
339
|
+
|
340
|
+
@icon_type.setter
|
341
|
+
def icon_type(self, icon_type):
|
342
|
+
"""Sets the icon_type of this WorkspaceTemplate.
|
343
|
+
|
344
|
+
The type of the icon for the workspace template # noqa: E501
|
345
|
+
|
346
|
+
:param icon_type: The icon_type of this WorkspaceTemplate. # noqa: E501
|
347
|
+
:type: str
|
348
|
+
"""
|
349
|
+
|
350
|
+
self._icon_type = icon_type
|
351
|
+
|
352
|
+
@property
|
353
|
+
def icon_bg_color(self):
|
354
|
+
"""Gets the icon_bg_color of this WorkspaceTemplate. # noqa: E501
|
355
|
+
|
356
|
+
The background color of the icon for the workspace template # noqa: E501
|
357
|
+
|
358
|
+
:return: The icon_bg_color of this WorkspaceTemplate. # noqa: E501
|
359
|
+
:rtype: str
|
360
|
+
"""
|
361
|
+
return self._icon_bg_color
|
362
|
+
|
363
|
+
@icon_bg_color.setter
|
364
|
+
def icon_bg_color(self, icon_bg_color):
|
365
|
+
"""Sets the icon_bg_color of this WorkspaceTemplate.
|
366
|
+
|
367
|
+
The background color of the icon for the workspace template # noqa: E501
|
368
|
+
|
369
|
+
:param icon_bg_color: The icon_bg_color of this WorkspaceTemplate. # noqa: E501
|
370
|
+
:type: str
|
371
|
+
"""
|
372
|
+
|
373
|
+
self._icon_bg_color = icon_bg_color
|
374
|
+
|
375
|
+
@property
|
376
|
+
def mins_to_complete(self):
|
377
|
+
"""Gets the mins_to_complete of this WorkspaceTemplate. # noqa: E501
|
378
|
+
|
379
|
+
The number of minutes expected to complete the template # noqa: E501
|
380
|
+
|
381
|
+
:return: The mins_to_complete of this WorkspaceTemplate. # noqa: E501
|
382
|
+
:rtype: int
|
383
|
+
"""
|
384
|
+
return self._mins_to_complete
|
385
|
+
|
386
|
+
@mins_to_complete.setter
|
387
|
+
def mins_to_complete(self, mins_to_complete):
|
388
|
+
"""Sets the mins_to_complete of this WorkspaceTemplate.
|
389
|
+
|
390
|
+
The number of minutes expected to complete the template # noqa: E501
|
391
|
+
|
392
|
+
:param mins_to_complete: The mins_to_complete of this WorkspaceTemplate. # noqa: E501
|
393
|
+
:type: int
|
394
|
+
"""
|
395
|
+
|
396
|
+
self._mins_to_complete = mins_to_complete
|
397
|
+
|
398
|
+
@property
|
399
|
+
def complexity(self):
|
400
|
+
"""Gets the complexity of this WorkspaceTemplate. # noqa: E501
|
401
|
+
|
402
|
+
The complexity of the workspace template # noqa: E501
|
403
|
+
|
404
|
+
:return: The complexity of this WorkspaceTemplate. # noqa: E501
|
405
|
+
:rtype: ComplexityLevel
|
406
|
+
"""
|
407
|
+
return self._complexity
|
408
|
+
|
409
|
+
@complexity.setter
|
410
|
+
def complexity(self, complexity):
|
411
|
+
"""Sets the complexity of this WorkspaceTemplate.
|
412
|
+
|
413
|
+
The complexity of the workspace template # noqa: E501
|
414
|
+
|
415
|
+
:param complexity: The complexity of this WorkspaceTemplate. # noqa: E501
|
416
|
+
:type: ComplexityLevel
|
417
|
+
"""
|
418
|
+
|
419
|
+
self._complexity = complexity
|
420
|
+
|
309
421
|
def to_dict(self):
|
310
422
|
"""Returns the model properties as a dict"""
|
311
423
|
result = {}
|
@@ -35,16 +35,22 @@ class WorkspaceTemplateReadme(object):
|
|
35
35
|
openapi_types = {
|
36
36
|
'content': 'str',
|
37
37
|
'title': 'str',
|
38
|
-
'description': 'str'
|
38
|
+
'description': 'str',
|
39
|
+
'icon_type': 'str',
|
40
|
+
'icon_bg_color': 'str',
|
41
|
+
'url': 'str'
|
39
42
|
}
|
40
43
|
|
41
44
|
attribute_map = {
|
42
45
|
'content': 'content',
|
43
46
|
'title': 'title',
|
44
|
-
'description': 'description'
|
47
|
+
'description': 'description',
|
48
|
+
'icon_type': 'icon_type',
|
49
|
+
'icon_bg_color': 'icon_bg_color',
|
50
|
+
'url': 'url'
|
45
51
|
}
|
46
52
|
|
47
|
-
def __init__(self, content=None, title=None, description=None, local_vars_configuration=None): # noqa: E501
|
53
|
+
def __init__(self, content=None, title=None, description=None, icon_type=None, icon_bg_color=None, url=None, local_vars_configuration=None): # noqa: E501
|
48
54
|
"""WorkspaceTemplateReadme - a model defined in OpenAPI""" # noqa: E501
|
49
55
|
if local_vars_configuration is None:
|
50
56
|
local_vars_configuration = Configuration()
|
@@ -53,11 +59,19 @@ class WorkspaceTemplateReadme(object):
|
|
53
59
|
self._content = None
|
54
60
|
self._title = None
|
55
61
|
self._description = None
|
62
|
+
self._icon_type = None
|
63
|
+
self._icon_bg_color = None
|
64
|
+
self._url = None
|
56
65
|
self.discriminator = None
|
57
66
|
|
58
67
|
self.content = content
|
59
68
|
self.title = title
|
60
69
|
self.description = description
|
70
|
+
if icon_type is not None:
|
71
|
+
self.icon_type = icon_type
|
72
|
+
if icon_bg_color is not None:
|
73
|
+
self.icon_bg_color = icon_bg_color
|
74
|
+
self.url = url
|
61
75
|
|
62
76
|
@property
|
63
77
|
def content(self):
|
@@ -134,6 +148,77 @@ class WorkspaceTemplateReadme(object):
|
|
134
148
|
|
135
149
|
self._description = description
|
136
150
|
|
151
|
+
@property
|
152
|
+
def icon_type(self):
|
153
|
+
"""Gets the icon_type of this WorkspaceTemplateReadme. # noqa: E501
|
154
|
+
|
155
|
+
The remix icon name of the icon for the workspace template # noqa: E501
|
156
|
+
|
157
|
+
:return: The icon_type of this WorkspaceTemplateReadme. # noqa: E501
|
158
|
+
:rtype: str
|
159
|
+
"""
|
160
|
+
return self._icon_type
|
161
|
+
|
162
|
+
@icon_type.setter
|
163
|
+
def icon_type(self, icon_type):
|
164
|
+
"""Sets the icon_type of this WorkspaceTemplateReadme.
|
165
|
+
|
166
|
+
The remix icon name of the icon for the workspace template # noqa: E501
|
167
|
+
|
168
|
+
:param icon_type: The icon_type of this WorkspaceTemplateReadme. # noqa: E501
|
169
|
+
:type: str
|
170
|
+
"""
|
171
|
+
|
172
|
+
self._icon_type = icon_type
|
173
|
+
|
174
|
+
@property
|
175
|
+
def icon_bg_color(self):
|
176
|
+
"""Gets the icon_bg_color of this WorkspaceTemplateReadme. # noqa: E501
|
177
|
+
|
178
|
+
The background color of the icon for the workspace template # noqa: E501
|
179
|
+
|
180
|
+
:return: The icon_bg_color of this WorkspaceTemplateReadme. # noqa: E501
|
181
|
+
:rtype: str
|
182
|
+
"""
|
183
|
+
return self._icon_bg_color
|
184
|
+
|
185
|
+
@icon_bg_color.setter
|
186
|
+
def icon_bg_color(self, icon_bg_color):
|
187
|
+
"""Sets the icon_bg_color of this WorkspaceTemplateReadme.
|
188
|
+
|
189
|
+
The background color of the icon for the workspace template # noqa: E501
|
190
|
+
|
191
|
+
:param icon_bg_color: The icon_bg_color of this WorkspaceTemplateReadme. # noqa: E501
|
192
|
+
:type: str
|
193
|
+
"""
|
194
|
+
|
195
|
+
self._icon_bg_color = icon_bg_color
|
196
|
+
|
197
|
+
@property
|
198
|
+
def url(self):
|
199
|
+
"""Gets the url of this WorkspaceTemplateReadme. # noqa: E501
|
200
|
+
|
201
|
+
The url of the workspace template # noqa: E501
|
202
|
+
|
203
|
+
:return: The url of this WorkspaceTemplateReadme. # noqa: E501
|
204
|
+
:rtype: str
|
205
|
+
"""
|
206
|
+
return self._url
|
207
|
+
|
208
|
+
@url.setter
|
209
|
+
def url(self, url):
|
210
|
+
"""Sets the url of this WorkspaceTemplateReadme.
|
211
|
+
|
212
|
+
The url of the workspace template # noqa: E501
|
213
|
+
|
214
|
+
:param url: The url of this WorkspaceTemplateReadme. # noqa: E501
|
215
|
+
:type: str
|
216
|
+
"""
|
217
|
+
if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501
|
218
|
+
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
219
|
+
|
220
|
+
self._url = url
|
221
|
+
|
137
222
|
def to_dict(self):
|
138
223
|
"""Returns the model properties as a dict"""
|
139
224
|
result = {}
|
@@ -1129,7 +1129,7 @@ def add_collaborators(cloud: str, users_file: str,) -> None:
|
|
1129
1129
|
@click.option(
|
1130
1130
|
"--output",
|
1131
1131
|
"-o",
|
1132
|
-
help="File to write the
|
1132
|
+
help="File to write the output YAML to.",
|
1133
1133
|
type=str,
|
1134
1134
|
required=False,
|
1135
1135
|
)
|
@@ -1154,18 +1154,21 @@ def get_cloud(
|
|
1154
1154
|
log.error("Cloud not found.")
|
1155
1155
|
return
|
1156
1156
|
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1157
|
+
# Include all cloud deployments for the cloud.
|
1158
|
+
cloud_deployments = CloudController().get_cloud_deployments(cloud_id=cloud.id)
|
1159
|
+
result = {
|
1160
|
+
"name": cloud.name,
|
1161
|
+
"id": cloud.id,
|
1162
|
+
"created_at": cloud.created_at,
|
1163
|
+
"is_default": cloud.is_default,
|
1164
|
+
"deployments": cloud_deployments.get("deployments", []),
|
1165
|
+
}
|
1160
1166
|
|
1167
|
+
if output:
|
1161
1168
|
with open(output, "w") as f:
|
1162
1169
|
yaml.dump(result, f, sort_keys=False)
|
1163
|
-
|
1164
1170
|
else:
|
1165
|
-
|
1166
|
-
cloud.to_dict() if hasattr(cloud, "to_dict") else cloud.__dict__
|
1167
|
-
)
|
1168
|
-
print(yaml.dump(cloud_dict, sort_keys=False))
|
1171
|
+
print(yaml.dump(result, sort_keys=False))
|
1169
1172
|
|
1170
1173
|
except ValueError as e:
|
1171
1174
|
log.error(f"Error retrieving cloud: {e}")
|
@@ -652,14 +652,31 @@ collaborators:
|
|
652
652
|
"""
|
653
653
|
|
654
654
|
CLOUD_GET_CLOUD_EXAMPLE = """\
|
655
|
-
$ anyscale cloud get --name
|
656
|
-
name: anyscale_v2_default_cloud
|
655
|
+
$ anyscale cloud get --name my-cloud
|
657
656
|
id: cld_123
|
658
|
-
|
659
|
-
region: us-west-2
|
657
|
+
name: my-cloud
|
660
658
|
created_at: 2022-10-18 05:12:13.335803+00:00
|
661
|
-
is_default:
|
662
|
-
|
659
|
+
is_default: true
|
660
|
+
deployments:
|
661
|
+
- cloud_deployment_id: cldrsrc_123
|
662
|
+
name: vm-aws-us-west-2
|
663
|
+
provider: AWS
|
664
|
+
compute_stack: VM
|
665
|
+
region: us-west-2
|
666
|
+
networking_mode: PUBLIC
|
667
|
+
object_storage:
|
668
|
+
bucket_name: s3://my-bucket
|
669
|
+
file_storage:
|
670
|
+
file_storage_id: fs-123
|
671
|
+
aws_config:
|
672
|
+
vpc_id: vpc-123
|
673
|
+
subnet_ids:
|
674
|
+
- subnet-123
|
675
|
+
security_group_ids:
|
676
|
+
- sg-123
|
677
|
+
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-role-123
|
678
|
+
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-role-123
|
679
|
+
memorydb_cluster_name: my-memorydb-cluster
|
663
680
|
"""
|
664
681
|
|
665
682
|
CLOUD_GET_DEFAULT_CLOUD_EXAMPLE = """\
|