Skip to content

Commit d9cfdab

Browse files
Generate iaas
1 parent 815ef3e commit d9cfdab

28 files changed

Lines changed: 358 additions & 45 deletions

services/iaas/oas_commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a35d8f28738a45005b098b66b6debd08a67ab018
1+
c6966ee81faf4ce115a9dcdc4e0e00165099de8f

services/iaas/src/stackit/iaas/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
"ServerMaintenance",
143143
"ServerNetwork",
144144
"ServerNetworking",
145+
"ServerVTPM",
145146
"ServiceAccountMailListResponse",
146147
"SetImageSharePayload",
147148
"Snapshot",
@@ -431,6 +432,7 @@
431432
)
432433
from stackit.iaas.models.server_network import ServerNetwork as ServerNetwork
433434
from stackit.iaas.models.server_networking import ServerNetworking as ServerNetworking
435+
from stackit.iaas.models.server_vtpm import ServerVTPM as ServerVTPM
434436
from stackit.iaas.models.service_account_mail_list_response import (
435437
ServiceAccountMailListResponse as ServiceAccountMailListResponse,
436438
)

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

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ def add_service_account_to_server(
19711971
) -> ServiceAccountMailListResponse:
19721972
"""Attach service account to a server.
19731973

1974-
Attach an additional service account to the server.
1974+
Attach a service account to the server.
19751975

19761976
:param project_id: The identifier (ID) of a STACKIT Project. (required)
19771977
:type project_id: UUID
@@ -2051,7 +2051,7 @@ def add_service_account_to_server_with_http_info(
20512051
) -> ApiResponse[ServiceAccountMailListResponse]:
20522052
"""Attach service account to a server.
20532053

2054-
Attach an additional service account to the server.
2054+
Attach a service account to the server.
20552055

20562056
:param project_id: The identifier (ID) of a STACKIT Project. (required)
20572057
:type project_id: UUID
@@ -2131,7 +2131,7 @@ def add_service_account_to_server_without_preload_content(
21312131
) -> RESTResponseType:
21322132
"""Attach service account to a server.
21332133

2134-
Attach an additional service account to the server.
2134+
Attach a service account to the server.
21352135

21362136
:param project_id: The identifier (ID) of a STACKIT Project. (required)
21372137
:type project_id: UUID
@@ -2912,6 +2912,7 @@ def create_backup(
29122912
"401": "Error",
29132913
"403": "Error",
29142914
"404": "Error",
2915+
"413": "Error",
29152916
"500": "Error",
29162917
}
29172918
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -2985,6 +2986,7 @@ def create_backup_with_http_info(
29852986
"401": "Error",
29862987
"403": "Error",
29872988
"404": "Error",
2989+
"413": "Error",
29882990
"500": "Error",
29892991
}
29902992
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -3058,6 +3060,7 @@ def create_backup_without_preload_content(
30583060
"401": "Error",
30593061
"403": "Error",
30603062
"404": "Error",
3063+
"413": "Error",
30613064
"500": "Error",
30623065
}
30633066
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -3145,7 +3148,7 @@ def create_image(
31453148
) -> ImageCreateResponse:
31463149
"""Create new Image.
31473150

3148-
Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image.
3151+
Create a new Image in a project in queued state. Image data must be imported separately. This call returns a pre-signed URL to upload small images.
31493152

31503153
:param project_id: The identifier (ID) of a STACKIT Project. (required)
31513154
:type project_id: UUID
@@ -3191,6 +3194,7 @@ def create_image(
31913194
"401": "Error",
31923195
"403": "Error",
31933196
"404": "Error",
3197+
"413": "Error",
31943198
"429": "Error",
31953199
"500": "Error",
31963200
}
@@ -3219,7 +3223,7 @@ def create_image_with_http_info(
32193223
) -> ApiResponse[ImageCreateResponse]:
32203224
"""Create new Image.
32213225

3222-
Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image.
3226+
Create a new Image in a project in queued state. Image data must be imported separately. This call returns a pre-signed URL to upload small images.
32233227

32243228
:param project_id: The identifier (ID) of a STACKIT Project. (required)
32253229
:type project_id: UUID
@@ -3265,6 +3269,7 @@ def create_image_with_http_info(
32653269
"401": "Error",
32663270
"403": "Error",
32673271
"404": "Error",
3272+
"413": "Error",
32683273
"429": "Error",
32693274
"500": "Error",
32703275
}
@@ -3293,7 +3298,7 @@ def create_image_without_preload_content(
32933298
) -> RESTResponseType:
32943299
"""Create new Image.
32953300

3296-
Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image.
3301+
Create a new Image in a project in queued state. Image data must be imported separately. This call returns a pre-signed URL to upload small images.
32973302

