platform-api-python-client 4.15.0__py3-none-any.whl → 4.23.1__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.
Files changed (68) hide show
  1. platform_api_python_client/__init__.py +50 -3
  2. platform_api_python_client/api/external_api.py +5460 -1700
  3. platform_api_python_client/api_client.py +1 -1
  4. platform_api_python_client/configuration.py +1 -1
  5. platform_api_python_client/models/__init__.py +49 -2
  6. platform_api_python_client/models/argo_rollouts.py +89 -0
  7. platform_api_python_client/models/cert_manager.py +89 -0
  8. platform_api_python_client/models/cloud_provider.py +39 -0
  9. platform_api_python_client/models/cluster_components.py +193 -0
  10. platform_api_python_client/models/cluster_config.py +91 -0
  11. platform_api_python_client/models/cluster_credential.py +91 -0
  12. platform_api_python_client/models/cluster_registration_request.py +110 -0
  13. platform_api_python_client/models/{create_url_response.py → cluster_registration_response.py} +8 -9
  14. platform_api_python_client/models/create_block_volume_request.py +125 -0
  15. platform_api_python_client/models/create_c_serve_v3_deployment_request.py +3 -1
  16. platform_api_python_client/models/create_compute_deployment_request.py +14 -3
  17. platform_api_python_client/models/create_compute_deployment_response.py +3 -10
  18. platform_api_python_client/models/create_dynamo_deployment_request.py +186 -0
  19. platform_api_python_client/models/create_dynamo_deployment_response.py +92 -0
  20. platform_api_python_client/models/create_inference_v3_deployment_request.py +3 -1
  21. platform_api_python_client/models/create_job_deployment_request.py +15 -2
  22. platform_api_python_client/models/create_object_volume_request.py +136 -0
  23. platform_api_python_client/models/create_service_account_request.py +97 -0
  24. platform_api_python_client/models/create_service_account_response.py +120 -0
  25. platform_api_python_client/models/create_volume_request.py +140 -0
  26. platform_api_python_client/models/deployment_component_type.py +40 -0
  27. platform_api_python_client/models/deployment_response.py +25 -10
  28. platform_api_python_client/models/deployment_type.py +1 -0
  29. platform_api_python_client/models/external_dns.py +89 -0
  30. platform_api_python_client/models/final_stack.py +89 -0
  31. platform_api_python_client/models/fluent_bit.py +89 -0
  32. platform_api_python_client/models/{create_url_request.py → generate_service_account_secret_response.py} +7 -9
  33. platform_api_python_client/models/get_block_volume_response.py +115 -0
  34. platform_api_python_client/models/get_compute_deployment_response.py +12 -1
  35. platform_api_python_client/models/get_dynamo_deployment_response.py +179 -0
  36. platform_api_python_client/models/get_job_deployment_response.py +13 -2
  37. platform_api_python_client/models/get_object_volume_response.py +141 -0
  38. platform_api_python_client/models/get_volume_response.py +140 -0
  39. platform_api_python_client/models/gpu_operator.py +89 -0
  40. platform_api_python_client/models/ingress_nginx.py +89 -0
  41. platform_api_python_client/models/istio.py +98 -0
  42. platform_api_python_client/models/istio_cni_overrides.py +99 -0
  43. platform_api_python_client/models/istio_cni_subchart_overrides.py +96 -0
  44. platform_api_python_client/models/istio_overrides.py +96 -0
  45. platform_api_python_client/models/keda.py +89 -0
  46. platform_api_python_client/models/kube_prometheus_stack.py +89 -0
  47. platform_api_python_client/models/list_service_accounts_response.py +95 -0
  48. platform_api_python_client/models/list_volumes_response.py +95 -0
  49. platform_api_python_client/models/longhorn.py +89 -0
  50. platform_api_python_client/models/metrics_server.py +89 -0
  51. platform_api_python_client/models/network_operator.py +89 -0
  52. platform_api_python_client/models/object_storage_provider.py +36 -0
  53. platform_api_python_client/models/opentelemetry_collector.py +89 -0
  54. platform_api_python_client/models/pod_details.py +9 -1
  55. platform_api_python_client/models/prometheus_adapter.py +89 -0
  56. platform_api_python_client/models/service_account_response.py +118 -0
  57. platform_api_python_client/models/spire.py +89 -0
  58. platform_api_python_client/models/spire_crds.py +89 -0
  59. platform_api_python_client/models/teleport_kube_agent.py +89 -0
  60. platform_api_python_client/models/update_service_account_request.py +107 -0
  61. platform_api_python_client/models/volume_access_mode.py +37 -0
  62. platform_api_python_client/models/volume_backend.py +37 -0
  63. platform_api_python_client/models/volume_status.py +37 -0
  64. platform_api_python_client/models/volume_status_response.py +108 -0
  65. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/METADATA +1 -1
  66. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/RECORD +68 -21
  67. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/WHEEL +1 -1
  68. {platform_api_python_client-4.15.0.dist-info → platform_api_python_client-4.23.1.dist-info}/top_level.txt +0 -0
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/4.15.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/4.23.1/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
@@ -392,7 +392,7 @@ class Configuration:
392
392
  "OS: {env}\n"\
