Skip to content

Commit ca285fb

Browse files
Generate iaasalpha (#672)
1 parent 7727295 commit ca285fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+265
-114
lines changed

services/iaasalpha/src/stackit/iaasalpha/api/default_api.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21040,6 +21040,7 @@ def list_images(
2104021040
str,
2104121041
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
2104221042
],
21043+
all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
2104321044
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
2104421045
_request_timeout: Union[
2104521046
None,
@@ -21057,6 +21058,8 @@ def list_images(
2105721058

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

2108421087
_param = self._list_images_serialize(
2108521088
project_id=project_id,
21089+
all=all,
2108621090
label_selector=label_selector,
2108721091
_request_auth=_request_auth,
2108821092
_content_type=_content_type,
@@ -21112,6 +21116,7 @@ def list_images_with_http_info(
2111221116
str,
2111321117
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
2111421118
],
21119+
all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
2111521120
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
2111621121
_request_timeout: Union[
2111721122
None,
@@ -21129,6 +21134,8 @@ def list_images_with_http_info(
2112921134

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

2115621163
_param = self._list_images_serialize(
2115721164
project_id=project_id,
21165+
all=all,
2115821166
label_selector=label_selector,
2115921167
_request_auth=_request_auth,
2116021168
_content_type=_content_type,
@@ -21184,6 +21192,7 @@ def list_images_without_preload_content(
2118421192
str,
2118521193
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
2118621194
],
21195+
all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None,
2118721196
label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None,
2118821197
_request_timeout: Union[
2118921198
None,
@@ -21201,6 +21210,8 @@ def list_images_without_preload_content(
2120121210

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

2122821239
_param = self._list_images_serialize(
2122921240
project_id=project_id,
21241+
all=all,
2123021242
label_selector=label_selector,
2123121243
_request_auth=_request_auth,
2123221244
_content_type=_content_type,
@@ -21248,6 +21260,7 @@ def list_images_without_preload_content(
2124821260
def _list_images_serialize(
2124921261
self,
2125021262
project_id,
21263+
all,
2125121264
label_selector,
2125221265
_request_auth,
2125321266
_content_type,
@@ -21270,6 +21283,10 @@ def _list_images_serialize(
2127021283
if project_id is not None:
2127121284
_path_params["projectId"] = project_id
2127221285
# process the query parameters
21286+
if all is not None:
21287+
21288+
_query_params.append(("all", all))
21289+
2127321290
if label_selector is not None:
2127421291

2127521292
_query_params.append(("label_selector", label_selector))

services/iaasalpha/src/stackit/iaasalpha/models/add_volume_to_server_payload.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class AddVolumeToServerPayload(BaseModel):
2929
"""
3030

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

123123
_obj = cls.model_validate(
124124
{
125-
"deleteOnTermination": (
126-
obj.get("deleteOnTermination") if obj.get("deleteOnTermination") is not None else False
127-
),
125+
"deleteOnTermination": obj.get("deleteOnTermination"),
128126
"serverId": obj.get("serverId"),
129127
"volumeId": obj.get("volumeId"),
130128
}

services/iaasalpha/src/stackit/iaasalpha/models/affinity_group.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class AffinityGroup(BaseModel):
3737
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
3838
description="The name for a General Object. Matches Names and also UUIDs."
3939
)
40-
policy: StrictStr = Field(description="The affinity group policy.")
40+
policy: StrictStr = Field(
41+
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`."
42+
)
4143
__properties: ClassVar[List[str]] = ["id", "members", "name", "policy"]
4244

4345
@field_validator("id")

services/iaasalpha/src/stackit/iaasalpha/models/backup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class Backup(BaseModel):
3939
default=None, description="Universally Unique Identifier (UUID)."
4040
)
4141
labels: Optional[Dict[str, Any]] = Field(
42-
default=None, description="Object that represents the labels of an object."
42+
default=None,
43+
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}$`.",
4344
)
4445
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
4546
default=None, description="The name for a General Object. Matches Names and also UUIDs."
@@ -48,7 +49,10 @@ class Backup(BaseModel):
4849
snapshot_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
4950
default=None, description="Universally Unique Identifier (UUID).", alias="snapshotId"
5051
)
51-
status: Optional[StrictStr] = Field(default=None, description="The status of a backup object.")
52+
status: Optional[StrictStr] = Field(
53+
default=None,
54+
description="The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`.",
55+
)
5256
updated_at: Optional[datetime] = Field(
5357
default=None, description="Date-time when resource was last updated.", alias="updatedAt"
5458
)

services/iaasalpha/src/stackit/iaasalpha/models/backup_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class BackupSource(BaseModel):
3131
id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
3232
description="Universally Unique Identifier (UUID)."
3333
)
34-
type: StrictStr = Field(description="The source types of a backup.")
34+
type: StrictStr = Field(description="The source types of a backup. Possible values: `volume`, `snapshot`.")
3535
__properties: ClassVar[List[str]] = ["id", "type"]
3636

3737
@field_validator("id")

services/iaasalpha/src/stackit/iaasalpha/models/boot_volume.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BootVolume(BaseModel):
3838
"""
3939

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

135135
_obj = cls.model_validate(
136136
{
137-
"deleteOnTermination": (
138-
obj.get("deleteOnTermination") if obj.get("deleteOnTermination") is not None else False
139-
),
137+
"deleteOnTermination": obj.get("deleteOnTermination"),
140138
"id": obj.get("id"),
141139
"performanceClass": obj.get("performanceClass"),
142140
"size": obj.get("size"),

services/iaasalpha/src/stackit/iaasalpha/models/boot_volume_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class BootVolumeSource(BaseModel):
3131
id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(
3232
description="Universally Unique Identifier (UUID)."
3333
)
34-
type: StrictStr = Field(description="The source types of a boot volume.")
34+
type: StrictStr = Field(description="The source types of a boot volume. Possible values: `image`, `volume`.")
3535
__properties: ClassVar[List[str]] = ["id", "type"]
3636

3737
@field_validator("id")

services/iaasalpha/src/stackit/iaasalpha/models/create_affinity_group_payload.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class CreateAffinityGroupPayload(BaseModel):
3737
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
3838
description="The name for a General Object. Matches Names and also UUIDs."
3939
)
40-
policy: StrictStr = Field(description="The affinity group policy.")
40+
policy: StrictStr = Field(
41+
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`."
42+
)
4143
__properties: ClassVar[List[str]] = ["id", "members", "name", "policy"]
4244

4345
@field_validator("id")

services/iaasalpha/src/stackit/iaasalpha/models/create_backup_payload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class CreateBackupPayload(BaseModel):
3131
"""
3232

3333
labels: Optional[Dict[str, Any]] = Field(
34-
default=None, description="Object that represents the labels of an object."
34+
default=None,
35+
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}$`.",
3536
)
3637
name: Optional[Annotated[str, Field(strict=True, max_length=63)]] = Field(
3738
default=None, description="The name for a General Object. Matches Names and also UUIDs."

services/iaasalpha/src/stackit/iaasalpha/models/create_image_payload.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ class CreateImagePayload(BaseModel):
4545
created_at: Optional[datetime] = Field(
4646
default=None, description="Date-time when resource was created.", alias="createdAt"
4747
)
48-
disk_format: StrictStr = Field(description="Object that represents a disk format.", alias="diskFormat")
48+
disk_format: StrictStr = Field(
49+
description="Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.", alias="diskFormat"
50+
)
4951
id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
5052
default=None, description="Universally Unique Identifier (UUID)."
5153
)
5254
labels: Optional[Dict[str, Any]] = Field(
53-
default=None, description="Object that represents the labels of an object."
55+
default=None,
56+
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}$`.",
5457
)
5558
min_disk_size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.", alias="minDiskSize")
5659
min_ram: Optional[StrictInt] = Field(default=None, description="Size in Megabyte.", alias="minRam")
@@ -61,8 +64,14 @@ class CreateImagePayload(BaseModel):
6164
default=None, description="Universally Unique Identifier (UUID)."
6265
)
6366
protected: Optional[StrictBool] = None
64-
scope: Optional[StrictStr] = Field(default=None, description="Scope of an Image.")
65-
status: Optional[StrictStr] = Field(default=None, description="The status of an image object.")
67+
scope: Optional[StrictStr] = Field(
68+
default=None, description="Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`."
69+
)
70+
size: Optional[StrictInt] = Field(default=None, description="Size in bytes.")
71+
status: Optional[StrictStr] = Field(
72+
default=None,
73+
description="The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.",
74+
)
6675
updated_at: Optional[datetime] = Field(
6776
default=None, description="Date-time when resource was last updated.", alias="updatedAt"
6877
)
@@ -79,6 +88,7 @@ class CreateImagePayload(BaseModel):
7988
"owner",
8089
"protected",
8190
"scope",
91+
"size",
8292
"status",
8393
"updatedAt",
8494
]
@@ -150,6 +160,7 @@ def to_dict(self) -> Dict[str, Any]:
150160
* OpenAPI `readOnly` fields are excluded.
151161
* OpenAPI `readOnly` fields are excluded.
152162
* OpenAPI `readOnly` fields are excluded.
163+
* OpenAPI `readOnly` fields are excluded.
153164
"""
154165
excluded_fields: Set[str] = set(
155166
[
@@ -158,6 +169,7 @@ def to_dict(self) -> Dict[str, Any]:
158169
"id",
159170
"owner",
160171
"scope",
172+
"size",
161173
"status",
162174
"updated_at",
163175
]
@@ -199,6 +211,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
199211
"owner": obj.get("owner"),
200212
"protected": obj.get("protected"),
201213
"scope": obj.get("scope"),
214+
"size": obj.get("size"),
202215
"status": obj.get("status"),
203216
"updatedAt": obj.get("updatedAt"),
204217
}

services/iaasalpha/src/stackit/iaasalpha/models/create_key_pair_payload.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class CreateKeyPairPayload(BaseModel):
3636
default=None, description="Object that represents an SSH keypair MD5 fingerprint."
3737
)
3838
labels: Optional[Dict[str, Any]] = Field(
39-
default=None, description="Object that represents the labels of an object."
39+
default=None,
40+
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}$`.",
4041
)
4142
name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field(
4243
default=None,
@@ -73,9 +74,11 @@ def name_validate_regular_expression(cls, value):
7374
@field_validator("public_key")
7475
def public_key_validate_regular_expression(cls, value):
7576
"""Validates the regular expression"""
76-
if not re.match(r"^(ssh-rsa|ssh-ed25519)\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$", value):
77+
if not re.match(
78+
r"^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp(256|384|521))\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$", value
79+
):
7780
raise ValueError(
78-
r"must validate the regular expression /^(ssh-rsa|ssh-ed25519)\s+[A-Za-z0-9+\/]+[=]{0,3}(\s+.+)?\s*$/"
81+
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*$/"
7982
)
8083
return value
8184

services/iaasalpha/src/stackit/iaasalpha/models/create_network_area_payload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class CreateNetworkAreaPayload(BaseModel):
3232

3333
address_family: CreateAreaAddressFamily = Field(alias="addressFamily")
3434
labels: Optional[Dict[str, Any]] = Field(
35-
default=None, description="Object that represents the labels of an object."
35+
default=None,
36+
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}$`.",
3637
)
3738
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
3839
description="The name for a General Object. Matches Names and also UUIDs."

services/iaasalpha/src/stackit/iaasalpha/models/create_network_payload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class CreateNetworkPayload(BaseModel):
3434

3535
address_family: Optional[CreateNetworkAddressFamily] = Field(default=None, alias="addressFamily")
3636
labels: Optional[Dict[str, Any]] = Field(
37-
default=None, description="Object that represents the labels of an object."
37+
default=None,
38+
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}$`.",
3839
)
3940
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
4041
description="The name for a General Object. Matches Names and also UUIDs."

services/iaasalpha/src/stackit/iaasalpha/models/create_nic_payload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class CreateNicPayload(BaseModel):
5353
default=None, description="Object that represents an IPv6 address."
5454
)
5555
labels: Optional[Dict[str, Any]] = Field(
56-
default=None, description="Object that represents the labels of an object."
56+
default=None,
57+
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}$`.",
5758
)
5859
mac: Optional[Annotated[str, Field(strict=True)]] = Field(
5960
default=None, description="Object that represents an MAC address."

services/iaasalpha/src/stackit/iaasalpha/models/create_protocol.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class CreateProtocol(BaseModel):
4343
)
4444
# data type: str
4545
oneof_schema_2_validator: Optional[StrictStr] = Field(
46-
default=None, description="The protocol name which the rule should match."
46+
default=None,
47+
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`.",
4748
)
4849
actual_instance: Optional[Union[int, str]] = None
4950
one_of_schemas: Set[str] = {"int", "str"}

services/iaasalpha/src/stackit/iaasalpha/models/create_public_ip_payload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class CreatePublicIPPayload(BaseModel):
3535
default=None, description="Object that represents an IP address."
3636
)
3737
labels: Optional[Dict[str, Any]] = Field(
38-
default=None, description="Object that represents the labels of an object."
38+
default=None,
39+
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}$`.",
3940
)
4041
network_interface: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field(
4142
default=None,

services/iaasalpha/src/stackit/iaasalpha/models/create_security_group_payload.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class CreateSecurityGroupPayload(BaseModel):
4141
default=None, description="Universally Unique Identifier (UUID)."
4242
)
4343
labels: Optional[Dict[str, Any]] = Field(
44-
default=None, description="Object that represents the labels of an object."
44+
default=None,
45+
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}$`.",
4546
)
4647
name: Annotated[str, Field(strict=True, max_length=63)] = Field(
4748
description="The name for a General Object. Matches Names and also UUIDs."

0 commit comments

Comments
 (0)