Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion services/ske/src/stackit/ske/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down Expand Up @@ -43,6 +43,8 @@
"GetProviderOptionsRequestVersionState",
"Hibernation",
"HibernationSchedule",
"IDP",
"IDPKubeconfig",
"Image",
"Kubeconfig",
"Kubernetes",
Expand Down Expand Up @@ -109,6 +111,8 @@
from stackit.ske.models.hibernation_schedule import (
HibernationSchedule as HibernationSchedule,
)
from stackit.ske.models.idp import IDP as IDP
from stackit.ske.models.idp_kubeconfig import IDPKubeconfig as IDPKubeconfig
from stackit.ske.models.image import Image as Image
from stackit.ske.models.kubeconfig import Kubeconfig as Kubeconfig
from stackit.ske.models.kubernetes import Kubernetes as Kubernetes
Expand Down
325 changes: 300 additions & 25 deletions services/ske/src/stackit/ske/api/default_api.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
4 changes: 3 additions & 1 deletion services/ske/src/stackit/ske/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down Expand Up @@ -33,6 +33,8 @@
)
from stackit.ske.models.hibernation import Hibernation
from stackit.ske.models.hibernation_schedule import HibernationSchedule
from stackit.ske.models.idp import IDP
from stackit.ske.models.idp_kubeconfig import IDPKubeconfig
from stackit.ske.models.image import Image
from stackit.ske.models.kubeconfig import Kubeconfig
from stackit.ske.models.kubernetes import Kubernetes
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/availability_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/cluster_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
5 changes: 4 additions & 1 deletion services/ske/src/stackit/ske/models/cluster_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down Expand Up @@ -53,6 +53,7 @@ class ClusterStatus(BaseModel):
error: Optional[RuntimeError] = None
errors: Optional[List[ClusterError]] = None
hibernated: Optional[StrictBool] = None
identity: Optional[StrictStr] = None
pod_address_ranges: Optional[List[StrictStr]] = Field(
default=None,
description="The network ranges (in CIDR notation) used by pods of the cluster.",
Expand All @@ -66,6 +67,7 @@ class ClusterStatus(BaseModel):
"error",
"errors",
"hibernated",
"identity",
"podAddressRanges",
]

Expand Down Expand Up @@ -162,6 +164,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
else None
),
"hibernated": obj.get("hibernated"),
"identity": obj.get("identity"),
"podAddressRanges": obj.get("podAddressRanges"),
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down Expand Up @@ -36,7 +36,7 @@ class CredentialsRotationState(BaseModel):
)
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
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/cri.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
2 changes: 1 addition & 1 deletion services/ske/src/stackit/ske/models/hibernation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
STACKIT Kubernetes Engine API

The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks.
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)
Expand Down
88 changes: 88 additions & 0 deletions services/ske/src/stackit/ske/models/idp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# 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,
StrictStr,
)
from typing_extensions import Self


class IDP(BaseModel):
"""
IDP
""" # noqa: E501

enabled: StrictBool = Field(description="Enable IDP integration for the cluster.")
type: StrictStr = Field(description='Possible values: `"stackit"`')
__properties: ClassVar[List[str]] = ["enabled", "type"]

model_config = ConfigDict(
populate_by_name=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"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of IDP 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 IDP 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"), "type": obj.get("type")})
return _obj
Loading
Loading