393
393
  "Python Version: {pyversion}\n"\
394
394
  "Version of the API: 0.1.0\n"\
395
- "SDK Package Version: 4.15.0".\
395
+ "SDK Package Version: 4.23.1".\
396
396
  format(env=sys.platform, pyversion=sys.version)
397
397
 
398
398
  def get_host_settings(self):
@@ -14,28 +14,42 @@
14
14
 
15
15
 
16
16
  # import models into model package
17
+ from platform_api_python_client.models.argo_rollouts import ArgoRollouts
17
18
  from platform_api_python_client.models.backend_protocol import BackendProtocol
18
19
  from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf
19
20
  from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse
20
21
  from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
22
+ from platform_api_python_client.models.cert_manager import CertManager
23
+ from platform_api_python_client.models.cloud_provider import CloudProvider
21
24
  from platform_api_python_client.models.cluster_capacity_response import ClusterCapacityResponse
25
+ from platform_api_python_client.models.cluster_components import ClusterComponents
26
+ from platform_api_python_client.models.cluster_config import ClusterConfig
27
+ from platform_api_python_client.models.cluster_credential import ClusterCredential
28
+ from platform_api_python_client.models.cluster_registration_request import ClusterRegistrationRequest
29
+ from platform_api_python_client.models.cluster_registration_response import ClusterRegistrationResponse
22
30
  from platform_api_python_client.models.config_file_mount import ConfigFileMount
31
+ from platform_api_python_client.models.create_block_volume_request import CreateBlockVolumeRequest
23
32
  from platform_api_python_client.models.create_c_serve_v2_deployment_response import CreateCServeV2DeploymentResponse
24
33
  from platform_api_python_client.models.create_c_serve_v3_deployment_request import CreateCServeV3DeploymentRequest
25
34
  from platform_api_python_client.models.create_c_serve_v3_deployment_response import CreateCServeV3DeploymentResponse
26
35
  from platform_api_python_client.models.create_compute_deployment_request import CreateComputeDeploymentRequest
27
36
  from platform_api_python_client.models.create_compute_deployment_response import CreateComputeDeploymentResponse
37
+ from platform_api_python_client.models.create_dynamo_deployment_request import CreateDynamoDeploymentRequest
38
+ from platform_api_python_client.models.create_dynamo_deployment_response import CreateDynamoDeploymentResponse
28
39
  from platform_api_python_client.models.create_hardware_instance_request import CreateHardwareInstanceRequest
29
40
  from platform_api_python_client.models.create_inference_deployment_response import CreateInferenceDeploymentResponse
30
41
  from platform_api_python_client.models.create_inference_v3_deployment_request import CreateInferenceV3DeploymentRequest
31
42
  from platform_api_python_client.models.create_job_deployment_request import CreateJobDeploymentRequest
32
43
  from platform_api_python_client.models.create_job_deployment_response import CreateJobDeploymentResponse
44
+ from platform_api_python_client.models.create_object_volume_request import CreateObjectVolumeRequest
33
45
  from platform_api_python_client.models.create_organization_request import CreateOrganizationRequest
