Skip to content

Commit

Permalink
Generator: Update SDK /services/ske (#638)
Browse files Browse the repository at this point in the history
* Generate ske

* Add changelog

Signed-off-by: Alexander Dahmen <[email protected]>

---------

Signed-off-by: Alexander Dahmen <[email protected]>
Co-authored-by: Alexander Dahmen <[email protected]>
  • Loading branch information
stackit-pipeline and Fyusel authored Feb 6, 2025
1 parent 46227ba commit 6d19aaa
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 1,492 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Release (2025-XX-XX)

- `ske`: [v0.3.0](services/ske/CHANGELOG.md#v030-2025-02-06)
- **Removal:** The following methods were removed after deprecation (2024-04-16) and [`serviceenablement` SDK](https://github.com/stackitcloud/stackit-sdk-python/tree/main/services/serviceenablement) must be used instead.
- `DisableService`
- `EnableService`
- `GetServiceStatus`
- `logme`: [v0.3.0](services/logme/CHANGELOG.md#v030-2025-02-05)
- **Breaking Change:** Remove mistakenly implemented `syslog-use-udp`. Does not exist.
- `serverupdate`: [v0.3.0](services/serverupdate/CHANGELOG.md#v030-2025-02-06)
Expand Down
7 changes: 7 additions & 0 deletions services/ske/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v0.3.0 (2025-02-06)

- **Removal:** The following methods were removed after deprecation (2024-04-16) and [`serviceenablement` SDK](https://github.com/stackitcloud/stackit-sdk-python/tree/main/services/serviceenablement) must be used instead.
- `DisableService`
- `EnableService`
- `GetServiceStatus`

## v0.2.0 (2025-01-13)

- **Breaking Change:**: `get_host_from_settings` returns an error if a region is specified for a global URL.
Expand Down
2 changes: 1 addition & 1 deletion services/ske/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-ske"

[tool.poetry]
name = "stackit-ske"
version = "v0.2.0"
version = "v0.3.0"
authors = [
"STACKIT Developer Tools <[email protected]>",
]
Expand Down
3 changes: 0 additions & 3 deletions services/ske/src/stackit/ske/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from stackit.ske.models.create_or_update_cluster_payload import (
CreateOrUpdateClusterPayload,
)
from stackit.ske.models.credentials import Credentials
from stackit.ske.models.credentials_rotation_state import CredentialsRotationState
from stackit.ske.models.cri import CRI
from stackit.ske.models.dns import DNS
Expand All @@ -64,8 +63,6 @@
from stackit.ske.models.maintenance_auto_update import MaintenanceAutoUpdate
from stackit.ske.models.network import Network
from stackit.ske.models.nodepool import Nodepool
from stackit.ske.models.project_response import ProjectResponse
from stackit.ske.models.project_state import ProjectState
from stackit.ske.models.provider_options import ProviderOptions
from stackit.ske.models.runtime_error import RuntimeError
from stackit.ske.models.taint import Taint
Expand Down
1,288 changes: 37 additions & 1,251 deletions services/ske/src/stackit/ske/api/default_api.py

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions services/ske/src/stackit/ske/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from stackit.ske.models.create_or_update_cluster_payload import (
CreateOrUpdateClusterPayload,
)
from stackit.ske.models.credentials import Credentials
from stackit.ske.models.credentials_rotation_state import CredentialsRotationState
from stackit.ske.models.cri import CRI
from stackit.ske.models.dns import DNS
Expand All @@ -45,8 +44,6 @@
from stackit.ske.models.maintenance_auto_update import MaintenanceAutoUpdate
from stackit.ske.models.network import Network
from stackit.ske.models.nodepool import Nodepool
from stackit.ske.models.project_response import ProjectResponse
from stackit.ske.models.project_state import ProjectState
from stackit.ske.models.provider_options import ProviderOptions
from stackit.ske.models.runtime_error import RuntimeError
from stackit.ske.models.taint import Taint
Expand Down
18 changes: 16 additions & 2 deletions services/ske/src/stackit/ske/models/cluster_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import json
import pprint
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
Expand All @@ -31,13 +32,25 @@ class ClusterStatus(BaseModel):
"""

aggregated: Optional[ClusterStatusState] = ClusterStatusState.STATE_UNSPECIFIED
creation_time: Optional[StrictStr] = Field(
creation_time: Optional[datetime] = Field(
default=None, description="Format: `2024-02-15T11:06:29Z`", alias="creationTime"
)
credentials_rotation: Optional[CredentialsRotationState] = Field(default=None, alias="credentialsRotation")
egress_address_ranges: Optional[List[StrictStr]] = Field(
default=None,
description="The outgoing network ranges (in CIDR notation) of traffic originating from workload on the cluster.",
alias="egressAddressRanges",
)
error: Optional[RuntimeError] = None
hibernated: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["aggregated", "creationTime", "credentialsRotation", "error", "hibernated"]
__properties: ClassVar[List[str]] = [
"aggregated",
"creationTime",
"credentialsRotation",
"egressAddressRanges",
"error",
"hibernated",
]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -104,6 +117,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("credentialsRotation") is not None
else None
),
"egressAddressRanges": obj.get("egressAddressRanges"),
"error": RuntimeError.from_dict(obj["error"]) if obj.get("error") is not None else None,
"hibernated": obj.get("hibernated"),
}
Expand Down
91 changes: 0 additions & 91 deletions services/ske/src/stackit/ske/models/credentials.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import json
import pprint
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
Expand All @@ -26,15 +27,15 @@ class CredentialsRotationState(BaseModel):
CredentialsRotationState
"""

last_completion_time: Optional[StrictStr] = Field(
last_completion_time: Optional[datetime] = Field(
default=None, description="Format: `2024-02-15T11:06:29Z`", alias="lastCompletionTime"
)
last_initiation_time: Optional[StrictStr] = Field(
last_initiation_time: Optional[datetime] = Field(
default=None, description="Format: `2024-02-15T11:06:29Z`", alias="lastInitiationTime"
)
phase: Optional[StrictStr] = Field(
default=None,
description="Phase of the credentials rotation. `NEVER` indicates that no credentials rotation has been performed using the new credentials rotation endpoints yet. Using the deprecated [rotate-credentials](#tag/Credentials/operation/SkeService_GetClusterCredentials) endpoint will not update this status field.",
description="Phase of the credentials rotation. `NEVER` indicates that no credentials rotation has been performed using the new credentials rotation endpoints yet.",
)
__properties: ClassVar[List[str]] = ["lastCompletionTime", "lastInitiationTime", "phase"]

Expand Down
8 changes: 4 additions & 4 deletions services/ske/src/stackit/ske/models/hibernation_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ class HibernationSchedule(BaseModel):
def end_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(
r"(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})",
r"(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})",
value,
):
raise ValueError(
r"must validate the regular expression /(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})/"
r"must validate the regular expression /(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})/"
)
return value

@field_validator("start")
def start_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(
r"(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})",
r"(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})",
value,
):
raise ValueError(
r"must validate the regular expression /(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})/"
r"must validate the regular expression /(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\\d+(ns|us|µs|ms|s|m|h))+)|((((\\d+,)+\\d+|(\\d+(\\/|-)\\d+)|\\d+|\\*) ?){5,7})/"
)
return value

Expand Down
3 changes: 2 additions & 1 deletion services/ske/src/stackit/ske/models/kubeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import json
import pprint
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr
Expand All @@ -26,7 +27,7 @@ class Kubeconfig(BaseModel):
Kubeconfig
"""

expiration_timestamp: Optional[StrictStr] = Field(default=None, alias="expirationTimestamp")
expiration_timestamp: Optional[datetime] = Field(default=None, alias="expirationTimestamp")
kubeconfig: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["expirationTimestamp", "kubeconfig"]

Expand Down
3 changes: 2 additions & 1 deletion services/ske/src/stackit/ske/models/kubernetes_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import json
import pprint
import re
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
Expand All @@ -27,7 +28,7 @@ class KubernetesVersion(BaseModel):
KubernetesVersion
"""

expiration_date: Optional[StrictStr] = Field(default=None, alias="expirationDate")
expiration_date: Optional[datetime] = Field(default=None, alias="expirationDate")
feature_gates: Optional[Dict[str, StrictStr]] = Field(default=None, alias="featureGates")
state: Optional[StrictStr] = None
version: Optional[Annotated[str, Field(strict=True)]] = None
Expand Down
3 changes: 2 additions & 1 deletion services/ske/src/stackit/ske/models/machine_image_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import json
import pprint
import re
from datetime import datetime
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
Expand All @@ -30,7 +31,7 @@ class MachineImageVersion(BaseModel):
"""

cri: Optional[List[CRI]] = None
expiration_date: Optional[StrictStr] = Field(default=None, alias="expirationDate")
expiration_date: Optional[datetime] = Field(default=None, alias="expirationDate")
state: Optional[StrictStr] = None
version: Optional[Annotated[str, Field(strict=True)]] = None
__properties: ClassVar[List[str]] = ["cri", "expirationDate", "state", "version"]
Expand Down
89 changes: 0 additions & 89 deletions services/ske/src/stackit/ske/models/project_response.py

This file was deleted.

Loading

0 comments on commit 6d19aaa

Please sign in to comment.