32983303
:param project_id: The identifier (ID) of a STACKIT Project. (required)
32993304
:type project_id: UUID
@@ -3339,6 +3344,7 @@ def create_image_without_preload_content(
33393344
"401": "Error",
33403345
"403": "Error",
33413346
"404": "Error",
3347+
"413": "Error",
33423348
"429": "Error",
33433349
"500": "Error",
33443350
}
@@ -6923,6 +6929,8 @@ def create_snapshot(
69236929
"401": "Error",
69246930
"403": "Error",
69256931
"404": "Error",
6932+
"409": "Error",
6933+
"413": "Error",
69266934
"500": "Error",
69276935
}
69286936
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -6996,6 +7004,8 @@ def create_snapshot_with_http_info(
69967004
"401": "Error",
69977005
"403": "Error",
69987006
"404": "Error",
7007+
"409": "Error",
7008+
"413": "Error",
69997009
"500": "Error",
70007010
}
70017011
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -7069,6 +7079,8 @@ def create_snapshot_without_preload_content(
70697079
"401": "Error",
70707080
"403": "Error",
70717081
"404": "Error",
7082+
"409": "Error",
7083+
"413": "Error",
70727084
"500": "Error",
70737085
}
70747086
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -7202,6 +7214,8 @@ def create_volume(
72027214
"401": "Error",
72037215
"403": "Error",
72047216
"404": "Error",
7217+
"409": "Error",
7218+
"413": "Error",
72057219
"500": "Error",
72067220
}
72077221
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -7275,6 +7289,8 @@ def create_volume_with_http_info(
72757289
"401": "Error",
72767290
"403": "Error",
72777291
"404": "Error",
7292+
"409": "Error",
7293+
"413": "Error",
72787294
"500": "Error",
72797295
}
72807296
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -7348,6 +7364,8 @@ def create_volume_without_preload_content(
73487364
"401": "Error",
73497365
"403": "Error",
73507366
"404": "Error",
7367+
"409": "Error",
7368+
"413": "Error",
73517369
"500": "Error",
73527370
}
73537371
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
@@ -27738,9 +27756,9 @@ def list_server_service_accounts(
2773827756
_headers: Optional[Dict[StrictStr, Any]] = None,
2773927757
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2774027758
) -> ServiceAccountMailListResponse:
27741-
"""List all service accounts of the Server.
27759+
"""List the service account of the Server.
2774227760

27743-
Get the list of the service accounts of the server.
27761+
Get service account of the server in a list.
2774427762

2774527763
:param project_id: The identifier (ID) of a STACKIT Project. (required)
2774627764
:type project_id: UUID
@@ -27811,9 +27829,9 @@ def list_server_service_accounts_with_http_info(
2781127829
_headers: Optional[Dict[StrictStr, Any]] = None,
2781227830
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2781327831
) -> ApiResponse[ServiceAccountMailListResponse]:
27814-
"""List all service accounts of the Server.
27832+
"""List the service account of the Server.
2781527833

27816-
Get the list of the service accounts of the server.
27834+
Get service account of the server in a list.
2781727835

2781827836
:param project_id: The identifier (ID) of a STACKIT Project. (required)
2781927837
:type project_id: UUID
@@ -27884,9 +27902,9 @@ def list_server_service_accounts_without_preload_content(
2788427902
_headers: Optional[Dict[StrictStr, Any]] = None,
2788527903
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2788627904
) -> RESTResponseType:
27887-
"""List all service accounts of the Server.
27905+
"""List the service account of the Server.
2788827906

27889-
Get the list of the service accounts of the server.
27907+
Get service account of the server in a list.
2789027908

2789127909
:param project_id: The identifier (ID) of a STACKIT Project. (required)
2789227910
:type project_id: UUID
@@ -31149,7 +31167,7 @@ def remove_service_account_from_server(
3114931167
) -> ServiceAccountMailListResponse:
3115031168
"""Detach a service account from a server.
3115131169

31152-
Detach an additional service account from the server.
31170+
Detach a service account from the server.
3115331171

3115431172
:param project_id: The identifier (ID) of a STACKIT Project. (required)
3115531173
:type project_id: UUID
@@ -31229,7 +31247,7 @@ def remove_service_account_from_server_with_http_info(
3122931247
) -> ApiResponse[ServiceAccountMailListResponse]:
3123031248
"""Detach a service account from a server.
3123131249

31232-
Detach an additional service account from the server.
31250+
Detach a service account from the server.
3123331251

