Skip to content

Commit 200620c

Browse files
Generate ske
1 parent 3cb4c01 commit 200620c

22 files changed

Lines changed: 649 additions & 29 deletions

‎services/ske/oas_commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ea0931a6f93703c990517136e0d4c7a88455b282
1+
bead0331c9760ab4d2ff87614ae3ad156bc46758

‎services/ske/src/stackit/ske/__init__.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@
3030
"ACL",
3131
"Access",
3232
"AccessScope",
33+
"ApplicationLoadBalancer",
3334
"Audit",
3435
"AvailabilityZone",
36+
"CNI",
3537
"CRI",
38+
"CiliumConfig",
39+
"CiliumHubble",
3640
"Cluster",
3741
"ClusterError",
3842
"ClusterStatus",
@@ -51,6 +55,7 @@
5155
"IDP",
5256
"IDPKubeconfig",
5357
"Image",
58+
"Kata",
5459
"Kubeconfig",
5560
"Kubernetes",
5661
"KubernetesVersion",
@@ -59,6 +64,7 @@
5964
"Machine",
6065
"MachineImage",
6166
"MachineImageVersion",
67+
"MachineImageVersionCRI",
6268
"MachineType",
6369
"Maintenance",
6470
"MaintenanceAutoUpdate",
@@ -93,14 +99,20 @@
9399

