lightning-sdk 2025.9.23__py3-none-any.whl → 2025.9.30__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 +3 -2
- lightning_sdk/cli/entrypoint.py +3 -1
- lightning_sdk/cli/groups.py +8 -1
- lightning_sdk/cli/legacy/download.py +3 -4
- lightning_sdk/cli/legacy/entrypoint.py +1 -1
- lightning_sdk/cli/legacy/upload.py +2 -3
- lightning_sdk/cli/studio/__init__.py +2 -0
- lightning_sdk/cli/studio/connect.py +94 -0
- lightning_sdk/cli/studio/create.py +19 -5
- lightning_sdk/cli/studio/delete.py +9 -5
- lightning_sdk/cli/studio/list.py +5 -1
- lightning_sdk/cli/studio/ssh.py +12 -54
- lightning_sdk/cli/studio/start.py +26 -3
- lightning_sdk/cli/studio/stop.py +7 -3
- lightning_sdk/cli/studio/switch.py +21 -5
- lightning_sdk/cli/utils/ssh_connection.py +51 -0
- lightning_sdk/cli/utils/studio_selection.py +22 -15
- lightning_sdk/cli/vm/__init__.py +20 -0
- lightning_sdk/cli/vm/create.py +33 -0
- lightning_sdk/cli/vm/delete.py +25 -0
- lightning_sdk/cli/vm/list.py +30 -0
- lightning_sdk/cli/vm/ssh.py +31 -0
- lightning_sdk/cli/vm/start.py +60 -0
- lightning_sdk/cli/vm/stop.py +25 -0
- lightning_sdk/cli/vm/switch.py +38 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +20 -1
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +2 -95
- lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +24 -8
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +420 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +121 -0
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +655 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +20 -1
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/job_id_reportroutingtelemetry_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_storagetransfers_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/user_id_affiliatelinks_body.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_abort_storage_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_machine_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_machine_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_machine_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lightning_elastic_cluster_v1.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_get_model_total_usage_metrics_response.py → v1_list_machines_response.py} +37 -37
- lightning_sdk/lightning_cloud/openapi/models/v1_list_storage_transfers_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +539 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine_direct_v1.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pause_storage_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_purchase_annual_upsell_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_report_deployment_routing_telemetry_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_resume_storage_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier_type.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_storage_transfer.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_storage_transfer_status.py +108 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +105 -79
- lightning_sdk/studio.py +55 -11
- lightning_sdk/teamspace.py +11 -2
- {lightning_sdk-2025.9.23.dist-info → lightning_sdk-2025.9.30.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.9.23.dist-info → lightning_sdk-2025.9.30.dist-info}/RECORD +74 -45
- {lightning_sdk-2025.9.23.dist-info → lightning_sdk-2025.9.30.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.9.23.dist-info → lightning_sdk-2025.9.30.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.9.23.dist-info → lightning_sdk-2025.9.30.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.9.23.dist-info → lightning_sdk-2025.9.30.dist-info}/top_level.txt +0 -0
|
@@ -1356,41 +1356,43 @@ class BillingServiceApi(object):
|
|
|
1356
1356
|
_request_timeout=params.get('_request_timeout'),
|
|
1357
1357
|
collection_formats=collection_formats)
|
|
1358
1358
|
|
|
1359
|
-
def billing_service_purchase_annual_upsell(self, **kwargs) -> 'V1PurchaseAnnualUpsellResponse': # noqa: E501
|
|
1359
|
+
def billing_service_purchase_annual_upsell(self, body: 'V1PurchaseAnnualUpsellRequest', **kwargs) -> 'V1PurchaseAnnualUpsellResponse': # noqa: E501
|
|
1360
1360
|
"""billing_service_purchase_annual_upsell # noqa: E501
|
|
1361
1361
|
|
|
1362
1362
|
This method makes a synchronous HTTP request by default. To make an
|
|
1363
1363
|
asynchronous HTTP request, please pass async_req=True
|
|
1364
|
-
>>> thread = api.billing_service_purchase_annual_upsell(async_req=True)
|
|
1364
|
+
>>> thread = api.billing_service_purchase_annual_upsell(body, async_req=True)
|
|
1365
1365
|
>>> result = thread.get()
|
|
1366
1366
|
|
|
1367
1367
|
:param async_req bool
|
|
1368
|
+
:param V1PurchaseAnnualUpsellRequest body: (required)
|
|
1368
1369
|
:return: V1PurchaseAnnualUpsellResponse
|
|
1369
1370
|
If the method is called asynchronously,
|
|
1370
1371
|
returns the request thread.
|
|
1371
1372
|
"""
|
|
1372
1373
|
kwargs['_return_http_data_only'] = True
|
|
1373
1374
|
if kwargs.get('async_req'):
|
|
1374
|
-
return self.billing_service_purchase_annual_upsell_with_http_info(**kwargs) # noqa: E501
|
|
1375
|
+
return self.billing_service_purchase_annual_upsell_with_http_info(body, **kwargs) # noqa: E501
|
|
1375
1376
|
else:
|
|
1376
|
-
(data) = self.billing_service_purchase_annual_upsell_with_http_info(**kwargs) # noqa: E501
|
|
1377
|
+
(data) = self.billing_service_purchase_annual_upsell_with_http_info(body, **kwargs) # noqa: E501
|
|
1377
1378
|
return data
|
|
1378
1379
|
|
|
1379
|
-
def billing_service_purchase_annual_upsell_with_http_info(self, **kwargs) -> 'V1PurchaseAnnualUpsellResponse': # noqa: E501
|
|
1380
|
+
def billing_service_purchase_annual_upsell_with_http_info(self, body: 'V1PurchaseAnnualUpsellRequest', **kwargs) -> 'V1PurchaseAnnualUpsellResponse': # noqa: E501
|
|
1380
1381
|
"""billing_service_purchase_annual_upsell # noqa: E501
|
|
1381
1382
|
|
|
1382
1383
|
This method makes a synchronous HTTP request by default. To make an
|
|
1383
1384
|
asynchronous HTTP request, please pass async_req=True
|
|
1384
|
-
>>> thread = api.billing_service_purchase_annual_upsell_with_http_info(async_req=True)
|
|
1385
|
+
>>> thread = api.billing_service_purchase_annual_upsell_with_http_info(body, async_req=True)
|
|
1385
1386
|
>>> result = thread.get()
|
|
1386
1387
|
|
|
1387
1388
|
:param async_req bool
|
|
1389
|
+
:param V1PurchaseAnnualUpsellRequest body: (required)
|
|
1388
1390
|
:return: V1PurchaseAnnualUpsellResponse
|
|
1389
1391
|
If the method is called asynchronously,
|
|
1390
1392
|
returns the request thread.
|
|
1391
1393
|
"""
|
|
1392
1394
|
|
|
1393
|
-
all_params = [] # noqa: E501
|
|
1395
|
+
all_params = ['body'] # noqa: E501
|
|
1394
1396
|
all_params.append('async_req')
|
|
1395
1397
|
all_params.append('_return_http_data_only')
|
|
1396
1398
|
all_params.append('_preload_content')
|
|
@@ -1405,6 +1407,10 @@ class BillingServiceApi(object):
|
|
|
1405
1407
|
)
|
|
1406
1408
|
params[key] = val
|
|
1407
1409
|
del params['kwargs']
|
|
1410
|
+
# verify the required parameter 'body' is set
|
|
1411
|
+
if ('body' not in params or
|
|
1412
|
+
params['body'] is None):
|
|
1413
|
+
raise ValueError("Missing the required parameter `body` when calling `billing_service_purchase_annual_upsell`") # noqa: E501
|
|
1408
1414
|
|
|
1409
1415
|
collection_formats = {}
|
|
1410
1416
|
|
|
@@ -1418,10 +1424,16 @@ class BillingServiceApi(object):
|
|
|
1418
1424
|
local_var_files = {}
|
|
1419
1425
|
|
|
1420
1426
|
body_params = None
|
|
1427
|
+
if 'body' in params:
|
|
1428
|
+
body_params = params['body']
|
|
1421
1429
|
# HTTP header `Accept`
|
|
1422
1430
|
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1423
1431
|
['application/json']) # noqa: E501
|
|
1424
1432
|
|
|
1433
|
+
# HTTP header `Content-Type`
|
|
1434
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
1435
|
+
['application/json']) # noqa: E501
|
|
1436
|
+
|
|
1425
1437
|
# Authentication setting
|
|
1426
1438
|
auth_settings = [] # noqa: E501
|
|
1427
1439
|
|
|
@@ -1450,6 +1462,7 @@ class BillingServiceApi(object):
|
|
|
1450
1462
|
>>> result = thread.get()
|
|
1451
1463
|
|
|
1452
1464
|
:param async_req bool
|
|
1465
|
+
:param str org_id:
|
|
1453
1466
|
:return: V1QuoteAnnualUpsellResponse
|
|
1454
1467
|
If the method is called asynchronously,
|
|
1455
1468
|
returns the request thread.
|
|
@@ -1470,12 +1483,13 @@ class BillingServiceApi(object):
|
|
|
1470
1483
|
>>> result = thread.get()
|
|
1471
1484
|
|
|
1472
1485
|
:param async_req bool
|
|
1486
|
+
:param str org_id:
|
|
1473
1487
|
:return: V1QuoteAnnualUpsellResponse
|
|
1474
1488
|
If the method is called asynchronously,
|
|
1475
1489
|
returns the request thread.
|
|
1476
1490
|
"""
|
|
1477
1491
|
|
|
1478
|
-
all_params = [] # noqa: E501
|
|
1492
|
+
all_params = ['org_id'] # noqa: E501
|
|
1479
1493
|
all_params.append('async_req')
|
|
1480
1494
|
all_params.append('_return_http_data_only')
|
|
1481
1495
|
all_params.append('_preload_content')
|
|
@@ -1496,6 +1510,8 @@ class BillingServiceApi(object):
|
|
|
1496
1510
|
path_params = {}
|
|
1497
1511
|
|
|
1498
1512
|
query_params = []
|
|
1513
|
+
if 'org_id' in params:
|
|
1514
|
+
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
1499
1515
|
|
|
1500
1516
|
header_params = {}
|
|
1501
1517
|
|
|
@@ -657,6 +657,111 @@ class ClusterServiceApi(object):
|
|
|
657
657
|
_request_timeout=params.get('_request_timeout'),
|
|
658
658
|
collection_formats=collection_formats)
|
|
659
659
|
|
|
660
|
+
def cluster_service_create_machine(self, body: 'CreateMachineRequestRepresentsTheRequestToCreateAMachine', cluster_id: 'str', **kwargs) -> 'V1CreateMachineResponse': # noqa: E501
|
|
661
|
+
"""cluster_service_create_machine # noqa: E501
|
|
662
|
+
|
|
663
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
664
|
+
asynchronous HTTP request, please pass async_req=True
|
|
665
|
+
>>> thread = api.cluster_service_create_machine(body, cluster_id, async_req=True)
|
|
666
|
+
>>> result = thread.get()
|
|
667
|
+
|
|
668
|
+
:param async_req bool
|
|
669
|
+
:param CreateMachineRequestRepresentsTheRequestToCreateAMachine body: (required)
|
|
670
|
+
:param str cluster_id: (required)
|
|
671
|
+
:return: V1CreateMachineResponse
|
|
672
|
+
If the method is called asynchronously,
|
|
673
|
+
returns the request thread.
|
|
674
|
+
"""
|
|
675
|
+
kwargs['_return_http_data_only'] = True
|
|
676
|
+
if kwargs.get('async_req'):
|
|
677
|
+
return self.cluster_service_create_machine_with_http_info(body, cluster_id, **kwargs) # noqa: E501
|
|
678
|
+
else:
|
|
679
|
+
(data) = self.cluster_service_create_machine_with_http_info(body, cluster_id, **kwargs) # noqa: E501
|
|
680
|
+
return data
|
|
681
|
+
|
|
682
|
+
def cluster_service_create_machine_with_http_info(self, body: 'CreateMachineRequestRepresentsTheRequestToCreateAMachine', cluster_id: 'str', **kwargs) -> 'V1CreateMachineResponse': # noqa: E501
|
|
683
|
+
"""cluster_service_create_machine # noqa: E501
|
|
684
|
+
|
|
685
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
686
|
+
asynchronous HTTP request, please pass async_req=True
|
|
687
|
+
>>> thread = api.cluster_service_create_machine_with_http_info(body, cluster_id, async_req=True)
|
|
688
|
+
>>> result = thread.get()
|
|
689
|
+
|
|
690
|
+
:param async_req bool
|
|
691
|
+
:param CreateMachineRequestRepresentsTheRequestToCreateAMachine body: (required)
|
|
692
|
+
:param str cluster_id: (required)
|
|
693
|
+
:return: V1CreateMachineResponse
|
|
694
|
+
If the method is called asynchronously,
|
|
695
|
+
returns the request thread.
|
|
696
|
+
"""
|
|
697
|
+
|
|
698
|
+
all_params = ['body', 'cluster_id'] # noqa: E501
|
|
699
|
+
all_params.append('async_req')
|
|
700
|
+
all_params.append('_return_http_data_only')
|
|
701
|
+
all_params.append('_preload_content')
|
|
702
|
+
all_params.append('_request_timeout')
|
|
703
|
+
|
|
704
|
+
params = locals()
|
|
705
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
706
|
+
if key not in all_params:
|
|
707
|
+
raise TypeError(
|
|
708
|
+
"Got an unexpected keyword argument '%s'"
|
|
709
|
+
" to method cluster_service_create_machine" % key
|
|
710
|
+
)
|
|
711
|
+
params[key] = val
|
|
712
|
+
del params['kwargs']
|
|
713
|
+
# verify the required parameter 'body' is set
|
|
714
|
+
if ('body' not in params or
|
|
715
|
+
params['body'] is None):
|
|
716
|
+
raise ValueError("Missing the required parameter `body` when calling `cluster_service_create_machine`") # noqa: E501
|
|
717
|
+
# verify the required parameter 'cluster_id' is set
|
|
718
|
+
if ('cluster_id' not in params or
|
|
719
|
+
params['cluster_id'] is None):
|
|
720
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_create_machine`") # noqa: E501
|
|
721
|
+
|
|
722
|
+
collection_formats = {}
|
|
723
|
+
|
|
724
|
+
path_params = {}
|
|
725
|
+
if 'cluster_id' in params:
|
|
726
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
727
|
+
|
|
728
|
+
query_params = []
|
|
729
|
+
|
|
730
|
+
header_params = {}
|
|
731
|
+
|
|
732
|
+
form_params = []
|
|
733
|
+
local_var_files = {}
|
|
734
|
+
|
|
735
|
+
body_params = None
|
|
736
|
+
if 'body' in params:
|
|
737
|
+
body_params = params['body']
|
|
738
|
+
# HTTP header `Accept`
|
|
739
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
740
|
+
['application/json']) # noqa: E501
|
|
741
|
+
|
|
742
|
+
# HTTP header `Content-Type`
|
|
743
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
744
|
+
['application/json']) # noqa: E501
|
|
745
|
+
|
|
746
|
+
# Authentication setting
|
|
747
|
+
auth_settings = [] # noqa: E501
|
|
748
|
+
|
|
749
|
+
return self.api_client.call_api(
|
|
750
|
+
'/v1/core/clusters/{clusterId}/machines', 'POST',
|
|
751
|
+
path_params,
|
|
752
|
+
query_params,
|
|
753
|
+
header_params,
|
|
754
|
+
body=body_params,
|
|
755
|
+
post_params=form_params,
|
|
756
|
+
files=local_var_files,
|
|
757
|
+
response_type='V1CreateMachineResponse', # noqa: E501
|
|
758
|
+
auth_settings=auth_settings,
|
|
759
|
+
async_req=params.get('async_req'),
|
|
760
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
761
|
+
_preload_content=params.get('_preload_content', True),
|
|
762
|
+
_request_timeout=params.get('_request_timeout'),
|
|
763
|
+
collection_formats=collection_formats)
|
|
764
|
+
|
|
660
765
|
def cluster_service_create_project_cluster(self, body: 'ProjectIdClustersBody', project_id: 'str', **kwargs) -> 'Externalv1Cluster': # noqa: E501
|
|
661
766
|
"""cluster_service_create_project_cluster # noqa: E501
|
|
662
767
|
|
|
@@ -1392,6 +1497,111 @@ class ClusterServiceApi(object):
|
|
|
1392
1497
|
_request_timeout=params.get('_request_timeout'),
|
|
1393
1498
|
collection_formats=collection_formats)
|
|
1394
1499
|
|
|
1500
|
+
def cluster_service_delete_machine(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1DeleteMachineResponse': # noqa: E501
|
|
1501
|
+
"""Delete a machine # noqa: E501
|
|
1502
|
+
|
|
1503
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1504
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1505
|
+
>>> thread = api.cluster_service_delete_machine(cluster_id, id, async_req=True)
|
|
1506
|
+
>>> result = thread.get()
|
|
1507
|
+
|
|
1508
|
+
:param async_req bool
|
|
1509
|
+
:param str cluster_id: (required)
|
|
1510
|
+
:param str id: (required)
|
|
1511
|
+
:param str org_id:
|
|
1512
|
+
:return: V1DeleteMachineResponse
|
|
1513
|
+
If the method is called asynchronously,
|
|
1514
|
+
returns the request thread.
|
|
1515
|
+
"""
|
|
1516
|
+
kwargs['_return_http_data_only'] = True
|
|
1517
|
+
if kwargs.get('async_req'):
|
|
1518
|
+
return self.cluster_service_delete_machine_with_http_info(cluster_id, id, **kwargs) # noqa: E501
|
|
1519
|
+
else:
|
|
1520
|
+
(data) = self.cluster_service_delete_machine_with_http_info(cluster_id, id, **kwargs) # noqa: E501
|
|
1521
|
+
return data
|
|
1522
|
+
|
|
1523
|
+
def cluster_service_delete_machine_with_http_info(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1DeleteMachineResponse': # noqa: E501
|
|
1524
|
+
"""Delete a machine # noqa: E501
|
|
1525
|
+
|
|
1526
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1527
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1528
|
+
>>> thread = api.cluster_service_delete_machine_with_http_info(cluster_id, id, async_req=True)
|
|
1529
|
+
>>> result = thread.get()
|
|
1530
|
+
|
|
1531
|
+
:param async_req bool
|
|
1532
|
+
:param str cluster_id: (required)
|
|
1533
|
+
:param str id: (required)
|
|
1534
|
+
:param str org_id:
|
|
1535
|
+
:return: V1DeleteMachineResponse
|
|
1536
|
+
If the method is called asynchronously,
|
|
1537
|
+
returns the request thread.
|
|
1538
|
+
"""
|
|
1539
|
+
|
|
1540
|
+
all_params = ['cluster_id', 'id', 'org_id'] # noqa: E501
|
|
1541
|
+
all_params.append('async_req')
|
|
1542
|
+
all_params.append('_return_http_data_only')
|
|
1543
|
+
all_params.append('_preload_content')
|
|
1544
|
+
all_params.append('_request_timeout')
|
|
1545
|
+
|
|
1546
|
+
params = locals()
|
|
1547
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1548
|
+
if key not in all_params:
|
|
1549
|
+
raise TypeError(
|
|
1550
|
+
"Got an unexpected keyword argument '%s'"
|
|
1551
|
+
" to method cluster_service_delete_machine" % key
|
|
1552
|
+
)
|
|
1553
|
+
params[key] = val
|
|
1554
|
+
del params['kwargs']
|
|
1555
|
+
# verify the required parameter 'cluster_id' is set
|
|
1556
|
+
if ('cluster_id' not in params or
|
|
1557
|
+
params['cluster_id'] is None):
|
|
1558
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_delete_machine`") # noqa: E501
|
|
1559
|
+
# verify the required parameter 'id' is set
|
|
1560
|
+
if ('id' not in params or
|
|
1561
|
+
params['id'] is None):
|
|
1562
|
+
raise ValueError("Missing the required parameter `id` when calling `cluster_service_delete_machine`") # noqa: E501
|
|
1563
|
+
|
|
1564
|
+
collection_formats = {}
|
|
1565
|
+
|
|
1566
|
+
path_params = {}
|
|
1567
|
+
if 'cluster_id' in params:
|
|
1568
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
1569
|
+
if 'id' in params:
|
|
1570
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
1571
|
+
|
|
1572
|
+
query_params = []
|
|
1573
|
+
if 'org_id' in params:
|
|
1574
|
+
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
1575
|
+
|
|
1576
|
+
header_params = {}
|
|
1577
|
+
|
|
1578
|
+
form_params = []
|
|
1579
|
+
local_var_files = {}
|
|
1580
|
+
|
|
1581
|
+
body_params = None
|
|
1582
|
+
# HTTP header `Accept`
|
|
1583
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1584
|
+
['application/json']) # noqa: E501
|
|
1585
|
+
|
|
1586
|
+
# Authentication setting
|
|
1587
|
+
auth_settings = [] # noqa: E501
|
|
1588
|
+
|
|
1589
|
+
return self.api_client.call_api(
|
|
1590
|
+
'/v1/core/clusters/{clusterId}/machines/{id}', 'DELETE',
|
|
1591
|
+
path_params,
|
|
1592
|
+
query_params,
|
|
1593
|
+
header_params,
|
|
1594
|
+
body=body_params,
|
|
1595
|
+
post_params=form_params,
|
|
1596
|
+
files=local_var_files,
|
|
1597
|
+
response_type='V1DeleteMachineResponse', # noqa: E501
|
|
1598
|
+
auth_settings=auth_settings,
|
|
1599
|
+
async_req=params.get('async_req'),
|
|
1600
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1601
|
+
_preload_content=params.get('_preload_content', True),
|
|
1602
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1603
|
+
collection_formats=collection_formats)
|
|
1604
|
+
|
|
1395
1605
|
def cluster_service_delete_project_cluster(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteProjectClusterResponse': # noqa: E501
|
|
1396
1606
|
"""cluster_service_delete_project_cluster # noqa: E501
|
|
1397
1607
|
|
|
@@ -2111,6 +2321,111 @@ class ClusterServiceApi(object):
|
|
|
2111
2321
|
_request_timeout=params.get('_request_timeout'),
|
|
2112
2322
|
collection_formats=collection_formats)
|
|
2113
2323
|
|
|
2324
|
+
def cluster_service_get_machine(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetMachineResponse': # noqa: E501
|
|
2325
|
+
"""Get a machine by ID # noqa: E501
|
|
2326
|
+
|
|
2327
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2328
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2329
|
+
>>> thread = api.cluster_service_get_machine(cluster_id, id, async_req=True)
|
|
2330
|
+
>>> result = thread.get()
|
|
2331
|
+
|
|
2332
|
+
:param async_req bool
|
|
2333
|
+
:param str cluster_id: (required)
|
|
2334
|
+
:param str id: (required)
|
|
2335
|
+
:param str org_id:
|
|
2336
|
+
:return: V1GetMachineResponse
|
|
2337
|
+
If the method is called asynchronously,
|
|
2338
|
+
returns the request thread.
|
|
2339
|
+
"""
|
|
2340
|
+
kwargs['_return_http_data_only'] = True
|
|
2341
|
+
if kwargs.get('async_req'):
|
|
2342
|
+
return self.cluster_service_get_machine_with_http_info(cluster_id, id, **kwargs) # noqa: E501
|
|
2343
|
+
else:
|
|
2344
|
+
(data) = self.cluster_service_get_machine_with_http_info(cluster_id, id, **kwargs) # noqa: E501
|
|
2345
|
+
return data
|
|
2346
|
+
|
|
2347
|
+
def cluster_service_get_machine_with_http_info(self, cluster_id: 'str', id: 'str', **kwargs) -> 'V1GetMachineResponse': # noqa: E501
|
|
2348
|
+
"""Get a machine by ID # noqa: E501
|
|
2349
|
+
|
|
2350
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2351
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2352
|
+
>>> thread = api.cluster_service_get_machine_with_http_info(cluster_id, id, async_req=True)
|
|
2353
|
+
>>> result = thread.get()
|
|
2354
|
+
|
|
2355
|
+
:param async_req bool
|
|
2356
|
+
:param str cluster_id: (required)
|
|
2357
|
+
:param str id: (required)
|
|
2358
|
+
:param str org_id:
|
|
2359
|
+
:return: V1GetMachineResponse
|
|
2360
|
+
If the method is called asynchronously,
|
|
2361
|
+
returns the request thread.
|
|
2362
|
+
"""
|
|
2363
|
+
|
|
2364
|
+
all_params = ['cluster_id', 'id', 'org_id'] # noqa: E501
|
|
2365
|
+
all_params.append('async_req')
|
|
2366
|
+
all_params.append('_return_http_data_only')
|
|
2367
|
+
all_params.append('_preload_content')
|
|
2368
|
+
all_params.append('_request_timeout')
|
|
2369
|
+
|
|
2370
|
+
params = locals()
|
|
2371
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
2372
|
+
if key not in all_params:
|
|
2373
|
+
raise TypeError(
|
|
2374
|
+
"Got an unexpected keyword argument '%s'"
|
|
2375
|
+
" to method cluster_service_get_machine" % key
|
|
2376
|
+
)
|
|
2377
|
+
params[key] = val
|
|
2378
|
+
del params['kwargs']
|
|
2379
|
+
# verify the required parameter 'cluster_id' is set
|
|
2380
|
+
if ('cluster_id' not in params or
|
|
2381
|
+
params['cluster_id'] is None):
|
|
2382
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_get_machine`") # noqa: E501
|
|
2383
|
+
# verify the required parameter 'id' is set
|
|
2384
|
+
if ('id' not in params or
|
|
2385
|
+
params['id'] is None):
|
|
2386
|
+
raise ValueError("Missing the required parameter `id` when calling `cluster_service_get_machine`") # noqa: E501
|
|
2387
|
+
|
|
2388
|
+
collection_formats = {}
|
|
2389
|
+
|
|
2390
|
+
path_params = {}
|
|
2391
|
+
if 'cluster_id' in params:
|
|
2392
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
2393
|
+
if 'id' in params:
|
|
2394
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
2395
|
+
|
|
2396
|
+
query_params = []
|
|
2397
|
+
if 'org_id' in params:
|
|
2398
|
+
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
2399
|
+
|
|
2400
|
+
header_params = {}
|
|
2401
|
+
|
|
2402
|
+
form_params = []
|
|
2403
|
+
local_var_files = {}
|
|
2404
|
+
|
|
2405
|
+
body_params = None
|
|
2406
|
+
# HTTP header `Accept`
|
|
2407
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2408
|
+
['application/json']) # noqa: E501
|
|
2409
|
+
|
|
2410
|
+
# Authentication setting
|
|
2411
|
+
auth_settings = [] # noqa: E501
|
|
2412
|
+
|
|
2413
|
+
return self.api_client.call_api(
|
|
2414
|
+
'/v1/core/clusters/{clusterId}/machines/{id}', 'GET',
|
|
2415
|
+
path_params,
|
|
2416
|
+
query_params,
|
|
2417
|
+
header_params,
|
|
2418
|
+
body=body_params,
|
|
2419
|
+
post_params=form_params,
|
|
2420
|
+
files=local_var_files,
|
|
2421
|
+
response_type='V1GetMachineResponse', # noqa: E501
|
|
2422
|
+
auth_settings=auth_settings,
|
|
2423
|
+
async_req=params.get('async_req'),
|
|
2424
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2425
|
+
_preload_content=params.get('_preload_content', True),
|
|
2426
|
+
_request_timeout=params.get('_request_timeout'),
|
|
2427
|
+
collection_formats=collection_formats)
|
|
2428
|
+
|
|
2114
2429
|
def cluster_service_get_project_cluster(self, project_id: 'str', id: 'str', **kwargs) -> 'Externalv1Cluster': # noqa: E501
|
|
2115
2430
|
"""cluster_service_get_project_cluster # noqa: E501
|
|
2116
2431
|
|
|
@@ -3012,6 +3327,111 @@ class ClusterServiceApi(object):
|
|
|
3012
3327
|
_request_timeout=params.get('_request_timeout'),
|
|
3013
3328
|
collection_formats=collection_formats)
|
|
3014
3329
|
|
|
3330
|
+
def cluster_service_list_machines(self, cluster_id: 'str', **kwargs) -> 'V1ListMachinesResponse': # noqa: E501
|
|
3331
|
+
"""List machines with optional filtering # noqa: E501
|
|
3332
|
+
|
|
3333
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3334
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3335
|
+
>>> thread = api.cluster_service_list_machines(cluster_id, async_req=True)
|
|
3336
|
+
>>> result = thread.get()
|
|
3337
|
+
|
|
3338
|
+
:param async_req bool
|
|
3339
|
+
:param str cluster_id: (required)
|
|
3340
|
+
:param str org_id:
|
|
3341
|
+
:param int page_size:
|
|
3342
|
+
:param str page_token:
|
|
3343
|
+
:return: V1ListMachinesResponse
|
|
3344
|
+
If the method is called asynchronously,
|
|
3345
|
+
returns the request thread.
|
|
3346
|
+
"""
|
|
3347
|
+
kwargs['_return_http_data_only'] = True
|
|
3348
|
+
if kwargs.get('async_req'):
|
|
3349
|
+
return self.cluster_service_list_machines_with_http_info(cluster_id, **kwargs) # noqa: E501
|
|
3350
|
+
else:
|
|
3351
|
+
(data) = self.cluster_service_list_machines_with_http_info(cluster_id, **kwargs) # noqa: E501
|
|
3352
|
+
return data
|
|
3353
|
+
|
|
3354
|
+
def cluster_service_list_machines_with_http_info(self, cluster_id: 'str', **kwargs) -> 'V1ListMachinesResponse': # noqa: E501
|
|
3355
|
+
"""List machines with optional filtering # noqa: E501
|
|
3356
|
+
|
|
3357
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
3358
|
+
asynchronous HTTP request, please pass async_req=True
|
|
3359
|
+
>>> thread = api.cluster_service_list_machines_with_http_info(cluster_id, async_req=True)
|
|
3360
|
+
>>> result = thread.get()
|
|
3361
|
+
|
|
3362
|
+
:param async_req bool
|
|
3363
|
+
:param str cluster_id: (required)
|
|
3364
|
+
:param str org_id:
|
|
3365
|
+
:param int page_size:
|
|
3366
|
+
:param str page_token:
|
|
3367
|
+
:return: V1ListMachinesResponse
|
|
3368
|
+
If the method is called asynchronously,
|
|
3369
|
+
returns the request thread.
|
|
3370
|
+
"""
|
|
3371
|
+
|
|
3372
|
+
all_params = ['cluster_id', 'org_id', 'page_size', 'page_token'] # noqa: E501
|
|
3373
|
+
all_params.append('async_req')
|
|
3374
|
+
all_params.append('_return_http_data_only')
|
|
3375
|
+
all_params.append('_preload_content')
|
|
3376
|
+
all_params.append('_request_timeout')
|
|
3377
|
+
|
|
3378
|
+
params = locals()
|
|
3379
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
3380
|
+
if key not in all_params:
|
|
3381
|
+
raise TypeError(
|
|
3382
|
+
"Got an unexpected keyword argument '%s'"
|
|
3383
|
+
" to method cluster_service_list_machines" % key
|
|
3384
|
+
)
|
|
3385
|
+
params[key] = val
|
|
3386
|
+
del params['kwargs']
|
|
3387
|
+
# verify the required parameter 'cluster_id' is set
|
|
3388
|
+
if ('cluster_id' not in params or
|
|
3389
|
+
params['cluster_id'] is None):
|
|
3390
|
+
raise ValueError("Missing the required parameter `cluster_id` when calling `cluster_service_list_machines`") # noqa: E501
|
|
3391
|
+
|
|
3392
|
+
collection_formats = {}
|
|
3393
|
+
|
|
3394
|
+
path_params = {}
|
|
3395
|
+
if 'cluster_id' in params:
|
|
3396
|
+
path_params['clusterId'] = params['cluster_id'] # noqa: E501
|
|
3397
|
+
|
|
3398
|
+
query_params = []
|
|
3399
|
+
if 'org_id' in params:
|
|
3400
|
+
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
3401
|
+
if 'page_size' in params:
|
|
3402
|
+
query_params.append(('pageSize', params['page_size'])) # noqa: E501
|
|
3403
|
+
if 'page_token' in params:
|
|
3404
|
+
query_params.append(('pageToken', params['page_token'])) # noqa: E501
|
|
3405
|
+
|
|
3406
|
+
header_params = {}
|
|
3407
|
+
|
|
3408
|
+
form_params = []
|
|
3409
|
+
local_var_files = {}
|
|
3410
|
+
|
|
3411
|
+
body_params = None
|
|
3412
|
+
# HTTP header `Accept`
|
|
3413
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
3414
|
+
['application/json']) # noqa: E501
|
|
3415
|
+
|
|
3416
|
+
# Authentication setting
|
|
3417
|
+
auth_settings = [] # noqa: E501
|
|
3418
|
+
|
|
3419
|
+
return self.api_client.call_api(
|
|
3420
|
+
'/v1/core/clusters/{clusterId}/machines', 'GET',
|
|
3421
|
+
path_params,
|
|
3422
|
+
query_params,
|
|
3423
|
+
header_params,
|
|
3424
|
+
body=body_params,
|
|
3425
|
+
post_params=form_params,
|
|
3426
|
+
files=local_var_files,
|
|
3427
|
+
response_type='V1ListMachinesResponse', # noqa: E501
|
|
3428
|
+
auth_settings=auth_settings,
|
|
3429
|
+
async_req=params.get('async_req'),
|
|
3430
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
3431
|
+
_preload_content=params.get('_preload_content', True),
|
|
3432
|
+
_request_timeout=params.get('_request_timeout'),
|
|
3433
|
+
collection_formats=collection_formats)
|
|
3434
|
+
|
|
3015
3435
|
def cluster_service_list_organization_cluster_encryption_keys(self, **kwargs) -> 'V1ListOrganizationClusterEncryptionKeysResponse': # noqa: E501
|
|
3016
3436
|
"""cluster_service_list_organization_cluster_encryption_keys # noqa: E501
|
|
3017
3437
|
|