34
46
  from platform_api_python_client.models.create_organization_response import CreateOrganizationResponse
35
- from platform_api_python_client.models.create_url_request import CreateUrlRequest
36
- from platform_api_python_client.models.create_url_response import CreateUrlResponse
47
+ from platform_api_python_client.models.create_service_account_request import CreateServiceAccountRequest
48
+ from platform_api_python_client.models.create_service_account_response import CreateServiceAccountResponse
49
+ from platform_api_python_client.models.create_volume_request import CreateVolumeRequest
37
50
  from platform_api_python_client.models.credits_response import CreditsResponse
38
51
  from platform_api_python_client.models.daily_bill_response import DailyBillResponse
52
+ from platform_api_python_client.models.deployment_component_type import DeploymentComponentType
39
53
  from platform_api_python_client.models.deployment_response import DeploymentResponse
40
54
  from platform_api_python_client.models.deployment_status import DeploymentStatus
41
55
  from platform_api_python_client.models.deployment_status_request import DeploymentStatusRequest
@@ -44,6 +58,11 @@ from platform_api_python_client.models.deployment_status_v3_response import Depl
44
58
  from platform_api_python_client.models.deployment_type import DeploymentType
45
59
  from platform_api_python_client.models.deployment_usage import DeploymentUsage
46
60
  from platform_api_python_client.models.deployment_usage_value import DeploymentUsageValue
61
+ from platform_api_python_client.models.external_dns import ExternalDns
62
+ from platform_api_python_client.models.final_stack import FinalStack
63
+ from platform_api_python_client.models.fluent_bit import FluentBit
64
+ from platform_api_python_client.models.generate_service_account_secret_response import GenerateServiceAccountSecretResponse
65
+ from platform_api_python_client.models.get_block_volume_response import GetBlockVolumeResponse
47
66
  from platform_api_python_client.models.get_c_serve_v2_deployment_response import GetCServeV2DeploymentResponse
48
67
  from platform_api_python_client.models.get_c_serve_v3_deployment_response import GetCServeV3DeploymentResponse
49
68
  from platform_api_python_client.models.get_cluster_response import GetClusterResponse
@@ -52,14 +71,25 @@ from platform_api_python_client.models.get_deployment_log_response import GetDep
52
71
  from platform_api_python_client.models.get_deployment_response import GetDeploymentResponse
53
72
  from platform_api_python_client.models.get_deployment_revision_response import GetDeploymentRevisionResponse
54
73
  from platform_api_python_client.models.get_deployment_usage_response import GetDeploymentUsageResponse
74
+ from platform_api_python_client.models.get_dynamo_deployment_response import GetDynamoDeploymentResponse
55
75
  from platform_api_python_client.models.get_inference_deployment_response import GetInferenceDeploymentResponse
56
76
  from platform_api_python_client.models.get_inference_v3_deployment_response import GetInferenceV3DeploymentResponse
57
77
  from platform_api_python_client.models.get_job_deployment_response import GetJobDeploymentResponse
78
+ from platform_api_python_client.models.get_object_volume_response import GetObjectVolumeResponse
79
+ from platform_api_python_client.models.get_volume_response import GetVolumeResponse
80
+ from platform_api_python_client.models.gpu_operator import GpuOperator
58
81
  from platform_api_python_client.models.gpu_type_capacity import GpuTypeCapacity
59
82
  from platform_api_python_client.models.http_validation_error import HTTPValidationError
60
83
  from platform_api_python_client.models.hardware_instance_response import HardwareInstanceResponse
61
84
  from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
85
+ from platform_api_python_client.models.ingress_nginx import IngressNginx
62
86
  from platform_api_python_client.models.invite_user_request import InviteUserRequest
87
+ from platform_api_python_client.models.istio import Istio
88
+ from platform_api_python_client.models.istio_cni_overrides import IstioCniOverrides
89
+ from platform_api_python_client.models.istio_cni_subchart_overrides import IstioCniSubchartOverrides
90
+ from platform_api_python_client.models.istio_overrides import IstioOverrides
91
+ from platform_api_python_client.models.keda import Keda
92
+ from platform_api_python_client.models.kube_prometheus_stack import KubePrometheusStack
63
93
  from platform_api_python_client.models.list_c_serve_recipe_response import ListCServeRecipeResponse
