lightning-sdk 2025.10.14__py3-none-any.whl → 2025.10.22__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 +6 -3
- lightning_sdk/api/base_studio_api.py +13 -9
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/studio_api.py +7 -2
- lightning_sdk/base_studio.py +30 -17
- lightning_sdk/cli/base_studio/list.py +1 -3
- lightning_sdk/cli/entrypoint.py +8 -34
- lightning_sdk/cli/studio/connect.py +42 -92
- lightning_sdk/cli/studio/create.py +23 -1
- lightning_sdk/cli/studio/start.py +12 -2
- lightning_sdk/cli/utils/get_base_studio.py +24 -0
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +71 -0
- lightning_sdk/cli/utils/logging.py +121 -0
- lightning_sdk/cli/utils/ssh_connection.py +1 -1
- lightning_sdk/constants.py +1 -0
- lightning_sdk/helpers.py +53 -34
- lightning_sdk/lightning_cloud/login.py +260 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +10 -3
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +97 -0
- lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +10 -3
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -79
- lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
- lightning_sdk/lightning_cloud/rest_client.py +48 -45
- lightning_sdk/machine.py +2 -0
- lightning_sdk/studio.py +14 -2
- lightning_sdk/utils/license.py +13 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.22.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.22.dist-info}/RECORD +51 -41
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.22.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.22.dist-info}/top_level.txt +0 -0
|
@@ -43,6 +43,7 @@ class CreateMachineRequestRepresentsTheRequestToCreateAMachine(object):
|
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'address': 'str',
|
|
45
45
|
'instance_type': 'str',
|
|
46
|
+
'management_api_url': 'str',
|
|
46
47
|
'name': 'str',
|
|
47
48
|
'org_id': 'str',
|
|
48
49
|
'parent_cluster_id': 'str',
|
|
@@ -59,6 +60,7 @@ class CreateMachineRequestRepresentsTheRequestToCreateAMachine(object):
|
|
|
59
60
|
attribute_map = {
|
|
60
61
|
'address': 'address',
|
|
61
62
|
'instance_type': 'instanceType',
|
|
63
|
+
'management_api_url': 'managementApiUrl',
|
|
62
64
|
'name': 'name',
|
|
63
65
|
'org_id': 'orgId',
|
|
64
66
|
'parent_cluster_id': 'parentClusterId',
|
|
@@ -72,10 +74,11 @@ class CreateMachineRequestRepresentsTheRequestToCreateAMachine(object):
|
|
|
72
74
|
'unschedulable': 'unschedulable'
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
def __init__(self, address: 'str' =None, instance_type: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, resources: 'V1Resources' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501
|
|
77
|
+
def __init__(self, address: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, resources: 'V1Resources' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501
|
|
76
78
|
"""CreateMachineRequestRepresentsTheRequestToCreateAMachine - a model defined in Swagger""" # noqa: E501
|
|
77
79
|
self._address = None
|
|
78
80
|
self._instance_type = None
|
|
81
|
+
self._management_api_url = None
|
|
79
82
|
self._name = None
|
|
80
83
|
self._org_id = None
|
|
81
84
|
self._parent_cluster_id = None
|
|
@@ -92,6 +95,8 @@ class CreateMachineRequestRepresentsTheRequestToCreateAMachine(object):
|
|
|
92
95
|
self.address = address
|
|
93
96
|
if instance_type is not None:
|
|
94
97
|
self.instance_type = instance_type
|
|
98
|
+
if management_api_url is not None:
|
|
99
|
+
self.management_api_url = management_api_url
|
|
95
100
|
if name is not None:
|
|
96
101
|
self.name = name
|
|
97
102
|
if org_id is not None:
|
|
@@ -157,6 +162,27 @@ class CreateMachineRequestRepresentsTheRequestToCreateAMachine(object):
|
|
|
157
162
|
|
|
158
163
|
self._instance_type = instance_type
|
|
159
164
|
|
|
165
|
+
@property
|
|
166
|
+
def management_api_url(self) -> 'str':
|
|
167
|
+
"""Gets the management_api_url of this CreateMachineRequestRepresentsTheRequestToCreateAMachine. # noqa: E501
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
:return: The management_api_url of this CreateMachineRequestRepresentsTheRequestToCreateAMachine. # noqa: E501
|
|
171
|
+
:rtype: str
|
|
172
|
+
"""
|
|
173
|
+
return self._management_api_url
|
|
174
|
+
|
|
175
|
+
@management_api_url.setter
|
|
176
|
+
def management_api_url(self, management_api_url: 'str'):
|
|
177
|
+
"""Sets the management_api_url of this CreateMachineRequestRepresentsTheRequestToCreateAMachine.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
:param management_api_url: The management_api_url of this CreateMachineRequestRepresentsTheRequestToCreateAMachine. # noqa: E501
|
|
181
|
+
:type: str
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
self._management_api_url = management_api_url
|
|
185
|
+
|
|
160
186
|
@property
|
|
161
187
|
def name(self) -> 'str':
|
|
162
188
|
"""Gets the name of this CreateMachineRequestRepresentsTheRequestToCreateAMachine. # noqa: E501
|
|
@@ -46,6 +46,7 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
46
46
|
'bytes_to_sync': 'str',
|
|
47
47
|
'cloud_space_id': 'str',
|
|
48
48
|
'cloud_space_instance_id': 'str',
|
|
49
|
+
'cluster_id': 'str',
|
|
49
50
|
'compute_config': 'V1UserRequestedComputeConfig',
|
|
50
51
|
'creation_timestamp': 'datetime',
|
|
51
52
|
'data_connection_mounts': 'list[V1DataConnectionMount]',
|
|
@@ -82,6 +83,7 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
82
83
|
'bytes_to_sync': 'bytesToSync',
|
|
83
84
|
'cloud_space_id': 'cloudSpaceId',
|
|
84
85
|
'cloud_space_instance_id': 'cloudSpaceInstanceId',
|
|
86
|
+
'cluster_id': 'clusterId',
|
|
85
87
|
'compute_config': 'computeConfig',
|
|
86
88
|
'creation_timestamp': 'creationTimestamp',
|
|
87
89
|
'data_connection_mounts': 'dataConnectionMounts',
|
|
@@ -112,13 +114,14 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
112
114
|
'vscode_url': 'vscodeUrl'
|
|
113
115
|
}
|
|
114
116
|
|
|
115
|
-
def __init__(self, alerts: 'list[V1ServerAlert]' =None, app_url: 'str' =None, bytes_to_sync: 'str' =None, cloud_space_id: 'str' =None, cloud_space_instance_id: 'str' =None, compute_config: 'V1UserRequestedComputeConfig' =None, creation_timestamp: 'datetime' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, files_to_sync: 'str' =None, free: 'bool' =None, ide: 'str' =None, instance_id: 'str' =None, instance_region: 'str' =None, instance_url: 'str' =None, jupyterlab_url: 'str' =None, phase: 'V1CloudSpaceInstanceState' =None, price: 'float' =None, private_ip_address: 'str' =None, public_ip_address: 'str' =None, ssh_host: 'str' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, start_timestamp: 'datetime' =None, startup_eta_seconds: 'str' =None, startup_percentage: 'str' =None, startup_phase: 'str' =None, startup_status: 'V1CloudSpaceInstanceStartupStatus' =None, status_message: 'str' =None, switched_at: 'datetime' =None, sync_last_updated: 'datetime' =None, termination_time: 'datetime' =None, transfer_metadata: 'V1CloudSpaceTransferMetadata' =None, vscode_url: 'str' =None): # noqa: E501
|
|
117
|
+
def __init__(self, alerts: 'list[V1ServerAlert]' =None, app_url: 'str' =None, bytes_to_sync: 'str' =None, cloud_space_id: 'str' =None, cloud_space_instance_id: 'str' =None, cluster_id: 'str' =None, compute_config: 'V1UserRequestedComputeConfig' =None, creation_timestamp: 'datetime' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, files_to_sync: 'str' =None, free: 'bool' =None, ide: 'str' =None, instance_id: 'str' =None, instance_region: 'str' =None, instance_url: 'str' =None, jupyterlab_url: 'str' =None, phase: 'V1CloudSpaceInstanceState' =None, price: 'float' =None, private_ip_address: 'str' =None, public_ip_address: 'str' =None, ssh_host: 'str' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, start_timestamp: 'datetime' =None, startup_eta_seconds: 'str' =None, startup_percentage: 'str' =None, startup_phase: 'str' =None, startup_status: 'V1CloudSpaceInstanceStartupStatus' =None, status_message: 'str' =None, switched_at: 'datetime' =None, sync_last_updated: 'datetime' =None, termination_time: 'datetime' =None, transfer_metadata: 'V1CloudSpaceTransferMetadata' =None, vscode_url: 'str' =None): # noqa: E501
|
|
116
118
|
"""Externalv1CloudSpaceInstanceStatus - a model defined in Swagger""" # noqa: E501
|
|
117
119
|
self._alerts = None
|
|
118
120
|
self._app_url = None
|
|
119
121
|
self._bytes_to_sync = None
|
|
120
122
|
self._cloud_space_id = None
|
|
121
123
|
self._cloud_space_instance_id = None
|
|
124
|
+
self._cluster_id = None
|
|
122
125
|
self._compute_config = None
|
|
123
126
|
self._creation_timestamp = None
|
|
124
127
|
self._data_connection_mounts = None
|
|
@@ -158,6 +161,8 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
158
161
|
self.cloud_space_id = cloud_space_id
|
|
159
162
|
if cloud_space_instance_id is not None:
|
|
160
163
|
self.cloud_space_instance_id = cloud_space_instance_id
|
|
164
|
+
if cluster_id is not None:
|
|
165
|
+
self.cluster_id = cluster_id
|
|
161
166
|
if compute_config is not None:
|
|
162
167
|
self.compute_config = compute_config
|
|
163
168
|
if creation_timestamp is not None:
|
|
@@ -320,6 +325,27 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
320
325
|
|
|
321
326
|
self._cloud_space_instance_id = cloud_space_instance_id
|
|
322
327
|
|
|
328
|
+
@property
|
|
329
|
+
def cluster_id(self) -> 'str':
|
|
330
|
+
"""Gets the cluster_id of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
:return: The cluster_id of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
334
|
+
:rtype: str
|
|
335
|
+
"""
|
|
336
|
+
return self._cluster_id
|
|
337
|
+
|
|
338
|
+
@cluster_id.setter
|
|
339
|
+
def cluster_id(self, cluster_id: 'str'):
|
|
340
|
+
"""Sets the cluster_id of this Externalv1CloudSpaceInstanceStatus.
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
:param cluster_id: The cluster_id of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
344
|
+
:type: str
|
|
345
|
+
"""
|
|
346
|
+
|
|
347
|
+
self._cluster_id = cluster_id
|
|
348
|
+
|
|
323
349
|
@property
|
|
324
350
|
def compute_config(self) -> 'V1UserRequestedComputeConfig':
|
|
325
351
|
"""Gets the compute_config of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
@@ -41,23 +41,28 @@ class IdForkBody1(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'new_name': 'str',
|
|
44
45
|
'target_cluster_id': 'str',
|
|
45
46
|
'target_project_id': 'str',
|
|
46
47
|
'version_id': 'str'
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
attribute_map = {
|
|
51
|
+
'new_name': 'newName',
|
|
50
52
|
'target_cluster_id': 'targetClusterId',
|
|
51
53
|
'target_project_id': 'targetProjectId',
|
|
52
54
|
'version_id': 'versionId'
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
def __init__(self, target_cluster_id: 'str' =None, target_project_id: 'str' =None, version_id: 'str' =None): # noqa: E501
|
|
57
|
+
def __init__(self, new_name: 'str' =None, target_cluster_id: 'str' =None, target_project_id: 'str' =None, version_id: 'str' =None): # noqa: E501
|
|
56
58
|
"""IdForkBody1 - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self._new_name = None
|
|
57
60
|
self._target_cluster_id = None
|
|
58
61
|
self._target_project_id = None
|
|
59
62
|
self._version_id = None
|
|
60
63
|
self.discriminator = None
|
|
64
|
+
if new_name is not None:
|
|
65
|
+
self.new_name = new_name
|
|
61
66
|
if target_cluster_id is not None:
|
|
62
67
|
self.target_cluster_id = target_cluster_id
|
|
63
68
|
if target_project_id is not None:
|
|
@@ -65,6 +70,27 @@ class IdForkBody1(object):
|
|
|
65
70
|
if version_id is not None:
|
|
66
71
|
self.version_id = version_id
|
|
67
72
|
|
|
73
|
+
@property
|
|
74
|
+
def new_name(self) -> 'str':
|
|
75
|
+
"""Gets the new_name of this IdForkBody1. # noqa: E501
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:return: The new_name of this IdForkBody1. # noqa: E501
|
|
79
|
+
:rtype: str
|
|
80
|
+
"""
|
|
81
|
+
return self._new_name
|
|
82
|
+
|
|
83
|
+
@new_name.setter
|
|
84
|
+
def new_name(self, new_name: 'str'):
|
|
85
|
+
"""Sets the new_name of this IdForkBody1.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:param new_name: The new_name of this IdForkBody1. # noqa: E501
|
|
89
|
+
:type: str
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
self._new_name = new_name
|
|
93
|
+
|
|
68
94
|
@property
|
|
69
95
|
def target_cluster_id(self) -> 'str':
|
|
70
96
|
"""Gets the target_cluster_id of this IdForkBody1. # 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 LicenseKeyValidateBody(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
|
+
'product_id': 'str'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'product_id': 'productId'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, product_id: 'str' =None): # noqa: E501
|
|
52
|
+
"""LicenseKeyValidateBody - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._product_id = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if product_id is not None:
|
|
56
|
+
self.product_id = product_id
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def product_id(self) -> 'str':
|
|
60
|
+
"""Gets the product_id of this LicenseKeyValidateBody. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The product_id of this LicenseKeyValidateBody. # noqa: E501
|
|
64
|
+
:rtype: str
|
|
65
|
+
"""
|
|
66
|
+
return self._product_id
|
|
67
|
+
|
|
68
|
+
@product_id.setter
|
|
69
|
+
def product_id(self, product_id: 'str'):
|
|
70
|
+
"""Sets the product_id of this LicenseKeyValidateBody.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param product_id: The product_id of this LicenseKeyValidateBody. # noqa: E501
|
|
74
|
+
:type: str
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._product_id = product_id
|
|
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(LicenseKeyValidateBody, 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: 'LicenseKeyValidateBody') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, LicenseKeyValidateBody):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'LicenseKeyValidateBody') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -0,0 +1,175 @@
|
|
|
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 V1CreateLicenseRequest(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
|
+
'owner_id': 'str',
|
|
45
|
+
'owner_type': 'V1TokenOwnerType',
|
|
46
|
+
'product_id': 'str'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
attribute_map = {
|
|
50
|
+
'owner_id': 'ownerId',
|
|
51
|
+
'owner_type': 'ownerType',
|
|
52
|
+
'product_id': 'productId'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
def __init__(self, owner_id: 'str' =None, owner_type: 'V1TokenOwnerType' =None, product_id: 'str' =None): # noqa: E501
|
|
56
|
+
"""V1CreateLicenseRequest - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._owner_id = None
|
|
58
|
+
self._owner_type = None
|
|
59
|
+
self._product_id = None
|
|
60
|
+
self.discriminator = None
|
|
61
|
+
if owner_id is not None:
|
|
62
|
+
self.owner_id = owner_id
|
|
63
|
+
if owner_type is not None:
|
|
64
|
+
self.owner_type = owner_type
|
|
65
|
+
if product_id is not None:
|
|
66
|
+
self.product_id = product_id
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def owner_id(self) -> 'str':
|
|
70
|
+
"""Gets the owner_id of this V1CreateLicenseRequest. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The owner_id of this V1CreateLicenseRequest. # noqa: E501
|
|
74
|
+
:rtype: str
|
|
75
|
+
"""
|
|
76
|
+
return self._owner_id
|
|
77
|
+
|
|
78
|
+
@owner_id.setter
|
|
79
|
+
def owner_id(self, owner_id: 'str'):
|
|
80
|
+
"""Sets the owner_id of this V1CreateLicenseRequest.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param owner_id: The owner_id of this V1CreateLicenseRequest. # noqa: E501
|
|
84
|
+
:type: str
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._owner_id = owner_id
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def owner_type(self) -> 'V1TokenOwnerType':
|
|
91
|
+
"""Gets the owner_type of this V1CreateLicenseRequest. # noqa: E501
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:return: The owner_type of this V1CreateLicenseRequest. # noqa: E501
|
|
95
|
+
:rtype: V1TokenOwnerType
|
|
96
|
+
"""
|
|
97
|
+
return self._owner_type
|
|
98
|
+
|
|
99
|
+
@owner_type.setter
|
|
100
|
+
def owner_type(self, owner_type: 'V1TokenOwnerType'):
|
|
101
|
+
"""Sets the owner_type of this V1CreateLicenseRequest.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:param owner_type: The owner_type of this V1CreateLicenseRequest. # noqa: E501
|
|
105
|
+
:type: V1TokenOwnerType
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
self._owner_type = owner_type
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def product_id(self) -> 'str':
|
|
112
|
+
"""Gets the product_id of this V1CreateLicenseRequest. # noqa: E501
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
:return: The product_id of this V1CreateLicenseRequest. # noqa: E501
|
|
116
|
+
:rtype: str
|
|
117
|
+
"""
|
|
118
|
+
return self._product_id
|
|
119
|
+
|
|
120
|
+
@product_id.setter
|
|
121
|
+
def product_id(self, product_id: 'str'):
|
|
122
|
+
"""Sets the product_id of this V1CreateLicenseRequest.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:param product_id: The product_id of this V1CreateLicenseRequest. # noqa: E501
|
|
126
|
+
:type: str
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
self._product_id = product_id
|
|
130
|
+
|
|
131
|
+
def to_dict(self) -> dict:
|
|
132
|
+
"""Returns the model properties as a dict"""
|
|
133
|
+
result = {}
|
|
134
|
+
|
|
135
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
136
|
+
value = getattr(self, attr)
|
|
137
|
+
if isinstance(value, list):
|
|
138
|
+
result[attr] = list(map(
|
|
139
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
140
|
+
value
|
|
141
|
+
))
|
|
142
|
+
elif hasattr(value, "to_dict"):
|
|
143
|
+
result[attr] = value.to_dict()
|
|
144
|
+
elif isinstance(value, dict):
|
|
145
|
+
result[attr] = dict(map(
|
|
146
|
+
lambda item: (item[0], item[1].to_dict())
|
|
147
|
+
if hasattr(item[1], "to_dict") else item,
|
|
148
|
+
value.items()
|
|
149
|
+
))
|
|
150
|
+
else:
|
|
151
|
+
result[attr] = value
|
|
152
|
+
if issubclass(V1CreateLicenseRequest, dict):
|
|
153
|
+
for key, value in self.items():
|
|
154
|
+
result[key] = value
|
|
155
|
+
|
|
156
|
+
return result
|
|
157
|
+
|
|
158
|
+
def to_str(self) -> str:
|
|
159
|
+
"""Returns the string representation of the model"""
|
|
160
|
+
return pprint.pformat(self.to_dict())
|
|
161
|
+
|
|
162
|
+
def __repr__(self) -> str:
|
|
163
|
+
"""For `print` and `pprint`"""
|
|
164
|
+
return self.to_str()
|
|
165
|
+
|
|
166
|
+
def __eq__(self, other: 'V1CreateLicenseRequest') -> bool:
|
|
167
|
+
"""Returns true if both objects are equal"""
|
|
168
|
+
if not isinstance(other, V1CreateLicenseRequest):
|
|
169
|
+
return False
|
|
170
|
+
|
|
171
|
+
return self.__dict__ == other.__dict__
|
|
172
|
+
|
|
173
|
+
def __ne__(self, other: 'V1CreateLicenseRequest') -> bool:
|
|
174
|
+
"""Returns true if both objects are not equal"""
|
|
175
|
+
return not self == other
|
|
@@ -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 V1DeleteLicenseResponse(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
|
+
"""V1DeleteLicenseResponse - 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(V1DeleteLicenseResponse, 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: 'V1DeleteLicenseResponse') -> bool:
|
|
89
|
+
"""Returns true if both objects are equal"""
|
|
90
|
+
if not isinstance(other, V1DeleteLicenseResponse):
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
return self.__dict__ == other.__dict__
|
|
94
|
+
|
|
95
|
+
def __ne__(self, other: 'V1DeleteLicenseResponse') -> bool:
|
|
96
|
+
"""Returns true if both objects are not equal"""
|
|
97
|
+
return not self == other
|
|
@@ -55,6 +55,7 @@ class V1ExternalClusterSpec(object):
|
|
|
55
55
|
'google_cloud_v1': 'V1GoogleCloudDirectV1',
|
|
56
56
|
'kubernetes_v1': 'V1KubernetesDirectV1',
|
|
57
57
|
'lambda_labs_v1': 'V1LambdaLabsDirectV1',
|
|
58
|
+
'lightning_elastic_cluster_v1': 'V1LightningElasticClusterV1',
|
|
58
59
|
'locked_zones': 'list[str]',
|
|
59
60
|
'machine_v1': 'V1MachineDirectV1',
|
|
60
61
|
'monitor_deletion_disabled': 'bool',
|
|
@@ -89,6 +90,7 @@ class V1ExternalClusterSpec(object):
|
|
|
89
90
|
'google_cloud_v1': 'googleCloudV1',
|
|
90
91
|
'kubernetes_v1': 'kubernetesV1',
|
|
91
92
|
'lambda_labs_v1': 'lambdaLabsV1',
|
|
93
|
+
'lightning_elastic_cluster_v1': 'lightningElasticClusterV1',
|
|
92
94
|
'locked_zones': 'lockedZones',
|
|
93
95
|
'machine_v1': 'machineV1',
|
|
94
96
|
'monitor_deletion_disabled': 'monitorDeletionDisabled',
|
|
@@ -108,7 +110,7 @@ class V1ExternalClusterSpec(object):
|
|
|
108
110
|
'vultr_v1': 'vultrV1'
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
def __init__(self, ai_pod_v1: 'V1AiPodV1' =None, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, user_id: 'str' =None, voltage_park_v1: 'V1VoltageParkDirectV1' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501
|
|
113
|
+
def __init__(self, ai_pod_v1: 'V1AiPodV1' =None, auth_token: 'str' =None, available_accelerators: 'list[str]' =None, aws_v1: 'V1AWSDirectV1' =None, cloudflare_v1: 'V1CloudflareV1' =None, cluster_type: 'V1ClusterType' =None, compute_cluster_ids: 'list[str]' =None, deletion_options: 'V1ClusterDeletionOptions' =None, desired_state: 'V1ClusterState' =None, domain: 'str' =None, driver: 'V1CloudProvider' =None, google_cloud_v1: 'V1GoogleCloudDirectV1' =None, kubernetes_v1: 'V1KubernetesDirectV1' =None, lambda_labs_v1: 'V1LambdaLabsDirectV1' =None, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1' =None, locked_zones: 'list[str]' =None, machine_v1: 'V1MachineDirectV1' =None, monitor_deletion_disabled: 'bool' =None, nebius_v1: 'V1NebiusDirectV1' =None, overprovisioning: 'list[V1InstanceOverprovisioningSpec]' =None, parent_cluster_id: 'str' =None, parent_cluster_type: 'str' =None, pause_automation: 'bool' =None, reservation_details: 'V1ReservationDetails' =None, reserved_capacity_provider: 'bool' =None, reserved_instances_only: 'bool' =None, security_options: 'V1ClusterSecurityOptions' =None, slurm_v1: 'V1SlurmV1' =None, tagging_options: 'V1ClusterTaggingOptions' =None, user_id: 'str' =None, voltage_park_v1: 'V1VoltageParkDirectV1' =None, vultr_v1: 'V1VultrDirectV1' =None): # noqa: E501
|
|
112
114
|
"""V1ExternalClusterSpec - a model defined in Swagger""" # noqa: E501
|
|
113
115
|
self._ai_pod_v1 = None
|
|
114
116
|
self._auth_token = None
|
|
@@ -124,6 +126,7 @@ class V1ExternalClusterSpec(object):
|
|
|
124
126
|
self._google_cloud_v1 = None
|
|
125
127
|
self._kubernetes_v1 = None
|
|
126
128
|
self._lambda_labs_v1 = None
|
|
129
|
+
self._lightning_elastic_cluster_v1 = None
|
|
127
130
|
self._locked_zones = None
|
|
128
131
|
self._machine_v1 = None
|
|
129
132
|
self._monitor_deletion_disabled = None
|
|
@@ -170,6 +173,8 @@ class V1ExternalClusterSpec(object):
|
|
|
170
173
|
self.kubernetes_v1 = kubernetes_v1
|
|
171
174
|
if lambda_labs_v1 is not None:
|
|
172
175
|
self.lambda_labs_v1 = lambda_labs_v1
|
|
176
|
+
if lightning_elastic_cluster_v1 is not None:
|
|
177
|
+
self.lightning_elastic_cluster_v1 = lightning_elastic_cluster_v1
|
|
173
178
|
if locked_zones is not None:
|
|
174
179
|
self.locked_zones = locked_zones
|
|
175
180
|
if machine_v1 is not None:
|
|
@@ -501,6 +506,27 @@ class V1ExternalClusterSpec(object):
|
|
|
501
506
|
|
|
502
507
|
self._lambda_labs_v1 = lambda_labs_v1
|
|
503
508
|
|
|
509
|
+
@property
|
|
510
|
+
def lightning_elastic_cluster_v1(self) -> 'V1LightningElasticClusterV1':
|
|
511
|
+
"""Gets the lightning_elastic_cluster_v1 of this V1ExternalClusterSpec. # noqa: E501
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
:return: The lightning_elastic_cluster_v1 of this V1ExternalClusterSpec. # noqa: E501
|
|
515
|
+
:rtype: V1LightningElasticClusterV1
|
|
516
|
+
"""
|
|
517
|
+
return self._lightning_elastic_cluster_v1
|
|
518
|
+
|
|
519
|
+
@lightning_elastic_cluster_v1.setter
|
|
520
|
+
def lightning_elastic_cluster_v1(self, lightning_elastic_cluster_v1: 'V1LightningElasticClusterV1'):
|
|
521
|
+
"""Sets the lightning_elastic_cluster_v1 of this V1ExternalClusterSpec.
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
:param lightning_elastic_cluster_v1: The lightning_elastic_cluster_v1 of this V1ExternalClusterSpec. # noqa: E501
|
|
525
|
+
:type: V1LightningElasticClusterV1
|
|
526
|
+
"""
|
|
527
|
+
|
|
528
|
+
self._lightning_elastic_cluster_v1 = lightning_elastic_cluster_v1
|
|
529
|
+
|
|
504
530
|
@property
|
|
505
531
|
def locked_zones(self) -> 'list[str]':
|
|
506
532
|
"""Gets the locked_zones of this V1ExternalClusterSpec. # noqa: E501
|