Skip to content

Generator: Update SDK /services/iaasalpha #672

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 1 commit into from
Feb 26, 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
17 changes: 17 additions & 0 deletions services/iaasalpha/src/stackit/iaasalpha/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21040,6 +21040,7 @@ def list_images(
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
_request_timeout: Union[
None,
Expand All @@ -21057,6 +21058,8 @@ def list_images(

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: str
:param all: List all Images.
:type all: bool
:param label_selector: Filter resources by labels.
:type label_selector: str
:param _request_timeout: timeout setting for this request. If one
Expand All @@ -21083,6 +21086,7 @@ def list_images(

_param = self._list_images_serialize(
project_id=project_id,
all=all,
label_selector=label_selector,
_request_auth=_request_auth,
_content_type=_content_type,
Expand Down Expand Up @@ -21112,6 +21116,7 @@ def list_images_with_http_info(
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
_request_timeout: Union[
None,
Expand All @@ -21129,6 +21134,8 @@ def list_images_with_http_info(

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: str
:param all: List all Images.
:type all: bool
:param label_selector: Filter resources by labels.
:type label_selector: str
:param _request_timeout: timeout setting for this request. If one
Expand All @@ -21155,6 +21162,7 @@ def list_images_with_http_info(

_param = self._list_images_serialize(
project_id=project_id,
all=all,
label_selector=label_selector,
_request_auth=_request_auth,
_content_type=_content_type,
Expand Down Expand Up @@ -21184,6 +21192,7 @@ def list_images_without_preload_content(
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
_request_timeout: Union[
None,
Expand All @@ -21201,6 +21210,8 @@ def list_images_without_preload_content(

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: str
:param all: List all Images.
:type all: bool
:param label_selector: Filter resources by labels.
:type label_selector: str
:param _request_timeout: timeout setting for this request. If one
Expand All @@ -21227,6 +21238,7 @@ def list_images_without_preload_content(

_param = self._list_images_serialize(
project_id=project_id,
all=all,
label_selector=label_selector,
_request_auth=_request_auth,
_content_type=_content_type,
Expand All @@ -21248,6 +21260,7 @@ def list_images_without_preload_content(
def _list_images_serialize(
self,
project_id,
all,
label_selector,
_request_auth,
_content_type,
Expand All @@ -21270,6 +21283,10 @@ def _list_images_serialize(
if project_id is not None:
_path_params["projectId"] = project_id
# process the query parameters
if all is not None:

_query_params.append(("all", all))

if label_selector is not None:

_query_params.append(("label_selector", label_selector))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AddVolumeToServerPayload(BaseModel):
"""

delete_on_termination: Optional[StrictBool] = Field(
default=False,
default=None,
description="Delete the volume during the termination of the server. Defaults to false.",
alias="deleteOnTermination",
)
Expand Down Expand Up @@ -122,9 +122,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"deleteOnTermination": (
obj.get("deleteOnTermination") if obj.get("deleteOnTermination") is not None else False
),
"deleteOnTermination": obj.get("deleteOnTermination"),
"serverId": obj.get("serverId"),
"volumeId": obj.get("volumeId"),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class AffinityGroup(BaseModel):
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
policy: StrictStr = Field(description="The affinity group policy.")
policy: StrictStr = Field(
description="The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`."
)
__properties: ClassVar[List[str]] = ["id", "members", "name", "policy"]

@field_validator("id")
Expand Down
8 changes: 6 additions & 2 deletions services/iaasalpha/src/stackit/iaasalpha/models/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class Backup(BaseModel):
default=None, description="Universally Unique Identifier (UUID)."
)
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
default=None, description="The name for a General Object. Matches Names and also UUIDs."
Expand All @@ -48,7 +49,10 @@ class Backup(BaseModel):
snapshot_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID).", alias="snapshotId"
)
status: Optional[StrictStr] = Field(default=None, description="The status of a backup object.")
status: Optional[StrictStr] = Field(
default=None,
description="The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`.",
)
updated_at: Optional[datetime] = Field(
default=None, description="Date-time when resource was last updated.", alias="updatedAt"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BackupSource(BaseModel):
id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID)."
)
type: StrictStr = Field(description="The source types of a backup.")
type: StrictStr = Field(description="The source types of a backup. Possible values: `volume`, `snapshot`.")
__properties: ClassVar[List[str]] = ["id", "type"]

@field_validator("id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class BootVolume(BaseModel):
"""

delete_on_termination: Optional[StrictBool] = Field(
default=False,
default=None,
description="Delete the volume during the termination of the server. Defaults to false.",
alias="deleteOnTermination",
)
Expand Down Expand Up @@ -134,9 +134,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"deleteOnTermination": (
obj.get("deleteOnTermination") if obj.get("deleteOnTermination") is not None else False
),
"deleteOnTermination": obj.get("deleteOnTermination"),
"id": obj.get("id"),
"performanceClass": obj.get("performanceClass"),
"size": obj.get("size"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BootVolumeSource(BaseModel):
id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
description="Universally Unique Identifier (UUID)."
)
type: StrictStr = Field(description="The source types of a boot volume.")
type: StrictStr = Field(description="The source types of a boot volume. Possible values: `image`, `volume`.")
__properties: ClassVar[List[str]] = ["id", "type"]

@field_validator("id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class CreateAffinityGroupPayload(BaseModel):
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
policy: StrictStr = Field(description="The affinity group policy.")
policy: StrictStr = Field(
description="The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`."
)
__properties: ClassVar[List[str]] = ["id", "members", "name", "policy"]

@field_validator("id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class CreateBackupPayload(BaseModel):
"""

labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = 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 @@ -45,12 +45,15 @@ class CreateImagePayload(BaseModel):
created_at: Optional[datetime] = Field(
default=None, description="Date-time when resource was created.", alias="createdAt"
)
disk_format: StrictStr = Field(description="Object that represents a disk format.", alias="diskFormat")
disk_format: StrictStr = Field(
description="Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.", alias="diskFormat"
)
id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None, description="Universally Unique Identifier (UUID)."
)
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
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 @@ -61,8 +64,14 @@ class CreateImagePayload(BaseModel):
default=None, description="Universally Unique Identifier (UUID)."
)
protected: Optional[StrictBool] = None
scope: Optional[StrictStr] = Field(default=None, description="Scope of an Image.")
status: Optional[StrictStr] = Field(default=None, description="The status of an image object.")
scope: Optional[StrictStr] = Field(
default=None, description="Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`."
)
size: Optional[StrictInt] = Field(default=None, description="Size in bytes.")
status: Optional[StrictStr] = Field(
default=None,
description="The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.",
)
updated_at: Optional[datetime] = Field(
default=None, description="Date-time when resource was last updated.", alias="updatedAt"
)
Expand All @@ -79,6 +88,7 @@ class CreateImagePayload(BaseModel):
"owner",
"protected",
"scope",
"size",
"status",
"updatedAt",
]
Expand Down Expand Up @@ -150,6 +160,7 @@ def to_dict(self) -> Dict[str, Any]:
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set(
[
Expand All @@ -158,6 +169,7 @@ def to_dict(self) -> Dict[str, Any]:
"id",
"owner",
"scope",
"size",
"status",
"updated_at",
]
Expand Down Expand Up @@ -199,6 +211,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"owner": obj.get("owner"),
"protected": obj.get("protected"),
"scope": obj.get("scope"),
"size": obj.get("size"),
"status": obj.get("status"),
"updatedAt": obj.get("updatedAt"),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class CreateKeyPairPayload(BaseModel):
default=None, description="Object that represents an SSH keypair MD5 fingerprint."
)
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
default=None,
Expand Down Expand Up @@ -73,9 +74,11 @@ def name_validate_regular_expression(cls, value):
@field_validator("public_key")
def public_key_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^(ssh-rsa|ssh-ed25519)\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$", value):
if not re.match(
r"^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$", value
):
raise ValueError(
r"must validate the regular expression /^(ssh-rsa|ssh-ed25519)\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$/"
r"must validate the regular expression /^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$/"
)
return value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ 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."
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}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = 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,8 @@ class CreateNetworkPayload(BaseModel):

address_family: Optional[CreateNetworkAddressFamily] = Field(default=None, alias="addressFamily")
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = 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 @@ -53,7 +53,8 @@ class CreateNicPayload(BaseModel):
default=None, description="Object that represents an IPv6 address."
)
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
mac: Optional[Annotated[str, Field(strict=True)]] = Field(
default=None, description="Object that represents an MAC address."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class CreateProtocol(BaseModel):
)
# data type: str
oneof_schema_2_validator: Optional[StrictStr] = Field(
default=None, description="The protocol name which the rule should match."
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`.",
)
actual_instance: Optional[Union[int, str]] = None
one_of_schemas: Set[str] = {"int", "str"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class CreatePublicIPPayload(BaseModel):
default=None, description="Object that represents an IP address."
)
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
network_interface: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
default=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class CreateSecurityGroupPayload(BaseModel):
default=None, description="Universally Unique Identifier (UUID)."
)
labels: Optional[Dict[str, Any]] = Field(
default=None, description="Object that represents the labels of an object."
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}$`.",
)
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
Expand Down
Loading
Loading