Skip to content
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Release (2025-xx-xx)
- `iaas`: [v0.8.1](services/iaas/CHANGELOG.md#v081)
- **Internal:** Add workaround to fix upstream OpenAPI generator issue where regex patterns include leading/trailing slashes that need to be removed for validation in `AllowedAddressesInner`, `AreaId`, and `CreateProtocol` models
- `observability`: [v0.9.0](services/observability/CHANGELOG.md#v090)
- **Feature:** Add new `GoogleChat` webhook

Expand Down
3 changes: 3 additions & 0 deletions services/iaas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.8.1
- **Internal:** Add workaround to fix upstream OpenAPI generator issue where regex patterns include leading/trailing slashes that need to be removed for validation in `AllowedAddressesInner`, `AreaId`, and `CreateProtocol` models

## v0.8.0
- **Feature:** Add new method to get project details `GetProjectDetails`

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.8.0"
version = "v0.8.1"
authors = [
"STACKIT Developer Tools <[email protected]>",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import json
import pprint
import re
from typing import Any, Dict, Optional, Set, Union

from pydantic import (
Expand All @@ -37,13 +38,35 @@ class AllowedAddressesInner(BaseModel):
"""

# data type: str
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_1_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Object that represents an IP address."
default=None,
description="Object that represents an IP address.",
pattern=re.sub(
r"^\/|\/$",
"",
r"/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/",
),
)
# END of the workaround
# data type: str
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Classless Inter-Domain Routing (CIDR)."
default=None,
description="Classless Inter-Domain Routing (CIDR).",
pattern=re.sub(
r"^\/|\/$",
"",
r"/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/",
),
)
# END of the workaround
actual_instance: Optional[Union[str]] = None
one_of_schemas: Set[str] = {"str"}

Expand Down
12 changes: 10 additions & 2 deletions services/iaas/src/stackit/iaas/models/area_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import json
import pprint
import re
from typing import Any, Dict, Optional, Set, Union

from pydantic import (
Expand All @@ -39,9 +40,16 @@ class AreaId(BaseModel):
"""

# data type: str
oneof_schema_1_validator: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_1_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None,
description="Universally Unique Identifier (UUID).",
pattern=re.sub(r"^\/|\/$", "", r"/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"),
)
# END of the workaround
# data type: StaticAreaID
oneof_schema_2_validator: Optional[StaticAreaID] = None
actual_instance: Optional[Union[StaticAreaID, str]] = None
Expand Down
8 changes: 6 additions & 2 deletions services/iaas/src/stackit/iaas/models/create_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
BaseModel,
ConfigDict,
Field,
StrictStr,
ValidationError,
field_validator,
)
Expand All @@ -42,10 +41,15 @@ class CreateProtocol(BaseModel):
default=None, description="The protocol number which the rule should match."
)
# data type: str
oneof_schema_2_validator: Optional[StrictStr] = Field(
# BEGIN of the workaround until upstream issues are fixed:
# https://github.com/OpenAPITools/openapi-generator/issues/19034 from Jun 28, 2024
# and https://github.com/OpenAPITools/openapi-generator/issues/19842 from Oct 11, 2024
# Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-227
oneof_schema_2_validator: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None,
description="The protocol name which the rule should match. Possible values: `ah`, `dccp`, `egp`, `esp`, `gre`, `icmp`, `igmp`, `ipip`, `ipv6-encap`, `ipv6-frag`, `ipv6-icmp`, `ipv6-nonxt`, `ipv6-opts`, `ipv6-route`, `ospf`, `pgm`, `rsvp`, `sctp`, `tcp`, `udp`, `udplite`, `vrrp`.",
)
# END of the workaround
actual_instance: Optional[Union[int, str]] = None
one_of_schemas: Set[str] = {"int", "str"}

Expand Down
Loading