Skip to content

Generator: Update SDK /services/iaas #2093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2025
Merged
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
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
- **Version**: Minimal version is now python 3.9
- `git`: [v0.4.0](services/git/CHANGELOG.md#v040)
- **Version**: Minimal version is now python 3.9
- `iaas`: [v0.6.0](services/iaas/CHANGELOG.md#v060)
- **Version**: Minimal version is now python 3.9
- `iaas`:
- [v0.7.0](services/iaas/CHANGELOG.md#v070)
- **Docs:** Improved descriptions of properties in structs with their possible values
- **Feature:** Add `Agent` field to `CreateImagePayload`, `UpdateImagePayload` and `Image` model
- **Feature:** Add `Encrypted` and `EncryptionsParameters` fields to `CreateVolumePayload` model
- [v0.6.0](services/iaas/CHANGELOG.md#v060)
- **Version**: Minimal version is now python 3.9
- `intake`: [v0.1.0](services/intake/CHANGELOG.md#v010)
- **New**: STACKIT Intake module can be used to manage the STACKIT Intake. Manage your `IntakeRunners`, `Intakes` and `IntakeUsers`
- `kms`: [v0.1.0](services/kms/CHANGELOG.md#v010)
Expand Down
5 changes: 5 additions & 0 deletions services/iaas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v0.7.0
- **Docs:** Improved descriptions of properties in structs with their possible values
- **Feature:** Add `Agent` field to `CreateImagePayload`, `UpdateImagePayload` and `Image` model
- **Feature:** Add `Encrypted` and `EncryptionsParameters` fields to `CreateVolumePayload` model

## v0.6.0
- **Version**: Minimal version is now python 3.9

Expand Down
2 changes: 1 addition & 1 deletion services/iaas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-iaas"

[tool.poetry]
name = "stackit-iaas"
version = "v0.6.0"
version = "v0.7.0"
authors = [
"STACKIT Developer Tools <[email protected]>",
]
Expand Down
6 changes: 6 additions & 0 deletions services/iaas/src/stackit/iaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"GetServerLog200Response",
"ICMPParameters",
"Image",
"ImageAgent",
"ImageChecksum",
"ImageConfig",
"ImageCreateResponse",
Expand Down Expand Up @@ -144,6 +145,7 @@
"Volume",
"VolumeAttachment",
"VolumeAttachmentListResponse",
"VolumeEncryptionParameter",
"VolumeListResponse",
"VolumePerformanceClass",
"VolumePerformanceClassListResponse",
Expand Down Expand Up @@ -268,6 +270,7 @@
)
from stackit.iaas.models.icmp_parameters import ICMPParameters as ICMPParameters
from stackit.iaas.models.image import Image as Image
from stackit.iaas.models.image_agent import ImageAgent as ImageAgent
from stackit.iaas.models.image_checksum import ImageChecksum as ImageChecksum
from stackit.iaas.models.image_config import ImageConfig as ImageConfig
from stackit.iaas.models.image_create_response import (
Expand Down Expand Up @@ -426,6 +429,9 @@
from stackit.iaas.models.volume_attachment_list_response import (
VolumeAttachmentListResponse as VolumeAttachmentListResponse,
)
from stackit.iaas.models.volume_encryption_parameter import (
VolumeEncryptionParameter as VolumeEncryptionParameter,
)
from stackit.iaas.models.volume_list_response import (
VolumeListResponse as VolumeListResponse,
)
Expand Down
2 changes: 2 additions & 0 deletions services/iaas/src/stackit/iaas/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
from stackit.iaas.models.get_server_log200_response import GetServerLog200Response
from stackit.iaas.models.icmp_parameters import ICMPParameters
from stackit.iaas.models.image import Image
from stackit.iaas.models.image_agent import ImageAgent
from stackit.iaas.models.image_checksum import ImageChecksum
from stackit.iaas.models.image_config import ImageConfig
from stackit.iaas.models.image_create_response import ImageCreateResponse
Expand Down Expand Up @@ -158,6 +159,7 @@
from stackit.iaas.models.volume_attachment_list_response import (
VolumeAttachmentListResponse,
)
from stackit.iaas.models.volume_encryption_parameter import VolumeEncryptionParameter
from stackit.iaas.models.volume_list_response import VolumeListResponse
from stackit.iaas.models.volume_performance_class import VolumePerformanceClass
from stackit.iaas.models.volume_performance_class_list_response import (
Expand Down
2 changes: 1 addition & 1 deletion services/iaas/src/stackit/iaas/models/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Backup(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ class BaseSecurityGroupRule(BaseModel):
description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(
default=None, description="Description Object. Allows string up to 255 Characters."
)
direction: StrictStr = Field(description="The direction of the traffic which the rule should match.")
ethertype: Optional[StrictStr] = Field(default="IPv4", description="The ethertype which the rule should match.")
direction: StrictStr = Field(
description="The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`."
)
ethertype: Optional[StrictStr] = Field(
default="IPv4", description="The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`."
)
icmp_parameters: Optional[ICMPParameters] = Field(default=None, alias="icmpParameters")
id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CreateBackupPayload(BaseModel):

labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
13 changes: 11 additions & 2 deletions services/iaas/src/stackit/iaas/models/create_image_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
)
from typing_extensions import Annotated, Self

from stackit.iaas.models.image_agent import ImageAgent
from stackit.iaas.models.image_checksum import ImageChecksum
from stackit.iaas.models.image_config import ImageConfig

Expand All @@ -40,6 +41,7 @@ class CreateImagePayload(BaseModel):
Object that represents an Image and its parameters. Used for Creating and returning (get/list).
""" # noqa: E501

agent: Optional[ImageAgent] = None
checksum: Optional[ImageChecksum] = None
config: Optional[ImageConfig] = None
created_at: Optional[datetime] = Field(
Expand All @@ -53,7 +55,7 @@ class CreateImagePayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
min_disk_size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.", alias="minDiskSize")
min_ram: Optional[StrictInt] = Field(default=None, description="Size in Megabyte.", alias="minRam")
Expand All @@ -63,7 +65,9 @@ class CreateImagePayload(BaseModel):
owner: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
)
protected: Optional[StrictBool] = None
protected: Optional[StrictBool] = Field(
default=None, description="When true the image is prevented from being deleted."
)
scope: Optional[StrictStr] = Field(
default=None, description="Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`."
)
Expand All @@ -76,6 +80,7 @@ class CreateImagePayload(BaseModel):
default=None, description="Date-time when resource was last updated.", alias="updatedAt"
)
__properties: ClassVar[List[str]] = [
"agent",
"checksum",
"config",
"createdAt",
Expand Down Expand Up @@ -180,6 +185,9 @@ def to_dict(self) -> Dict[str, Any]:
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of agent
if self.agent:
_dict["agent"] = self.agent.to_dict()
# override the default output from pydantic by calling `to_dict()` of checksum
if self.checksum:
_dict["checksum"] = self.checksum.to_dict()
Expand All @@ -199,6 +207,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"agent": ImageAgent.from_dict(obj["agent"]) if obj.get("agent") is not None else None,
"checksum": ImageChecksum.from_dict(obj["checksum"]) if obj.get("checksum") is not None else None,
"config": ImageConfig.from_dict(obj["config"]) if obj.get("config") is not None else None,
"createdAt": obj.get("createdAt"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CreateKeyPairPayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CreateNetworkAreaPayload(BaseModel):
address_family: CreateAreaAddressFamily = Field(alias="addressFamily")
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CreateNetworkPayload(BaseModel):
dhcp: Optional[StrictBool] = Field(default=None, description="Enable or disable DHCP for a network.")
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
8 changes: 5 additions & 3 deletions services/iaas/src/stackit/iaas/models/create_nic_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CreateNicPayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
mac: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Object that represents an MAC address."
Expand All @@ -73,8 +73,10 @@ class CreateNicPayload(BaseModel):
security_groups: Optional[List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]] = Field(
default=None, description="A list of UUIDs.", alias="securityGroups"
)
status: Optional[StrictStr] = None
type: Optional[StrictStr] = None
status: Optional[StrictStr] = Field(default=None, description="Possible values: `ACTIVE`, `DOWN`.")
type: Optional[StrictStr] = Field(
default=None, description="Possible values: `server`, `metadata`, `gateway`, `none`."
)
__properties: ClassVar[List[str]] = [
"allowedAddresses",
"device",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CreatePublicIPPayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
network_interface: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Associate the public IP with a network interface (ID).", alias="networkInterface"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CreateSecurityGroupPayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ class CreateSecurityGroupRulePayload(BaseModel):
description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(
default=None, description="Description Object. Allows string up to 255 Characters."
)
direction: StrictStr = Field(description="The direction of the traffic which the rule should match.")
ethertype: Optional[StrictStr] = Field(default="IPv4", description="The ethertype which the rule should match.")
direction: StrictStr = Field(
description="The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`."
)
ethertype: Optional[StrictStr] = Field(
default="IPv4", description="The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`."
)
icmp_parameters: Optional[ICMPParameters] = Field(default=None, alias="icmpParameters")
id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CreateServerPayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
launched_at: Optional[datetime] = Field(
default=None, description="Date-time when resource was launched.", alias="launchedAt"
Expand All @@ -78,7 +78,7 @@ class CreateServerPayload(BaseModel):
maintenance_window: Optional[ServerMaintenance] = Field(default=None, alias="maintenanceWindow")
metadata: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`.",
description="Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(description="The name for a Server.")
networking: Optional[CreateServerPayloadNetworking] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CreateSnapshotPayload(BaseModel):
)
labels: Optional[Dict[str, Any]] = Field(
default=None,
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`.",
description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
Loading
Loading