64
94
  from platform_api_python_client.models.list_cluster_capacity_response import ListClusterCapacityResponse
65
95
  from platform_api_python_client.models.list_daily_bill_response import ListDailyBillResponse
@@ -68,20 +98,37 @@ from platform_api_python_client.models.list_get_cluster_response import ListGetC
68
98
  from platform_api_python_client.models.list_get_deployment_response import ListGetDeploymentResponse
69
99
  from platform_api_python_client.models.list_hardware_instance_response import ListHardwareInstanceResponse
70
100
  from platform_api_python_client.models.list_prebuilt_image_response import ListPrebuiltImageResponse
101
+ from platform_api_python_client.models.list_service_accounts_response import ListServiceAccountsResponse
71
102
  from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse
103
+ from platform_api_python_client.models.list_volumes_response import ListVolumesResponse
104
+ from platform_api_python_client.models.longhorn import Longhorn
72
105
  from platform_api_python_client.models.metric import Metric
73
106
  from platform_api_python_client.models.metrics_config import MetricsConfig
107
+ from platform_api_python_client.models.metrics_server import MetricsServer
108
+ from platform_api_python_client.models.network_operator import NetworkOperator
109
+ from platform_api_python_client.models.object_storage_provider import ObjectStorageProvider
110
+ from platform_api_python_client.models.opentelemetry_collector import OpentelemetryCollector
74
111
  from platform_api_python_client.models.pod_details import PodDetails
75
112
  from platform_api_python_client.models.pod_status import PodStatus
76
113
  from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
114
+ from platform_api_python_client.models.prometheus_adapter import PrometheusAdapter
77
115
  from platform_api_python_client.models.revision_pod_details import RevisionPodDetails
78
116
  from platform_api_python_client.models.rollout_status import RolloutStatus
79
117
  from platform_api_python_client.models.rollout_strategy_params import RolloutStrategyParams
118
+ from platform_api_python_client.models.service_account_response import ServiceAccountResponse
80
119
  from platform_api_python_client.models.service_status import ServiceStatus
120
+ from platform_api_python_client.models.spire import Spire
121
+ from platform_api_python_client.models.spire_crds import SpireCrds
122
+ from platform_api_python_client.models.teleport_kube_agent import TeleportKubeAgent
81
123
  from platform_api_python_client.models.update_deployment_response import UpdateDeploymentResponse
82
124
  from platform_api_python_client.models.update_deployment_status_v3_request import UpdateDeploymentStatusV3Request
125
+ from platform_api_python_client.models.update_service_account_request import UpdateServiceAccountRequest
83
126
  from platform_api_python_client.models.user_vault_item import UserVaultItem
84
127
  from platform_api_python_client.models.user_vault_type import UserVaultType
85
128
  from platform_api_python_client.models.validation_error import ValidationError
86
129
  from platform_api_python_client.models.validation_error_loc_inner import ValidationErrorLocInner
87
130
  from platform_api_python_client.models.vault_scope import VaultScope