94100
# import models into sdk package
95101
from stackit.ske.models.acl import ACL as ACL
102+
from stackit.ske.models.application_load_balancer import (
103+
ApplicationLoadBalancer as ApplicationLoadBalancer,
104+
)
96105
from stackit.ske.models.audit import Audit as Audit
97106
from stackit.ske.models.availability_zone import AvailabilityZone as AvailabilityZone
107+
from stackit.ske.models.cilium_config import CiliumConfig as CiliumConfig
108+
from stackit.ske.models.cilium_hubble import CiliumHubble as CiliumHubble
98109
from stackit.ske.models.cluster import Cluster as Cluster
99110
from stackit.ske.models.cluster_error import ClusterError as ClusterError
100111
from stackit.ske.models.cluster_status import ClusterStatus as ClusterStatus
101112
from stackit.ske.models.cluster_status_state import (
102113
ClusterStatusState as ClusterStatusState,
103114
)
115+
from stackit.ske.models.cni import CNI as CNI
104116
from stackit.ske.models.create_kubeconfig_payload import (
105117
CreateKubeconfigPayload as CreateKubeconfigPayload,
106118
)
@@ -130,6 +142,7 @@
130142
from stackit.ske.models.idp import IDP as IDP
131143
from stackit.ske.models.idp_kubeconfig import IDPKubeconfig as IDPKubeconfig
132144
from stackit.ske.models.image import Image as Image
145+
from stackit.ske.models.kata import Kata as Kata
133146
from stackit.ske.models.kubeconfig import Kubeconfig as Kubeconfig
134147
from stackit.ske.models.kubernetes import Kubernetes as Kubernetes
135148
from stackit.ske.models.kubernetes_version import KubernetesVersion as KubernetesVersion
@@ -142,6 +155,9 @@
142155
from stackit.ske.models.machine_image_version import (
143156
MachineImageVersion as MachineImageVersion,
144157
)
158+
from stackit.ske.models.machine_image_version_cri import (
159+
MachineImageVersionCRI as MachineImageVersionCRI,
160+
)
145161
from stackit.ske.models.machine_type import MachineType as MachineType
146162
from stackit.ske.models.maintenance import Maintenance as Maintenance
147163
from stackit.ske.models.maintenance_auto_update import (

‎services/ske/src/stackit/ske/api/default_api.py‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,10 @@ def create_or_update_cluster(
610610
project_id: StrictStr,
611611
region: StrictStr,
612612
cluster_name: Annotated[
613-
StrictStr,
613+
str,
614614
Field(
615-
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long."
615+
strict=True,
616+
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long.",
616617
),
617618
],
618619
create_or_update_cluster_payload: CreateOrUpdateClusterPayload,
@@ -690,9 +691,10 @@ def create_or_update_cluster_with_http_info(
690691
project_id: StrictStr,
691692
region: StrictStr,
692693
cluster_name: Annotated[
693-
StrictStr,
694+
str,
694695
Field(
695-
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long."
696+
strict=True,
697+
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long.",
696698
),
697699
],
698700
create_or_update_cluster_payload: CreateOrUpdateClusterPayload,
@@ -770,9 +772,10 @@ def create_or_update_cluster_without_preload_content(
770772
project_id: StrictStr,
771773
region: StrictStr,
772774
cluster_name: Annotated[
773-
StrictStr,
775+
str,
774776
Field(
775-
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long."
777+
strict=True,
778+
description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long.",
776779
),
777780
],
778781
create_or_update_cluster_payload: CreateOrUpdateClusterPayload,

‎services/ske/src/stackit/ske/models/__init__.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@
1717

1818
# import models into model package
1919
from stackit.ske.models.acl import ACL
20+
from stackit.ske.models.application_load_balancer import ApplicationLoadBalancer
2021
from stackit.ske.models.audit import Audit
2122
from stackit.ske.models.availability_zone import AvailabilityZone
23+
from stackit.ske.models.cilium_config import CiliumConfig
24+
from stackit.ske.models.cilium_hubble import CiliumHubble
2225
from stackit.ske.models.cluster import Cluster
2326
from stackit.ske.models.cluster_error import ClusterError
2427
from stackit.ske.models.cluster_status import ClusterStatus
2528
from stackit.ske.models.cluster_status_state import ClusterStatusState
29+
from stackit.ske.models.cni import CNI
2630
from stackit.ske.models.create_kubeconfig_payload import CreateKubeconfigPayload
2731
from stackit.ske.models.create_or_update_cluster_payload import (
2832
CreateOrUpdateClusterPayload,
@@ -42,6 +46,7 @@
4246
from stackit.ske.models.idp import IDP
4347
from stackit.ske.models.idp_kubeconfig import IDPKubeconfig
4448
from stackit.ske.models.image import Image
49+
from stackit.ske.models.kata import Kata
4550
from stackit.ske.models.kubeconfig import Kubeconfig
4651
from stackit.ske.models.kubernetes import Kubernetes
4752
from stackit.ske.models.kubernetes_version import KubernetesVersion
@@ -50,6 +55,7 @@
5055
from stackit.ske.models.machine import Machine
5156
from stackit.ske.models.machine_image import MachineImage
5257
from stackit.ske.models.machine_image_version import MachineImageVersion
58+
from stackit.ske.models.machine_image_version_cri import MachineImageVersionCRI
5359
from stackit.ske.models.machine_type import MachineType
5460
from stackit.ske.models.maintenance import Maintenance
5561
from stackit.ske.models.maintenance_auto_update import MaintenanceAutoUpdate

‎services/ske/src/stackit/ske/models/access_scope.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class AccessScope(str, Enum):
2323
"""
24-
The access scope of the Control Plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. This field is immutable. ⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
24+
The access scope of the Control Plane. It defines if the Kubernetes control plane is public or only available inside a STACKIT Network Area. ⚠️ Warning: Changing the access scope on an existing cluster directly impacts its network exposure (e.g., making a private cluster publicly accessible) ⚠️ Note: This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
2525
"""
2626

2727
"""

‎services/ske/src/stackit/ske/models/acl.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
StrictStr,
2626
)
2727
from pydantic_core import to_jsonable_python
28-
from typing_extensions import Annotated, Self
28+
from typing_extensions import Self
2929

3030

3131
class ACL(BaseModel):
3232
"""
3333
ACL
3434
""" # noqa: E501
3535

36-
allowed_cidrs: Annotated[List[StrictStr], Field(max_length=10)] = Field(
36+
allowed_cidrs: List[StrictStr] = Field(
3737
description="Array of CIDRs to allow access to the kubernetes API.", alias="allowedCidrs"
3838
)
3939
enabled: StrictBool = Field(description="Enables the acl extension.")
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# coding: utf-8
2+
3+
"""
4+
STACKIT Kubernetes Engine API
5+
6+
The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks.
7+
8+
The version of the OpenAPI document: 2.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501
13+
14+
from __future__ import annotations
15+
16+
import json
17+
import pprint
18+
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
20+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
21+
from pydantic_core import to_jsonable_python
22+
from typing_extensions import Self
23+
24+
25+
class ApplicationLoadBalancer(BaseModel):
26+
"""
27+
ApplicationLoadBalancer
28+
""" # noqa: E501
29+
30+
enabled: StrictBool = Field(
31+
description="Enables the application load balancer extension. ⚠️ Note: This feature is in private preview. Enabling application load balancer extension is only possible for enabled accounts. Otherwise the request will be rejected."
32+
)
33+
__properties: ClassVar[List[str]] = ["enabled"]
34+
35+
model_config = ConfigDict(
36+
validate_by_name=True,
37+
validate_by_alias=True,
38+
validate_assignment=True,
39+
protected_namespaces=(),
40+
)
41+
42+
def to_str(self) -> str:
43+
"""Returns the string representation of the model using alias"""
44+
return pprint.pformat(self.model_dump(by_alias=True))
45+
46+
def to_json(self) -> str:
47+
"""Returns the JSON representation of the model using alias"""
48+
return json.dumps(to_jsonable_python(self.to_dict()))
49+
50+
@classmethod
51+
def from_json(cls, json_str: str) -> Optional[Self]:
52+
"""Create an instance of ApplicationLoadBalancer from a JSON string"""
53+
return cls.from_dict(json.loads(json_str))
54+
55+
def to_dict(self) -> Dict[str, Any]:
56+
"""Return the dictionary representation of the model using alias.
57+
58+
This has the following differences from calling pydantic's
59+
`self.model_dump(by_alias=True)`:
60+
61+
* `None` is only added to the output dict for nullable fields that
62+
were set at model initialization. Other fields with value `None`
63+
are ignored.
64+
"""
65+
excluded_fields: Set[str] = set([])
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 ApplicationLoadBalancer 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({"enabled": obj.get("enabled")})
84+
return _obj
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# coding: utf-8
2+
3+
"""
4+
STACKIT Kubernetes Engine API
5+
6+
The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks.
7+
8+
The version of the OpenAPI document: 2.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501
13+
14+
from __future__ import annotations
15+
16+
import json
17+
import pprint
18+
from typing import Any, ClassVar, Dict, List, Optional, Set
19+
20+
from pydantic import BaseModel, ConfigDict
21+
from pydantic_core import to_jsonable_python
22+
from typing_extensions import Self
23+
24+
from stackit.ske.models.cilium_hubble import CiliumHubble
25+
26+
27+
class CiliumConfig(BaseModel):
28+
"""
29+
Configuration options for the Cilium CNI ⚠️ Note: This feature is in private preview. Enabling Cilium is only possible for enabled accounts. If your account does not have access, the request will be rejected.
30+
""" # noqa: E501
31+
32+
hubble: Optional[CiliumHubble] = None
33+
__properties: ClassVar[List[str]] = ["hubble"]
34+
35+
model_config = ConfigDict(
36+
validate_by_name=True,
37+
validate_by_alias=True,
38+
validate_assignment=True,
39+
protected_namespaces=(),
40+
)
41+
42+
def to_str(self) -> str:
43+
"""Returns the string representation of the model using alias"""
44+
return pprint.pformat(self.model_dump(by_alias=True))
45+
46+
def to_json(self) -> str:
47+
"""Returns the JSON representation of the model using alias"""
48+
return json.dumps(to_jsonable_python(self.to_dict()))
49+
50+
@classmethod
51+
def from_json(cls, json_str: str) -> Optional[Self]:
52+
"""Create an instance of CiliumConfig from a JSON string"""
53+
return cls.from_dict(json.loads(json_str))
54+
55+
def to_dict(self) -> Dict[str, Any]:
56+
"""Return the dictionary representation of the model using alias.
57+
58+
This has the following differences from calling pydantic's
59+
`self.model_dump(by_alias=True)`:
60+
61+
* `None` is only added to the output dict for nullable fields that
62+
were set at model initialization. Other fields with value `None`
63+
are ignored.
64+
"""
65+
excluded_fields: Set[str] = set([])
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 hubble
73+
if self.hubble:
74+
_dict["hubble"] = self.hubble.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 CiliumConfig 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+
{"hubble": CiliumHubble.from_dict(obj["hubble"]) if obj.get("hubble") is not None else None}
88+
)
89+
return _obj

0 commit comments

Comments
 (0)