lightning-sdk 2025.12.17__py3-none-any.whl → 2026.1.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/__version__.py +1 -1
- lightning_sdk/api/k8s_api.py +75 -29
- lightning_sdk/api/studio_api.py +195 -33
- lightning_sdk/api/teamspace_api.py +28 -9
- lightning_sdk/cli/cp/__init__.py +64 -0
- lightning_sdk/cli/entrypoint.py +2 -0
- lightning_sdk/cli/groups.py +22 -0
- lightning_sdk/cli/legacy/clusters_menu.py +2 -2
- lightning_sdk/cli/legacy/deploy/_auth.py +7 -6
- lightning_sdk/cli/legacy/run.py +13 -2
- lightning_sdk/cli/studio/__init__.py +4 -0
- lightning_sdk/cli/studio/cp.py +20 -64
- lightning_sdk/cli/studio/ls.py +57 -0
- lightning_sdk/cli/studio/rm.py +71 -0
- lightning_sdk/cli/utils/logging.py +2 -1
- lightning_sdk/cli/utils/studio_filesystem.py +65 -0
- lightning_sdk/cli/utils/teamspace_selection.py +5 -0
- lightning_sdk/exceptions.py +4 -0
- lightning_sdk/job/base.py +1 -1
- lightning_sdk/k8s_cluster.py +9 -10
- lightning_sdk/lightning_cloud/__version__.py +1 -1
- lightning_sdk/lightning_cloud/openapi/__init__.py +29 -11
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -1
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +113 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +268 -123
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +246 -19
- lightning_sdk/lightning_cloud/openapi/api/lightningwork_service_api.py +116 -11
- lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +588 -2
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +9 -1
- lightning_sdk/lightning_cloud/openapi/api/{kubernetes_virtual_machine_service_api.py → virtual_machine_service_api.py} +82 -82
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +28 -10
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_cluster_capacity_reservation_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_machine_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_org_cluster_capacity_reservation_body.py +409 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_report_machine_system_metrics_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/lit_logger_service_create_lit_logger_media_body.py +305 -0
- lightning_sdk/lightning_cloud/openapi/models/lit_logger_service_update_lit_logger_media_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/lit_logger_service_update_metrics_stream_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_capacity_reservation_used_by.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +53 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_type.py +0 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_lit_logger_media_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_org_cluster_capacity_reservation_response.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/{v1_ai_pod_v1.py → v1_cudo_direct_v1.py} +51 -51
- lightning_sdk/lightning_cloud/openapi/models/{v1_delete_kubernetes_virtual_machine_response.py → v1_delete_lit_logger_media_response.py} +6 -6
- lightning_sdk/lightning_cloud/openapi/models/{kubernetes_virtual_machine_service_update_kubernetes_virtual_machine_body.py → v1_delete_virtual_machine_response.py} +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_kubernetes_pod_logs_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_get_machine_response.py → v1_get_kubernetes_pod_response.py} +23 -23
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_joinable_organization.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_setting.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_type.py +108 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_settings_v1.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_pod.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_pod_logs_page.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubevirt_config.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_pods_response.py +43 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_pods_sort_order.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_logger_media_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_models_response.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_kubernetes_virtual_machines_response.py → v1_list_virtual_machines_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_logger_media.py +513 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +27 -53
- lightning_sdk/lightning_cloud/openapi/models/v1_machine_direct_v1.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_media_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_nebius_direct_v1.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_idle_state_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_report_machine_system_metrics_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_tenant_credentials.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +157 -131
- lightning_sdk/lightning_cloud/openapi/models/{v1_kubernetes_virtual_machine.py → v1_virtual_machine.py} +94 -68
- lightning_sdk/lightning_cloud/openapi/models/{v1_kubevirt_vm_configuration.py → v1_vm_configuration.py} +20 -20
- lightning_sdk/lightning_cloud/openapi/models/{v1_kubevirt_provider_configuration.py → v1_vm_provider_configuration.py} +32 -32
- lightning_sdk/lightning_cloud/openapi/models/virtual_machine_service_create_virtual_machine_body.py +565 -0
- lightning_sdk/lightning_cloud/openapi/models/virtual_machine_service_update_virtual_machine_body.py +97 -0
- lightning_sdk/lightning_cloud/rest_client.py +0 -2
- lightning_sdk/machine.py +3 -3
- lightning_sdk/studio.py +14 -4
- lightning_sdk/utils/logging.py +2 -1
- {lightning_sdk-2025.12.17.dist-info → lightning_sdk-2026.1.22.dist-info}/METADATA +1 -5
- {lightning_sdk-2025.12.17.dist-info → lightning_sdk-2026.1.22.dist-info}/RECORD +95 -75
- {lightning_sdk-2025.12.17.dist-info → lightning_sdk-2026.1.22.dist-info}/WHEEL +1 -1
- lightning_sdk/lightning_cloud/cli/__main__.py +0 -29
- lightning_sdk/lightning_cloud/openapi/models/kubernetes_virtual_machine_service_create_kubernetes_virtual_machine_body.py +0 -513
- lightning_sdk/lightning_cloud/openapi/models/v1_kubevirt_vm_resources.py +0 -201
- lightning_sdk/lightning_cloud/source_code/logs_socket_api.py +0 -103
- {lightning_sdk-2025.12.17.dist-info → lightning_sdk-2026.1.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.12.17.dist-info → lightning_sdk-2026.1.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.12.17.dist-info → lightning_sdk-2026.1.22.dist-info}/top_level.txt +0 -0
|
@@ -343,7 +343,7 @@ class ClusterServiceApi(object):
|
|
|
343
343
|
collection_formats=collection_formats)
|
|
344
344
|
|
|
345
345
|
def cluster_service_create_cluster_capacity_reservation(self, body: 'ClusterServiceCreateClusterCapacityReservationBody', project_id: 'str', cluster_id: 'str', **kwargs) -> 'V1CreateClusterCapacityReservationResponse': # noqa: E501
|
|
346
|
-
"""
|
|
346
|
+
"""capacity reservation # noqa: E501
|
|
347
347
|
|
|
348
348
|
This method makes a synchronous HTTP request by default. To make an
|
|
349
349
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -366,7 +366,7 @@ class ClusterServiceApi(object):
|
|
|
366
366
|
return data
|
|
367
367
|
|
|
368
368
|
def cluster_service_create_cluster_capacity_reservation_with_http_info(self, body: 'ClusterServiceCreateClusterCapacityReservationBody', project_id: 'str', cluster_id: 'str', **kwargs) -> 'V1CreateClusterCapacityReservationResponse': # noqa: E501
|
|
369
|
-
"""
|
|
369
|
+
"""capacity reservation # noqa: E501
|
|
370
370
|
|
|
371
371
|
This method makes a synchronous HTTP request by default. To make an
|
|
372
372
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -867,6 +867,119 @@ class ClusterServiceApi(object):
|
|
|
867
867
|
_request_timeout=params.get('_request_timeout'),
|
|
868
868
|
collection_formats=collection_formats)
|
|
869
869
|
|
|
870
|
+
def cluster_service_create_org_cluster_capacity_reservation(self, body: 'ClusterServiceCreateOrgClusterCapacityReservationBody', org_id: 'str', cluster_id: 'str', **kwargs) -> 'V1CreateOrgClusterCapacityReservationResponse': # noqa: E501
|
|
871
|
+
"""cluster_service_create_org_cluster_capacity_reservation # noqa: E501
|
|
872
|
+
|
|
873
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
874
|
+
asynchronous HTTP request, please pass async_req=True
|
|
875
|
+
>>> thread = api.cluster_service_create_org_cluster_capacity_reservation(body, org_id, cluster_id, async_req=True)
|
|
876
|
+
>>> result = thread.get()
|
|
877
|
+
|
|
878
|
+
:param async_req bool
|
|
879
|
+
:param ClusterServiceCreateOrgClusterCapacityReservationBody body: (required)
|
|
880
|
+
:param str org_id: (required)
|
|
881
|
+
:param str cluster_id: (required)
|
|
882
|
+
:return: V1CreateOrgClusterCapacityReservationResponse
|
|
883
|
+
If the method is called asynchronously,
|
|
884
|
+
returns the request thread.
|
|
885
|
+
"""
|
|
886
|
+
kwargs['_return_http_data_only'] = True
|
|
887
|
+
if kwargs.get('async_req'):
|
|
888
|
+
return self.cluster_service_create_org_cluster_capacity_reservation_with_http_info(body, org_id, cluster_id, **kwargs) # noqa: E501
|
|
889
|
+
else:
|
|
890
|
+
(data) = self.cluster_service_create_org_cluster_capacity_reservation_with_http_info(body, org_id, cluster_id, **kwargs) # noqa: E501
|
|
891
|
+
return data
|
|
892
|
+
|
|
893
|
+
def cluster_service_create_org_cluster_capacity_reservation_with_http_info(self, body: 'ClusterServiceCreateOrgClusterCapacityReservationBody', org_id: 'str', cluster_id: 'str', **kwargs) -> 'V1CreateOrgClusterCapacityReservationResponse': # noqa: E501
|
|
894
|
+
"""cluster_service_create_org_cluster_capacity_reservation # noqa: E501
|
|
895
|
+
|
|
896
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
897
|
+
asynchronous HTTP request, please pass async_req=True
|
|
898
|
+
>>> thread = api.cluster_service_create_org_cluster_capacity_reservation_with_http_info(body, org_id, cluster_id, async_req=True)
|
|
899
|
+
>>> result = thread.get()
|
|
900
|
+
|
|
901
|
+
:param async_req bool
|
|
902
|
+
:param ClusterServiceCreateOrgClusterCapacityReservationBody body: (required)
|
|
903
|
+
:param str org_id: (required)
|
|
904
|
+
:param str cluster_id: (required)
|
|
905
|
+
:return: V1CreateOrgClusterCapacityReservationResponse
|
|
906
|
+
If the method is called asynchronously,
|
|
907
|
+
returns the request thread.
|
|
908
|
+
"""
|
|
909
|
+
|
|
910
|
+
all_params = ['body', 'org_id', 'cluster_id'] # noqa: E501
|
|
911
|
+
all_params.append('async_req')
|
|
912
|
+
all_params.append('_return_http_data_only')
|
|
913
|
+
all_params.append('_preload_content')
|
|
914
|
+
all_params.append('_request_timeout')
|
|
915
|
+
|
|
916
|
+
params = locals()
|
|
917
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
918
|
+
if key not in all_params:
|
|
919
|
+
raise TypeError(
|
|
920
|
+
"Got an unexpected keyword argument '%s'"
|
|
921
|
+
" to method cluster_service_create_org_cluster_capacity_reservation" % key
|
|
922
|
+
)
|
|
923
|
+
params[key] = val
|
|
924
|
+
del params['kwargs']
|
|
925
|
+
# verify the required parameter 'body' is set
|
|
926
|
+
if ('body' not in params or
|
|
927
|
+
params['body'] is None):
|
|
928
|
+
raise ValueError("Missing the required parameter `body` when calling `cluster_service_create_org_cluster_capacity_reservation`") # noqa: E501
|
|
929
|
+
# verify the required parameter 'org_id' is set
|
|
930
|
+
if ('org_id' not in params or
|
|
931
|
+
params['org_id'] is None):
|
|
932
|
+
raise ValueError("Missing the required parameter `org_id` when calling `cluster_service_create_org_cluster_capacity_reservation`") # noqa: E501
|
|
933
|
+
# verify the required parameter 'cluster_id' is set
|
|
934
|
+
if ('cluster_id' not in params or
|
|
935
|
+
params['cluster_id'] is None):
|
|
936
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_create_org_cluster_capacity_reservation`") # noqa: E501
|
|
937
|
+
|
|
938
|
+
collection_formats = {}
|
|
939
|
+
|
|
940
|
+
path_params = {}
|
|
941
|
+
if 'org_id' in params:
|
|
942
|
+
path_params['orgId'] = params['org_id'] # noqa: E501
|
|
943
|
+
if 'cluster_id' in params:
|
|
944
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
945
|
+
|
|
946
|
+
query_params = []
|
|
947
|
+
|
|
948
|
+
header_params = {}
|
|
949
|
+
|
|
950
|
+
form_params = []
|
|
951
|
+
local_var_files = {}
|
|
952
|
+
|
|
953
|
+
body_params = None
|
|
954
|
+
if 'body' in params:
|
|
955
|
+
body_params = params['body']
|
|
956
|
+
# HTTP header `Accept`
|
|
957
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
958
|
+
['application/json']) # noqa: E501
|
|
959
|
+
|
|
960
|
+
# HTTP header `Content-Type`
|
|
961
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
962
|
+
['application/json']) # noqa: E501
|
|
963
|
+
|
|
964
|
+
# Authentication setting
|
|
965
|
+
auth_settings = [] # noqa: E501
|
|
966
|
+
|
|
967
|
+
return self.api_client.call_api(
|
|
968
|
+
'/v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations', 'POST',
|
|
969
|
+
path_params,
|
|
970
|
+
query_params,
|
|
971
|
+
header_params,
|
|
972
|
+
body=body_params,
|
|
973
|
+
post_params=form_params,
|
|
974
|
+
files=local_var_files,
|
|
975
|
+
response_type='V1CreateOrgClusterCapacityReservationResponse', # noqa: E501
|
|
976
|
+
auth_settings=auth_settings,
|
|
977
|
+
async_req=params.get('async_req'),
|
|
978
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
979
|
+
_preload_content=params.get('_preload_content', True),
|
|
980
|
+
_request_timeout=params.get('_request_timeout'),
|
|
981
|
+
collection_formats=collection_formats)
|
|
982
|
+
|
|
870
983
|
def cluster_service_create_project_cluster(self, body: 'ClusterServiceCreateProjectClusterBody', project_id: 'str', **kwargs) -> 'Externalv1Cluster': # noqa: E501
|
|
871
984
|
"""cluster_service_create_project_cluster # noqa: E501
|
|
872
985
|
|
|
@@ -2527,111 +2640,6 @@ class ClusterServiceApi(object):
|
|
|
2527
2640
|
_request_timeout=params.get('_request_timeout'),
|
|
2528
2641
|
collection_formats=collection_formats)
|
|
2529
2642
|
|
|
2530
|
-
def cluster_service_get_machine(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetMachineResponse': # noqa: E501
|
|
2531
|
-
"""Get a machine by ID # noqa: E501
|
|
2532
|
-
|
|
2533
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
2534
|
-
asynchronous HTTP request, please pass async_req=True
|
|
2535
|
-
>>> thread = api.cluster_service_get_machine(cluster_id, id, async_req=True)
|
|
2536
|
-
>>> result = thread.get()
|
|
2537
|
-
|
|
2538
|
-
:param async_req bool
|
|
2539
|
-
:param str cluster_id: (required)
|
|
2540
|
-
:param str id: (required)
|
|
2541
|
-
:param str org_id:
|
|
2542
|
-
:return: V1GetMachineResponse
|
|
2543
|
-
If the method is called asynchronously,
|
|
2544
|
-
returns the request thread.
|
|
2545
|
-
"""
|
|
2546
|
-
kwargs['_return_http_data_only'] = True
|
|
2547
|
-
if kwargs.get('async_req'):
|
|
2548
|
-
return self.cluster_service_get_machine_with_http_info(cluster_id, id, **kwargs) # noqa: E501
|
|
2549
|
-
else:
|
|
2550
|
-
(data) = self.cluster_service_get_machine_with_http_info(cluster_id, id, **kwargs) # noqa: E501
|
|
2551
|
-
return data
|
|
2552
|
-
|
|
2553
|
-
def cluster_service_get_machine_with_http_info(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetMachineResponse': # noqa: E501
|
|
2554
|
-
"""Get a machine by ID # noqa: E501
|
|
2555
|
-
|
|
2556
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
2557
|
-
asynchronous HTTP request, please pass async_req=True
|
|
2558
|
-
>>> thread = api.cluster_service_get_machine_with_http_info(cluster_id, id, async_req=True)
|
|
2559
|
-
>>> result = thread.get()
|
|
2560
|
-
|
|
2561
|
-
:param async_req bool
|
|
2562
|
-
:param str cluster_id: (required)
|
|
2563
|
-
:param str id: (required)
|
|
2564
|
-
:param str org_id:
|
|
2565
|
-
:return: V1GetMachineResponse
|
|
2566
|
-
If the method is called asynchronously,
|
|
2567
|
-
returns the request thread.
|
|
2568
|
-
"""
|
|
2569
|
-
|
|
2570
|
-
all_params = ['cluster_id', 'id', 'org_id'] # noqa: E501
|
|
2571
|
-
all_params.append('async_req')
|
|
2572
|
-
all_params.append('_return_http_data_only')
|
|
2573
|
-
all_params.append('_preload_content')
|
|
2574
|
-
all_params.append('_request_timeout')
|
|
2575
|
-
|
|
2576
|
-
params = locals()
|
|
2577
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
2578
|
-
if key not in all_params:
|
|
2579
|
-
raise TypeError(
|
|
2580
|
-
"Got an unexpected keyword argument '%s'"
|
|
2581
|
-
" to method cluster_service_get_machine" % key
|
|
2582
|
-
)
|
|
2583
|
-
params[key] = val
|
|
2584
|
-
del params['kwargs']
|
|
2585
|
-
# verify the required parameter 'cluster_id' is set
|
|
2586
|
-
if ('cluster_id' not in params or
|
|
2587
|
-
params['cluster_id'] is None):
|
|
2588
|
-
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_get_machine`") # noqa: E501
|
|
2589
|
-
# verify the required parameter 'id' is set
|
|
2590
|
-
if ('id' not in params or
|
|
2591
|
-
params['id'] is None):
|
|
2592
|
-
raise ValueError("Missing the required parameter `id` when calling `cluster_service_get_machine`") # noqa: E501
|
|
2593
|
-
|
|
2594
|
-
collection_formats = {}
|
|
2595
|
-
|
|
2596
|
-
path_params = {}
|
|
2597
|
-
if 'cluster_id' in params:
|
|
2598
|
-
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
2599
|
-
if 'id' in params:
|
|
2600
|
-
path_params['id'] = params['id'] # noqa: E501
|
|
2601
|
-
|
|
2602
|
-
query_params = []
|
|
2603
|
-
if 'org_id' in params:
|
|
2604
|
-
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
2605
|
-
|
|
2606
|
-
header_params = {}
|
|
2607
|
-
|
|
2608
|
-
form_params = []
|
|
2609
|
-
local_var_files = {}
|
|
2610
|
-
|
|
2611
|
-
body_params = None
|
|
2612
|
-
# HTTP header `Accept`
|
|
2613
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2614
|
-
['application/json']) # noqa: E501
|
|
2615
|
-
|
|
2616
|
-
# Authentication setting
|
|
2617
|
-
auth_settings = [] # noqa: E501
|
|
2618
|
-
|
|
2619
|
-
return self.api_client.call_api(
|
|
2620
|
-
'/v1/core/clusters/{clusterId}/machines/{id}', 'GET',
|
|
2621
|
-
path_params,
|
|
2622
|
-
query_params,
|
|
2623
|
-
header_params,
|
|
2624
|
-
body=body_params,
|
|
2625
|
-
post_params=form_params,
|
|
2626
|
-
files=local_var_files,
|
|
2627
|
-
response_type='V1GetMachineResponse', # noqa: E501
|
|
2628
|
-
auth_settings=auth_settings,
|
|
2629
|
-
async_req=params.get('async_req'),
|
|
2630
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2631
|
-
_preload_content=params.get('_preload_content', True),
|
|
2632
|
-
_request_timeout=params.get('_request_timeout'),
|
|
2633
|
-
collection_formats=collection_formats)
|
|
2634
|
-
|
|
2635
2643
|
def cluster_service_get_project_cluster(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1Cluster': # noqa: E501
|
|
2636
2644
|
"""cluster_service_get_project_cluster # noqa: E501
|
|
2637
2645
|
|
|
@@ -3032,20 +3040,26 @@ class ClusterServiceApi(object):
|
|
|
3032
3040
|
_request_timeout=params.get('_request_timeout'),
|
|
3033
3041
|
collection_formats=collection_formats)
|
|
3034
3042
|
|
|
3035
|
-
def cluster_service_list_cluster_capacity_reservations(self,
|
|
3043
|
+
def cluster_service_list_cluster_capacity_reservations(self, org_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListClusterCapacityReservationsResponse': # noqa: E501
|
|
3036
3044
|
"""cluster_service_list_cluster_capacity_reservations # noqa: E501
|
|
3037
3045
|
|
|
3038
3046
|
This method makes a synchronous HTTP request by default. To make an
|
|
3039
3047
|
asynchronous HTTP request, please pass async_req=True
|
|
3040
|
-
>>> thread = api.cluster_service_list_cluster_capacity_reservations(
|
|
3048
|
+
>>> thread = api.cluster_service_list_cluster_capacity_reservations(org_id, cluster_id, async_req=True)
|
|
3041
3049
|
>>> result = thread.get()
|
|
3042
3050
|
|
|
3043
3051
|
:param async_req bool
|
|
3044
|
-
:param str
|
|
3052
|
+
:param str org_id: (required)
|
|
3045
3053
|
:param str cluster_id: (required)
|
|
3054
|
+
:param str project_id:
|
|
3046
3055
|
:param datetime start_time:
|
|
3047
3056
|
:param datetime end_time:
|
|
3048
3057
|
:param bool available_only:
|
|
3058
|
+
:param str region:
|
|
3059
|
+
:param str zone:
|
|
3060
|
+
:param str instance_type:
|
|
3061
|
+
:param bool include_all:
|
|
3062
|
+
:param bool find_used_by: whether to find which cloudspace_ids and jobs_ids are using the reservations
|
|
3049
3063
|
:param bool from_aggregate:
|
|
3050
3064
|
:param str apparent_provider: only required if from aggregate, storage.providertype (eg `lightningaggregate`)
|
|
3051
3065
|
:return: V1ListClusterCapacityReservationsResponse
|
|
@@ -3054,25 +3068,31 @@ class ClusterServiceApi(object):
|
|
|
3054
3068
|
"""
|
|
3055
3069
|
kwargs['_return_http_data_only'] = True
|
|
3056
3070
|
if kwargs.get('async_req'):
|
|
3057
|
-
return self.cluster_service_list_cluster_capacity_reservations_with_http_info(
|
|
3071
|
+
return self.cluster_service_list_cluster_capacity_reservations_with_http_info(org_id, cluster_id, **kwargs) # noqa: E501
|
|
3058
3072
|
else:
|
|
3059
|
-
(data) = self.cluster_service_list_cluster_capacity_reservations_with_http_info(
|
|
3073
|
+
(data) = self.cluster_service_list_cluster_capacity_reservations_with_http_info(org_id, cluster_id, **kwargs) # noqa: E501
|
|
3060
3074
|
return data
|
|
3061
3075
|
|
|
3062
|
-
def cluster_service_list_cluster_capacity_reservations_with_http_info(self,
|
|
3076
|
+
def cluster_service_list_cluster_capacity_reservations_with_http_info(self, org_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListClusterCapacityReservationsResponse': # noqa: E501
|
|
3063
3077
|
"""cluster_service_list_cluster_capacity_reservations # noqa: E501
|
|
3064
3078
|
|
|
3065
3079
|
This method makes a synchronous HTTP request by default. To make an
|
|
3066
3080
|
asynchronous HTTP request, please pass async_req=True
|
|
3067
|
-
>>> thread = api.cluster_service_list_cluster_capacity_reservations_with_http_info(
|
|
3081
|
+
>>> thread = api.cluster_service_list_cluster_capacity_reservations_with_http_info(org_id, cluster_id, async_req=True)
|
|
3068
3082
|
>>> result = thread.get()
|
|
3069
3083
|
|
|
3070
3084
|
:param async_req bool
|
|
3071
|
-
:param str
|
|
3085
|
+
:param str org_id: (required)
|
|
3072
3086
|
:param str cluster_id: (required)
|
|
3087
|
+
:param str project_id:
|
|
3073
3088
|
:param datetime start_time:
|
|
3074
3089
|
:param datetime end_time:
|
|
3075
3090
|
:param bool available_only:
|
|
3091
|
+
:param str region:
|
|
3092
|
+
:param str zone:
|
|
3093
|
+
:param str instance_type:
|
|
3094
|
+
:param bool include_all:
|
|
3095
|
+
:param bool find_used_by: whether to find which cloudspace_ids and jobs_ids are using the reservations
|
|
3076
3096
|
:param bool from_aggregate:
|
|
3077
3097
|
:param str apparent_provider: only required if from aggregate, storage.providertype (eg `lightningaggregate`)
|
|
3078
3098
|
:return: V1ListClusterCapacityReservationsResponse
|
|
@@ -3080,7 +3100,7 @@ class ClusterServiceApi(object):
|
|
|
3080
3100
|
returns the request thread.
|
|
3081
3101
|
"""
|
|
3082
3102
|
|
|
3083
|
-
all_params = ['
|
|
3103
|
+
all_params = ['org_id', 'cluster_id', 'project_id', 'start_time', 'end_time', 'available_only', 'region', 'zone', 'instance_type', 'include_all', 'find_used_by', 'from_aggregate', 'apparent_provider'] # noqa: E501
|
|
3084
3104
|
all_params.append('async_req')
|
|
3085
3105
|
all_params.append('_return_http_data_only')
|
|
3086
3106
|
all_params.append('_preload_content')
|
|
@@ -3095,10 +3115,10 @@ class ClusterServiceApi(object):
|
|
|
3095
3115
|
)
|
|
3096
3116
|
params[key] = val
|
|
3097
3117
|
del params['kwargs']
|
|
3098
|
-
# verify the required parameter '
|
|
3099
|
-
if ('
|
|
3100
|
-
params['
|
|
3101
|
-
raise ValueError("Missing the required parameter `
|
|
3118
|
+
# verify the required parameter 'org_id' is set
|
|
3119
|
+
if ('org_id' not in params or
|
|
3120
|
+
params['org_id'] is None):
|
|
3121
|
+
raise ValueError("Missing the required parameter `org_id` when calling `cluster_service_list_cluster_capacity_reservations`") # noqa: E501
|
|
3102
3122
|
# verify the required parameter 'cluster_id' is set
|
|
3103
3123
|
if ('cluster_id' not in params or
|
|
3104
3124
|
params['cluster_id'] is None):
|
|
@@ -3107,18 +3127,30 @@ class ClusterServiceApi(object):
|
|
|
3107
3127
|
collection_formats = {}
|
|
3108
3128
|
|
|
3109
3129
|
path_params = {}
|
|
3110
|
-
if '
|
|
3111
|
-
path_params['
|
|
3130
|
+
if 'org_id' in params:
|
|
3131
|
+
path_params['orgId'] = params['org_id'] # noqa: E501
|
|
3112
3132
|
if 'cluster_id' in params:
|
|
3113
3133
|
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
3114
3134
|
|
|
3115
3135
|
query_params = []
|
|
3136
|
+
if 'project_id' in params:
|
|
3137
|
+
query_params.append(('projectId', params['project_id'])) # noqa: E501
|
|
3116
3138
|
if 'start_time' in params:
|
|
3117
3139
|
query_params.append(('startTime', params['start_time'])) # noqa: E501
|
|
3118
3140
|
if 'end_time' in params:
|
|
3119
3141
|
query_params.append(('endTime', params['end_time'])) # noqa: E501
|
|
3120
3142
|
if 'available_only' in params:
|
|
3121
3143
|
query_params.append(('availableOnly', params['available_only'])) # noqa: E501
|
|
3144
|
+
if 'region' in params:
|
|
3145
|
+
query_params.append(('region', params['region'])) # noqa: E501
|
|
3146
|
+
if 'zone' in params:
|
|
3147
|
+
query_params.append(('zone', params['zone'])) # noqa: E501
|
|
3148
|
+
if 'instance_type' in params:
|
|
3149
|
+
query_params.append(('instanceType', params['instance_type'])) # noqa: E501
|
|
3150
|
+
if 'include_all' in params:
|
|
3151
|
+
query_params.append(('includeAll', params['include_all'])) # noqa: E501
|
|
3152
|
+
if 'find_used_by' in params:
|
|
3153
|
+
query_params.append(('findUsedBy', params['find_used_by'])) # noqa: E501
|
|
3122
3154
|
if 'from_aggregate' in params:
|
|
3123
3155
|
query_params.append(('fromAggregate', params['from_aggregate'])) # noqa: E501
|
|
3124
3156
|
if 'apparent_provider' in params:
|
|
@@ -3138,7 +3170,7 @@ class ClusterServiceApi(object):
|
|
|
3138
3170
|
auth_settings = [] # noqa: E501
|
|
3139
3171
|
|
|
3140
3172
|
return self.api_client.call_api(
|
|
3141
|
-
'/v1/
|
|
3173
|
+
'/v1/orgs/{orgId}/clusters/{clusterId}/capacity-reservations', 'GET',
|
|
3142
3174
|
path_params,
|
|
3143
3175
|
query_params,
|
|
3144
3176
|
header_params,
|
|
@@ -4244,6 +4276,119 @@ class ClusterServiceApi(object):
|
|
|
4244
4276
|
_request_timeout=params.get('_request_timeout'),
|
|
4245
4277
|
collection_formats=collection_formats)
|
|
4246
4278
|
|
|
4279
|
+
def cluster_service_report_machine_system_metrics(self, body: 'ClusterServiceReportMachineSystemMetricsBody', cluster_id: 'str', machine_id: 'str', **kwargs) -> 'V1ReportMachineSystemMetricsResponse': # noqa: E501
|
|
4280
|
+
"""cluster_service_report_machine_system_metrics # noqa: E501
|
|
4281
|
+
|
|
4282
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
4283
|
+
asynchronous HTTP request, please pass async_req=True
|
|
4284
|
+
>>> thread = api.cluster_service_report_machine_system_metrics(body, cluster_id, machine_id, async_req=True)
|
|
4285
|
+
>>> result = thread.get()
|
|
4286
|
+
|
|
4287
|
+
:param async_req bool
|
|
4288
|
+
:param ClusterServiceReportMachineSystemMetricsBody body: (required)
|
|
4289
|
+
:param str cluster_id: (required)
|
|
4290
|
+
:param str machine_id: (required)
|
|
4291
|
+
:return: V1ReportMachineSystemMetricsResponse
|
|
4292
|
+
If the method is called asynchronously,
|
|
4293
|
+
returns the request thread.
|
|
4294
|
+
"""
|
|
4295
|
+
kwargs['_return_http_data_only'] = True
|
|
4296
|
+
if kwargs.get('async_req'):
|
|
4297
|
+
return self.cluster_service_report_machine_system_metrics_with_http_info(body, cluster_id, machine_id, **kwargs) # noqa: E501
|
|
4298
|
+
else:
|
|
4299
|
+
(data) = self.cluster_service_report_machine_system_metrics_with_http_info(body, cluster_id, machine_id, **kwargs) # noqa: E501
|
|
4300
|
+
return data
|
|
4301
|
+
|
|
4302
|
+
def cluster_service_report_machine_system_metrics_with_http_info(self, body: 'ClusterServiceReportMachineSystemMetricsBody', cluster_id: 'str', machine_id: 'str', **kwargs) -> 'V1ReportMachineSystemMetricsResponse': # noqa: E501
|
|
4303
|
+
"""cluster_service_report_machine_system_metrics # noqa: E501
|
|
4304
|
+
|
|
4305
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
4306
|
+
asynchronous HTTP request, please pass async_req=True
|
|
4307
|
+
>>> thread = api.cluster_service_report_machine_system_metrics_with_http_info(body, cluster_id, machine_id, async_req=True)
|
|
4308
|
+
>>> result = thread.get()
|
|
4309
|
+
|
|
4310
|
+
:param async_req bool
|
|
4311
|
+
:param ClusterServiceReportMachineSystemMetricsBody body: (required)
|
|
4312
|
+
:param str cluster_id: (required)
|
|
4313
|
+
:param str machine_id: (required)
|
|
4314
|
+
:return: V1ReportMachineSystemMetricsResponse
|
|
4315
|
+
If the method is called asynchronously,
|
|
4316
|
+
returns the request thread.
|
|
4317
|
+
"""
|
|
4318
|
+
|
|
4319
|
+
all_params = ['body', 'cluster_id', 'machine_id'] # noqa: E501
|
|
4320
|
+
all_params.append('async_req')
|
|
4321
|
+
all_params.append('_return_http_data_only')
|
|
4322
|
+
all_params.append('_preload_content')
|
|
4323
|
+
all_params.append('_request_timeout')
|
|
4324
|
+
|
|
4325
|
+
params = locals()
|
|
4326
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
4327
|
+
if key not in all_params:
|
|
4328
|
+
raise TypeError(
|
|
4329
|
+
"Got an unexpected keyword argument '%s'"
|
|
4330
|
+
" to method cluster_service_report_machine_system_metrics" % key
|
|
4331
|
+
)
|
|
4332
|
+
params[key] = val
|
|
4333
|
+
del params['kwargs']
|
|
4334
|
+
# verify the required parameter 'body' is set
|
|
4335
|
+
if ('body' not in params or
|
|
4336
|
+
params['body'] is None):
|
|
4337
|
+
raise ValueError("Missing the required parameter `body` when calling `cluster_service_report_machine_system_metrics`") # noqa: E501
|
|
4338
|
+
# verify the required parameter 'cluster_id' is set
|
|
4339
|
+
if ('cluster_id' not in params or
|
|
4340
|
+
params['cluster_id'] is None):
|
|
4341
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_report_machine_system_metrics`") # noqa: E501
|
|
4342
|
+
# verify the required parameter 'machine_id' is set
|
|
4343
|
+
if ('machine_id' not in params or
|
|
4344
|
+
params['machine_id'] is None):
|
|
4345
|
+
raise ValueError("Missing the required parameter `machine_id` when calling `cluster_service_report_machine_system_metrics`") # noqa: E501
|
|
4346
|
+
|
|
4347
|
+
collection_formats = {}
|
|
4348
|
+
|
|
4349
|
+
path_params = {}
|
|
4350
|
+
if 'cluster_id' in params:
|
|
4351
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
4352
|
+
if 'machine_id' in params:
|
|
4353
|
+
path_params['machineId'] = params['machine_id'] # noqa: E501
|
|
4354
|
+
|
|
4355
|
+
query_params = []
|
|
4356
|
+
|
|
4357
|
+
header_params = {}
|
|
4358
|
+
|
|
4359
|
+
form_params = []
|
|
4360
|
+
local_var_files = {}
|
|
4361
|
+
|
|
4362
|
+
body_params = None
|
|
4363
|
+
if 'body' in params:
|
|
4364
|
+
body_params = params['body']
|
|
4365
|
+
# HTTP header `Accept`
|
|
4366
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
4367
|
+
['application/json']) # noqa: E501
|
|
4368
|
+
|
|
4369
|
+
# HTTP header `Content-Type`
|
|
4370
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
4371
|
+
['application/json']) # noqa: E501
|
|
4372
|
+
|
|
4373
|
+
# Authentication setting
|
|
4374
|
+
auth_settings = [] # noqa: E501
|
|
4375
|
+
|
|
4376
|
+
return self.api_client.call_api(
|
|
4377
|
+
'/v1/core/clusters/{clusterId}/machines/{machineId}/system-metrics', 'POST',
|
|
4378
|
+
path_params,
|
|
4379
|
+
query_params,
|
|
4380
|
+
header_params,
|
|
4381
|
+
body=body_params,
|
|
4382
|
+
post_params=form_params,
|
|
4383
|
+
files=local_var_files,
|
|
4384
|
+
response_type='V1ReportMachineSystemMetricsResponse', # noqa: E501
|
|
4385
|
+
auth_settings=auth_settings,
|
|
4386
|
+
async_req=params.get('async_req'),
|
|
4387
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
4388
|
+
_preload_content=params.get('_preload_content', True),
|
|
4389
|
+
_request_timeout=params.get('_request_timeout'),
|
|
4390
|
+
collection_formats=collection_formats)
|
|
4391
|
+
|
|
4247
4392
|
def cluster_service_request_cluster_access(self, body: 'V1RequestClusterAccessRequest', **kwargs) -> 'V1RequestClusterAccessResponse': # noqa: E501
|
|
4248
4393
|
"""cluster_service_request_cluster_access # noqa: E501
|
|
4249
4394
|
|