131
+ from platform_api_python_client.models.volume_access_mode import VolumeAccessMode
132
+ from platform_api_python_client.models.volume_backend import VolumeBackend
133
+ from platform_api_python_client.models.volume_status import VolumeStatus
134
+ from platform_api_python_client.models.volume_status_response import VolumeStatusResponse
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ArgoRollouts(BaseModel):
26
+ """
27
+ ArgoRollouts
28
+ """ # noqa: E501
29
+ enabled: Optional[StrictBool] = True
30
+ values: Optional[Dict[str, Any]] = None
31
+ __properties: ClassVar[List[str]] = ["enabled", "values"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ArgoRollouts from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of ArgoRollouts from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
85
+ "values": obj.get("values")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class CertManager(BaseModel):
26
+ """
27
+ CertManager
28
+ """ # noqa: E501
29
+ enabled: Optional[StrictBool] = True
30
+ values: Optional[Dict[str, Any]] = None
31
+ __properties: ClassVar[List[str]] = ["enabled", "values"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of CertManager from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of CertManager from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
85
+ "values": obj.get("values")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class CloudProvider(str, Enum):
22
+ """
23
+ CloudProvider
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ GCP = 'gcp'
30
+ AWS = 'aws'
31
+ AZURE = 'azure'
32
+ NEBIUS = 'nebius'
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of CloudProvider from a JSON string"""
37
+ return cls(json.loads(json_str))
38
+
39
+
@@ -0,0 +1,193 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from platform_api_python_client.models.argo_rollouts import ArgoRollouts
23
+ from platform_api_python_client.models.cert_manager import CertManager
24
+ from platform_api_python_client.models.external_dns import ExternalDns
25
+ from platform_api_python_client.models.final_stack import FinalStack
26
+ from platform_api_python_client.models.fluent_bit import FluentBit
27
+ from platform_api_python_client.models.gpu_operator import GpuOperator
28
+ from platform_api_python_client.models.ingress_nginx import IngressNginx
29
+ from platform_api_python_client.models.istio import Istio
30
+ from platform_api_python_client.models.keda import Keda
31
+ from platform_api_python_client.models.kube_prometheus_stack import KubePrometheusStack
32
+ from platform_api_python_client.models.longhorn import Longhorn
33
+ from platform_api_python_client.models.metrics_server import MetricsServer
34
+ from platform_api_python_client.models.network_operator import NetworkOperator
35
+ from platform_api_python_client.models.opentelemetry_collector import OpentelemetryCollector
36
+ from platform_api_python_client.models.prometheus_adapter import PrometheusAdapter
37
+ from platform_api_python_client.models.spire import Spire
38
+ from platform_api_python_client.models.spire_crds import SpireCrds
39
+ from platform_api_python_client.models.teleport_kube_agent import TeleportKubeAgent
40
+ from typing import Optional, Set
41
+ from typing_extensions import Self
42
+
43
+ class ClusterComponents(BaseModel):
44
+ """
45
+ Per-component ApplicationSet entries — the caller-facing surface. This is the request-body schema for cluster updates: callers may flip `enabled` and supply per-component `values`, but nothing here is cluster identity. Cluster identity lives in `Shared` and is passed as serialization context when building ApplicationSet elements. Field declaration order is for code locality only — actual bring-up order is driven by each subclass's `wave` ClassVar (rendered into the child Application's argocd.argoproj.io/sync-wave annotation).
46
+ """ # noqa: E501
47
+ kube_prometheus_stack: Optional[KubePrometheusStack] = None
48
+ istio: Optional[Istio] = None
49
+ cert_manager: Optional[CertManager] = None
50
+ ingress_nginx: Optional[IngressNginx] = None
51
+ spire_crds: Optional[SpireCrds] = None
52
+ spire: Optional[Spire] = None
53
+ external_dns: Optional[ExternalDns] = None
54
+ prometheus_adapter: Optional[PrometheusAdapter] = None
55
+ keda: Optional[Keda] = None
56
+ fluent_bit: Optional[FluentBit] = None
57
+ argo_rollouts: Optional[ArgoRollouts] = None
58
+ network_operator: Optional[NetworkOperator] = None
59
+ opentelemetry_collector: Optional[OpentelemetryCollector] = None
60
+ gpu_operator: Optional[GpuOperator] = None
61
+ longhorn: Optional[Longhorn] = None
62
+ metrics_server: Optional[MetricsServer] = None
63
+ teleport_kube_agent: Optional[TeleportKubeAgent] = None
64
+ final_stack: Optional[FinalStack] = None
65
+ __properties: ClassVar[List[str]] = ["kube_prometheus_stack", "istio", "cert_manager", "ingress_nginx", "spire_crds", "spire", "external_dns", "prometheus_adapter", "keda", "fluent_bit", "argo_rollouts", "network_operator", "opentelemetry_collector", "gpu_operator", "longhorn", "metrics_server", "teleport_kube_agent", "final_stack"]
66
+
67
+ model_config = ConfigDict(
68
+ populate_by_name=True,
69
+ validate_assignment=True,
70
+ protected_namespaces=(),
71
+ )
72
+
73
+
74
+ def to_str(self) -> str:
75
+ """Returns the string representation of the model using alias"""
76
+ return pprint.pformat(self.model_dump(by_alias=True))
77
+
78
+ def to_json(self) -> str:
79
+ """Returns the JSON representation of the model using alias"""
80
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
81
+ return json.dumps(self.to_dict())
82
+
83
+ @classmethod
84
+ def from_json(cls, json_str: str) -> Optional[Self]:
85
+ """Create an instance of ClusterComponents from a JSON string"""
86
+ return cls.from_dict(json.loads(json_str))
87
+
88
+ def to_dict(self) -> Dict[str, Any]:
89
+ """Return the dictionary representation of the model using alias.
90
+
91
+ This has the following differences from calling pydantic's
92
+ `self.model_dump(by_alias=True)`:
93
+
94
+ * `None` is only added to the output dict for nullable fields that
95
+ were set at model initialization. Other fields with value `None`
96
+ are ignored.
97
+ """
98
+ excluded_fields: Set[str] = set([
99
+ ])
100
+
101
+ _dict = self.model_dump(
102
+ by_alias=True,
103
+ exclude=excluded_fields,
104
+ exclude_none=True,
105
+ )
106
+ # override the default output from pydantic by calling `to_dict()` of kube_prometheus_stack
107
+ if self.kube_prometheus_stack:
108
+ _dict['kube_prometheus_stack'] = self.kube_prometheus_stack.to_dict()
109
+ # override the default output from pydantic by calling `to_dict()` of istio
110
+ if self.istio:
111
+ _dict['istio'] = self.istio.to_dict()
112
+ # override the default output from pydantic by calling `to_dict()` of cert_manager
113
+ if self.cert_manager:
114
+ _dict['cert_manager'] = self.cert_manager.to_dict()
115
+ # override the default output from pydantic by calling `to_dict()` of ingress_nginx
116
+ if self.ingress_nginx:
117
+ _dict['ingress_nginx'] = self.ingress_nginx.to_dict()
118
+ # override the default output from pydantic by calling `to_dict()` of spire_crds
119
+ if self.spire_crds:
120
+ _dict['spire_crds'] = self.spire_crds.to_dict()
121
+ # override the default output from pydantic by calling `to_dict()` of spire
122
+ if self.spire:
123
+ _dict['spire'] = self.spire.to_dict()
124
+ # override the default output from pydantic by calling `to_dict()` of external_dns
125
+ if self.external_dns:
126
+ _dict['external_dns'] = self.external_dns.to_dict()
127
+ # override the default output from pydantic by calling `to_dict()` of prometheus_adapter
128
+ if self.prometheus_adapter:
129
+ _dict['prometheus_adapter'] = self.prometheus_adapter.to_dict()
130
+ # override the default output from pydantic by calling `to_dict()` of keda
131
+ if self.keda:
132
+ _dict['keda'] = self.keda.to_dict()
133
+ # override the default output from pydantic by calling `to_dict()` of fluent_bit
134
+ if self.fluent_bit:
135
+ _dict['fluent_bit'] = self.fluent_bit.to_dict()
136
+ # override the default output from pydantic by calling `to_dict()` of argo_rollouts
137
+ if self.argo_rollouts:
138
+ _dict['argo_rollouts'] = self.argo_rollouts.to_dict()
139
+ # override the default output from pydantic by calling `to_dict()` of network_operator
140
+ if self.network_operator:
141
+ _dict['network_operator'] = self.network_operator.to_dict()
142
+ # override the default output from pydantic by calling `to_dict()` of opentelemetry_collector
143
+ if self.opentelemetry_collector:
144
+ _dict['opentelemetry_collector'] = self.opentelemetry_collector.to_dict()
145
+ # override the default output from pydantic by calling `to_dict()` of gpu_operator
146
+ if self.gpu_operator:
147
+ _dict['gpu_operator'] = self.gpu_operator.to_dict()
148
+ # override the default output from pydantic by calling `to_dict()` of longhorn
149
+ if self.longhorn:
150
+ _dict['longhorn'] = self.longhorn.to_dict()
151
+ # override the default output from pydantic by calling `to_dict()` of metrics_server
152
+ if self.metrics_server:
153
+ _dict['metrics_server'] = self.metrics_server.to_dict()
154
+ # override the default output from pydantic by calling `to_dict()` of teleport_kube_agent
155
+ if self.teleport_kube_agent:
156
+ _dict['teleport_kube_agent'] = self.teleport_kube_agent.to_dict()
157
+ # override the default output from pydantic by calling `to_dict()` of final_stack
158
+ if self.final_stack:
159
+ _dict['final_stack'] = self.final_stack.to_dict()
160
+ return _dict
161
+
162
+ @classmethod
163
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
164
+ """Create an instance of ClusterComponents from a dict"""
165
+ if obj is None:
166
+ return None
167
+
168
+ if not isinstance(obj, dict):
169
+ return cls.model_validate(obj)
170
+
171
+ _obj = cls.model_validate({
172
+ "kube_prometheus_stack": KubePrometheusStack.from_dict(obj["kube_prometheus_stack"]) if obj.get("kube_prometheus_stack") is not None else None,
173
+ "istio": Istio.from_dict(obj["istio"]) if obj.get("istio") is not None else None,
174
+ "cert_manager": CertManager.from_dict(obj["cert_manager"]) if obj.get("cert_manager") is not None else None,
175
+ "ingress_nginx": IngressNginx.from_dict(obj["ingress_nginx"]) if obj.get("ingress_nginx") is not None else None,
176
+ "spire_crds": SpireCrds.from_dict(obj["spire_crds"]) if obj.get("spire_crds") is not None else None,
177
+ "spire": Spire.from_dict(obj["spire"]) if obj.get("spire") is not None else None,
178
+ "external_dns": ExternalDns.from_dict(obj["external_dns"]) if obj.get("external_dns") is not None else None,
179
+ "prometheus_adapter": PrometheusAdapter.from_dict(obj["prometheus_adapter"]) if obj.get("prometheus_adapter") is not None else None,
180
+ "keda": Keda.from_dict(obj["keda"]) if obj.get("keda") is not None else None,
181
+ "fluent_bit": FluentBit.from_dict(obj["fluent_bit"]) if obj.get("fluent_bit") is not None else None,
182
+ "argo_rollouts": ArgoRollouts.from_dict(obj["argo_rollouts"]) if obj.get("argo_rollouts") is not None else None,
183
+ "network_operator": NetworkOperator.from_dict(obj["network_operator"]) if obj.get("network_operator") is not None else None,
184
+ "opentelemetry_collector": OpentelemetryCollector.from_dict(obj["opentelemetry_collector"]) if obj.get("opentelemetry_collector") is not None else None,
185
+ "gpu_operator": GpuOperator.from_dict(obj["gpu_operator"]) if obj.get("gpu_operator") is not None else None,
186
+ "longhorn": Longhorn.from_dict(obj["longhorn"]) if obj.get("longhorn") is not None else None,
187
+ "metrics_server": MetricsServer.from_dict(obj["metrics_server"]) if obj.get("metrics_server") is not None else None,
188
+ "teleport_kube_agent": TeleportKubeAgent.from_dict(obj["teleport_kube_agent"]) if obj.get("teleport_kube_agent") is not None else None,
189
+ "final_stack": FinalStack.from_dict(obj["final_stack"]) if obj.get("final_stack") is not None else None
190
+ })
191
+ return _obj
192
+
193
+
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Platform External API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List
22
+ from platform_api_python_client.models.cluster_components import ClusterComponents
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ClusterConfig(BaseModel):
27
+ """
28
+ ClusterConfig
29
+ """ # noqa: E501
30
+ components: ClusterComponents
31
+ __properties: ClassVar[List[str]] = ["components"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ClusterConfig from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of components
73
+ if self.components:
74
+ _dict['components'] = self.components.to_dict()
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of ClusterConfig from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "components": ClusterComponents.from_dict(obj["components"]) if obj.get("components") is not None else None
88
+ })
89
+ return _obj
90
+
91
+