lightning-sdk 0.2.7__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 +7 -12
- 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 +133 -27
- 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 +23 -46
- lightning_sdk/teamspace.py +19 -4
- {lightning_sdk-0.2.7.dist-info → lightning_sdk-0.2.9.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.7.dist-info → lightning_sdk-0.2.9.dist-info}/RECORD +32 -25
- {lightning_sdk-0.2.7.dist-info → lightning_sdk-0.2.9.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.7.dist-info → lightning_sdk-0.2.9.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.7.dist-info → lightning_sdk-0.2.9.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.7.dist-info → lightning_sdk-0.2.9.dist-info}/top_level.txt +0 -0
|
@@ -65,6 +65,7 @@ class V1DataConnection(object):
|
|
|
65
65
|
'total_size_bytes': 'str',
|
|
66
66
|
'type': 'str',
|
|
67
67
|
'updated_at': 'datetime',
|
|
68
|
+
'weka': 'V1WekaDataConnection',
|
|
68
69
|
'writable': 'bool'
|
|
69
70
|
}
|
|
70
71
|
|
|
@@ -93,10 +94,11 @@ class V1DataConnection(object):
|
|
|
93
94
|
'total_size_bytes': 'totalSizeBytes',
|
|
94
95
|
'type': 'type',
|
|
95
96
|
'updated_at': 'updatedAt',
|
|
97
|
+
'weka': 'weka',
|
|
96
98
|
'writable': 'writable'
|
|
97
99
|
}
|
|
98
100
|
|
|
99
|
-
def __init__(self, access_cluster_ids: 'list[str]' =None, accessible: 'bool' =None, aws: 'V1AwsDataConnection' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, efs: 'V1EfsConfig' =None, error: 'str' =None, filestore: 'V1FilestoreDataConnection' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, id: 'str' =None, index: 'V1Index' =None, is_managed: 'bool' =None, lock_out: 'bool' =None, name: 'str' =None, number_of_files: 'str' =None, project_id: 'str' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, state: 'V1DataConnectionState' =None, total_size_bytes: 'str' =None, type: 'str' =None, updated_at: 'datetime' =None, writable: 'bool' =None): # noqa: E501
|
|
101
|
+
def __init__(self, access_cluster_ids: 'list[str]' =None, accessible: 'bool' =None, aws: 'V1AwsDataConnection' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, efs: 'V1EfsConfig' =None, error: 'str' =None, filestore: 'V1FilestoreDataConnection' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, id: 'str' =None, index: 'V1Index' =None, is_managed: 'bool' =None, lock_out: 'bool' =None, name: 'str' =None, number_of_files: 'str' =None, project_id: 'str' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, state: 'V1DataConnectionState' =None, total_size_bytes: 'str' =None, type: 'str' =None, updated_at: 'datetime' =None, weka: 'V1WekaDataConnection' =None, writable: 'bool' =None): # noqa: E501
|
|
100
102
|
"""V1DataConnection - a model defined in Swagger""" # noqa: E501
|
|
101
103
|
self._access_cluster_ids = None
|
|
102
104
|
self._accessible = None
|
|
@@ -122,6 +124,7 @@ class V1DataConnection(object):
|
|
|
122
124
|
self._total_size_bytes = None
|
|
123
125
|
self._type = None
|
|
124
126
|
self._updated_at = None
|
|
127
|
+
self._weka = None
|
|
125
128
|
self._writable = None
|
|
126
129
|
self.discriminator = None
|
|
127
130
|
if access_cluster_ids is not None:
|
|
@@ -172,6 +175,8 @@ class V1DataConnection(object):
|
|
|
172
175
|
self.type = type
|
|
173
176
|
if updated_at is not None:
|
|
174
177
|
self.updated_at = updated_at
|
|
178
|
+
if weka is not None:
|
|
179
|
+
self.weka = weka
|
|
175
180
|
if writable is not None:
|
|
176
181
|
self.writable = writable
|
|
177
182
|
|
|
@@ -679,6 +684,27 @@ class V1DataConnection(object):
|
|
|
679
684
|
|
|
680
685
|
self._updated_at = updated_at
|
|
681
686
|
|
|
687
|
+
@property
|
|
688
|
+
def weka(self) -> 'V1WekaDataConnection':
|
|
689
|
+
"""Gets the weka of this V1DataConnection. # noqa: E501
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
:return: The weka of this V1DataConnection. # noqa: E501
|
|
693
|
+
:rtype: V1WekaDataConnection
|
|
694
|
+
"""
|
|
695
|
+
return self._weka
|
|
696
|
+
|
|
697
|
+
@weka.setter
|
|
698
|
+
def weka(self, weka: 'V1WekaDataConnection'):
|
|
699
|
+
"""Sets the weka of this V1DataConnection.
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
:param weka: The weka of this V1DataConnection. # noqa: E501
|
|
703
|
+
:type: V1WekaDataConnection
|
|
704
|
+
"""
|
|
705
|
+
|
|
706
|
+
self._weka = weka
|
|
707
|
+
|
|
682
708
|
@property
|
|
683
709
|
def writable(self) -> 'bool':
|
|
684
710
|
"""Gets the writable of this V1DataConnection. # noqa: E501
|
|
@@ -0,0 +1,123 @@
|
|
|
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 V1GetCloudSpaceInstanceSystemMetricsAggregateResponse(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
|
+
'metrics': 'list[V1SystemMetricsAggregated]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'metrics': 'metrics'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, metrics: 'list[V1SystemMetricsAggregated]' =None): # noqa: E501
|
|
52
|
+
"""V1GetCloudSpaceInstanceSystemMetricsAggregateResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._metrics = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if metrics is not None:
|
|
56
|
+
self.metrics = metrics
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def metrics(self) -> 'list[V1SystemMetricsAggregated]':
|
|
60
|
+
"""Gets the metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1SystemMetricsAggregated]
|
|
65
|
+
"""
|
|
66
|
+
return self._metrics
|
|
67
|
+
|
|
68
|
+
@metrics.setter
|
|
69
|
+
def metrics(self, metrics: 'list[V1SystemMetricsAggregated]'):
|
|
70
|
+
"""Sets the metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param metrics: The metrics of this V1GetCloudSpaceInstanceSystemMetricsAggregateResponse. # noqa: E501
|
|
74
|
+
:type: list[V1SystemMetricsAggregated]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._metrics = metrics
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict:
|
|
80
|
+
"""Returns the model properties as a dict"""
|
|
81
|
+
result = {}
|
|
82
|
+
|
|
83
|
+
for attr, _ in six.iteritems(self.swagger_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
|
+
if issubclass(V1GetCloudSpaceInstanceSystemMetricsAggregateResponse, dict):
|
|
101
|
+
for key, value in self.items():
|
|
102
|
+
result[key] = value
|
|
103
|
+
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
def to_str(self) -> str:
|
|
107
|
+
"""Returns the string representation of the model"""
|
|
108
|
+
return pprint.pformat(self.to_dict())
|
|
109
|
+
|
|
110
|
+
def __repr__(self) -> str:
|
|
111
|
+
"""For `print` and `pprint`"""
|
|
112
|
+
return self.to_str()
|
|
113
|
+
|
|
114
|
+
def __eq__(self, other: 'V1GetCloudSpaceInstanceSystemMetricsAggregateResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1GetCloudSpaceInstanceSystemMetricsAggregateResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1GetCloudSpaceInstanceSystemMetricsAggregateResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -43,6 +43,7 @@ class V1GoogleCloudDirectV1(object):
|
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'bucket_name': 'str',
|
|
45
45
|
'compute_project_role': 'str',
|
|
46
|
+
'compute_service_account_email': 'str',
|
|
46
47
|
'credentials_secret_id': 'str',
|
|
47
48
|
'credentials_service_account_email': 'str',
|
|
48
49
|
'custom_subnet_mode': 'bool',
|
|
@@ -59,6 +60,7 @@ class V1GoogleCloudDirectV1(object):
|
|
|
59
60
|
attribute_map = {
|
|
60
61
|
'bucket_name': 'bucketName',
|
|
61
62
|
'compute_project_role': 'computeProjectRole',
|
|
63
|
+
'compute_service_account_email': 'computeServiceAccountEmail',
|
|
62
64
|
'credentials_secret_id': 'credentialsSecretId',
|
|
63
65
|
'credentials_service_account_email': 'credentialsServiceAccountEmail',
|
|
64
66
|
'custom_subnet_mode': 'customSubnetMode',
|
|
@@ -72,10 +74,11 @@ class V1GoogleCloudDirectV1(object):
|
|
|
72
74
|
'vpc_networks': 'vpcNetworks'
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
def __init__(self, bucket_name: 'str' =None, compute_project_role: 'str' =None, credentials_secret_id: 'str' =None, credentials_service_account_email: 'str' =None, custom_subnet_mode: 'bool' =None, primary_region: 'str' =None, project_id: 'str' =None, project_sa_enabled: 'bool' =None, regions: 'list[str]' =None, service_account_email: 'str' =None, source_cidr_ips: 'list[str]' =None, subnets: 'list[V1SubnetSpec]' =None, vpc_networks: 'list[str]' =None): # noqa: E501
|
|
77
|
+
def __init__(self, bucket_name: 'str' =None, compute_project_role: 'str' =None, compute_service_account_email: 'str' =None, credentials_secret_id: 'str' =None, credentials_service_account_email: 'str' =None, custom_subnet_mode: 'bool' =None, primary_region: 'str' =None, project_id: 'str' =None, project_sa_enabled: 'bool' =None, regions: 'list[str]' =None, service_account_email: 'str' =None, source_cidr_ips: 'list[str]' =None, subnets: 'list[V1SubnetSpec]' =None, vpc_networks: 'list[str]' =None): # noqa: E501
|
|
76
78
|
"""V1GoogleCloudDirectV1 - a model defined in Swagger""" # noqa: E501
|
|
77
79
|
self._bucket_name = None
|
|
78
80
|
self._compute_project_role = None
|
|
81
|
+
self._compute_service_account_email = None
|
|
79
82
|
self._credentials_secret_id = None
|
|
80
83
|
self._credentials_service_account_email = None
|
|
81
84
|
self._custom_subnet_mode = None
|
|
@@ -92,6 +95,8 @@ class V1GoogleCloudDirectV1(object):
|
|
|
92
95
|
self.bucket_name = bucket_name
|
|
93
96
|
if compute_project_role is not None:
|
|
94
97
|
self.compute_project_role = compute_project_role
|
|
98
|
+
if compute_service_account_email is not None:
|
|
99
|
+
self.compute_service_account_email = compute_service_account_email
|
|
95
100
|
if credentials_secret_id is not None:
|
|
96
101
|
self.credentials_secret_id = credentials_secret_id
|
|
97
102
|
if credentials_service_account_email is not None:
|
|
@@ -157,6 +162,27 @@ class V1GoogleCloudDirectV1(object):
|
|
|
157
162
|
|
|
158
163
|
self._compute_project_role = compute_project_role
|
|
159
164
|
|
|
165
|
+
@property
|
|
166
|
+
def compute_service_account_email(self) -> 'str':
|
|
167
|
+
"""Gets the compute_service_account_email of this V1GoogleCloudDirectV1. # noqa: E501
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
:return: The compute_service_account_email of this V1GoogleCloudDirectV1. # noqa: E501
|
|
171
|
+
:rtype: str
|
|
172
|
+
"""
|
|
173
|
+
return self._compute_service_account_email
|
|
174
|
+
|
|
175
|
+
@compute_service_account_email.setter
|
|
176
|
+
def compute_service_account_email(self, compute_service_account_email: 'str'):
|
|
177
|
+
"""Sets the compute_service_account_email of this V1GoogleCloudDirectV1.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
:param compute_service_account_email: The compute_service_account_email of this V1GoogleCloudDirectV1. # noqa: E501
|
|
181
|
+
:type: str
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
self._compute_service_account_email = compute_service_account_email
|
|
185
|
+
|
|
160
186
|
@property
|
|
161
187
|
def credentials_secret_id(self) -> 'str':
|
|
162
188
|
"""Gets the credentials_secret_id of this V1GoogleCloudDirectV1. # noqa: E501
|
|
@@ -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
|