3123431252
:param project_id: The identifier (ID) of a STACKIT Project. (required)
3123531253
:type project_id: UUID
@@ -31309,7 +31327,7 @@ def remove_service_account_from_server_without_preload_content(
3130931327
) -> RESTResponseType:
3131031328
"""Detach a service account from a server.
3131131329

31312-
Detach an additional service account from the server.
31330+
Detach a service account from the server.
3131331331

3131431332
:param project_id: The identifier (ID) of a STACKIT Project. (required)
3131531333
:type project_id: UUID

services/iaas/src/stackit/iaas/exceptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) ->
4646
full_msg = msg
4747
if path_to_item:
4848
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
49-
super(ApiTypeError, self).__init__(full_msg)
49+
super(ApiTypeError, self).__init__(full_msg, path_to_item, valid_classes, key_type)
5050

5151

5252
class ApiValueError(OpenApiException, ValueError):
@@ -64,7 +64,7 @@ def __init__(self, msg, path_to_item=None) -> None:
6464
full_msg = msg
6565
if path_to_item:
6666
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
67-
super(ApiValueError, self).__init__(full_msg)
67+
super(ApiValueError, self).__init__(full_msg, path_to_item)
6868

6969

7070
class ApiAttributeError(OpenApiException, AttributeError):
@@ -83,7 +83,7 @@ def __init__(self, msg, path_to_item=None) -> None:
8383
full_msg = msg
8484
if path_to_item:
8585
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
86-
super(ApiAttributeError, self).__init__(full_msg)
86+
super(ApiAttributeError, self).__init__(full_msg, path_to_item)
8787

8888

8989
class ApiKeyError(OpenApiException, KeyError):
@@ -100,7 +100,7 @@ def __init__(self, msg, path_to_item=None) -> None:
100100
full_msg = msg
101101
if path_to_item:
102102
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
103-
super(ApiKeyError, self).__init__(full_msg)
103+
super(ApiKeyError, self).__init__(full_msg, path_to_item)
104104

105105

106106
class ApiException(OpenApiException):

services/iaas/src/stackit/iaas/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
from stackit.iaas.models.server_maintenance import ServerMaintenance
164164
from stackit.iaas.models.server_network import ServerNetwork
165165
from stackit.iaas.models.server_networking import ServerNetworking
166+
from stackit.iaas.models.server_vtpm import ServerVTPM
166167
from stackit.iaas.models.service_account_mail_list_response import (
167168
ServiceAccountMailListResponse,
168169
)

services/iaas/src/stackit/iaas/models/add_routing_table_to_area_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
class AddRoutingTableToAreaPayload(BaseModel):
3030
"""
31-
An object representing a routing table.
31+
An object representing a routing table. Filterable Fields: `dynamicRoutes`, `systemRoutes`.
3232
""" # noqa: E501
3333

3434
created_at: Optional[datetime] = Field(

services/iaas/src/stackit/iaas/models/create_network_area_range_payload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CreateNetworkAreaRangePayload(BaseModel):
3131
""" # noqa: E501
3232

3333
ipv4: Optional[Annotated[List[NetworkRange], Field(min_length=1, max_length=64)]] = Field(
34-
default=None, description="A list of network ranges."
34+
default=None, description="A list of network area network ranges."
3535
)
3636
__properties: ClassVar[List[str]] = ["ipv4"]
3737

services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import pprint
1919
import re # noqa: F401
2020
from typing import Any, ClassVar, Dict, List, Optional, Set
21+
from uuid import UUID
2122

2223
from pydantic import BaseModel, ConfigDict, Field, field_validator
2324
from pydantic_core import to_jsonable_python
@@ -37,7 +38,10 @@ class CreateNetworkIPv4WithPrefix(BaseModel):
3738
default=None, description="A list containing DNS Servers/Nameservers for IPv4."
3839
)
3940
prefix: Annotated[str, Field(strict=True)] = Field(description="IPv4 Classless Inter-Domain Routing (CIDR).")
40-
__properties: ClassVar[List[str]] = ["gateway", "nameservers", "prefix"]
41+
vpc_network_range_id: Optional[UUID] = Field(
42+
default=None, description="Universally Unique Identifier (UUID).", alias="vpcNetworkRangeId"
43+
)
44+
__properties: ClassVar[List[str]] = ["gateway", "nameservers", "prefix", "vpcNetworkRangeId"]
4145

4246
@field_validator("gateway")
4347
def gateway_validate_regular_expression(cls, value):
@@ -72,6 +76,21 @@ def prefix_validate_regular_expression(cls, value):
7276
)
7377
return value
7478

79+
@field_validator("vpc_network_range_id")
80+
def vpc_network_range_id_validate_regular_expression(cls, value):
81+
"""Validates the regular expression"""
82+
if value is None:
83+
return value
84+
85+
if not isinstance(value, str):
86+
value = str(value)
87+
88+
if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value):
89+
raise ValueError(
90+
r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/"
91+
)
92+
return value
93+
7594
model_config = ConfigDict(
7695
validate_by_name=True,
7796
validate_by_alias=True,
@@ -126,6 +145,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
126145
return cls.model_validate(obj)
127146

128147
_obj = cls.model_validate(
129-
{"gateway": obj.get("gateway"), "nameservers": obj.get("nameservers"), "prefix": obj.get("prefix")}
148+
{
149+
"gateway": obj.get("gateway"),
150+
"nameservers": obj.get("nameservers"),
151+
"prefix": obj.get("prefix"),
152+
"vpcNetworkRangeId": obj.get("vpcNetworkRangeId"),
153+
}
130154
)
131155
return _obj

0 commit comments

Comments
 (0)