platform-api-python-client 4.37.1__py3-none-any.whl → 4.41.0__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.
- platform_api_python_client/__init__.py +410 -177
- platform_api_python_client/api/external_api.py +41 -47
- platform_api_python_client/api_client.py +81 -36
- platform_api_python_client/configuration.py +262 -66
- platform_api_python_client/exceptions.py +24 -5
- platform_api_python_client/models/__init__.py +52 -26
- platform_api_python_client/models/admission.py +106 -0
- platform_api_python_client/models/autoscaling.py +120 -0
- platform_api_python_client/models/ccl_dynamo_pools.py +4 -3
- platform_api_python_client/models/ccl_main_pools.py +4 -3
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_chart_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_controller.py +106 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_argo_rollouts_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_chart_values.py +117 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_cert_manager_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_chart_values.py +152 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_gpu_operator_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_chart_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_controller.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_ingress_nginx_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_istio_values.py +143 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_chart_values.py +154 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kai_scheduler_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_chart_values.py +131 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_keda_values.py +110 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_chart_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_kube_prometheus_stack_values.py +121 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_chart_values.py +106 -0
- platform_api_python_client/models/ccluster_catalogs_cluster_base_metrics_server_values.py +110 -0
- platform_api_python_client/models/{spire_crds.py → cdi.py} +36 -12
- platform_api_python_client/models/cluster_base_components.py +187 -0
- platform_api_python_client/models/cluster_capacity_response.py +5 -5
- platform_api_python_client/models/cluster_credential.py +4 -3
- platform_api_python_client/models/cluster_registration_request.py +4 -3
- platform_api_python_client/models/cluster_registration_response.py +4 -3
- platform_api_python_client/models/{istio_cni_overrides.py → cni.py} +29 -15
- platform_api_python_client/models/config_file_mount.py +6 -5
- platform_api_python_client/models/create_compute_deployment_request.py +10 -10
- platform_api_python_client/models/create_compute_deployment_response.py +4 -3
- platform_api_python_client/models/create_dynamo_deployment_request.py +29 -23
- platform_api_python_client/models/create_dynamo_deployment_response.py +4 -3
- platform_api_python_client/models/create_filesystem_volume_request.py +8 -7
- platform_api_python_client/models/create_hardware_instance_request.py +4 -3
- platform_api_python_client/models/create_inference_deployment_response.py +4 -3
- platform_api_python_client/models/create_inference_v3_deployment_request.py +14 -12
- platform_api_python_client/models/create_job_deployment_request.py +10 -10
- platform_api_python_client/models/create_job_deployment_response.py +4 -3
- platform_api_python_client/models/create_object_volume_request.py +10 -9
- platform_api_python_client/models/create_organization_request.py +4 -3
- platform_api_python_client/models/create_organization_response.py +4 -3
- platform_api_python_client/models/create_service_account_request.py +4 -3
- platform_api_python_client/models/create_service_account_response.py +4 -3
- platform_api_python_client/models/credits_response.py +4 -3
- platform_api_python_client/models/daily_bill_response.py +4 -3
- platform_api_python_client/models/{fluent_bit.py → dashboard.py} +29 -12
- platform_api_python_client/models/{prometheus_adapter.py → default_priorities.py} +29 -12
- platform_api_python_client/models/default_queue.py +106 -0
- platform_api_python_client/models/delete_user_vault_item_request.py +4 -3
- platform_api_python_client/models/deployment_log_event_v4.py +4 -3
- platform_api_python_client/models/deployment_status_request.py +4 -3
- platform_api_python_client/models/deployment_status_response.py +4 -3
- platform_api_python_client/models/deployment_status_v3_response.py +5 -5
- platform_api_python_client/models/deployment_usage.py +5 -5
- platform_api_python_client/models/deployment_usage_value.py +4 -3
- platform_api_python_client/models/dynamo_communications_input.py +4 -3
- platform_api_python_client/models/dynamo_frontend_config.py +105 -0
- platform_api_python_client/models/dynamo_frontend_config_response.py +105 -0
- platform_api_python_client/models/dynamo_image.py +6 -5
- platform_api_python_client/models/dynamo_kv_transfer_configuration.py +4 -3
- platform_api_python_client/models/dynamo_weight_transfer_configuration.py +4 -3
- platform_api_python_client/models/dynamo_worker_pool_config.py +5 -4
- platform_api_python_client/models/dynamo_worker_pools.py +4 -3
- platform_api_python_client/models/env.py +4 -3
- platform_api_python_client/models/generate_service_account_secret_response.py +4 -3
- platform_api_python_client/models/get_cluster_response.py +4 -3
- platform_api_python_client/models/get_compute_deployment_response.py +8 -8
- platform_api_python_client/models/get_deployment_log_response.py +4 -3
- platform_api_python_client/models/get_deployment_log_v4_response.py +5 -5
- platform_api_python_client/models/get_deployment_pods_response.py +4 -3
- platform_api_python_client/models/get_deployment_response.py +7 -7
- platform_api_python_client/models/get_deployment_revision_response.py +4 -3
- platform_api_python_client/models/get_deployment_usage_response.py +5 -5
- platform_api_python_client/models/get_dynamo_deployment_response.py +23 -17
- platform_api_python_client/models/get_filesystem_volume_response.py +4 -3
- platform_api_python_client/models/get_inference_deployment_response.py +7 -7
- platform_api_python_client/models/get_inference_v3_deployment_response.py +11 -9
- platform_api_python_client/models/get_job_deployment_response.py +8 -8
- platform_api_python_client/models/get_object_volume_response.py +4 -3
- platform_api_python_client/models/gpu_type_capacity.py +4 -3
- platform_api_python_client/models/hardware_instance_response.py +4 -3
- platform_api_python_client/models/hardware_preset_response.py +4 -3
- platform_api_python_client/models/http_validation_error.py +5 -5
- platform_api_python_client/models/image.py +6 -5
- platform_api_python_client/models/image_pull_secret_credentials.py +4 -3
- platform_api_python_client/models/ingress.py +4 -3
- platform_api_python_client/models/insight_list_item_response.py +4 -3
- platform_api_python_client/models/insight_resource.py +4 -3
- platform_api_python_client/models/insight_response.py +5 -5
- platform_api_python_client/models/insight_status_change_response.py +4 -3
- platform_api_python_client/models/invite_user_request.py +4 -3
- platform_api_python_client/models/istio_base.py +106 -0
- platform_api_python_client/models/istio_cni.py +124 -0
- platform_api_python_client/models/{argo_rollouts.py → istio_gateway.py} +29 -12
- platform_api_python_client/models/{istio_cni_subchart_overrides.py → istiod.py} +31 -17
- platform_api_python_client/models/list_cluster_capacity_response.py +5 -5
- platform_api_python_client/models/list_daily_bill_response.py +5 -5
- platform_api_python_client/models/list_deployment_revisions_response.py +5 -5
- platform_api_python_client/models/list_get_cluster_response.py +5 -5
- platform_api_python_client/models/list_get_deployment_response.py +5 -5
- platform_api_python_client/models/list_hardware_instance_response.py +5 -5
- platform_api_python_client/models/list_hardware_preset_response.py +5 -5
- platform_api_python_client/models/list_insights_response.py +5 -5
- platform_api_python_client/models/list_organization_gpu_quota_response.py +5 -5
- platform_api_python_client/models/list_prebuilt_image_response.py +5 -5
- platform_api_python_client/models/list_service_accounts_response.py +5 -5
- platform_api_python_client/models/list_user_vault_items_response.py +5 -5
- platform_api_python_client/models/list_volumes_response.py +5 -5
- platform_api_python_client/models/{validation_error_loc_inner.py → location_inner.py} +6 -6
- platform_api_python_client/models/metrics.py +117 -0
- platform_api_python_client/models/metrics_config.py +6 -5
- platform_api_python_client/models/{istio_overrides.py → mig.py} +28 -18
- platform_api_python_client/models/operator.py +117 -0
- platform_api_python_client/models/organization_gpu_quota_request.py +4 -3
- platform_api_python_client/models/organization_gpu_quota_response.py +4 -3
- platform_api_python_client/models/pilot.py +106 -0
- platform_api_python_client/models/pod_details.py +4 -3
- platform_api_python_client/models/pool.py +4 -3
- platform_api_python_client/models/prebuilt_image_response.py +4 -3
- platform_api_python_client/models/prometheus.py +110 -0
- platform_api_python_client/models/prometheus_rules.py +120 -0
- platform_api_python_client/models/prometheus_spec.py +113 -0
- platform_api_python_client/models/prometheus_values.py +117 -0
- platform_api_python_client/models/quota.py +106 -0
- platform_api_python_client/models/replicas.py +106 -0
- platform_api_python_client/models/resource_list.py +113 -0
- platform_api_python_client/models/resource_requirements.py +120 -0
- platform_api_python_client/models/revision_pod_details.py +5 -5
- platform_api_python_client/models/rollout_strategy_params.py +4 -3
- platform_api_python_client/models/scheduler.py +117 -0
- platform_api_python_client/models/service_account_response.py +4 -3
- platform_api_python_client/models/{istio.py → toggle.py} +27 -19
- platform_api_python_client/models/toleration.py +134 -0
- platform_api_python_client/models/unified_get_compute_deployment_response.py +8 -8
- platform_api_python_client/models/unified_get_deployment_logs_response.py +5 -5
- platform_api_python_client/models/unified_get_deployment_pods_response.py +4 -3
- platform_api_python_client/models/unified_get_deployment_revision_response.py +4 -3
- platform_api_python_client/models/unified_get_deployment_rollout_response.py +4 -3
- platform_api_python_client/models/unified_get_deployment_usage_response.py +5 -5
- platform_api_python_client/models/unified_get_dynamo_deployment_response.py +13 -13
- platform_api_python_client/models/unified_get_inference_v3_deployment_response.py +9 -9
- platform_api_python_client/models/unified_get_job_deployment_response.py +8 -8
- platform_api_python_client/models/unified_list_deployment_revisions_response.py +5 -5
- platform_api_python_client/models/unified_update_deployment_rollout_request.py +4 -3
- platform_api_python_client/models/unified_write_compute_deployment_request.py +8 -8
- platform_api_python_client/models/unified_write_deployment_response.py +4 -3
- platform_api_python_client/models/unified_write_dynamo_deployment_request.py +11 -11
- platform_api_python_client/models/unified_write_inference_v3_deployment_request.py +9 -9
- platform_api_python_client/models/unified_write_job_deployment_request.py +8 -8
- platform_api_python_client/models/update_cluster_metadata_request.py +4 -3
- platform_api_python_client/models/{cluster_config.py → update_cluster_request.py} +11 -10
- platform_api_python_client/models/update_deployment_response.py +4 -3
- platform_api_python_client/models/update_deployment_status_v3_request.py +4 -3
- platform_api_python_client/models/update_insight_status_request.py +7 -6
- platform_api_python_client/models/update_service_account_request.py +4 -3
- platform_api_python_client/models/upsert_user_vault_item_request.py +4 -3
- platform_api_python_client/models/user_vault_item.py +4 -3
- platform_api_python_client/models/validation_error.py +8 -8
- platform_api_python_client/models/volume_mount.py +4 -3
- platform_api_python_client/models/volume_status_response.py +4 -3
- platform_api_python_client/models/{dynamo_communications_output.py → workload.py} +34 -15
- platform_api_python_client/rest.py +87 -10
- platform_api_python_client-4.41.0.dist-info/METADATA +418 -0
- platform_api_python_client-4.41.0.dist-info/RECORD +206 -0
- platform_api_python_client/models/cert_manager.py +0 -89
- platform_api_python_client/models/cluster_components.py +0 -193
- platform_api_python_client/models/external_dns.py +0 -89
- platform_api_python_client/models/final_stack.py +0 -89
- platform_api_python_client/models/gpu_operator.py +0 -89
- platform_api_python_client/models/ingress_nginx.py +0 -89
- platform_api_python_client/models/keda.py +0 -89
- platform_api_python_client/models/kube_prometheus_stack.py +0 -89
- platform_api_python_client/models/longhorn.py +0 -89
- platform_api_python_client/models/metrics_server.py +0 -89
- platform_api_python_client/models/network_operator.py +0 -89
- platform_api_python_client/models/opentelemetry_collector.py +0 -89
- platform_api_python_client/models/spire.py +0 -89
- platform_api_python_client/models/teleport_kube_agent.py +0 -89
- platform_api_python_client-4.37.1.dist-info/METADATA +0 -23
- platform_api_python_client-4.37.1.dist-info/RECORD +0 -180
- {platform_api_python_client-4.37.1.dist-info → platform_api_python_client-4.41.0.dist-info}/WHEEL +0 -0
- {platform_api_python_client-4.37.1.dist-info → platform_api_python_client-4.41.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
1
|
"""
|
|
4
2
|
Platform External API
|
|
5
3
|
|
|
@@ -11,6 +9,7 @@
|
|
|
11
9
|
Do not edit the class manually.
|
|
12
10
|
""" # noqa: E501
|
|
13
11
|
|
|
12
|
+
|
|
14
13
|
import warnings
|
|
15
14
|
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
15
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
@@ -20,7 +19,6 @@ from datetime import datetime
|
|
|
20
19
|
from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
21
20
|
from typing import Any, List, Optional
|
|
22
21
|
from typing_extensions import Annotated
|
|
23
|
-
from platform_api_python_client.models.cluster_config import ClusterConfig
|
|
24
22
|
from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest
|
|
25
23
|
from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse
|
|
26
24
|
from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest
|
|
@@ -42,7 +40,6 @@ from platform_api_python_client.models.delete_user_vault_item_request import Del
|
|
|
42
40
|
from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest
|
|
43
41
|
from platform_api_python_client.models.deployment_status_response import DeploymentStatusResponse
|
|
44
42
|
from platform_api_python_client.models.deployment_status_v3_response import DeploymentStatusV3Response
|
|
45
|
-
from platform_api_python_client.models.deployment_type import DeploymentType
|
|
46
43
|
from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse
|
|
47
44
|
from platform_api_python_client.models.get_cluster_response import GetClusterResponse
|
|
48
45
|
from platform_api_python_client.models.get_compute_deployment_response import GetComputeDeploymentResponse
|
|
@@ -57,9 +54,7 @@ from platform_api_python_client.models.get_inference_v3_deployment_response impo
|
|
|
57
54
|
from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse
|
|
58
55
|
from platform_api_python_client.models.get_volume_response import GetVolumeResponse
|
|
59
56
|
from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse
|
|
60
|
-
from platform_api_python_client.models.insight_resource_type import InsightResourceType
|
|
61
57
|
from platform_api_python_client.models.insight_response import InsightResponse
|
|
62
|
-
from platform_api_python_client.models.insight_severity import InsightSeverity
|
|
63
58
|
from platform_api_python_client.models.insight_status import InsightStatus
|
|
64
59
|
from platform_api_python_client.models.invite_user_request import InviteUserRequest
|
|
65
60
|
from platform_api_python_client.models.list_cluster_capacity_response import ListClusterCapacityResponse
|
|
@@ -91,14 +86,13 @@ from platform_api_python_client.models.unified_update_deployment_rollout_request
|
|
|
91
86
|
from platform_api_python_client.models.unified_write_deployment_request import UnifiedWriteDeploymentRequest
|
|
92
87
|
from platform_api_python_client.models.unified_write_deployment_response import UnifiedWriteDeploymentResponse
|
|
93
88
|
from platform_api_python_client.models.update_cluster_metadata_request import UpdateClusterMetadataRequest
|
|
89
|
+
from platform_api_python_client.models.update_cluster_request import UpdateClusterRequest
|
|
94
90
|
from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse
|
|
95
91
|
from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request
|
|
96
92
|
from platform_api_python_client.models.update_insight_status_request import UpdateInsightStatusRequest
|
|
97
93
|
from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest
|
|
98
94
|
from platform_api_python_client.models.upsert_user_vault_item_request import UpsertUserVaultItemRequest
|
|
99
|
-
from platform_api_python_client.models.usage_component import UsageComponent
|
|
100
95
|
from platform_api_python_client.models.user_vault_item import UserVaultItem
|
|
101
|
-
from platform_api_python_client.models.user_vault_type import UserVaultType
|
|
102
96
|
from platform_api_python_client.models.volume_status_response import VolumeStatusResponse
|
|
103
97
|
|
|
104
98
|
from platform_api_python_client.api_client import ApiClient, RequestSerialized
|
|
@@ -5967,7 +5961,7 @@ class EXTERNALApi:
|
|
|
5967
5961
|
@validate_call
|
|
5968
5962
|
def get_all_user_vault_items_endpoint_user_vault_get(
|
|
5969
5963
|
self,
|
|
5970
|
-
type: Optional[
|
|
5964
|
+
type: Optional[Any] = None,
|
|
5971
5965
|
search_query: Optional[StrictStr] = None,
|
|
5972
5966
|
_request_timeout: Union[
|
|
5973
5967
|
None,
|
|
@@ -6039,7 +6033,7 @@ class EXTERNALApi:
|
|
|
6039
6033
|
@validate_call
|
|
6040
6034
|
def get_all_user_vault_items_endpoint_user_vault_get_with_http_info(
|
|
6041
6035
|
self,
|
|
6042
|
-
type: Optional[
|
|
6036
|
+
type: Optional[Any] = None,
|
|
6043
6037
|
search_query: Optional[StrictStr] = None,
|
|
6044
6038
|
_request_timeout: Union[
|
|
6045
6039
|
None,
|
|
@@ -6111,7 +6105,7 @@ class EXTERNALApi:
|
|
|
6111
6105
|
@validate_call
|
|
6112
6106
|
def get_all_user_vault_items_endpoint_user_vault_get_without_preload_content(
|
|
6113
6107
|
self,
|
|
6114
|
-
type: Optional[
|
|
6108
|
+
type: Optional[Any] = None,
|
|
6115
6109
|
search_query: Optional[StrictStr] = None,
|
|
6116
6110
|
_request_timeout: Union[
|
|
6117
6111
|
None,
|
|
@@ -10706,7 +10700,7 @@ class EXTERNALApi:
|
|
|
10706
10700
|
self,
|
|
10707
10701
|
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
10708
10702
|
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
10709
|
-
type: Optional[
|
|
10703
|
+
type: Optional[Any] = None,
|
|
10710
10704
|
search_query: Optional[StrictStr] = None,
|
|
10711
10705
|
_request_timeout: Union[
|
|
10712
10706
|
None,
|
|
@@ -10785,7 +10779,7 @@ class EXTERNALApi:
|
|
|
10785
10779
|
self,
|
|
10786
10780
|
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
10787
10781
|
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
10788
|
-
type: Optional[
|
|
10782
|
+
type: Optional[Any] = None,
|
|
10789
10783
|
search_query: Optional[StrictStr] = None,
|
|
10790
10784
|
_request_timeout: Union[
|
|
10791
10785
|
None,
|
|
@@ -10864,7 +10858,7 @@ class EXTERNALApi:
|
|
|
10864
10858
|
self,
|
|
10865
10859
|
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
10866
10860
|
limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
10867
|
-
type: Optional[
|
|
10861
|
+
type: Optional[Any] = None,
|
|
10868
10862
|
search_query: Optional[StrictStr] = None,
|
|
10869
10863
|
_request_timeout: Union[
|
|
10870
10864
|
None,
|
|
@@ -13105,7 +13099,7 @@ class EXTERNALApi:
|
|
|
13105
13099
|
@validate_call
|
|
13106
13100
|
def get_prebuilt_images_prebuilt_images_get(
|
|
13107
13101
|
self,
|
|
13108
|
-
type: Optional[
|
|
13102
|
+
type: Optional[Any] = None,
|
|
13109
13103
|
_request_timeout: Union[
|
|
13110
13104
|
None,
|
|
13111
13105
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -13172,7 +13166,7 @@ class EXTERNALApi:
|
|
|
13172
13166
|
@validate_call
|
|
13173
13167
|
def get_prebuilt_images_prebuilt_images_get_with_http_info(
|
|
13174
13168
|
self,
|
|
13175
|
-
type: Optional[
|
|
13169
|
+
type: Optional[Any] = None,
|
|
13176
13170
|
_request_timeout: Union[
|
|
13177
13171
|
None,
|
|
13178
13172
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -13239,7 +13233,7 @@ class EXTERNALApi:
|
|
|
13239
13233
|
@validate_call
|
|
13240
13234
|
def get_prebuilt_images_prebuilt_images_get_without_preload_content(
|
|
13241
13235
|
self,
|
|
13242
|
-
type: Optional[
|
|
13236
|
+
type: Optional[Any] = None,
|
|
13243
13237
|
_request_timeout: Union[
|
|
13244
13238
|
None,
|
|
13245
13239
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -14807,7 +14801,7 @@ class EXTERNALApi:
|
|
|
14807
14801
|
end_time_in_seconds: StrictInt,
|
|
14808
14802
|
step: Optional[StrictInt] = None,
|
|
14809
14803
|
revision_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
14810
|
-
component: Optional[
|
|
14804
|
+
component: Optional[Any] = None,
|
|
14811
14805
|
pod: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None,
|
|
14812
14806
|
_request_timeout: Union[
|
|
14813
14807
|
None,
|
|
@@ -14903,7 +14897,7 @@ class EXTERNALApi:
|
|
|
14903
14897
|
end_time_in_seconds: StrictInt,
|
|
14904
14898
|
step: Optional[StrictInt] = None,
|
|
14905
14899
|
revision_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
14906
|
-
component: Optional[
|
|
14900
|
+
component: Optional[Any] = None,
|
|
14907
14901
|
pod: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None,
|
|
14908
14902
|
_request_timeout: Union[
|
|
14909
14903
|
None,
|
|
@@ -14999,7 +14993,7 @@ class EXTERNALApi:
|
|
|
14999
14993
|
end_time_in_seconds: StrictInt,
|
|
15000
14994
|
step: Optional[StrictInt] = None,
|
|
15001
14995
|
revision_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
15002
|
-
component: Optional[
|
|
14996
|
+
component: Optional[Any] = None,
|
|
15003
14997
|
pod: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None,
|
|
15004
14998
|
_request_timeout: Union[
|
|
15005
14999
|
None,
|
|
@@ -15435,7 +15429,7 @@ class EXTERNALApi:
|
|
|
15435
15429
|
end_time_in_seconds: StrictInt,
|
|
15436
15430
|
step: Optional[StrictInt] = None,
|
|
15437
15431
|
revision_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
15438
|
-
component: Optional[
|
|
15432
|
+
component: Optional[Any] = None,
|
|
15439
15433
|
pod: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None,
|
|
15440
15434
|
_request_timeout: Union[
|
|
15441
15435
|
None,
|
|
@@ -15530,7 +15524,7 @@ class EXTERNALApi:
|
|
|
15530
15524
|
end_time_in_seconds: StrictInt,
|
|
15531
15525
|
step: Optional[StrictInt] = None,
|
|
15532
15526
|
revision_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
15533
|
-
component: Optional[
|
|
15527
|
+
component: Optional[Any] = None,
|
|
15534
15528
|
pod: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None,
|
|
15535
15529
|
_request_timeout: Union[
|
|
15536
15530
|
None,
|
|
@@ -15625,7 +15619,7 @@ class EXTERNALApi:
|
|
|
15625
15619
|
end_time_in_seconds: StrictInt,
|
|
15626
15620
|
step: Optional[StrictInt] = None,
|
|
15627
15621
|
revision_number: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
15628
|
-
component: Optional[
|
|
15622
|
+
component: Optional[Any] = None,
|
|
15629
15623
|
pod: Optional[Annotated[str, Field(strict=True, max_length=253)]] = None,
|
|
15630
15624
|
_request_timeout: Union[
|
|
15631
15625
|
None,
|
|
@@ -17403,10 +17397,10 @@ class EXTERNALApi:
|
|
|
17403
17397
|
def list_insights_insights_get(
|
|
17404
17398
|
self,
|
|
17405
17399
|
status: Annotated[Optional[List[InsightStatus]], Field(description="Repeat to list several statuses")] = None,
|
|
17406
|
-
severity: Optional[
|
|
17400
|
+
severity: Optional[Any] = None,
|
|
17407
17401
|
cluster_id: Optional[StrictInt] = None,
|
|
17408
17402
|
deployment_id: Optional[StrictInt] = None,
|
|
17409
|
-
resource_type: Optional[
|
|
17403
|
+
resource_type: Optional[Any] = None,
|
|
17410
17404
|
observed_after: Optional[datetime] = None,
|
|
17411
17405
|
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
|
17412
17406
|
before_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
@@ -17498,10 +17492,10 @@ class EXTERNALApi:
|
|
|
17498
17492
|
def list_insights_insights_get_with_http_info(
|
|
17499
17493
|
self,
|
|
17500
17494
|
status: Annotated[Optional[List[InsightStatus]], Field(description="Repeat to list several statuses")] = None,
|
|
17501
|
-
severity: Optional[
|
|
17495
|
+
severity: Optional[Any] = None,
|
|
17502
17496
|
cluster_id: Optional[StrictInt] = None,
|
|
17503
17497
|
deployment_id: Optional[StrictInt] = None,
|
|
17504
|
-
resource_type: Optional[
|
|
17498
|
+
resource_type: Optional[Any] = None,
|
|
17505
17499
|
observed_after: Optional[datetime] = None,
|
|
17506
17500
|
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
|
17507
17501
|
before_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
@@ -17593,10 +17587,10 @@ class EXTERNALApi:
|
|
|
17593
17587
|
def list_insights_insights_get_without_preload_content(
|
|
17594
17588
|
self,
|
|
17595
17589
|
status: Annotated[Optional[List[InsightStatus]], Field(description="Repeat to list several statuses")] = None,
|
|
17596
|
-
severity: Optional[
|
|
17590
|
+
severity: Optional[Any] = None,
|
|
17597
17591
|
cluster_id: Optional[StrictInt] = None,
|
|
17598
17592
|
deployment_id: Optional[StrictInt] = None,
|
|
17599
|
-
resource_type: Optional[
|
|
17593
|
+
resource_type: Optional[Any] = None,
|
|
17600
17594
|
observed_after: Optional[datetime] = None,
|
|
17601
17595
|
limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None,
|
|
17602
17596
|
before_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
|
|
@@ -19472,7 +19466,7 @@ class EXTERNALApi:
|
|
|
19472
19466
|
def update_cluster_clusters_cluster_id_put(
|
|
19473
19467
|
self,
|
|
19474
19468
|
cluster_id: StrictInt,
|
|
19475
|
-
|
|
19469
|
+
update_cluster_request: UpdateClusterRequest,
|
|
19476
19470
|
_request_timeout: Union[
|
|
19477
19471
|
None,
|
|
19478
19472
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -19488,12 +19482,12 @@ class EXTERNALApi:
|
|
|
19488
19482
|
) -> object:
|
|
19489
19483
|
"""Update Cluster
|
|
19490
19484
|
|
|
19491
|
-
|
|
19485
|
+
Install the requested cluster_base components on an org-owned ccluster cluster. Applies the cluster's cluster-base component set and returns without waiting for the rollout, so repeating the call is safe. Components left out of the request are uninstalled.
|
|
19492
19486
|
|
|
19493
19487
|
:param cluster_id: (required)
|
|
19494
19488
|
:type cluster_id: int
|
|
19495
|
-
:param
|
|
19496
|
-
:type
|
|
19489
|
+
:param update_cluster_request: (required)
|
|
19490
|
+
:type update_cluster_request: UpdateClusterRequest
|
|
19497
19491
|
:param _request_timeout: timeout setting for this request. If one
|
|
19498
19492
|
number provided, it will be total request
|
|
19499
19493
|
timeout. It can also be a pair (tuple) of
|
|
@@ -19518,7 +19512,7 @@ class EXTERNALApi:
|
|
|
19518
19512
|
|
|
19519
19513
|
_param = self._update_cluster_clusters_cluster_id_put_serialize(
|
|
19520
19514
|
cluster_id=cluster_id,
|
|
19521
|
-
|
|
19515
|
+
update_cluster_request=update_cluster_request,
|
|
19522
19516
|
_request_auth=_request_auth,
|
|
19523
19517
|
_content_type=_content_type,
|
|
19524
19518
|
_headers=_headers,
|
|
@@ -19544,7 +19538,7 @@ class EXTERNALApi:
|
|
|
19544
19538
|
def update_cluster_clusters_cluster_id_put_with_http_info(
|
|
19545
19539
|
self,
|
|
19546
19540
|
cluster_id: StrictInt,
|
|
19547
|
-
|
|
19541
|
+
update_cluster_request: UpdateClusterRequest,
|
|
19548
19542
|
_request_timeout: Union[
|
|
19549
19543
|
None,
|
|
19550
19544
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -19560,12 +19554,12 @@ class EXTERNALApi:
|
|
|
19560
19554
|
) -> ApiResponse[object]:
|
|
19561
19555
|
"""Update Cluster
|
|
19562
19556
|
|
|
19563
|
-
|
|
19557
|
+
Install the requested cluster_base components on an org-owned ccluster cluster. Applies the cluster's cluster-base component set and returns without waiting for the rollout, so repeating the call is safe. Components left out of the request are uninstalled.
|
|
19564
19558
|
|
|
19565
19559
|
:param cluster_id: (required)
|
|
19566
19560
|
:type cluster_id: int
|
|
19567
|
-
:param
|
|
19568
|
-
:type
|
|
19561
|
+
:param update_cluster_request: (required)
|
|
19562
|
+
:type update_cluster_request: UpdateClusterRequest
|
|
19569
19563
|
:param _request_timeout: timeout setting for this request. If one
|
|
19570
19564
|
number provided, it will be total request
|
|
19571
19565
|
timeout. It can also be a pair (tuple) of
|
|
@@ -19590,7 +19584,7 @@ class EXTERNALApi:
|
|
|
19590
19584
|
|
|
19591
19585
|
_param = self._update_cluster_clusters_cluster_id_put_serialize(
|
|
19592
19586
|
cluster_id=cluster_id,
|
|
19593
|
-
|
|
19587
|
+
update_cluster_request=update_cluster_request,
|
|
19594
19588
|
_request_auth=_request_auth,
|
|
19595
19589
|
_content_type=_content_type,
|
|
19596
19590
|
_headers=_headers,
|
|
@@ -19616,7 +19610,7 @@ class EXTERNALApi:
|
|
|
19616
19610
|
def update_cluster_clusters_cluster_id_put_without_preload_content(
|
|
19617
19611
|
self,
|
|
19618
19612
|
cluster_id: StrictInt,
|
|
19619
|
-
|
|
19613
|
+
update_cluster_request: UpdateClusterRequest,
|
|
19620
19614
|
_request_timeout: Union[
|
|
19621
19615
|
None,
|
|
19622
19616
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -19632,12 +19626,12 @@ class EXTERNALApi:
|
|
|
19632
19626
|
) -> RESTResponseType:
|
|
19633
19627
|
"""Update Cluster
|
|
19634
19628
|
|
|
19635
|
-
|
|
19629
|
+
Install the requested cluster_base components on an org-owned ccluster cluster. Applies the cluster's cluster-base component set and returns without waiting for the rollout, so repeating the call is safe. Components left out of the request are uninstalled.
|
|
19636
19630
|
|
|
19637
19631
|
:param cluster_id: (required)
|
|
19638
19632
|
:type cluster_id: int
|
|
19639
|
-
:param
|
|
19640
|
-
:type
|
|
19633
|
+
:param update_cluster_request: (required)
|
|
19634
|
+
:type update_cluster_request: UpdateClusterRequest
|
|
19641
19635
|
:param _request_timeout: timeout setting for this request. If one
|
|
19642
19636
|
number provided, it will be total request
|
|
19643
19637
|
timeout. It can also be a pair (tuple) of
|
|
@@ -19662,7 +19656,7 @@ class EXTERNALApi:
|
|
|
19662
19656
|
|
|
19663
19657
|
_param = self._update_cluster_clusters_cluster_id_put_serialize(
|
|
19664
19658
|
cluster_id=cluster_id,
|
|
19665
|
-
|
|
19659
|
+
update_cluster_request=update_cluster_request,
|
|
19666
19660
|
_request_auth=_request_auth,
|
|
19667
19661
|
_content_type=_content_type,
|
|
19668
19662
|
_headers=_headers,
|
|
@@ -19683,7 +19677,7 @@ class EXTERNALApi:
|
|
|
19683
19677
|
def _update_cluster_clusters_cluster_id_put_serialize(
|
|
19684
19678
|
self,
|
|
19685
19679
|
cluster_id,
|
|
19686
|
-
|
|
19680
|
+
update_cluster_request,
|
|
19687
19681
|
_request_auth,
|
|
19688
19682
|
_content_type,
|
|
19689
19683
|
_headers,
|
|
@@ -19711,8 +19705,8 @@ class EXTERNALApi:
|
|
|
19711
19705
|
# process the header parameters
|
|
19712
19706
|
# process the form parameters
|
|
19713
19707
|
# process the body parameter
|
|
19714
|
-
if
|
|
19715
|
-
_body_params =
|
|
19708
|
+
if update_cluster_request is not None:
|
|
19709
|
+
_body_params = update_cluster_request
|
|
19716
19710
|
|
|
19717
19711
|
|
|
19718
19712
|
# set the HTTP header `Accept`
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
1
|
"""
|
|
4
2
|
Platform External API
|
|
5
3
|
|
|
@@ -12,6 +10,7 @@
|
|
|
12
10
|
""" # noqa: E501
|
|
13
11
|
|
|
14
12
|
|
|
13
|
+
|
|
15
14
|
import datetime
|
|
16
15
|
from dateutil.parser import parse
|
|
17
16
|
from enum import Enum
|
|
@@ -21,6 +20,7 @@ import mimetypes
|
|
|
21
20
|
import os
|
|
22
21
|
import re
|
|
23
22
|
import tempfile
|
|
23
|
+
import uuid
|
|
24
24
|
|
|
25
25
|
from urllib.parse import quote
|
|
26
26
|
from typing import Tuple, Optional, List, Dict, Union
|
|
@@ -68,6 +68,7 @@ class ApiClient:
|
|
|
68
68
|
'date': datetime.date,
|
|
69
69
|
'datetime': datetime.datetime,
|
|
70
70
|
'decimal': decimal.Decimal,
|
|
71
|
+
'UUID': uuid.UUID,
|
|
71
72
|
'object': object,
|
|
72
73
|
}
|
|
73
74
|
_pool = None
|
|
@@ -90,7 +91,7 @@ class ApiClient:
|
|
|
90
91
|
self.default_headers[header_name] = header_value
|
|
91
92
|
self.cookie = cookie
|
|
92
93
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/4.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/4.41.0/python'
|
|
94
95
|
self.client_side_validation = configuration.client_side_validation
|
|
95
96
|
|
|
96
97
|
def __enter__(self):
|
|
@@ -246,7 +247,6 @@ class ApiClient:
|
|
|
246
247
|
|
|
247
248
|
return method, url, header_params, body, post_params
|
|
248
249
|
|
|
249
|
-
|
|
250
250
|
def call_api(
|
|
251
251
|
self,
|
|
252
252
|
method,
|
|
@@ -301,17 +301,23 @@ class ApiClient:
|
|
|
301
301
|
# if not found, look for '1XX', '2XX', etc.
|
|
302
302
|
response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
|
|
303
303
|
|
|
304
|
+
# If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it.
|
|
305
|
+
if response_type is None and str(response_data.status) not in response_types_map \
|
|
306
|
+
and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \
|
|
307
|
+
and 'default' in response_types_map:
|
|
308
|
+
response_type = response_types_map['default']
|
|
309
|
+
|
|
304
310
|
# deserialize response data
|
|
305
311
|
response_text = None
|
|
306
312
|
return_data = None
|
|
307
313
|
try:
|
|
308
|
-
if response_type
|
|
314
|
+
if response_type in ("bytearray", "bytes"):
|
|
309
315
|
return_data = response_data.data
|
|
310
316
|
elif response_type == "file":
|
|
311
317
|
return_data = self.__deserialize_file(response_data)
|
|
312
318
|
elif response_type is not None:
|
|
313
319
|
match = None
|
|
314
|
-
content_type = response_data.
|
|
320
|
+
content_type = response_data.headers.get('content-type')
|
|
315
321
|
if content_type is not None:
|
|
316
322
|
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
|
|
317
323
|
encoding = match.group(1) if match else "utf-8"
|
|
@@ -328,7 +334,7 @@ class ApiClient:
|
|
|
328
334
|
return ApiResponse(
|
|
329
335
|
status_code = response_data.status,
|
|
330
336
|
data = return_data,
|
|
331
|
-
headers = response_data.
|
|
337
|
+
headers = response_data.headers,
|
|
332
338
|
raw_data = response_data.data
|
|
333
339
|
)
|
|
334
340
|
|
|
@@ -356,6 +362,8 @@ class ApiClient:
|
|
|
356
362
|
return obj.get_secret_value()
|
|
357
363
|
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
|
358
364
|
return obj
|
|
365
|
+
elif isinstance(obj, uuid.UUID):
|
|
366
|
+
return str(obj)
|
|
359
367
|
elif isinstance(obj, list):
|
|
360
368
|
return [
|
|
361
369
|
self.sanitize_for_serialization(sub_obj) for sub_obj in obj
|
|
@@ -368,24 +376,24 @@ class ApiClient:
|
|
|
368
376
|
return obj.isoformat()
|
|
369
377
|
elif isinstance(obj, decimal.Decimal):
|
|
370
378
|
return str(obj)
|
|
371
|
-
|
|
372
379
|
elif isinstance(obj, dict):
|
|
373
|
-
|
|
380
|
+
return {
|
|
381
|
+
key: self.sanitize_for_serialization(val)
|
|
382
|
+
for key, val in obj.items()
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
# Convert model obj to dict except
|
|
386
|
+
# attributes `openapi_types`, `attribute_map`
|
|
387
|
+
# and attributes which value is not None.
|
|
388
|
+
# Convert attribute name to json key in
|
|
389
|
+
# model definition for request.
|
|
390
|
+
if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
|
|
391
|
+
obj_dict = obj.to_dict()
|
|
374
392
|
else:
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
# Convert attribute name to json key in
|
|
379
|
-
# model definition for request.
|
|
380
|
-
if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
|
|
381
|
-
obj_dict = obj.to_dict()
|
|
382
|
-
else:
|
|
383
|
-
obj_dict = obj.__dict__
|
|
393
|
+
obj_dict = obj.__dict__
|
|
394
|
+
|
|
395
|
+
return self.sanitize_for_serialization(obj_dict)
|
|
384
396
|
|
|
385
|
-
return {
|
|
386
|
-
key: self.sanitize_for_serialization(val)
|
|
387
|
-
for key, val in obj_dict.items()
|
|
388
|
-
}
|
|
389
397
|
|
|
390
398
|
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
|
|
391
399
|
"""Deserializes response into an object.
|
|
@@ -404,7 +412,7 @@ class ApiClient:
|
|
|
404
412
|
data = json.loads(response_text)
|
|
405
413
|
except ValueError:
|
|
406
414
|
data = response_text
|
|
407
|
-
elif re.match(r'^application/(json|[\w
|
|
415
|
+
elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
|
408
416
|
if response_text == "":
|
|
409
417
|
data = ""
|
|
410
418
|
else:
|
|
@@ -431,6 +439,12 @@ class ApiClient:
|
|
|
431
439
|
return None
|
|
432
440
|
|
|
433
441
|
if isinstance(klass, str):
|
|
442
|
+
if klass.startswith('Optional['):
|
|
443
|
+
m = re.match(r'Optional\[(.*)]', klass)
|
|
444
|
+
assert m is not None, "Malformed Optional type definition"
|
|
445
|
+
# data is not None here, so the optionality is already resolved
|
|
446
|
+
return self.__deserialize(data, m.group(1))
|
|
447
|
+
|
|
434
448
|
if klass.startswith('List['):
|
|
435
449
|
m = re.match(r'List\[(.*)]', klass)
|
|
436
450
|
assert m is not None, "Malformed List type definition"
|
|
@@ -453,14 +467,16 @@ class ApiClient:
|
|
|
453
467
|
|
|
454
468
|
if klass in self.PRIMITIVE_TYPES:
|
|
455
469
|
return self.__deserialize_primitive(data, klass)
|
|
456
|
-
elif klass
|
|
470
|
+
elif klass is object:
|
|
457
471
|
return self.__deserialize_object(data)
|
|
458
|
-
elif klass
|
|
472
|
+
elif klass is datetime.date:
|
|
459
473
|
return self.__deserialize_date(data)
|
|
460
|
-
elif klass
|
|
474
|
+
elif klass is datetime.datetime:
|
|
461
475
|
return self.__deserialize_datetime(data)
|
|
462
|
-
elif klass
|
|
476
|
+
elif klass is decimal.Decimal:
|
|
463
477
|
return decimal.Decimal(data)
|
|
478
|
+
elif klass is uuid.UUID:
|
|
479
|
+
return uuid.UUID(data)
|
|
464
480
|
elif issubclass(klass, Enum):
|
|
465
481
|
return self.__deserialize_enum(data, klass)
|
|
466
482
|
else:
|
|
@@ -477,10 +493,15 @@ class ApiClient:
|
|
|
477
493
|
if collection_formats is None:
|
|
478
494
|
collection_formats = {}
|
|
479
495
|
for k, v in params.items() if isinstance(params, dict) else params:
|
|
496
|
+
if isinstance(v, bool):
|
|
497
|
+
v = str(v).lower()
|
|
480
498
|
if k in collection_formats:
|
|
481
499
|
collection_format = collection_formats[k]
|
|
482
500
|
if collection_format == 'multi':
|
|
483
|
-
new_params.extend(
|
|
501
|
+
new_params.extend(
|
|
502
|
+
(k, str(value).lower() if isinstance(value, bool) else value)
|
|
503
|
+
for value in v
|
|
504
|
+
)
|
|
484
505
|
else:
|
|
485
506
|
if collection_format == 'ssv':
|
|
486
507
|
delimiter = ' '
|
|
@@ -491,11 +512,20 @@ class ApiClient:
|
|
|
491
512
|
else: # csv is the default
|
|
492
513
|
delimiter = ','
|
|
493
514
|
new_params.append(
|
|
494
|
-
(k, delimiter.join(
|
|
515
|
+
(k, delimiter.join(
|
|
516
|
+
str(value).lower() if isinstance(value, bool) else str(value)
|
|
517
|
+
for value in v)))
|
|
495
518
|
else:
|
|
496
519
|
new_params.append((k, v))
|
|
497
520
|
return new_params
|
|
498
521
|
|
|
522
|
+
def explode_query_object(self, name, obj):
|
|
523
|
+
"""form style, explode: one query parameter per entry, keyed by the property name; a list repeats the name, None is left out"""
|
|
524
|
+
obj = self.sanitize_for_serialization(obj)
|
|
525
|
+
if not isinstance(obj, dict):
|
|
526
|
+
obj = {name: obj}
|
|
527
|
+
return [(k, item) for k, v in obj.items() for item in (v if isinstance(v, (list, tuple)) else [v]) if item is not None]
|
|
528
|
+
|
|
499
529
|
def parameters_to_url_query(self, params, collection_formats):
|
|
500
530
|
"""Get parameters as list of tuples, formatting collections.
|
|
501
531
|
|
|
@@ -514,10 +544,14 @@ class ApiClient:
|
|
|
514
544
|
if isinstance(v, dict):
|
|
515
545
|
v = json.dumps(v)
|
|
516
546
|
|
|
517
|
-
|
|
547
|
+
# a collection format applies only to a list; an exploded entry may share a declared array parameter's name
|
|
548
|
+
if k in collection_formats and isinstance(v, (list, tuple)):
|
|
518
549
|
collection_format = collection_formats[k]
|
|
519
550
|
if collection_format == 'multi':
|
|
520
|
-
new_params.extend(
|
|
551
|
+
new_params.extend(
|
|
552
|
+
(quote(str(k)), quote(str(value).lower() if isinstance(value, bool) else str(value)))
|
|
553
|
+
for value in v
|
|
554
|
+
)
|
|
521
555
|
else:
|
|
522
556
|
if collection_format == 'ssv':
|
|
523
557
|
delimiter = ' '
|
|
@@ -528,10 +562,13 @@ class ApiClient:
|
|
|
528
562
|
else: # csv is the default
|
|
529
563
|
delimiter = ','
|
|
530
564
|
new_params.append(
|
|
531
|
-
(k, delimiter.join(
|
|
565
|
+
(quote(str(k)), delimiter.join(
|
|
566
|
+
quote(str(value).lower() if isinstance(value, bool) else str(value))
|
|
567
|
+
for value in v))
|
|
532
568
|
)
|
|
533
569
|
else:
|
|
534
|
-
|
|
570
|
+
# names are quoted too: an exploded object's names are runtime data
|
|
571
|
+
new_params.append((quote(str(k)), quote(str(v))))
|
|
535
572
|
|
|
536
573
|
return "&".join(["=".join(map(str, item)) for item in new_params])
|
|
537
574
|
|
|
@@ -667,7 +704,13 @@ class ApiClient:
|
|
|
667
704
|
:param auth_setting: auth settings for the endpoint
|
|
668
705
|
"""
|
|
669
706
|
if auth_setting['in'] == 'cookie':
|
|
670
|
-
|
|
707
|
+
if not 'Cookie' in headers:
|
|
708
|
+
headers['Cookie'] = ""
|
|
709
|
+
else:
|
|
710
|
+
headers['Cookie'] += "; "
|
|
711
|
+
# Account for cookie value containing spaces and special characters, excluding base64 delimiters
|
|
712
|
+
cookie_value = quote(str(auth_setting['value']), safe="!#$%&'()*+-./:<=>?@[]^_`{|}~%+/=")
|
|
713
|
+
headers['Cookie'] += f"{auth_setting['key']}={cookie_value}"
|
|
671
714
|
elif auth_setting['in'] == 'header':
|
|
672
715
|
if auth_setting['type'] != 'http-signature':
|
|
673
716
|
headers[auth_setting['key']] = auth_setting['value']
|
|
@@ -694,14 +737,16 @@ class ApiClient:
|
|
|
694
737
|
os.close(fd)
|
|
695
738
|
os.remove(path)
|
|
696
739
|
|
|
697
|
-
content_disposition = response.
|
|
740
|
+
content_disposition = response.headers.get("Content-Disposition")
|
|
698
741
|
if content_disposition:
|
|
699
742
|
m = re.search(
|
|
700
743
|
r'filename=[\'"]?([^\'"\s]+)[\'"]?',
|
|
701
744
|
content_disposition
|
|
702
745
|
)
|
|
703
746
|
assert m is not None, "Unexpected 'content-disposition' header value"
|
|
704
|
-
filename = m.group(1)
|
|
747
|
+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
|
|
748
|
+
if filename in ("", ".", ".."): # fall back to tmp filename
|
|
749
|
+
filename = os.path.basename(path)
|
|
705
750
|
path = os.path.join(os.path.dirname(path), filename)
|
|
706
751
|
|
|
707
752
|
with open(path, "wb") as f:
|