lightning-sdk 0.2.22__py3-none-any.whl → 0.2.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/license_api.py +2 -2
- lightning_sdk/api/llm_api.py +2 -0
- lightning_sdk/api/pipeline_api.py +1 -0
- lightning_sdk/api/studio_api.py +2 -0
- lightning_sdk/cli/entrypoint.py +15 -13
- lightning_sdk/cli/start.py +5 -2
- lightning_sdk/lightning_cloud/openapi/__init__.py +8 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +206 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +97 -0
- lightning_sdk/lightning_cloud/openapi/api/pipelines_service_api.py +118 -1
- lightning_sdk/lightning_cloud/openapi/configuration.py +1 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +8 -0
- lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_visibility_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/pipelines_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_check_cluster_name_availability_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_check_cluster_name_availability_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_session.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +827 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_instance_overprovisioning_spec.py +29 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lightning_run.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_clusters_response.py +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_list_project_clusters_response.py +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_lite_published_cloud_space_response.py +513 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_shared_filesystem.py +131 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_update_cloud_space_visibility_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -79
- lightning_sdk/lightning_cloud/openapi/models/v1_volume.py +78 -104
- lightning_sdk/lightning_cloud/openapi/models/v1_volume_state.py +104 -0
- lightning_sdk/pipeline/__init__.py +11 -2
- lightning_sdk/pipeline/pipeline.py +38 -13
- lightning_sdk/pipeline/printer.py +29 -10
- lightning_sdk/pipeline/schedule.py +2 -1
- lightning_sdk/pipeline/{types.py → steps.py} +74 -56
- lightning_sdk/pipeline/utils.py +39 -2
- lightning_sdk/sandbox.py +157 -0
- lightning_sdk/services/license.py +12 -6
- lightning_sdk/studio.py +7 -1
- {lightning_sdk-0.2.22.dist-info → lightning_sdk-0.2.23.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.22.dist-info → lightning_sdk-0.2.23.dist-info}/RECORD +57 -48
- {lightning_sdk-0.2.22.dist-info → lightning_sdk-0.2.23.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.22.dist-info → lightning_sdk-0.2.23.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.22.dist-info → lightning_sdk-0.2.23.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.22.dist-info → lightning_sdk-0.2.23.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
lightning_sdk/api/license_api.py
CHANGED
|
@@ -10,8 +10,8 @@ LICENSE_CODE = os.environ.get("LICENSE_CODE", "d9s79g79ss")
|
|
|
10
10
|
LICENSE_SIGNING_URL = f"{env.LIGHTNING_CLOUD_URL}?settings=licenses"
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
def generate_url_user_settings(redirect_to: str = LICENSE_SIGNING_URL) -> str:
|
|
14
|
-
params = urlencode({"redirectTo": redirect_to, "okbhrt": LICENSE_CODE})
|
|
13
|
+
def generate_url_user_settings(name: str, redirect_to: str = LICENSE_SIGNING_URL) -> str:
|
|
14
|
+
params = urlencode({"redirectTo": redirect_to, "okbhrt": LICENSE_CODE, "licenseName": name})
|
|
15
15
|
return f"{env.LIGHTNING_CLOUD_URL}/sign-in?{params}"
|
|
16
16
|
|
|
17
17
|
|
lightning_sdk/api/llm_api.py
CHANGED
|
@@ -99,6 +99,7 @@ class LLMApi:
|
|
|
99
99
|
"stream": stream,
|
|
100
100
|
"metadata": metadata or {},
|
|
101
101
|
"internal_conversation": is_internal_conversation,
|
|
102
|
+
"system_prompt": system_prompt,
|
|
102
103
|
}
|
|
103
104
|
if images:
|
|
104
105
|
for image in images:
|
|
@@ -146,6 +147,7 @@ class LLMApi:
|
|
|
146
147
|
"stream": stream,
|
|
147
148
|
"metadata": metadata or {},
|
|
148
149
|
"internal_conversation": is_internal_conversation,
|
|
150
|
+
"system_prompt": system_prompt,
|
|
149
151
|
}
|
|
150
152
|
if images:
|
|
151
153
|
for image in images:
|
lightning_sdk/api/studio_api.py
CHANGED
|
@@ -123,6 +123,7 @@ class StudioApi:
|
|
|
123
123
|
teamspace_id: str,
|
|
124
124
|
cloud_account: Optional[str] = None,
|
|
125
125
|
source: Optional[V1CloudSpaceSourceType] = None,
|
|
126
|
+
disable_secrets: bool = False,
|
|
126
127
|
) -> V1CloudSpace:
|
|
127
128
|
"""Create a Studio with a given name in a given Teamspace on a possibly given cloud_account."""
|
|
128
129
|
body = ProjectIdCloudspacesBody(
|
|
@@ -131,6 +132,7 @@ class StudioApi:
|
|
|
131
132
|
display_name=name,
|
|
132
133
|
seed_files=[V1CloudSpaceSeedFile(path="main.py", contents="print('Hello, Lightning World!')\n")],
|
|
133
134
|
source=source,
|
|
135
|
+
disable_secrets=disable_secrets,
|
|
134
136
|
)
|
|
135
137
|
studio = self._client.cloud_space_service_create_cloud_space(body, teamspace_id)
|
|
136
138
|
|
lightning_sdk/cli/entrypoint.py
CHANGED
|
@@ -4,8 +4,9 @@ from types import TracebackType
|
|
|
4
4
|
from typing import Type
|
|
5
5
|
|
|
6
6
|
import click
|
|
7
|
-
from rich.console import Console
|
|
7
|
+
from rich.console import Console, Group
|
|
8
8
|
from rich.panel import Panel
|
|
9
|
+
from rich.syntax import Syntax
|
|
9
10
|
from rich.text import Text
|
|
10
11
|
|
|
11
12
|
from lightning_sdk import __version__
|
|
@@ -34,23 +35,24 @@ from lightning_sdk.lightning_cloud.login import Auth
|
|
|
34
35
|
|
|
35
36
|
def _notify_exception(exception_type: Type[BaseException], value: BaseException, tb: TracebackType) -> None:
|
|
36
37
|
"""CLI won't show tracebacks, just print the exception message."""
|
|
37
|
-
# if debug mode, print the traceback using rich
|
|
38
38
|
console = Console()
|
|
39
|
-
if value.args:
|
|
40
|
-
message = str(value.args[0]) if value.args[0] else str(value)
|
|
41
|
-
else:
|
|
42
|
-
message = str(value) or "An unknown error occurred"
|
|
43
39
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
message = str(value.args[0]) if value.args else str(value) or "An unknown error occurred"
|
|
41
|
+
|
|
42
|
+
error_text = Text()
|
|
43
|
+
error_text.append(f"{exception_type.__name__}: ", style="bold red")
|
|
44
|
+
error_text.append(message, style="white")
|
|
45
|
+
|
|
46
|
+
renderables = [error_text]
|
|
47
47
|
|
|
48
48
|
if _LIGHTNING_DEBUG:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
tb_text = "".join(traceback.format_exception(exception_type, value, tb))
|
|
50
|
+
renderables.append(Text("\n\nFull traceback:\n", style="bold yellow"))
|
|
51
|
+
renderables.append(Syntax(tb_text, "python", theme="monokai", line_numbers=False, word_wrap=True))
|
|
52
|
+
else:
|
|
53
|
+
renderables.append(Text("\n\nTo see the full traceback, set the LIGHTNING_DEBUG environment variable to 1."))
|
|
52
54
|
|
|
53
|
-
console.print(Panel(
|
|
55
|
+
console.print(Panel(Group(*renderables), title="⚡ Lightning CLI Error", border_style="red"))
|
|
54
56
|
|
|
55
57
|
|
|
56
58
|
@click.group(name="lightning", help="Command line interface (CLI) to interact with/manage Lightning AI Studios.")
|
lightning_sdk/cli/start.py
CHANGED
|
@@ -60,8 +60,11 @@ def studio(name: str, teamspace: Optional[str] = None, machine: str = "CPU", pro
|
|
|
60
60
|
|
|
61
61
|
try:
|
|
62
62
|
studio = Studio(name=name, teamspace=teamspace, org=owner, user=None, create_ok=False, provider=provider)
|
|
63
|
-
except (RuntimeError, ValueError, ApiException):
|
|
64
|
-
|
|
63
|
+
except (RuntimeError, ValueError, ApiException) as first_error:
|
|
64
|
+
try:
|
|
65
|
+
studio = Studio(name=name, teamspace=teamspace, org=None, user=owner, create_ok=False, provider=provider)
|
|
66
|
+
except (RuntimeError, ValueError, ApiException) as second_error:
|
|
67
|
+
raise first_error from second_error
|
|
65
68
|
|
|
66
69
|
try:
|
|
67
70
|
resolved_machine = getattr(Machine, machine.upper(), Machine(machine, machine))
|
|
@@ -89,6 +89,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cloud_space_id_versions_body i
|
|
|
89
89
|
from lightning_sdk.lightning_cloud.openapi.models.cloudspace_id_metric_body import CloudspaceIdMetricBody
|
|
90
90
|
from lightning_sdk.lightning_cloud.openapi.models.cloudspace_id_runs_body import CloudspaceIdRunsBody
|
|
91
91
|
from lightning_sdk.lightning_cloud.openapi.models.cloudspace_id_systemmetrics_body import CloudspaceIdSystemmetricsBody
|
|
92
|
+
from lightning_sdk.lightning_cloud.openapi.models.cloudspace_id_visibility_body import CloudspaceIdVisibilityBody
|
|
92
93
|
from lightning_sdk.lightning_cloud.openapi.models.cloudspaces_id_body import CloudspacesIdBody
|
|
93
94
|
from lightning_sdk.lightning_cloud.openapi.models.cluster_id_capacityblock_body import ClusterIdCapacityblockBody
|
|
94
95
|
from lightning_sdk.lightning_cloud.openapi.models.cluster_id_capacityreservations_body import ClusterIdCapacityreservationsBody
|
|
@@ -275,6 +276,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cpu_system_metrics import V
|
|
|
275
276
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cancel_cloud_space_instance_switch_response import V1CancelCloudSpaceInstanceSwitchResponse
|
|
276
277
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cancellation_metadata import V1CancellationMetadata
|
|
277
278
|
from lightning_sdk.lightning_cloud.openapi.models.v1_capacity_block_offering import V1CapacityBlockOffering
|
|
279
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_check_cluster_name_availability_request import V1CheckClusterNameAvailabilityRequest
|
|
280
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_check_cluster_name_availability_response import V1CheckClusterNameAvailabilityResponse
|
|
278
281
|
from lightning_sdk.lightning_cloud.openapi.models.v1_check_external_service_status_response import V1CheckExternalServiceStatusResponse
|
|
279
282
|
from lightning_sdk.lightning_cloud.openapi.models.v1_check_snowflake_connection_response import V1CheckSnowflakeConnectionResponse
|
|
280
283
|
from lightning_sdk.lightning_cloud.openapi.models.v1_checkbox import V1Checkbox
|
|
@@ -499,6 +502,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_execute_in_cloud_space_sess
|
|
|
499
502
|
from lightning_sdk.lightning_cloud.openapi.models.v1_execute_snowflake_query_response import V1ExecuteSnowflakeQueryResponse
|
|
500
503
|
from lightning_sdk.lightning_cloud.openapi.models.v1_experiment import V1Experiment
|
|
501
504
|
from lightning_sdk.lightning_cloud.openapi.models.v1_export_snowflake_query_response import V1ExportSnowflakeQueryResponse
|
|
505
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_external_cluster import V1ExternalCluster
|
|
506
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_external_cluster_spec import V1ExternalClusterSpec
|
|
502
507
|
from lightning_sdk.lightning_cloud.openapi.models.v1_external_search_user import V1ExternalSearchUser
|
|
503
508
|
from lightning_sdk.lightning_cloud.openapi.models.v1_file_endpoint import V1FileEndpoint
|
|
504
509
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filestore_data_connection import V1FilestoreDataConnection
|
|
@@ -719,6 +724,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_lit_page_type import V1LitP
|
|
|
719
724
|
from lightning_sdk.lightning_cloud.openapi.models.v1_lit_registry_artifact import V1LitRegistryArtifact
|
|
720
725
|
from lightning_sdk.lightning_cloud.openapi.models.v1_lit_registry_project import V1LitRegistryProject
|
|
721
726
|
from lightning_sdk.lightning_cloud.openapi.models.v1_lit_repository import V1LitRepository
|
|
727
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_lite_published_cloud_space_response import V1LitePublishedCloudSpaceResponse
|
|
722
728
|
from lightning_sdk.lightning_cloud.openapi.models.v1_locked_resource import V1LockedResource
|
|
723
729
|
from lightning_sdk.lightning_cloud.openapi.models.v1_log_page import V1LogPage
|
|
724
730
|
from lightning_sdk.lightning_cloud.openapi.models.v1_logger_artifact import V1LoggerArtifact
|
|
@@ -911,6 +917,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_agent_status_respons
|
|
|
911
917
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_billing_subscription_request import V1UpdateBillingSubscriptionRequest
|
|
912
918
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_cloud_space_collab_response import V1UpdateCloudSpaceCollabResponse
|
|
913
919
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_cloud_space_publication_response import V1UpdateCloudSpacePublicationResponse
|
|
920
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_update_cloud_space_visibility_response import V1UpdateCloudSpaceVisibilityResponse
|
|
914
921
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators_request import V1UpdateClusterAcceleratorsRequest
|
|
915
922
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_accelerators_response import V1UpdateClusterAcceleratorsResponse
|
|
916
923
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_cluster_availability_request import V1UpdateClusterAvailabilityRequest
|
|
@@ -959,6 +966,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_validate_managed_model_resp
|
|
|
959
966
|
from lightning_sdk.lightning_cloud.openapi.models.v1_verify_verification_response import V1VerifyVerificationResponse
|
|
960
967
|
from lightning_sdk.lightning_cloud.openapi.models.v1_voltage_park_direct_v1 import V1VoltageParkDirectV1
|
|
961
968
|
from lightning_sdk.lightning_cloud.openapi.models.v1_volume import V1Volume
|
|
969
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_volume_state import V1VolumeState
|
|
962
970
|
from lightning_sdk.lightning_cloud.openapi.models.v1_vultr_direct_v1 import V1VultrDirectV1
|
|
963
971
|
from lightning_sdk.lightning_cloud.openapi.models.v1_weka_data_connection import V1WekaDataConnection
|
|
964
972
|
from lightning_sdk.lightning_cloud.openapi.models.v1_work import V1Work
|
|
@@ -4785,6 +4785,99 @@ class CloudSpaceServiceApi(object):
|
|
|
4785
4785
|
_request_timeout=params.get('_request_timeout'),
|
|
4786
4786
|
collection_formats=collection_formats)
|
|
4787
4787
|
|
|
4788
|
+
def cloud_space_service_get_public_cloud_space_by_id(self, id: 'str', **kwargs) -> 'V1LitePublishedCloudSpaceResponse': # noqa: E501
|
|
4789
|
+
"""cloud_space_service_get_public_cloud_space_by_id # noqa: E501
|
|
4790
|
+
|
|
4791
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
4792
|
+
asynchronous HTTP request, please pass async_req=True
|
|
4793
|
+
>>> thread = api.cloud_space_service_get_public_cloud_space_by_id(id, async_req=True)
|
|
4794
|
+
>>> result = thread.get()
|
|
4795
|
+
|
|
4796
|
+
:param async_req bool
|
|
4797
|
+
:param str id: (required)
|
|
4798
|
+
:return: V1LitePublishedCloudSpaceResponse
|
|
4799
|
+
If the method is called asynchronously,
|
|
4800
|
+
returns the request thread.
|
|
4801
|
+
"""
|
|
4802
|
+
kwargs['_return_http_data_only'] = True
|
|
4803
|
+
if kwargs.get('async_req'):
|
|
4804
|
+
return self.cloud_space_service_get_public_cloud_space_by_id_with_http_info(id, **kwargs) # noqa: E501
|
|
4805
|
+
else:
|
|
4806
|
+
(data) = self.cloud_space_service_get_public_cloud_space_by_id_with_http_info(id, **kwargs) # noqa: E501
|
|
4807
|
+
return data
|
|
4808
|
+
|
|
4809
|
+
def cloud_space_service_get_public_cloud_space_by_id_with_http_info(self, id: 'str', **kwargs) -> 'V1LitePublishedCloudSpaceResponse': # noqa: E501
|
|
4810
|
+
"""cloud_space_service_get_public_cloud_space_by_id # noqa: E501
|
|
4811
|
+
|
|
4812
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
4813
|
+
asynchronous HTTP request, please pass async_req=True
|
|
4814
|
+
>>> thread = api.cloud_space_service_get_public_cloud_space_by_id_with_http_info(id, async_req=True)
|
|
4815
|
+
>>> result = thread.get()
|
|
4816
|
+
|
|
4817
|
+
:param async_req bool
|
|
4818
|
+
:param str id: (required)
|
|
4819
|
+
:return: V1LitePublishedCloudSpaceResponse
|
|
4820
|
+
If the method is called asynchronously,
|
|
4821
|
+
returns the request thread.
|
|
4822
|
+
"""
|
|
4823
|
+
|
|
4824
|
+
all_params = ['id'] # noqa: E501
|
|
4825
|
+
all_params.append('async_req')
|
|
4826
|
+
all_params.append('_return_http_data_only')
|
|
4827
|
+
all_params.append('_preload_content')
|
|
4828
|
+
all_params.append('_request_timeout')
|
|
4829
|
+
|
|
4830
|
+
params = locals()
|
|
4831
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
4832
|
+
if key not in all_params:
|
|
4833
|
+
raise TypeError(
|
|
4834
|
+
"Got an unexpected keyword argument '%s'"
|
|
4835
|
+
" to method cloud_space_service_get_public_cloud_space_by_id" % key
|
|
4836
|
+
)
|
|
4837
|
+
params[key] = val
|
|
4838
|
+
del params['kwargs']
|
|
4839
|
+
# verify the required parameter 'id' is set
|
|
4840
|
+
if ('id' not in params or
|
|
4841
|
+
params['id'] is None):
|
|
4842
|
+
raise ValueError("Missing the required parameter `id` when calling `cloud_space_service_get_public_cloud_space_by_id`") # noqa: E501
|
|
4843
|
+
|
|
4844
|
+
collection_formats = {}
|
|
4845
|
+
|
|
4846
|
+
path_params = {}
|
|
4847
|
+
if 'id' in params:
|
|
4848
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
4849
|
+
|
|
4850
|
+
query_params = []
|
|
4851
|
+
|
|
4852
|
+
header_params = {}
|
|
4853
|
+
|
|
4854
|
+
form_params = []
|
|
4855
|
+
local_var_files = {}
|
|
4856
|
+
|
|
4857
|
+
body_params = None
|
|
4858
|
+
# HTTP header `Accept`
|
|
4859
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
4860
|
+
['application/json']) # noqa: E501
|
|
4861
|
+
|
|
4862
|
+
# Authentication setting
|
|
4863
|
+
auth_settings = [] # noqa: E501
|
|
4864
|
+
|
|
4865
|
+
return self.api_client.call_api(
|
|
4866
|
+
'/v1/cloudspaces/public/{id}', 'GET',
|
|
4867
|
+
path_params,
|
|
4868
|
+
query_params,
|
|
4869
|
+
header_params,
|
|
4870
|
+
body=body_params,
|
|
4871
|
+
post_params=form_params,
|
|
4872
|
+
files=local_var_files,
|
|
4873
|
+
response_type='V1LitePublishedCloudSpaceResponse', # noqa: E501
|
|
4874
|
+
auth_settings=auth_settings,
|
|
4875
|
+
async_req=params.get('async_req'),
|
|
4876
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
4877
|
+
_preload_content=params.get('_preload_content', True),
|
|
4878
|
+
_request_timeout=params.get('_request_timeout'),
|
|
4879
|
+
collection_formats=collection_formats)
|
|
4880
|
+
|
|
4788
4881
|
def cloud_space_service_install_plugin(self, project_id: 'str', id: 'str', plugin_id: 'str', **kwargs) -> 'V1Plugin': # noqa: E501
|
|
4789
4882
|
"""cloud_space_service_install_plugin # noqa: E501
|
|
4790
4883
|
|
|
@@ -8979,3 +9072,116 @@ class CloudSpaceServiceApi(object):
|
|
|
8979
9072
|
_preload_content=params.get('_preload_content', True),
|
|
8980
9073
|
_request_timeout=params.get('_request_timeout'),
|
|
8981
9074
|
collection_formats=collection_formats)
|
|
9075
|
+
|
|
9076
|
+
def cloud_space_service_update_cloud_space_visibility(self, body: 'CloudspaceIdVisibilityBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1UpdateCloudSpaceVisibilityResponse': # noqa: E501
|
|
9077
|
+
"""UpdateJobVisibility updates the jobs visibility, mainly switch between public and private # noqa: E501
|
|
9078
|
+
|
|
9079
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
9080
|
+
asynchronous HTTP request, please pass async_req=True
|
|
9081
|
+
>>> thread = api.cloud_space_service_update_cloud_space_visibility(body, project_id, cloudspace_id, async_req=True)
|
|
9082
|
+
>>> result = thread.get()
|
|
9083
|
+
|
|
9084
|
+
:param async_req bool
|
|
9085
|
+
:param CloudspaceIdVisibilityBody body: (required)
|
|
9086
|
+
:param str project_id: (required)
|
|
9087
|
+
:param str cloudspace_id: (required)
|
|
9088
|
+
:return: V1UpdateCloudSpaceVisibilityResponse
|
|
9089
|
+
If the method is called asynchronously,
|
|
9090
|
+
returns the request thread.
|
|
9091
|
+
"""
|
|
9092
|
+
kwargs['_return_http_data_only'] = True
|
|
9093
|
+
if kwargs.get('async_req'):
|
|
9094
|
+
return self.cloud_space_service_update_cloud_space_visibility_with_http_info(body, project_id, cloudspace_id, **kwargs) # noqa: E501
|
|
9095
|
+
else:
|
|
9096
|
+
(data) = self.cloud_space_service_update_cloud_space_visibility_with_http_info(body, project_id, cloudspace_id, **kwargs) # noqa: E501
|
|
9097
|
+
return data
|
|
9098
|
+
|
|
9099
|
+
def cloud_space_service_update_cloud_space_visibility_with_http_info(self, body: 'CloudspaceIdVisibilityBody', project_id: 'str', cloudspace_id: 'str', **kwargs) -> 'V1UpdateCloudSpaceVisibilityResponse': # noqa: E501
|
|
9100
|
+
"""UpdateJobVisibility updates the jobs visibility, mainly switch between public and private # noqa: E501
|
|
9101
|
+
|
|
9102
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
9103
|
+
asynchronous HTTP request, please pass async_req=True
|
|
9104
|
+
>>> thread = api.cloud_space_service_update_cloud_space_visibility_with_http_info(body, project_id, cloudspace_id, async_req=True)
|
|
9105
|
+
>>> result = thread.get()
|
|
9106
|
+
|
|
9107
|
+
:param async_req bool
|
|
9108
|
+
:param CloudspaceIdVisibilityBody body: (required)
|
|
9109
|
+
:param str project_id: (required)
|
|
9110
|
+
:param str cloudspace_id: (required)
|
|
9111
|
+
:return: V1UpdateCloudSpaceVisibilityResponse
|
|
9112
|
+
If the method is called asynchronously,
|
|
9113
|
+
returns the request thread.
|
|
9114
|
+
"""
|
|
9115
|
+
|
|
9116
|
+
all_params = ['body', 'project_id', 'cloudspace_id'] # noqa: E501
|
|
9117
|
+
all_params.append('async_req')
|
|
9118
|
+
all_params.append('_return_http_data_only')
|
|
9119
|
+
all_params.append('_preload_content')
|
|
9120
|
+
all_params.append('_request_timeout')
|
|
9121
|
+
|
|
9122
|
+
params = locals()
|
|
9123
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
9124
|
+
if key not in all_params:
|
|
9125
|
+
raise TypeError(
|
|
9126
|
+
"Got an unexpected keyword argument '%s'"
|
|
9127
|
+
" to method cloud_space_service_update_cloud_space_visibility" % key
|
|
9128
|
+
)
|
|
9129
|
+
params[key] = val
|
|
9130
|
+
del params['kwargs']
|
|
9131
|
+
# verify the required parameter 'body' is set
|
|
9132
|
+
if ('body' not in params or
|
|
9133
|
+
params['body'] is None):
|
|
9134
|
+
raise ValueError("Missing the required parameter `body` when calling `cloud_space_service_update_cloud_space_visibility`") # noqa: E501
|
|
9135
|
+
# verify the required parameter 'project_id' is set
|
|
9136
|
+
if ('project_id' not in params or
|
|
9137
|
+
params['project_id'] is None):
|
|
9138
|
+
raise ValueError("Missing the required parameter `project_id` when calling `cloud_space_service_update_cloud_space_visibility`") # noqa: E501
|
|
9139
|
+
# verify the required parameter 'cloudspace_id' is set
|
|
9140
|
+
if ('cloudspace_id' not in params or
|
|
9141
|
+
params['cloudspace_id'] is None):
|
|
9142
|
+
raise ValueError("Missing the required parameter `cloudspace_id` when calling `cloud_space_service_update_cloud_space_visibility`") # noqa: E501
|
|
9143
|
+
|
|
9144
|
+
collection_formats = {}
|
|
9145
|
+
|
|
9146
|
+
path_params = {}
|
|
9147
|
+
if 'project_id' in params:
|
|
9148
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
9149
|
+
if 'cloudspace_id' in params:
|
|
9150
|
+
path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501
|
|
9151
|
+
|
|
9152
|
+
query_params = []
|
|
9153
|
+
|
|
9154
|
+
header_params = {}
|
|
9155
|
+
|
|
9156
|
+
form_params = []
|
|
9157
|
+
local_var_files = {}
|
|
9158
|
+
|
|
9159
|
+
body_params = None
|
|
9160
|
+
if 'body' in params:
|
|
9161
|
+
body_params = params['body']
|
|
9162
|
+
# HTTP header `Accept`
|
|
9163
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
9164
|
+
['application/json']) # noqa: E501
|
|
9165
|
+
|
|
9166
|
+
# HTTP header `Content-Type`
|
|
9167
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
9168
|
+
['application/json']) # noqa: E501
|
|
9169
|
+
|
|
9170
|
+
# Authentication setting
|
|
9171
|
+
auth_settings = [] # noqa: E501
|
|
9172
|
+
|
|
9173
|
+
return self.api_client.call_api(
|
|
9174
|
+
'/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/visibility', 'PUT',
|
|
9175
|
+
path_params,
|
|
9176
|
+
query_params,
|
|
9177
|
+
header_params,
|
|
9178
|
+
body=body_params,
|
|
9179
|
+
post_params=form_params,
|
|
9180
|
+
files=local_var_files,
|
|
9181
|
+
response_type='V1UpdateCloudSpaceVisibilityResponse', # noqa: E501
|
|
9182
|
+
auth_settings=auth_settings,
|
|
9183
|
+
async_req=params.get('async_req'),
|
|
9184
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
9185
|
+
_preload_content=params.get('_preload_content', True),
|
|
9186
|
+
_request_timeout=params.get('_request_timeout'),
|
|
9187
|
+
collection_formats=collection_formats)
|
|
@@ -43,6 +43,103 @@ class ClusterServiceApi(object):
|
|
|
43
43
|
api_client = ApiClient()
|
|
44
44
|
self.api_client = api_client
|
|
45
45
|
|
|
46
|
+
def cluster_service_check_cluster_name_availability(self, body: 'V1CheckClusterNameAvailabilityRequest', **kwargs) -> 'V1CheckClusterNameAvailabilityResponse': # noqa: E501
|
|
47
|
+
"""cluster_service_check_cluster_name_availability # noqa: E501
|
|
48
|
+
|
|
49
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
50
|
+
asynchronous HTTP request, please pass async_req=True
|
|
51
|
+
>>> thread = api.cluster_service_check_cluster_name_availability(body, async_req=True)
|
|
52
|
+
>>> result = thread.get()
|
|
53
|
+
|
|
54
|
+
:param async_req bool
|
|
55
|
+
:param V1CheckClusterNameAvailabilityRequest body: (required)
|
|
56
|
+
:return: V1CheckClusterNameAvailabilityResponse
|
|
57
|
+
If the method is called asynchronously,
|
|
58
|
+
returns the request thread.
|
|
59
|
+
"""
|
|
60
|
+
kwargs['_return_http_data_only'] = True
|
|
61
|
+
if kwargs.get('async_req'):
|
|
62
|
+
return self.cluster_service_check_cluster_name_availability_with_http_info(body, **kwargs) # noqa: E501
|
|
63
|
+
else:
|
|
64
|
+
(data) = self.cluster_service_check_cluster_name_availability_with_http_info(body, **kwargs) # noqa: E501
|
|
65
|
+
return data
|
|
66
|
+
|
|
67
|
+
def cluster_service_check_cluster_name_availability_with_http_info(self, body: 'V1CheckClusterNameAvailabilityRequest', **kwargs) -> 'V1CheckClusterNameAvailabilityResponse': # noqa: E501
|
|
68
|
+
"""cluster_service_check_cluster_name_availability # noqa: E501
|
|
69
|
+
|
|
70
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
71
|
+
asynchronous HTTP request, please pass async_req=True
|
|
72
|
+
>>> thread = api.cluster_service_check_cluster_name_availability_with_http_info(body, async_req=True)
|
|
73
|
+
>>> result = thread.get()
|
|
74
|
+
|
|
75
|
+
:param async_req bool
|
|
76
|
+
:param V1CheckClusterNameAvailabilityRequest body: (required)
|
|
77
|
+
:return: V1CheckClusterNameAvailabilityResponse
|
|
78
|
+
If the method is called asynchronously,
|
|
79
|
+
returns the request thread.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
all_params = ['body'] # noqa: E501
|
|
83
|
+
all_params.append('async_req')
|
|
84
|
+
all_params.append('_return_http_data_only')
|
|
85
|
+
all_params.append('_preload_content')
|
|
86
|
+
all_params.append('_request_timeout')
|
|
87
|
+
|
|
88
|
+
params = locals()
|
|
89
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
90
|
+
if key not in all_params:
|
|
91
|
+
raise TypeError(
|
|
92
|
+
"Got an unexpected keyword argument '%s'"
|
|
93
|
+
" to method cluster_service_check_cluster_name_availability" % key
|
|
94
|
+
)
|
|
95
|
+
params[key] = val
|
|
96
|
+
del params['kwargs']
|
|
97
|
+
# verify the required parameter 'body' is set
|
|
98
|
+
if ('body' not in params or
|
|
99
|
+
params['body'] is None):
|
|
100
|
+
raise ValueError("Missing the required parameter `body` when calling `cluster_service_check_cluster_name_availability`") # noqa: E501
|
|
101
|
+
|
|
102
|
+
collection_formats = {}
|
|
103
|
+
|
|
104
|
+
path_params = {}
|
|
105
|
+
|
|
106
|
+
query_params = []
|
|
107
|
+
|
|
108
|
+
header_params = {}
|
|
109
|
+
|
|
110
|
+
form_params = []
|
|
111
|
+
local_var_files = {}
|
|
112
|
+
|
|
113
|
+
body_params = None
|
|
114
|
+
if 'body' in params:
|
|
115
|
+
body_params = params['body']
|
|
116
|
+
# HTTP header `Accept`
|
|
117
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
118
|
+
['application/json']) # noqa: E501
|
|
119
|
+
|
|
120
|
+
# HTTP header `Content-Type`
|
|
121
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
122
|
+
['application/json']) # noqa: E501
|
|
123
|
+
|
|
124
|
+
# Authentication setting
|
|
125
|
+
auth_settings = [] # noqa: E501
|
|
126
|
+
|
|
127
|
+
return self.api_client.call_api(
|
|
128
|
+
'/v1/core/cluster-name-available', 'POST',
|
|
129
|
+
path_params,
|
|
130
|
+
query_params,
|
|
131
|
+
header_params,
|
|
132
|
+
body=body_params,
|
|
133
|
+
post_params=form_params,
|
|
134
|
+
files=local_var_files,
|
|
135
|
+
response_type='V1CheckClusterNameAvailabilityResponse', # noqa: E501
|
|
136
|
+
auth_settings=auth_settings,
|
|
137
|
+
async_req=params.get('async_req'),
|
|
138
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
139
|
+
_preload_content=params.get('_preload_content', True),
|
|
140
|
+
_request_timeout=params.get('_request_timeout'),
|
|
141
|
+
collection_formats=collection_formats)
|
|
142
|
+
|
|
46
143
|
def cluster_service_create_cluster(self, body: 'V1CreateClusterRequest', **kwargs) -> 'V1CreateClusterResponse': # noqa: E501
|
|
47
144
|
"""TODO: delete all non-project related endpoints # noqa: E501
|
|
48
145
|
|
|
@@ -43,6 +43,119 @@ class PipelinesServiceApi(object):
|
|
|
43
43
|
api_client = ApiClient()
|
|
44
44
|
self.api_client = api_client
|
|
45
45
|
|
|
46
|
+
def pipelines_service_create_child_pipeline(self, body: 'object', project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
|
|
47
|
+
"""pipelines_service_create_child_pipeline # noqa: E501
|
|
48
|
+
|
|
49
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
50
|
+
asynchronous HTTP request, please pass async_req=True
|
|
51
|
+
>>> thread = api.pipelines_service_create_child_pipeline(body, project_id, id, async_req=True)
|
|
52
|
+
>>> result = thread.get()
|
|
53
|
+
|
|
54
|
+
:param async_req bool
|
|
55
|
+
:param object body: (required)
|
|
56
|
+
:param str project_id: (required)
|
|
57
|
+
:param str id: (required)
|
|
58
|
+
:return: V1Pipeline
|
|
59
|
+
If the method is called asynchronously,
|
|
60
|
+
returns the request thread.
|
|
61
|
+
"""
|
|
62
|
+
kwargs['_return_http_data_only'] = True
|
|
63
|
+
if kwargs.get('async_req'):
|
|
64
|
+
return self.pipelines_service_create_child_pipeline_with_http_info(body, project_id, id, **kwargs) # noqa: E501
|
|
65
|
+
else:
|
|
66
|
+
(data) = self.pipelines_service_create_child_pipeline_with_http_info(body, project_id, id, **kwargs) # noqa: E501
|
|
67
|
+
return data
|
|
68
|
+
|
|
69
|
+
def pipelines_service_create_child_pipeline_with_http_info(self, body: 'object', project_id: 'str', id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
|
|
70
|
+
"""pipelines_service_create_child_pipeline # noqa: E501
|
|
71
|
+
|
|
72
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
73
|
+
asynchronous HTTP request, please pass async_req=True
|
|
74
|
+
>>> thread = api.pipelines_service_create_child_pipeline_with_http_info(body, project_id, id, async_req=True)
|
|
75
|
+
>>> result = thread.get()
|
|
76
|
+
|
|
77
|
+
:param async_req bool
|
|
78
|
+
:param object body: (required)
|
|
79
|
+
:param str project_id: (required)
|
|
80
|
+
:param str id: (required)
|
|
81
|
+
:return: V1Pipeline
|
|
82
|
+
If the method is called asynchronously,
|
|
83
|
+
returns the request thread.
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
all_params = ['body', 'project_id', 'id'] # noqa: E501
|
|
87
|
+
all_params.append('async_req')
|
|
88
|
+
all_params.append('_return_http_data_only')
|
|
89
|
+
all_params.append('_preload_content')
|
|
90
|
+
all_params.append('_request_timeout')
|
|
91
|
+
|
|
92
|
+
params = locals()
|
|
93
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
94
|
+
if key not in all_params:
|
|
95
|
+
raise TypeError(
|
|
96
|
+
"Got an unexpected keyword argument '%s'"
|
|
97
|
+
" to method pipelines_service_create_child_pipeline" % key
|
|
98
|
+
)
|
|
99
|
+
params[key] = val
|
|
100
|
+
del params['kwargs']
|
|
101
|
+
# verify the required parameter 'body' is set
|
|
102
|
+
if ('body' not in params or
|
|
103
|
+
params['body'] is None):
|
|
104
|
+
raise ValueError("Missing the required parameter `body` when calling `pipelines_service_create_child_pipeline`") # noqa: E501
|
|
105
|
+
# verify the required parameter 'project_id' is set
|
|
106
|
+
if ('project_id' not in params or
|
|
107
|
+
params['project_id'] is None):
|
|
108
|
+
raise ValueError("Missing the required parameter `project_id` when calling `pipelines_service_create_child_pipeline`") # noqa: E501
|
|
109
|
+
# verify the required parameter 'id' is set
|
|
110
|
+
if ('id' not in params or
|
|
111
|
+
params['id'] is None):
|
|
112
|
+
raise ValueError("Missing the required parameter `id` when calling `pipelines_service_create_child_pipeline`") # noqa: E501
|
|
113
|
+
|
|
114
|
+
collection_formats = {}
|
|
115
|
+
|
|
116
|
+
path_params = {}
|
|
117
|
+
if 'project_id' in params:
|
|
118
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
119
|
+
if 'id' in params:
|
|
120
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
121
|
+
|
|
122
|
+
query_params = []
|
|
123
|
+
|
|
124
|
+
header_params = {}
|
|
125
|
+
|
|
126
|
+
form_params = []
|
|
127
|
+
local_var_files = {}
|
|
128
|
+
|
|
129
|
+
body_params = None
|
|
130
|
+
if 'body' in params:
|
|
131
|
+
body_params = params['body']
|
|
132
|
+
# HTTP header `Accept`
|
|
133
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
134
|
+
['application/json']) # noqa: E501
|
|
135
|
+
|
|
136
|
+
# HTTP header `Content-Type`
|
|
137
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
138
|
+
['application/json']) # noqa: E501
|
|
139
|
+
|
|
140
|
+
# Authentication setting
|
|
141
|
+
auth_settings = [] # noqa: E501
|
|
142
|
+
|
|
143
|
+
return self.api_client.call_api(
|
|
144
|
+
'/v1/projects/{projectId}/pipelines/{id}', 'POST',
|
|
145
|
+
path_params,
|
|
146
|
+
query_params,
|
|
147
|
+
header_params,
|
|
148
|
+
body=body_params,
|
|
149
|
+
post_params=form_params,
|
|
150
|
+
files=local_var_files,
|
|
151
|
+
response_type='V1Pipeline', # noqa: E501
|
|
152
|
+
auth_settings=auth_settings,
|
|
153
|
+
async_req=params.get('async_req'),
|
|
154
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
155
|
+
_preload_content=params.get('_preload_content', True),
|
|
156
|
+
_request_timeout=params.get('_request_timeout'),
|
|
157
|
+
collection_formats=collection_formats)
|
|
158
|
+
|
|
46
159
|
def pipelines_service_create_pipeline(self, body: 'ProjectIdPipelinesBody', project_id: 'str', **kwargs) -> 'V1Pipeline': # noqa: E501
|
|
47
160
|
"""pipelines_service_create_pipeline # noqa: E501
|
|
48
161
|
|
|
@@ -462,6 +575,7 @@ class PipelinesServiceApi(object):
|
|
|
462
575
|
:param async_req bool
|
|
463
576
|
:param str project_id: (required)
|
|
464
577
|
:param str parent_pipeline_id:
|
|
578
|
+
:param str original_pipeline_id:
|
|
465
579
|
:param str page_token:
|
|
466
580
|
:param int limit:
|
|
467
581
|
:param str state:
|
|
@@ -488,6 +602,7 @@ class PipelinesServiceApi(object):
|
|
|
488
602
|
:param async_req bool
|
|
489
603
|
:param str project_id: (required)
|
|
490
604
|
:param str parent_pipeline_id:
|
|
605
|
+
:param str original_pipeline_id:
|
|
491
606
|
:param str page_token:
|
|
492
607
|
:param int limit:
|
|
493
608
|
:param str state:
|
|
@@ -497,7 +612,7 @@ class PipelinesServiceApi(object):
|
|
|
497
612
|
returns the request thread.
|
|
498
613
|
"""
|
|
499
614
|
|
|
500
|
-
all_params = ['project_id', 'parent_pipeline_id', 'page_token', 'limit', 'state', 'standalone'] # noqa: E501
|
|
615
|
+
all_params = ['project_id', 'parent_pipeline_id', 'original_pipeline_id', 'page_token', 'limit', 'state', 'standalone'] # noqa: E501
|
|
501
616
|
all_params.append('async_req')
|
|
502
617
|
all_params.append('_return_http_data_only')
|
|
503
618
|
all_params.append('_preload_content')
|
|
@@ -526,6 +641,8 @@ class PipelinesServiceApi(object):
|
|
|
526
641
|
query_params = []
|
|
527
642
|
if 'parent_pipeline_id' in params:
|
|
528
643
|
query_params.append(('parentPipelineId', params['parent_pipeline_id'])) # noqa: E501
|
|
644
|
+
if 'original_pipeline_id' in params:
|
|
645
|
+
query_params.append(('originalPipelineId', params['original_pipeline_id'])) # noqa: E501
|
|
529
646
|
if 'page_token' in params:
|
|
530
647
|
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
531
648
|
if 'limit' in params:
|
|
@@ -70,7 +70,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
|
|
|
70
70
|
self.password = ""
|
|
71
71
|
# Logging Settings
|
|
72
72
|
self.logger = {}
|
|
73
|
-
self.logger["package_logger"] = logging.getLogger("
|
|
73
|
+
self.logger["package_logger"] = logging.getLogger("lightning_cloud.openapi")
|
|
74
74
|
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
|
|
75
75
|
# Log format
|
|
76
76
|
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
|