From c3fcae1dfd61c4037798d90d7da05874b918b818 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 29 Jun 2026 10:08:28 +0000 Subject: [PATCH 1/2] Generate ske --- services/ske/oas_commit | 2 +- services/ske/src/stackit/ske/__init__.py | 2 + .../ske/src/stackit/ske/api/default_api.py | 27 ++++-- .../ske/src/stackit/ske/models/__init__.py | 1 + services/ske/src/stackit/ske/models/audit.py | 84 +++++++++++++++++++ .../ske/src/stackit/ske/models/cluster.py | 28 ++++++- .../create_or_update_cluster_payload.py | 7 ++ 7 files changed, 142 insertions(+), 9 deletions(-) create mode 100644 services/ske/src/stackit/ske/models/audit.py diff --git a/services/ske/oas_commit b/services/ske/oas_commit index 6ba71f50d..a886b4d4a 100644 --- a/services/ske/oas_commit +++ b/services/ske/oas_commit @@ -1 +1 @@ -d2755fb2bda0e2105f920af64d7176d184b2bcb7 +ea0931a6f93703c990517136e0d4c7a88455b282 diff --git a/services/ske/src/stackit/ske/__init__.py b/services/ske/src/stackit/ske/__init__.py index b29edb1f7..a934a50e0 100644 --- a/services/ske/src/stackit/ske/__init__.py +++ b/services/ske/src/stackit/ske/__init__.py @@ -31,6 +31,7 @@ "ACL", "Access", "AccessScope", + "Audit", "AvailabilityZone", "CRI", "Cluster", @@ -93,6 +94,7 @@ # import models into sdk package from stackit.ske.models.acl import ACL as ACL +from stackit.ske.models.audit import Audit as Audit from stackit.ske.models.availability_zone import AvailabilityZone as AvailabilityZone from stackit.ske.models.cluster import Cluster as Cluster from stackit.ske.models.cluster_error import ClusterError as ClusterError diff --git a/services/ske/src/stackit/ske/api/default_api.py b/services/ske/src/stackit/ske/api/default_api.py index bc98e7451..a6ddd80f8 100644 --- a/services/ske/src/stackit/ske/api/default_api.py +++ b/services/ske/src/stackit/ske/api/default_api.py @@ -609,7 +609,12 @@ def create_or_update_cluster( self, project_id: StrictStr, region: StrictStr, - cluster_name: StrictStr, + cluster_name: Annotated[ + StrictStr, + Field( + description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long." + ), + ], create_or_update_cluster_payload: CreateOrUpdateClusterPayload, _request_timeout: Union[ None, @@ -629,7 +634,7 @@ def create_or_update_cluster( :type project_id: str :param region: (required) :type region: str - :param cluster_name: (required) + :param cluster_name: Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. (required) :type cluster_name: str :param create_or_update_cluster_payload: (required) :type create_or_update_cluster_payload: CreateOrUpdateClusterPayload @@ -684,7 +689,12 @@ def create_or_update_cluster_with_http_info( self, project_id: StrictStr, region: StrictStr, - cluster_name: StrictStr, + cluster_name: Annotated[ + StrictStr, + Field( + description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long." + ), + ], create_or_update_cluster_payload: CreateOrUpdateClusterPayload, _request_timeout: Union[ None, @@ -704,7 +714,7 @@ def create_or_update_cluster_with_http_info( :type project_id: str :param region: (required) :type region: str - :param cluster_name: (required) + :param cluster_name: Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. (required) :type cluster_name: str :param create_or_update_cluster_payload: (required) :type create_or_update_cluster_payload: CreateOrUpdateClusterPayload @@ -759,7 +769,12 @@ def create_or_update_cluster_without_preload_content( self, project_id: StrictStr, region: StrictStr, - cluster_name: StrictStr, + cluster_name: Annotated[ + StrictStr, + Field( + description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long." + ), + ], create_or_update_cluster_payload: CreateOrUpdateClusterPayload, _request_timeout: Union[ None, @@ -779,7 +794,7 @@ def create_or_update_cluster_without_preload_content( :type project_id: str :param region: (required) :type region: str - :param cluster_name: (required) + :param cluster_name: Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long. (required) :type cluster_name: str :param create_or_update_cluster_payload: (required) :type create_or_update_cluster_payload: CreateOrUpdateClusterPayload diff --git a/services/ske/src/stackit/ske/models/__init__.py b/services/ske/src/stackit/ske/models/__init__.py index 499350b14..31816df93 100644 --- a/services/ske/src/stackit/ske/models/__init__.py +++ b/services/ske/src/stackit/ske/models/__init__.py @@ -17,6 +17,7 @@ # import models into model package from stackit.ske.models.acl import ACL +from stackit.ske.models.audit import Audit from stackit.ske.models.availability_zone import AvailabilityZone from stackit.ske.models.cluster import Cluster from stackit.ske.models.cluster_error import ClusterError diff --git a/services/ske/src/stackit/ske/models/audit.py b/services/ske/src/stackit/ske/models/audit.py new file mode 100644 index 000000000..6922a8137 --- /dev/null +++ b/services/ske/src/stackit/ske/models/audit.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + STACKIT Kubernetes Engine API + + The SKE API provides endpoints to create, update or delete clusters within STACKIT projects and to trigger further cluster management tasks. + + The version of the OpenAPI document: 2.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class Audit(BaseModel): + """ + Audit + """ # noqa: E501 + + enabled: StrictBool = Field( + description="Enable cluster audit log forwarding to a Telemetry Router. ⚠️ Note: This feature is in private preview. Enabling audit logging is only possible for enabled accounts. Otherwise the request will be rejected." + ) + __properties: ClassVar[List[str]] = ["enabled"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Audit from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Audit from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"enabled": obj.get("enabled")}) + return _obj diff --git a/services/ske/src/stackit/ske/models/cluster.py b/services/ske/src/stackit/ske/models/cluster.py index 5bfbbd603..9ee9a16db 100644 --- a/services/ske/src/stackit/ske/models/cluster.py +++ b/services/ske/src/stackit/ske/models/cluster.py @@ -15,13 +15,15 @@ import json import pprint +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Annotated, Self from stackit.ske.models.access import Access +from stackit.ske.models.audit import Audit from stackit.ske.models.cluster_status import ClusterStatus from stackit.ske.models.extension import Extension from stackit.ske.models.hibernation import Hibernation @@ -37,16 +39,21 @@ class Cluster(BaseModel): """ # noqa: E501 access: Optional[Access] = None + audit: Optional[Audit] = None extensions: Optional[Extension] = None hibernation: Optional[Hibernation] = None kubernetes: Kubernetes maintenance: Optional[Maintenance] = None - name: Optional[StrictStr] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=11)]] = Field( + default=None, + description="Use lowercase alphanumeric characters or -, must start and end with an alphanumeric character, and be between 1 and 11 characters long.", + ) network: Optional[Network] = None nodepools: Annotated[List[Nodepool], Field(min_length=1, max_length=50)] status: Optional[ClusterStatus] = None __properties: ClassVar[List[str]] = [ "access", + "audit", "extensions", "hibernation", "kubernetes", @@ -57,6 +64,19 @@ class Cluster(BaseModel): "status", ] + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not isinstance(value, str): + value = str(value) + + if not re.match(r"^[a-z0-9]([a-z0-9-]{0,9}[a-z0-9])?$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9]([a-z0-9-]{0,9}[a-z0-9])?$/") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, @@ -102,6 +122,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of access if self.access: _dict["access"] = self.access.to_dict() + # override the default output from pydantic by calling `to_dict()` of audit + if self.audit: + _dict["audit"] = self.audit.to_dict() # override the default output from pydantic by calling `to_dict()` of extensions if self.extensions: _dict["extensions"] = self.extensions.to_dict() @@ -141,6 +164,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "access": Access.from_dict(obj["access"]) if obj.get("access") is not None else None, + "audit": Audit.from_dict(obj["audit"]) if obj.get("audit") is not None else None, "extensions": Extension.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None, "hibernation": ( Hibernation.from_dict(obj["hibernation"]) if obj.get("hibernation") is not None else None diff --git a/services/ske/src/stackit/ske/models/create_or_update_cluster_payload.py b/services/ske/src/stackit/ske/models/create_or_update_cluster_payload.py index d6e9e03d4..ed5a095f8 100644 --- a/services/ske/src/stackit/ske/models/create_or_update_cluster_payload.py +++ b/services/ske/src/stackit/ske/models/create_or_update_cluster_payload.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated, Self from stackit.ske.models.access import Access +from stackit.ske.models.audit import Audit from stackit.ske.models.cluster_status import ClusterStatus from stackit.ske.models.extension import Extension from stackit.ske.models.hibernation import Hibernation @@ -37,6 +38,7 @@ class CreateOrUpdateClusterPayload(BaseModel): """ # noqa: E501 access: Optional[Access] = None + audit: Optional[Audit] = None extensions: Optional[Extension] = None hibernation: Optional[Hibernation] = None kubernetes: Kubernetes @@ -46,6 +48,7 @@ class CreateOrUpdateClusterPayload(BaseModel): status: Optional[ClusterStatus] = None __properties: ClassVar[List[str]] = [ "access", + "audit", "extensions", "hibernation", "kubernetes", @@ -95,6 +98,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of access if self.access: _dict["access"] = self.access.to_dict() + # override the default output from pydantic by calling `to_dict()` of audit + if self.audit: + _dict["audit"] = self.audit.to_dict() # override the default output from pydantic by calling `to_dict()` of extensions if self.extensions: _dict["extensions"] = self.extensions.to_dict() @@ -134,6 +140,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "access": Access.from_dict(obj["access"]) if obj.get("access") is not None else None, + "audit": Audit.from_dict(obj["audit"]) if obj.get("audit") is not None else None, "extensions": Extension.from_dict(obj["extensions"]) if obj.get("extensions") is not None else None, "hibernation": ( Hibernation.from_dict(obj["hibernation"]) if obj.get("hibernation") is not None else None From d5b6c752c5195211d2674c23bc998a197341513f Mon Sep 17 00:00:00 2001 From: Manuel Vaas Date: Tue, 30 Jun 2026 11:22:50 +0200 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 8 ++++++-- services/ske/CHANGELOG.md | 5 +++++ services/ske/pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cd9ea8d1..0004813cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Release (2026-06-23) +## Release (2026-MM-DD) - `logme`: - [v1.0.0](services/logme/CHANGELOG.md#v100) @@ -30,7 +30,11 @@ - **Breaking Change:** The region is no longer specified within the client configuration. Instead, the region must be passed as a parameter to any region-specific request. - **Deprecation:** `tls_ciphers`, `tls_ciphersuites`, `tls_protocols` from `InstanceParameters` model are deprecated and will be removed 2026-12-10. - **Feature:** Added optional `CreateCredentialsPayload`. - +- `ske`: + - [v1.12.0](services/ske/CHANGELOG.md#v1120) + - **Improvement:** Add regex validation of `name` attribute in model class `Cluster` + - **Feature:** New model class `Audit` + - **Feature:** Add optional attribute `audit` (type `Audit`) to model class `Cluster` ## Release (2026-13-05) - `auditlog`: diff --git a/services/ske/CHANGELOG.md b/services/ske/CHANGELOG.md index 9439853c3..b5a1a29ba 100644 --- a/services/ske/CHANGELOG.md +++ b/services/ske/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.12.0 +- **Improvement:** Add regex validation of `name` attribute in model class `Cluster` +- **Feature:** New model class `Audit` +- **Feature:** Add optional attribute `audit` (type `Audit`) to model class `Cluster` + ## v1.11.0 - **Feature:** Add attribute `service_account_issuer` to model `ClusterStatus` diff --git a/services/ske/pyproject.toml b/services/ske/pyproject.toml index 98def802d..38274062f 100644 --- a/services/ske/pyproject.toml +++ b/services/ske/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stackit-ske" -version = "v1.11.0" +version = "v1.12.0" description = "SKE-API" authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }] requires-python = ">=3.9,<4.0"