lightning-sdk 0.2.8__py3-none-any.whl → 0.2.9__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.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/api/cluster_api.py +22 -0
- lightning_sdk/api/lit_container_api.py +5 -3
- lightning_sdk/api/teamspace_api.py +2 -1
- lightning_sdk/cli/clusters_menu.py +46 -0
- lightning_sdk/cli/list.py +25 -5
- lightning_sdk/cli/serve.py +102 -19
- lightning_sdk/lightning_cloud/openapi/__init__.py +5 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +206 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +5 -0
- lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_systemmetrics_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_billing_tier.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_cold_start_metrics.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_instance_system_metrics_aggregate_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_system_metrics_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_phase.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_system_metrics_aggregated.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +55 -185
- lightning_sdk/lightning_cloud/openapi/models/v1_weka_data_connection.py +227 -0
- lightning_sdk/lit_container.py +13 -5
- lightning_sdk/models.py +7 -2
- lightning_sdk/serve.py +0 -20
- lightning_sdk/teamspace.py +19 -4
- {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.9.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.9.dist-info}/RECORD +32 -25
- {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.9.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.9.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.9.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.8.dist-info → lightning_sdk-0.2.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1ReportCloudSpaceInstanceSystemMetricsResponse(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
attribute_map = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self): # noqa: E501
|
|
50
|
+
"""V1ReportCloudSpaceInstanceSystemMetricsResponse - a model defined in Swagger""" # noqa: E501
|
|
51
|
+
self.discriminator = None
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict:
|
|
54
|
+
"""Returns the model properties as a dict"""
|
|
55
|
+
result = {}
|
|
56
|
+
|
|
57
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
58
|
+
value = getattr(self, attr)
|
|
59
|
+
if isinstance(value, list):
|
|
60
|
+
result[attr] = list(map(
|
|
61
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
62
|
+
value
|
|
63
|
+
))
|
|
64
|
+
elif hasattr(value, "to_dict"):
|
|
65
|
+
result[attr] = value.to_dict()
|
|
66
|
+
elif isinstance(value, dict):
|
|
67
|
+
result[attr] = dict(map(
|
|
68
|
+
lambda item: (item[0], item[1].to_dict())
|
|
69
|
+
if hasattr(item[1], "to_dict") else item,
|
|
70
|
+
value.items()
|
|
71
|
+
))
|
|
72
|
+
else:
|
|
73
|
+
result[attr] = value
|
|
74
|
+
if issubclass(V1ReportCloudSpaceInstanceSystemMetricsResponse, dict):
|
|
75
|
+
for key, value in self.items():
|
|
76
|
+
result[key] = value
|
|
77
|
+
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
def to_str(self) -> str:
|
|
81
|
+
"""Returns the string representation of the model"""
|
|
82
|
+
return pprint.pformat(self.to_dict())
|
|
83
|
+
|
|
84
|
+
def __repr__(self) -> str:
|
|
85
|
+
"""For `print` and `pprint`"""
|
|
86
|
+
return self.to_str()
|
|
87
|
+
|
|
88
|
+
def __eq__(self, other: 'V1ReportCloudSpaceInstanceSystemMetricsResponse') -> bool:
|
|
89
|
+
"""Returns true if both objects are equal"""
|
|
90
|
+
if not isinstance(other, V1ReportCloudSpaceInstanceSystemMetricsResponse):
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
return self.__dict__ == other.__dict__
|
|
94
|
+
|
|
95
|
+
def __ne__(self, other: 'V1ReportCloudSpaceInstanceSystemMetricsResponse') -> bool:
|
|
96
|
+
"""Returns true if both objects are not equal"""
|
|
97
|
+
return not self == other
|
|
@@ -40,6 +40,7 @@ class V1ServerAlertPhase(object):
|
|
|
40
40
|
UNSPECIFIED = "SERVER_ALERT_PHASE_UNSPECIFIED"
|
|
41
41
|
STARTUP = "SERVER_ALERT_PHASE_STARTUP"
|
|
42
42
|
SHUTDOWN = "SERVER_ALERT_PHASE_SHUTDOWN"
|
|
43
|
+
RUNTIME = "SERVER_ALERT_PHASE_RUNTIME"
|
|
43
44
|
"""
|
|
44
45
|
Attributes:
|
|
45
46
|
swagger_types (dict): The key is attribute name
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1SystemMetricsAggregated(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'avg_cpu_percentage': 'float',
|
|
45
|
+
'avg_gpu_percentage': 'float',
|
|
46
|
+
'num_cpus': 'float',
|
|
47
|
+
'num_gpus': 'float',
|
|
48
|
+
'timestamp': 'datetime'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
attribute_map = {
|
|
52
|
+
'avg_cpu_percentage': 'avgCpuPercentage',
|
|
53
|
+
'avg_gpu_percentage': 'avgGpuPercentage',
|
|
54
|
+
'num_cpus': 'numCpus',
|
|
55
|
+
'num_gpus': 'numGpus',
|
|
56
|
+
'timestamp': 'timestamp'
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
def __init__(self, avg_cpu_percentage: 'float' =None, avg_gpu_percentage: 'float' =None, num_cpus: 'float' =None, num_gpus: 'float' =None, timestamp: 'datetime' =None): # noqa: E501
|
|
60
|
+
"""V1SystemMetricsAggregated - a model defined in Swagger""" # noqa: E501
|
|
61
|
+
self._avg_cpu_percentage = None
|
|
62
|
+
self._avg_gpu_percentage = None
|
|
63
|
+
self._num_cpus = None
|
|
64
|
+
self._num_gpus = None
|
|
65
|
+
self._timestamp = None
|
|
66
|
+
self.discriminator = None
|
|
67
|
+
if avg_cpu_percentage is not None:
|
|
68
|
+
self.avg_cpu_percentage = avg_cpu_percentage
|
|
69
|
+
if avg_gpu_percentage is not None:
|
|
70
|
+
self.avg_gpu_percentage = avg_gpu_percentage
|
|
71
|
+
if num_cpus is not None:
|
|
72
|
+
self.num_cpus = num_cpus
|
|
73
|
+
if num_gpus is not None:
|
|
74
|
+
self.num_gpus = num_gpus
|
|
75
|
+
if timestamp is not None:
|
|
76
|
+
self.timestamp = timestamp
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def avg_cpu_percentage(self) -> 'float':
|
|
80
|
+
"""Gets the avg_cpu_percentage of this V1SystemMetricsAggregated. # noqa: E501
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:return: The avg_cpu_percentage of this V1SystemMetricsAggregated. # noqa: E501
|
|
84
|
+
:rtype: float
|
|
85
|
+
"""
|
|
86
|
+
return self._avg_cpu_percentage
|
|
87
|
+
|
|
88
|
+
@avg_cpu_percentage.setter
|
|
89
|
+
def avg_cpu_percentage(self, avg_cpu_percentage: 'float'):
|
|
90
|
+
"""Sets the avg_cpu_percentage of this V1SystemMetricsAggregated.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
:param avg_cpu_percentage: The avg_cpu_percentage of this V1SystemMetricsAggregated. # noqa: E501
|
|
94
|
+
:type: float
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
self._avg_cpu_percentage = avg_cpu_percentage
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def avg_gpu_percentage(self) -> 'float':
|
|
101
|
+
"""Gets the avg_gpu_percentage of this V1SystemMetricsAggregated. # noqa: E501
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:return: The avg_gpu_percentage of this V1SystemMetricsAggregated. # noqa: E501
|
|
105
|
+
:rtype: float
|
|
106
|
+
"""
|
|
107
|
+
return self._avg_gpu_percentage
|
|
108
|
+
|
|
109
|
+
@avg_gpu_percentage.setter
|
|
110
|
+
def avg_gpu_percentage(self, avg_gpu_percentage: 'float'):
|
|
111
|
+
"""Sets the avg_gpu_percentage of this V1SystemMetricsAggregated.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
:param avg_gpu_percentage: The avg_gpu_percentage of this V1SystemMetricsAggregated. # noqa: E501
|
|
115
|
+
:type: float
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
self._avg_gpu_percentage = avg_gpu_percentage
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def num_cpus(self) -> 'float':
|
|
122
|
+
"""Gets the num_cpus of this V1SystemMetricsAggregated. # noqa: E501
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:return: The num_cpus of this V1SystemMetricsAggregated. # noqa: E501
|
|
126
|
+
:rtype: float
|
|
127
|
+
"""
|
|
128
|
+
return self._num_cpus
|
|
129
|
+
|
|
130
|
+
@num_cpus.setter
|
|
131
|
+
def num_cpus(self, num_cpus: 'float'):
|
|
132
|
+
"""Sets the num_cpus of this V1SystemMetricsAggregated.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param num_cpus: The num_cpus of this V1SystemMetricsAggregated. # noqa: E501
|
|
136
|
+
:type: float
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
self._num_cpus = num_cpus
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def num_gpus(self) -> 'float':
|
|
143
|
+
"""Gets the num_gpus of this V1SystemMetricsAggregated. # noqa: E501
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
:return: The num_gpus of this V1SystemMetricsAggregated. # noqa: E501
|
|
147
|
+
:rtype: float
|
|
148
|
+
"""
|
|
149
|
+
return self._num_gpus
|
|
150
|
+
|
|
151
|
+
@num_gpus.setter
|
|
152
|
+
def num_gpus(self, num_gpus: 'float'):
|
|
153
|
+
"""Sets the num_gpus of this V1SystemMetricsAggregated.
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
:param num_gpus: The num_gpus of this V1SystemMetricsAggregated. # noqa: E501
|
|
157
|
+
:type: float
|
|
158
|
+
"""
|
|
159
|
+
|
|
160
|
+
self._num_gpus = num_gpus
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def timestamp(self) -> 'datetime':
|
|
164
|
+
"""Gets the timestamp of this V1SystemMetricsAggregated. # noqa: E501
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
:return: The timestamp of this V1SystemMetricsAggregated. # noqa: E501
|
|
168
|
+
:rtype: datetime
|
|
169
|
+
"""
|
|
170
|
+
return self._timestamp
|
|
171
|
+
|
|
172
|
+
@timestamp.setter
|
|
173
|
+
def timestamp(self, timestamp: 'datetime'):
|
|
174
|
+
"""Sets the timestamp of this V1SystemMetricsAggregated.
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
:param timestamp: The timestamp of this V1SystemMetricsAggregated. # noqa: E501
|
|
178
|
+
:type: datetime
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
self._timestamp = timestamp
|
|
182
|
+
|
|
183
|
+
def to_dict(self) -> dict:
|
|
184
|
+
"""Returns the model properties as a dict"""
|
|
185
|
+
result = {}
|
|
186
|
+
|
|
187
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
188
|
+
value = getattr(self, attr)
|
|
189
|
+
if isinstance(value, list):
|
|
190
|
+
result[attr] = list(map(
|
|
191
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
192
|
+
value
|
|
193
|
+
))
|
|
194
|
+
elif hasattr(value, "to_dict"):
|
|
195
|
+
result[attr] = value.to_dict()
|
|
196
|
+
elif isinstance(value, dict):
|
|
197
|
+
result[attr] = dict(map(
|
|
198
|
+
lambda item: (item[0], item[1].to_dict())
|
|
199
|
+
if hasattr(item[1], "to_dict") else item,
|
|
200
|
+
value.items()
|
|
201
|
+
))
|
|
202
|
+
else:
|
|
203
|
+
result[attr] = value
|
|
204
|
+
if issubclass(V1SystemMetricsAggregated, dict):
|
|
205
|
+
for key, value in self.items():
|
|
206
|
+
result[key] = value
|
|
207
|
+
|
|
208
|
+
return result
|
|
209
|
+
|
|
210
|
+
def to_str(self) -> str:
|
|
211
|
+
"""Returns the string representation of the model"""
|
|
212
|
+
return pprint.pformat(self.to_dict())
|
|
213
|
+
|
|
214
|
+
def __repr__(self) -> str:
|
|
215
|
+
"""For `print` and `pprint`"""
|
|
216
|
+
return self.to_str()
|
|
217
|
+
|
|
218
|
+
def __eq__(self, other: 'V1SystemMetricsAggregated') -> bool:
|
|
219
|
+
"""Returns true if both objects are equal"""
|
|
220
|
+
if not isinstance(other, V1SystemMetricsAggregated):
|
|
221
|
+
return False
|
|
222
|
+
|
|
223
|
+
return self.__dict__ == other.__dict__
|
|
224
|
+
|
|
225
|
+
def __ne__(self, other: 'V1SystemMetricsAggregated') -> bool:
|
|
226
|
+
"""Returns true if both objects are not equal"""
|
|
227
|
+
return not self == other
|