lightning-sdk 2025.10.22__py3-none-any.whl → 2025.10.23__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/job_api.py +4 -1
- lightning_sdk/cli/entrypoint.py +3 -0
- lightning_sdk/cli/groups.py +7 -0
- lightning_sdk/cli/license/__init__.py +14 -0
- lightning_sdk/cli/license/get.py +15 -0
- lightning_sdk/cli/license/list.py +45 -0
- lightning_sdk/cli/license/set.py +13 -0
- lightning_sdk/cli/studio/create.py +1 -1
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +1 -3
- lightning_sdk/job/base.py +7 -0
- lightning_sdk/job/job.py +8 -0
- lightning_sdk/job/v1.py +3 -0
- lightning_sdk/job/v2.py +4 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +6 -0
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +182 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +117 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +6 -0
- lightning_sdk/lightning_cloud/openapi/models/update1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_metric.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_platform_notifications_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_platform_notification.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_request.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +105 -131
- lightning_sdk/machine.py +3 -0
- lightning_sdk/pipeline/steps.py +1 -0
- lightning_sdk/studio.py +41 -11
- lightning_sdk/utils/config.py +18 -3
- lightning_sdk/utils/resolve.py +6 -1
- {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/RECORD +39 -29
- {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
lightning_sdk/api/job_api.py
CHANGED
|
@@ -250,6 +250,7 @@ class JobApiV2:
|
|
|
250
250
|
artifacts_local: Optional[str], # deprecated in favor of path_mappings
|
|
251
251
|
artifacts_remote: Optional[str], # deprecated in favor of path_mappings
|
|
252
252
|
max_runtime: Optional[int] = None,
|
|
253
|
+
reuse_snapshot: bool = True,
|
|
253
254
|
) -> V1Job:
|
|
254
255
|
body = self._create_job_body(
|
|
255
256
|
name=name,
|
|
@@ -267,6 +268,7 @@ class JobApiV2:
|
|
|
267
268
|
artifacts_local=artifacts_local,
|
|
268
269
|
artifacts_remote=artifacts_remote,
|
|
269
270
|
max_runtime=max_runtime,
|
|
271
|
+
reuse_snapshot=reuse_snapshot,
|
|
270
272
|
)
|
|
271
273
|
|
|
272
274
|
job: V1Job = self._client.jobs_service_create_job(project_id=teamspace_id, body=body)
|
|
@@ -288,6 +290,7 @@ class JobApiV2:
|
|
|
288
290
|
path_mappings: Optional[Dict[str, str]],
|
|
289
291
|
artifacts_local: Optional[str], # deprecated in favor of path_mappings
|
|
290
292
|
artifacts_remote: Optional[str], # deprecated in favor of path_mappings)
|
|
293
|
+
reuse_snapshot: bool,
|
|
291
294
|
max_runtime: Optional[int] = None,
|
|
292
295
|
machine_image_version: Optional[str] = None,
|
|
293
296
|
) -> ProjectIdJobsBody:
|
|
@@ -298,7 +301,7 @@ class JobApiV2:
|
|
|
298
301
|
|
|
299
302
|
instance_name = _machine_to_compute_name(machine)
|
|
300
303
|
|
|
301
|
-
run_id = __GLOBAL_LIGHTNING_UNIQUE_IDS_STORE__[studio_id] if studio_id is not None else ""
|
|
304
|
+
run_id = __GLOBAL_LIGHTNING_UNIQUE_IDS_STORE__[studio_id] if (studio_id is not None and reuse_snapshot) else ""
|
|
302
305
|
|
|
303
306
|
path_mappings_list = resolve_path_mappings(
|
|
304
307
|
mappings=path_mappings or {},
|
lightning_sdk/cli/entrypoint.py
CHANGED
|
@@ -13,6 +13,7 @@ from lightning_sdk.cli.groups import (
|
|
|
13
13
|
base_studio,
|
|
14
14
|
config,
|
|
15
15
|
# job,
|
|
16
|
+
license,
|
|
16
17
|
# mmt,
|
|
17
18
|
studio,
|
|
18
19
|
vm,
|
|
@@ -61,6 +62,8 @@ main_cli.add_command(config)
|
|
|
61
62
|
main_cli.add_command(studio)
|
|
62
63
|
main_cli.add_command(vm)
|
|
63
64
|
main_cli.add_command(base_studio)
|
|
65
|
+
main_cli.add_command(license)
|
|
66
|
+
|
|
64
67
|
if os.environ.get("LIGHTNING_EXPERIMENTAL_CLI_ONLY", "0") != "1":
|
|
65
68
|
#### LEGACY COMMANDS ####
|
|
66
69
|
# these commands are currently supported for backwards compatibility, but will potentially be removed in the future.
|
lightning_sdk/cli/groups.py
CHANGED
|
@@ -5,6 +5,7 @@ import click
|
|
|
5
5
|
from lightning_sdk.cli.base_studio import register_commands as register_base_studio_commands
|
|
6
6
|
from lightning_sdk.cli.config import register_commands as register_config_commands
|
|
7
7
|
from lightning_sdk.cli.job import register_commands as register_job_commands
|
|
8
|
+
from lightning_sdk.cli.license import register_commands as register_license_commands
|
|
8
9
|
from lightning_sdk.cli.mmt import register_commands as register_mmt_commands
|
|
9
10
|
from lightning_sdk.cli.studio import register_commands as register_studio_commands
|
|
10
11
|
from lightning_sdk.cli.vm import register_commands as register_vm_commands
|
|
@@ -40,6 +41,11 @@ def base_studio() -> None:
|
|
|
40
41
|
"""Manage Lightning AI Base Studios."""
|
|
41
42
|
|
|
42
43
|
|
|
44
|
+
@click.group(name="license")
|
|
45
|
+
def license() -> None: # noqa: A001
|
|
46
|
+
"""Manage Lightning AI Product Licenses."""
|
|
47
|
+
|
|
48
|
+
|
|
43
49
|
# Register config commands with the main config group
|
|
44
50
|
register_job_commands(job)
|
|
45
51
|
register_mmt_commands(mmt)
|
|
@@ -47,3 +53,4 @@ register_studio_commands(studio)
|
|
|
47
53
|
register_config_commands(config)
|
|
48
54
|
register_vm_commands(vm)
|
|
49
55
|
register_base_studio_commands(base_studio)
|
|
56
|
+
register_license_commands(license)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Base Studio CLI commands."""
|
|
2
|
+
|
|
3
|
+
import click
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def register_commands(group: click.Group) -> None:
|
|
7
|
+
"""Register base studio commands with the given group."""
|
|
8
|
+
from lightning_sdk.cli.license.get import get_license
|
|
9
|
+
from lightning_sdk.cli.license.list import list_licenses
|
|
10
|
+
from lightning_sdk.cli.license.set import set_license
|
|
11
|
+
|
|
12
|
+
group.add_command(list_licenses)
|
|
13
|
+
group.add_command(get_license)
|
|
14
|
+
group.add_command(set_license)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
from lightning_sdk.utils.config import _DEFAULT_CONFIG_FILE_PATH, Config, DefaultConfigKeys
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@click.command("get")
|
|
7
|
+
@click.argument("product_name")
|
|
8
|
+
@click.option("--config-file", help="Path to the config file")
|
|
9
|
+
def get_license(product_name: str, config_file: str = _DEFAULT_CONFIG_FILE_PATH) -> None:
|
|
10
|
+
"""Get a license key for a given product."""
|
|
11
|
+
cfg = Config(config_file)
|
|
12
|
+
license_key = cfg.get(f"{DefaultConfigKeys.license}.{product_name}")
|
|
13
|
+
if license_key:
|
|
14
|
+
# echo the license key without any additional output to make parsing simpler
|
|
15
|
+
click.echo(license_key)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""License list command."""
|
|
2
|
+
|
|
3
|
+
from typing import Mapping
|
|
4
|
+
|
|
5
|
+
import click
|
|
6
|
+
from rich.table import Table
|
|
7
|
+
|
|
8
|
+
from lightning_sdk.cli.utils.richt_print import rich_to_str
|
|
9
|
+
from lightning_sdk.utils.config import _DEFAULT_CONFIG_FILE_PATH, Config, DefaultConfigKeys
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@click.command("list")
|
|
13
|
+
@click.option("--include-key", help="Print the key as well", is_flag=True)
|
|
14
|
+
@click.option("--config-file", help="Path to the config file")
|
|
15
|
+
def list_licenses(include_key: bool, config_file: str = _DEFAULT_CONFIG_FILE_PATH) -> None:
|
|
16
|
+
"""List configured licenses.
|
|
17
|
+
|
|
18
|
+
Example:
|
|
19
|
+
lightning license list --include-key
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
return list_impl(include_key=include_key, config_path=config_file)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def list_impl(include_key: bool, config_path: str) -> None:
|
|
26
|
+
cfg = Config(config_file=config_path)
|
|
27
|
+
|
|
28
|
+
license_cfg = cfg.get_sub_config(DefaultConfigKeys.license)
|
|
29
|
+
|
|
30
|
+
if isinstance(license_cfg, Mapping):
|
|
31
|
+
table = Table(
|
|
32
|
+
pad_edge=True,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
table.add_column("Product")
|
|
36
|
+
table.add_column("License Key")
|
|
37
|
+
|
|
38
|
+
# sort by product_name
|
|
39
|
+
for product_name, license_key in sorted(license_cfg.items(), key=lambda x: x[0]):
|
|
40
|
+
table.add_row(product_name, license_key if include_key else "********")
|
|
41
|
+
|
|
42
|
+
click.echo(rich_to_str(table), color=True)
|
|
43
|
+
|
|
44
|
+
else:
|
|
45
|
+
click.echo("No licenses configured!")
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
from lightning_sdk.utils.config import _DEFAULT_CONFIG_FILE_PATH, Config, DefaultConfigKeys
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@click.command("set")
|
|
7
|
+
@click.argument("product_name")
|
|
8
|
+
@click.argument("license_key")
|
|
9
|
+
@click.option("--config-file", help="Path to the config file")
|
|
10
|
+
def set_license(product_name: str, license_key: str, config_file: str = _DEFAULT_CONFIG_FILE_PATH) -> None:
|
|
11
|
+
"""Set a license key for a given product."""
|
|
12
|
+
cfg = Config(config_file)
|
|
13
|
+
cfg.set(f"{DefaultConfigKeys.license}.{product_name}", license_key)
|
lightning_sdk/job/base.py
CHANGED
|
@@ -90,6 +90,7 @@ class _BaseJob(ABC):
|
|
|
90
90
|
path_mappings: Optional[Dict[str, str]] = None,
|
|
91
91
|
max_runtime: Optional[int] = None,
|
|
92
92
|
cluster: Optional[str] = None, # deprecated in favor of cloud_account
|
|
93
|
+
reuse_snapshot: bool = True,
|
|
93
94
|
) -> "_BaseJob":
|
|
94
95
|
"""Run async workloads using a docker image or a compute environment from your studio.
|
|
95
96
|
|
|
@@ -134,6 +135,8 @@ class _BaseJob(ABC):
|
|
|
134
135
|
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
135
136
|
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
136
137
|
Defaults to 3h
|
|
138
|
+
reuse_snapshot: Whether the job should reuse a Studio snapshot when multiple jobs for the same Studio are
|
|
139
|
+
submitted. Turning this off may result in longer job startup times. Defaults to True.
|
|
137
140
|
"""
|
|
138
141
|
from lightning_sdk.lightning_cloud.openapi.rest import ApiException
|
|
139
142
|
from lightning_sdk.studio import Studio
|
|
@@ -231,6 +234,7 @@ class _BaseJob(ABC):
|
|
|
231
234
|
entrypoint=entrypoint,
|
|
232
235
|
path_mappings=path_mappings,
|
|
233
236
|
max_runtime=max_runtime,
|
|
237
|
+
reuse_snapshot=reuse_snapshot,
|
|
234
238
|
)
|
|
235
239
|
|
|
236
240
|
@abstractmethod
|
|
@@ -251,6 +255,7 @@ class _BaseJob(ABC):
|
|
|
251
255
|
entrypoint: str = "sh -c",
|
|
252
256
|
path_mappings: Optional[Dict[str, str]] = None,
|
|
253
257
|
max_runtime: Optional[int] = None,
|
|
258
|
+
reuse_snapshot: bool = True,
|
|
254
259
|
) -> "_BaseJob":
|
|
255
260
|
"""Submit a new job to the Lightning AI platform.
|
|
256
261
|
|
|
@@ -290,6 +295,8 @@ class _BaseJob(ABC):
|
|
|
290
295
|
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
291
296
|
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
292
297
|
Defaults to 3h
|
|
298
|
+
reuse_snapshot: Whether the job should reuse a Studio snapshot when multiple jobs for the same Studio are
|
|
299
|
+
submitted. Turning this off may result in longer job startup times. Defaults to True.
|
|
293
300
|
"""
|
|
294
301
|
|
|
295
302
|
@abstractmethod
|
lightning_sdk/job/job.py
CHANGED
|
@@ -97,6 +97,7 @@ class Job(_BaseJob):
|
|
|
97
97
|
artifacts_local: Optional[str] = None, # deprecated in terms of path_mappings
|
|
98
98
|
artifacts_remote: Optional[str] = None, # deprecated in terms of path_mappings
|
|
99
99
|
cluster: Optional[str] = None, # deprecated in favor of cloud_account
|
|
100
|
+
reuse_snapshot: bool = True,
|
|
100
101
|
) -> "Job":
|
|
101
102
|
"""Run async workloads using a docker image or a compute environment from your studio.
|
|
102
103
|
|
|
@@ -140,6 +141,8 @@ class Job(_BaseJob):
|
|
|
140
141
|
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
141
142
|
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
142
143
|
Defaults to 3h
|
|
144
|
+
reuse_snapshot: Whether the job should reuse a Studio snapshot when multiple jobs for the same Studio are
|
|
145
|
+
submitted. Turning this off may result in longer job startup times. Defaults to True.
|
|
143
146
|
"""
|
|
144
147
|
ret_val = super().run(
|
|
145
148
|
name=name,
|
|
@@ -162,6 +165,7 @@ class Job(_BaseJob):
|
|
|
162
165
|
path_mappings=path_mappings,
|
|
163
166
|
max_runtime=max_runtime,
|
|
164
167
|
cluster=cluster,
|
|
168
|
+
reuse_snapshot=reuse_snapshot,
|
|
165
169
|
)
|
|
166
170
|
# required for typing with "Job"
|
|
167
171
|
assert isinstance(ret_val, cls)
|
|
@@ -186,6 +190,7 @@ class Job(_BaseJob):
|
|
|
186
190
|
artifacts_local: Optional[str] = None, # deprecated in terms of path_mappings
|
|
187
191
|
artifacts_remote: Optional[str] = None, # deprecated in terms of path_mappings
|
|
188
192
|
max_runtime: Optional[int] = None,
|
|
193
|
+
reuse_snapshot: bool = True,
|
|
189
194
|
) -> "Job":
|
|
190
195
|
"""Submit a new job to the Lightning AI platform.
|
|
191
196
|
|
|
@@ -224,6 +229,8 @@ class Job(_BaseJob):
|
|
|
224
229
|
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
225
230
|
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
226
231
|
Defaults to 3h
|
|
232
|
+
reuse_snapshot: Whether the job should reuse a Studio snapshot when multiple jobs for the same Studio are
|
|
233
|
+
submitted. Turning this off may result in longer job startup times. Defaults to True.
|
|
227
234
|
"""
|
|
228
235
|
self._job = self._internal_job._submit(
|
|
229
236
|
machine=machine,
|
|
@@ -241,6 +248,7 @@ class Job(_BaseJob):
|
|
|
241
248
|
artifacts_local=artifacts_local,
|
|
242
249
|
artifacts_remote=artifacts_remote,
|
|
243
250
|
max_runtime=max_runtime,
|
|
251
|
+
reuse_snapshot=reuse_snapshot,
|
|
244
252
|
)
|
|
245
253
|
return self
|
|
246
254
|
|
lightning_sdk/job/v1.py
CHANGED
|
@@ -54,6 +54,7 @@ class _JobV1(_BaseJob):
|
|
|
54
54
|
cloud_provider: Optional[str] = None,
|
|
55
55
|
interruptible: bool = False,
|
|
56
56
|
cluster: Optional[str] = None, # deprecated in favor of cloud_account
|
|
57
|
+
reuse_snapshot: bool = True,
|
|
57
58
|
) -> "_BaseJob":
|
|
58
59
|
"""Start a new async workload from your studio.
|
|
59
60
|
|
|
@@ -89,6 +90,7 @@ class _JobV1(_BaseJob):
|
|
|
89
90
|
cluster=cluster,
|
|
90
91
|
path_mappings=None,
|
|
91
92
|
max_runtime=None,
|
|
93
|
+
reuse_snapshot=reuse_snapshot,
|
|
92
94
|
)
|
|
93
95
|
|
|
94
96
|
def _submit(
|
|
@@ -108,6 +110,7 @@ class _JobV1(_BaseJob):
|
|
|
108
110
|
entrypoint: str = "sh -c",
|
|
109
111
|
path_mappings: Optional[Dict[str, str]] = None,
|
|
110
112
|
max_runtime: Optional[int] = None,
|
|
113
|
+
reuse_snapshot: bool = True,
|
|
111
114
|
) -> "_JobV1":
|
|
112
115
|
"""Submit a job to run on a machine.
|
|
113
116
|
|
lightning_sdk/job/v2.py
CHANGED
|
@@ -53,6 +53,7 @@ class _JobV2(_BaseJob):
|
|
|
53
53
|
max_runtime: Optional[int] = None,
|
|
54
54
|
artifacts_local: Optional[str] = None, # deprecated in favor of path_mappings
|
|
55
55
|
artifacts_remote: Optional[str] = None, # deprecated in favor of path_mappings
|
|
56
|
+
reuse_snapshot: bool = True,
|
|
56
57
|
) -> "_JobV2":
|
|
57
58
|
"""Submit a new job to the Lightning AI platform.
|
|
58
59
|
|
|
@@ -87,6 +88,8 @@ class _JobV2(_BaseJob):
|
|
|
87
88
|
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
88
89
|
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
89
90
|
Defaults to 3h
|
|
91
|
+
reuse_snapshot: Whether the job should reuse a Studio snapshot when multiple jobs for the same Studio are
|
|
92
|
+
submitted. Turning this off may result in longer job startup times. Defaults to True.
|
|
90
93
|
"""
|
|
91
94
|
# Command is required if Studio is provided to know what to run
|
|
92
95
|
# Image is mutually exclusive with Studio
|
|
@@ -129,6 +132,7 @@ class _JobV2(_BaseJob):
|
|
|
129
132
|
entrypoint=entrypoint,
|
|
130
133
|
path_mappings=path_mappings,
|
|
131
134
|
max_runtime=max_runtime,
|
|
135
|
+
reuse_snapshot=reuse_snapshot,
|
|
132
136
|
)
|
|
133
137
|
self._job = submitted
|
|
134
138
|
self._name = submitted.name
|
|
@@ -549,6 +549,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_cloud_space impo
|
|
|
549
549
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_dataset import V1FilesystemDataset
|
|
550
550
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_job import V1FilesystemJob
|
|
551
551
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_mmt import V1FilesystemMMT
|
|
552
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_metric import V1FilesystemMetric
|
|
552
553
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_metrics import V1FilesystemMetrics
|
|
553
554
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_slurm_job import V1FilesystemSlurmJob
|
|
554
555
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_snowflake_connection import V1FilesystemSnowflakeConnection
|
|
@@ -735,6 +736,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_cloud_space
|
|
|
735
736
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_datasets_response import V1ListFilesystemDatasetsResponse
|
|
736
737
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_jobs_response import V1ListFilesystemJobsResponse
|
|
737
738
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_mm_ts_response import V1ListFilesystemMMTsResponse
|
|
739
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_metrics_response import V1ListFilesystemMetricsResponse
|
|
738
740
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_slurm_jobs_response import V1ListFilesystemSlurmJobsResponse
|
|
739
741
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_snowflake_response import V1ListFilesystemSnowflakeResponse
|
|
740
742
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_gallery_components_response import V1ListGalleryComponentsResponse
|
|
@@ -780,6 +782,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_org_roles_response imp
|
|
|
780
782
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_organization_cluster_encryption_keys_response import V1ListOrganizationClusterEncryptionKeysResponse
|
|
781
783
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_organizations_response import V1ListOrganizationsResponse
|
|
782
784
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_pipelines_response import V1ListPipelinesResponse
|
|
785
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_list_platform_notifications_response import V1ListPlatformNotificationsResponse
|
|
783
786
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_pod_metrics_response import V1ListPodMetricsResponse
|
|
784
787
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_profiler_captures_response import V1ListProfilerCapturesResponse
|
|
785
788
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_project_artifacts_response import V1ListProjectArtifactsResponse
|
|
@@ -887,6 +890,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_pipeline_step_status import
|
|
|
887
890
|
from lightning_sdk.lightning_cloud.openapi.models.v1_pipeline_step_type import V1PipelineStepType
|
|
888
891
|
from lightning_sdk.lightning_cloud.openapi.models.v1_pipeline_template import V1PipelineTemplate
|
|
889
892
|
from lightning_sdk.lightning_cloud.openapi.models.v1_pipeline_template_visibility_type import V1PipelineTemplateVisibilityType
|
|
893
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_platform_notification import V1PlatformNotification
|
|
890
894
|
from lightning_sdk.lightning_cloud.openapi.models.v1_plugin import V1Plugin
|
|
891
895
|
from lightning_sdk.lightning_cloud.openapi.models.v1_plugins_list_response import V1PluginsListResponse
|
|
892
896
|
from lightning_sdk.lightning_cloud.openapi.models.v1_pod_metrics import V1PodMetrics
|
|
@@ -941,6 +945,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_request_cluster_access_resp
|
|
|
941
945
|
from lightning_sdk.lightning_cloud.openapi.models.v1_request_verification_code_response import V1RequestVerificationCodeResponse
|
|
942
946
|
from lightning_sdk.lightning_cloud.openapi.models.v1_required_balance_reason import V1RequiredBalanceReason
|
|
943
947
|
from lightning_sdk.lightning_cloud.openapi.models.v1_reservation_details import V1ReservationDetails
|
|
948
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_reset_api_key_request import V1ResetAPIKeyRequest
|
|
949
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_reset_api_key_response import V1ResetAPIKeyResponse
|
|
944
950
|
from lightning_sdk.lightning_cloud.openapi.models.v1_resource_tag import V1ResourceTag
|
|
945
951
|
from lightning_sdk.lightning_cloud.openapi.models.v1_resource_visibility import V1ResourceVisibility
|
|
946
952
|
from lightning_sdk.lightning_cloud.openapi.models.v1_resources import V1Resources
|
|
@@ -310,6 +310,91 @@ class AuthServiceApi(object):
|
|
|
310
310
|
_request_timeout=params.get('_request_timeout'),
|
|
311
311
|
collection_formats=collection_formats)
|
|
312
312
|
|
|
313
|
+
def auth_service_list_platform_notifications(self, **kwargs) -> 'V1ListPlatformNotificationsResponse': # noqa: E501
|
|
314
|
+
"""auth_service_list_platform_notifications # noqa: E501
|
|
315
|
+
|
|
316
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
317
|
+
asynchronous HTTP request, please pass async_req=True
|
|
318
|
+
>>> thread = api.auth_service_list_platform_notifications(async_req=True)
|
|
319
|
+
>>> result = thread.get()
|
|
320
|
+
|
|
321
|
+
:param async_req bool
|
|
322
|
+
:return: V1ListPlatformNotificationsResponse
|
|
323
|
+
If the method is called asynchronously,
|
|
324
|
+
returns the request thread.
|
|
325
|
+
"""
|
|
326
|
+
kwargs['_return_http_data_only'] = True
|
|
327
|
+
if kwargs.get('async_req'):
|
|
328
|
+
return self.auth_service_list_platform_notifications_with_http_info(**kwargs) # noqa: E501
|
|
329
|
+
else:
|
|
330
|
+
(data) = self.auth_service_list_platform_notifications_with_http_info(**kwargs) # noqa: E501
|
|
331
|
+
return data
|
|
332
|
+
|
|
333
|
+
def auth_service_list_platform_notifications_with_http_info(self, **kwargs) -> 'V1ListPlatformNotificationsResponse': # noqa: E501
|
|
334
|
+
"""auth_service_list_platform_notifications # noqa: E501
|
|
335
|
+
|
|
336
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
337
|
+
asynchronous HTTP request, please pass async_req=True
|
|
338
|
+
>>> thread = api.auth_service_list_platform_notifications_with_http_info(async_req=True)
|
|
339
|
+
>>> result = thread.get()
|
|
340
|
+
|
|
341
|
+
:param async_req bool
|
|
342
|
+
:return: V1ListPlatformNotificationsResponse
|
|
343
|
+
If the method is called asynchronously,
|
|
344
|
+
returns the request thread.
|
|
345
|
+
"""
|
|
346
|
+
|
|
347
|
+
all_params = [] # noqa: E501
|
|
348
|
+
all_params.append('async_req')
|
|
349
|
+
all_params.append('_return_http_data_only')
|
|
350
|
+
all_params.append('_preload_content')
|
|
351
|
+
all_params.append('_request_timeout')
|
|
352
|
+
|
|
353
|
+
params = locals()
|
|
354
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
355
|
+
if key not in all_params:
|
|
356
|
+
raise TypeError(
|
|
357
|
+
"Got an unexpected keyword argument '%s'"
|
|
358
|
+
" to method auth_service_list_platform_notifications" % key
|
|
359
|
+
)
|
|
360
|
+
params[key] = val
|
|
361
|
+
del params['kwargs']
|
|
362
|
+
|
|
363
|
+
collection_formats = {}
|
|
364
|
+
|
|
365
|
+
path_params = {}
|
|
366
|
+
|
|
367
|
+
query_params = []
|
|
368
|
+
|
|
369
|
+
header_params = {}
|
|
370
|
+
|
|
371
|
+
form_params = []
|
|
372
|
+
local_var_files = {}
|
|
373
|
+
|
|
374
|
+
body_params = None
|
|
375
|
+
# HTTP header `Accept`
|
|
376
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
377
|
+
['application/json']) # noqa: E501
|
|
378
|
+
|
|
379
|
+
# Authentication setting
|
|
380
|
+
auth_settings = [] # noqa: E501
|
|
381
|
+
|
|
382
|
+
return self.api_client.call_api(
|
|
383
|
+
'/v1/platform-notifications', 'GET',
|
|
384
|
+
path_params,
|
|
385
|
+
query_params,
|
|
386
|
+
header_params,
|
|
387
|
+
body=body_params,
|
|
388
|
+
post_params=form_params,
|
|
389
|
+
files=local_var_files,
|
|
390
|
+
response_type='V1ListPlatformNotificationsResponse', # noqa: E501
|
|
391
|
+
auth_settings=auth_settings,
|
|
392
|
+
async_req=params.get('async_req'),
|
|
393
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
394
|
+
_preload_content=params.get('_preload_content', True),
|
|
395
|
+
_request_timeout=params.get('_request_timeout'),
|
|
396
|
+
collection_formats=collection_formats)
|
|
397
|
+
|
|
313
398
|
def auth_service_login(self, body: 'V1LoginRequest', **kwargs) -> 'V1LoginResponse': # noqa: E501
|
|
314
399
|
"""auth_service_login # noqa: E501
|
|
315
400
|
|
|
@@ -698,6 +783,103 @@ class AuthServiceApi(object):
|
|
|
698
783
|
_request_timeout=params.get('_request_timeout'),
|
|
699
784
|
collection_formats=collection_formats)
|
|
700
785
|
|
|
786
|
+
def auth_service_reset_api_key(self, body: 'V1ResetAPIKeyRequest', **kwargs) -> 'V1ResetAPIKeyResponse': # noqa: E501
|
|
787
|
+
"""ResetAPIKey generates a new API key for the user # noqa: E501
|
|
788
|
+
|
|
789
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
790
|
+
asynchronous HTTP request, please pass async_req=True
|
|
791
|
+
>>> thread = api.auth_service_reset_api_key(body, async_req=True)
|
|
792
|
+
>>> result = thread.get()
|
|
793
|
+
|
|
794
|
+
:param async_req bool
|
|
795
|
+
:param V1ResetAPIKeyRequest body: (required)
|
|
796
|
+
:return: V1ResetAPIKeyResponse
|
|
797
|
+
If the method is called asynchronously,
|
|
798
|
+
returns the request thread.
|
|
799
|
+
"""
|
|
800
|
+
kwargs['_return_http_data_only'] = True
|
|
801
|
+
if kwargs.get('async_req'):
|
|
802
|
+
return self.auth_service_reset_api_key_with_http_info(body, **kwargs) # noqa: E501
|
|
803
|
+
else:
|
|
804
|
+
(data) = self.auth_service_reset_api_key_with_http_info(body, **kwargs) # noqa: E501
|
|
805
|
+
return data
|
|
806
|
+
|
|
807
|
+
def auth_service_reset_api_key_with_http_info(self, body: 'V1ResetAPIKeyRequest', **kwargs) -> 'V1ResetAPIKeyResponse': # noqa: E501
|
|
808
|
+
"""ResetAPIKey generates a new API key for the user # noqa: E501
|
|
809
|
+
|
|
810
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
811
|
+
asynchronous HTTP request, please pass async_req=True
|
|
812
|
+
>>> thread = api.auth_service_reset_api_key_with_http_info(body, async_req=True)
|
|
813
|
+
>>> result = thread.get()
|
|
814
|
+
|
|
815
|
+
:param async_req bool
|
|
816
|
+
:param V1ResetAPIKeyRequest body: (required)
|
|
817
|
+
:return: V1ResetAPIKeyResponse
|
|
818
|
+
If the method is called asynchronously,
|
|
819
|
+
returns the request thread.
|
|
820
|
+
"""
|
|
821
|
+
|
|
822
|
+
all_params = ['body'] # noqa: E501
|
|
823
|
+
all_params.append('async_req')
|
|
824
|
+
all_params.append('_return_http_data_only')
|
|
825
|
+
all_params.append('_preload_content')
|
|
826
|
+
all_params.append('_request_timeout')
|
|
827
|
+
|
|
828
|
+
params = locals()
|
|
829
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
830
|
+
if key not in all_params:
|
|
831
|
+
raise TypeError(
|
|
832
|
+
"Got an unexpected keyword argument '%s'"
|
|
833
|
+
" to method auth_service_reset_api_key" % key
|
|
834
|
+
)
|
|
835
|
+
params[key] = val
|
|
836
|
+
del params['kwargs']
|
|
837
|
+
# verify the required parameter 'body' is set
|
|
838
|
+
if ('body' not in params or
|
|
839
|
+
params['body'] is None):
|
|
840
|
+
raise ValueError("Missing the required parameter `body` when calling `auth_service_reset_api_key`") # noqa: E501
|
|
841
|
+
|
|
842
|
+
collection_formats = {}
|
|
843
|
+
|
|
844
|
+
path_params = {}
|
|
845
|
+
|
|
846
|
+
query_params = []
|
|
847
|
+
|
|
848
|
+
header_params = {}
|
|
849
|
+
|
|
850
|
+
form_params = []
|
|
851
|
+
local_var_files = {}
|
|
852
|
+
|
|
853
|
+
body_params = None
|
|
854
|
+
if 'body' in params:
|
|
855
|
+
body_params = params['body']
|
|
856
|
+
# HTTP header `Accept`
|
|
857
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
858
|
+
['application/json']) # noqa: E501
|
|
859
|
+
|
|
860
|
+
# HTTP header `Content-Type`
|
|
861
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
862
|
+
['application/json']) # noqa: E501
|
|
863
|
+
|
|
864
|
+
# Authentication setting
|
|
865
|
+
auth_settings = [] # noqa: E501
|
|
866
|
+
|
|
867
|
+
return self.api_client.call_api(
|
|
868
|
+
'/v1/auth/reset-api-key', 'PUT',
|
|
869
|
+
path_params,
|
|
870
|
+
query_params,
|
|
871
|
+
header_params,
|
|
872
|
+
body=body_params,
|
|
873
|
+
post_params=form_params,
|
|
874
|
+
files=local_var_files,
|
|
875
|
+
response_type='V1ResetAPIKeyResponse', # noqa: E501
|
|
876
|
+
auth_settings=auth_settings,
|
|
877
|
+
async_req=params.get('async_req'),
|
|
878
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
879
|
+
_preload_content=params.get('_preload_content', True),
|
|
880
|
+
_request_timeout=params.get('_request_timeout'),
|
|
881
|
+
collection_formats=collection_formats)
|
|
882
|
+
|
|
701
883
|
def auth_service_token_login(self, body: 'V1TokenLoginRequest', **kwargs) -> 'V1TokenLoginResponse': # noqa: E501
|
|
702
884
|
"""auth_service_token_login # noqa: E501
|
|
703
885
|
|