lightning-sdk 2025.10.14__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 +6 -3
- lightning_sdk/api/base_studio_api.py +13 -9
- lightning_sdk/api/job_api.py +4 -1
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/studio_api.py +7 -2
- lightning_sdk/base_studio.py +30 -17
- lightning_sdk/cli/base_studio/list.py +1 -3
- lightning_sdk/cli/entrypoint.py +11 -34
- 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/connect.py +42 -92
- lightning_sdk/cli/studio/create.py +23 -1
- lightning_sdk/cli/studio/start.py +12 -2
- lightning_sdk/cli/utils/get_base_studio.py +24 -0
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +69 -0
- lightning_sdk/cli/utils/logging.py +121 -0
- lightning_sdk/cli/utils/ssh_connection.py +1 -1
- lightning_sdk/constants.py +1 -0
- lightning_sdk/helpers.py +53 -34
- lightning_sdk/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/login.py +260 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +16 -3
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +279 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +117 -0
- lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +16 -3
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/update1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_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_get_cloud_space_transfer_estimate_response.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_list_platform_notifications_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +27 -1
- 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_slack_notifier.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +139 -191
- lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_validate_license_response.py} +21 -21
- lightning_sdk/lightning_cloud/rest_client.py +48 -45
- lightning_sdk/machine.py +5 -0
- lightning_sdk/pipeline/steps.py +1 -0
- lightning_sdk/studio.py +55 -13
- lightning_sdk/utils/config.py +18 -3
- lightning_sdk/utils/license.py +13 -0
- lightning_sdk/utils/resolve.py +6 -1
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/RECORD +74 -54
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.10.14.dist-info → lightning_sdk-2025.10.23.dist-info}/top_level.txt +0 -0
|
@@ -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,200 @@ 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
|
+
|
|
883
|
+
def auth_service_token_login(self, body: 'V1TokenLoginRequest', **kwargs) -> 'V1TokenLoginResponse': # noqa: E501
|
|
884
|
+
"""auth_service_token_login # noqa: E501
|
|
885
|
+
|
|
886
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
887
|
+
asynchronous HTTP request, please pass async_req=True
|
|
888
|
+
>>> thread = api.auth_service_token_login(body, async_req=True)
|
|
889
|
+
>>> result = thread.get()
|
|
890
|
+
|
|
891
|
+
:param async_req bool
|
|
892
|
+
:param V1TokenLoginRequest body: (required)
|
|
893
|
+
:return: V1TokenLoginResponse
|
|
894
|
+
If the method is called asynchronously,
|
|
895
|
+
returns the request thread.
|
|
896
|
+
"""
|
|
897
|
+
kwargs['_return_http_data_only'] = True
|
|
898
|
+
if kwargs.get('async_req'):
|
|
899
|
+
return self.auth_service_token_login_with_http_info(body, **kwargs) # noqa: E501
|
|
900
|
+
else:
|
|
901
|
+
(data) = self.auth_service_token_login_with_http_info(body, **kwargs) # noqa: E501
|
|
902
|
+
return data
|
|
903
|
+
|
|
904
|
+
def auth_service_token_login_with_http_info(self, body: 'V1TokenLoginRequest', **kwargs) -> 'V1TokenLoginResponse': # noqa: E501
|
|
905
|
+
"""auth_service_token_login # noqa: E501
|
|
906
|
+
|
|
907
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
908
|
+
asynchronous HTTP request, please pass async_req=True
|
|
909
|
+
>>> thread = api.auth_service_token_login_with_http_info(body, async_req=True)
|
|
910
|
+
>>> result = thread.get()
|
|
911
|
+
|
|
912
|
+
:param async_req bool
|
|
913
|
+
:param V1TokenLoginRequest body: (required)
|
|
914
|
+
:return: V1TokenLoginResponse
|
|
915
|
+
If the method is called asynchronously,
|
|
916
|
+
returns the request thread.
|
|
917
|
+
"""
|
|
918
|
+
|
|
919
|
+
all_params = ['body'] # noqa: E501
|
|
920
|
+
all_params.append('async_req')
|
|
921
|
+
all_params.append('_return_http_data_only')
|
|
922
|
+
all_params.append('_preload_content')
|
|
923
|
+
all_params.append('_request_timeout')
|
|
924
|
+
|
|
925
|
+
params = locals()
|
|
926
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
927
|
+
if key not in all_params:
|
|
928
|
+
raise TypeError(
|
|
929
|
+
"Got an unexpected keyword argument '%s'"
|
|
930
|
+
" to method auth_service_token_login" % key
|
|
931
|
+
)
|
|
932
|
+
params[key] = val
|
|
933
|
+
del params['kwargs']
|
|
934
|
+
# verify the required parameter 'body' is set
|
|
935
|
+
if ('body' not in params or
|
|
936
|
+
params['body'] is None):
|
|
937
|
+
raise ValueError("Missing the required parameter `body` when calling `auth_service_token_login`") # noqa: E501
|
|
938
|
+
|
|
939
|
+
collection_formats = {}
|
|
940
|
+
|
|
941
|
+
path_params = {}
|
|
942
|
+
|
|
943
|
+
query_params = []
|
|
944
|
+
|
|
945
|
+
header_params = {}
|
|
946
|
+
|
|
947
|
+
form_params = []
|
|
948
|
+
local_var_files = {}
|
|
949
|
+
|
|
950
|
+
body_params = None
|
|
951
|
+
if 'body' in params:
|
|
952
|
+
body_params = params['body']
|
|
953
|
+
# HTTP header `Accept`
|
|
954
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
955
|
+
['application/json']) # noqa: E501
|
|
956
|
+
|
|
957
|
+
# HTTP header `Content-Type`
|
|
958
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
959
|
+
['application/json']) # noqa: E501
|
|
960
|
+
|
|
961
|
+
# Authentication setting
|
|
962
|
+
auth_settings = [] # noqa: E501
|
|
963
|
+
|
|
964
|
+
return self.api_client.call_api(
|
|
965
|
+
'/v1/auth/token-login', 'POST',
|
|
966
|
+
path_params,
|
|
967
|
+
query_params,
|
|
968
|
+
header_params,
|
|
969
|
+
body=body_params,
|
|
970
|
+
post_params=form_params,
|
|
971
|
+
files=local_var_files,
|
|
972
|
+
response_type='V1TokenLoginResponse', # noqa: E501
|
|
973
|
+
auth_settings=auth_settings,
|
|
974
|
+
async_req=params.get('async_req'),
|
|
975
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
976
|
+
_preload_content=params.get('_preload_content', True),
|
|
977
|
+
_request_timeout=params.get('_request_timeout'),
|
|
978
|
+
collection_formats=collection_formats)
|
|
979
|
+
|
|
701
980
|
def auth_service_update_user(self, body: 'V1UpdateUserRequest', **kwargs) -> 'V1GetUserResponse': # noqa: E501
|
|
702
981
|
"""TODO: change `GetUserResponse` to `User` # noqa: E501
|
|
703
982
|
|
|
@@ -1674,6 +1674,123 @@ class K8SClusterServiceApi(object):
|
|
|
1674
1674
|
_request_timeout=params.get('_request_timeout'),
|
|
1675
1675
|
collection_formats=collection_formats)
|
|
1676
1676
|
|
|
1677
|
+
def k8_s_cluster_service_list_filesystem_metrics(self, project_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListFilesystemMetricsResponse': # noqa: E501
|
|
1678
|
+
"""k8_s_cluster_service_list_filesystem_metrics # noqa: E501
|
|
1679
|
+
|
|
1680
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1681
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1682
|
+
>>> thread = api.k8_s_cluster_service_list_filesystem_metrics(project_id, cluster_id, async_req=True)
|
|
1683
|
+
>>> result = thread.get()
|
|
1684
|
+
|
|
1685
|
+
:param async_req bool
|
|
1686
|
+
:param str project_id: (required)
|
|
1687
|
+
:param str cluster_id: (required)
|
|
1688
|
+
:param str fstype:
|
|
1689
|
+
:param str mountpoint:
|
|
1690
|
+
:param datetime start: Date range.
|
|
1691
|
+
:param datetime end:
|
|
1692
|
+
:return: V1ListFilesystemMetricsResponse
|
|
1693
|
+
If the method is called asynchronously,
|
|
1694
|
+
returns the request thread.
|
|
1695
|
+
"""
|
|
1696
|
+
kwargs['_return_http_data_only'] = True
|
|
1697
|
+
if kwargs.get('async_req'):
|
|
1698
|
+
return self.k8_s_cluster_service_list_filesystem_metrics_with_http_info(project_id, cluster_id, **kwargs) # noqa: E501
|
|
1699
|
+
else:
|
|
1700
|
+
(data) = self.k8_s_cluster_service_list_filesystem_metrics_with_http_info(project_id, cluster_id, **kwargs) # noqa: E501
|
|
1701
|
+
return data
|
|
1702
|
+
|
|
1703
|
+
def k8_s_cluster_service_list_filesystem_metrics_with_http_info(self, project_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListFilesystemMetricsResponse': # noqa: E501
|
|
1704
|
+
"""k8_s_cluster_service_list_filesystem_metrics # noqa: E501
|
|
1705
|
+
|
|
1706
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1707
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1708
|
+
>>> thread = api.k8_s_cluster_service_list_filesystem_metrics_with_http_info(project_id, cluster_id, async_req=True)
|
|
1709
|
+
>>> result = thread.get()
|
|
1710
|
+
|
|
1711
|
+
:param async_req bool
|
|
1712
|
+
:param str project_id: (required)
|
|
1713
|
+
:param str cluster_id: (required)
|
|
1714
|
+
:param str fstype:
|
|
1715
|
+
:param str mountpoint:
|
|
1716
|
+
:param datetime start: Date range.
|
|
1717
|
+
:param datetime end:
|
|
1718
|
+
:return: V1ListFilesystemMetricsResponse
|
|
1719
|
+
If the method is called asynchronously,
|
|
1720
|
+
returns the request thread.
|
|
1721
|
+
"""
|
|
1722
|
+
|
|
1723
|
+
all_params = ['project_id', 'cluster_id', 'fstype', 'mountpoint', 'start', 'end'] # noqa: E501
|
|
1724
|
+
all_params.append('async_req')
|
|
1725
|
+
all_params.append('_return_http_data_only')
|
|
1726
|
+
all_params.append('_preload_content')
|
|
1727
|
+
all_params.append('_request_timeout')
|
|
1728
|
+
|
|
1729
|
+
params = locals()
|
|
1730
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1731
|
+
if key not in all_params:
|
|
1732
|
+
raise TypeError(
|
|
1733
|
+
"Got an unexpected keyword argument '%s'"
|
|
1734
|
+
" to method k8_s_cluster_service_list_filesystem_metrics" % key
|
|
1735
|
+
)
|
|
1736
|
+
params[key] = val
|
|
1737
|
+
del params['kwargs']
|
|
1738
|
+
# verify the required parameter 'project_id' is set
|
|
1739
|
+
if ('project_id' not in params or
|
|
1740
|
+
params['project_id'] is None):
|
|
1741
|
+
raise ValueError("Missing the required parameter `project_id` when calling `k8_s_cluster_service_list_filesystem_metrics`") # noqa: E501
|
|
1742
|
+
# verify the required parameter 'cluster_id' is set
|
|
1743
|
+
if ('cluster_id' not in params or
|
|
1744
|
+
params['cluster_id'] is None):
|
|
1745
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `k8_s_cluster_service_list_filesystem_metrics`") # noqa: E501
|
|
1746
|
+
|
|
1747
|
+
collection_formats = {}
|
|
1748
|
+
|
|
1749
|
+
path_params = {}
|
|
1750
|
+
if 'project_id' in params:
|
|
1751
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
1752
|
+
if 'cluster_id' in params:
|
|
1753
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
1754
|
+
|
|
1755
|
+
query_params = []
|
|
1756
|
+
if 'fstype' in params:
|
|
1757
|
+
query_params.append(('fstype', params['fstype'])) # noqa: E501
|
|
1758
|
+
if 'mountpoint' in params:
|
|
1759
|
+
query_params.append(('mountpoint', params['mountpoint'])) # noqa: E501
|
|
1760
|
+
if 'start' in params:
|
|
1761
|
+
query_params.append(('start', params['start'])) # noqa: E501
|
|
1762
|
+
if 'end' in params:
|
|
1763
|
+
query_params.append(('end', params['end'])) # noqa: E501
|
|
1764
|
+
|
|
1765
|
+
header_params = {}
|
|
1766
|
+
|
|
1767
|
+
form_params = []
|
|
1768
|
+
local_var_files = {}
|
|
1769
|
+
|
|
1770
|
+
body_params = None
|
|
1771
|
+
# HTTP header `Accept`
|
|
1772
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1773
|
+
['application/json']) # noqa: E501
|
|
1774
|
+
|
|
1775
|
+
# Authentication setting
|
|
1776
|
+
auth_settings = [] # noqa: E501
|
|
1777
|
+
|
|
1778
|
+
return self.api_client.call_api(
|
|
1779
|
+
'/v1/projects/{projectId}/clusters/{clusterId}/filesystem', 'GET',
|
|
1780
|
+
path_params,
|
|
1781
|
+
query_params,
|
|
1782
|
+
header_params,
|
|
1783
|
+
body=body_params,
|
|
1784
|
+
post_params=form_params,
|
|
1785
|
+
files=local_var_files,
|
|
1786
|
+
response_type='V1ListFilesystemMetricsResponse', # noqa: E501
|
|
1787
|
+
auth_settings=auth_settings,
|
|
1788
|
+
async_req=params.get('async_req'),
|
|
1789
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1790
|
+
_preload_content=params.get('_preload_content', True),
|
|
1791
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1792
|
+
collection_formats=collection_formats)
|
|
1793
|
+
|
|
1677
1794
|
def k8_s_cluster_service_list_group_pod_metrics(self, project_id: 'str', cluster_id: 'str', **kwargs) -> 'V1ListGroupPodMetricsResponse': # noqa: E501
|
|
1678
1795
|
"""k8_s_cluster_service_list_group_pod_metrics # noqa: E501
|
|
1679
1796
|
|