Skip to content
Open
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: 1 addition & 1 deletion services/iaas/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a35d8f28738a45005b098b66b6debd08a67ab018
c6966ee81faf4ce115a9dcdc4e0e00165099de8f
2 changes: 2 additions & 0 deletions services/iaas/src/stackit/iaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
"ServerMaintenance",
"ServerNetwork",
"ServerNetworking",
"ServerVTPM",
"ServiceAccountMailListResponse",
"SetImageSharePayload",
"Snapshot",
Expand Down Expand Up @@ -431,6 +432,7 @@
)
from stackit.iaas.models.server_network import ServerNetwork as ServerNetwork
from stackit.iaas.models.server_networking import ServerNetworking as ServerNetworking
from stackit.iaas.models.server_vtpm import ServerVTPM as ServerVTPM
from stackit.iaas.models.service_account_mail_list_response import (
ServiceAccountMailListResponse as ServiceAccountMailListResponse,
)
Expand Down
48 changes: 33 additions & 15 deletions services/iaas/src/stackit/iaas/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ def add_service_account_to_server(
) -> ServiceAccountMailListResponse:
"""Attach service account to a server.

Attach an additional service account to the server.
Attach a service account to the server.

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

Attach an additional service account to the server.
Attach a service account to the server.

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

Attach an additional service account to the server.
Attach a service account to the server.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: UUID
Expand Down Expand Up @@ -2912,6 +2912,7 @@ def create_backup(
"401": "Error",
"403": "Error",
"404": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -2985,6 +2986,7 @@ def create_backup_with_http_info(
"401": "Error",
"403": "Error",
"404": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -3058,6 +3060,7 @@ def create_backup_without_preload_content(
"401": "Error",
"403": "Error",
"404": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -3145,7 +3148,7 @@ def create_image(
) -> ImageCreateResponse:
"""Create new Image.

Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image.
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.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: UUID
Expand Down Expand Up @@ -3191,6 +3194,7 @@ def create_image(
"401": "Error",
"403": "Error",
"404": "Error",
"413": "Error",
"429": "Error",
"500": "Error",
}
Expand Down Expand Up @@ -3219,7 +3223,7 @@ def create_image_with_http_info(
) -> ApiResponse[ImageCreateResponse]:
"""Create new Image.

Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image.
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.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: UUID
Expand Down Expand Up @@ -3265,6 +3269,7 @@ def create_image_with_http_info(
"401": "Error",
"403": "Error",
"404": "Error",
"413": "Error",
"429": "Error",
"500": "Error",
}
Expand Down Expand Up @@ -3293,7 +3298,7 @@ def create_image_without_preload_content(
) -> RESTResponseType:
"""Create new Image.

Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image.
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.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: UUID
Expand Down Expand Up @@ -3339,6 +3344,7 @@ def create_image_without_preload_content(
"401": "Error",
"403": "Error",
"404": "Error",
"413": "Error",
"429": "Error",
"500": "Error",
}
Expand Down Expand Up @@ -6923,6 +6929,8 @@ def create_snapshot(
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -6996,6 +7004,8 @@ def create_snapshot_with_http_info(
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -7069,6 +7079,8 @@ def create_snapshot_without_preload_content(
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -7202,6 +7214,8 @@ def create_volume(
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -7275,6 +7289,8 @@ def create_volume_with_http_info(
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -7348,6 +7364,8 @@ def create_volume_without_preload_content(
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"413": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
Expand Down Expand Up @@ -27738,9 +27756,9 @@ def list_server_service_accounts(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ServiceAccountMailListResponse:
"""List all service accounts of the Server.
"""List the service account of the Server.

Get the list of the service accounts of the server.
Get service account of the server in a list.

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

Get the list of the service accounts of the server.
Get service account of the server in a list.

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

Get the list of the service accounts of the server.
Get service account of the server in a list.

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

Detach an additional service account from the server.
Detach a service account from the server.

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

Detach an additional service account from the server.
Detach a service account from the server.

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

Detach an additional service account from the server.
Detach a service account from the server.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: UUID
Expand Down
8 changes: 4 additions & 4 deletions services/iaas/src/stackit/iaas/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None) ->
full_msg = msg
if path_to_item:
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
super(ApiTypeError, self).__init__(full_msg)
super(ApiTypeError, self).__init__(full_msg, path_to_item, valid_classes, key_type)


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


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


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


class ApiException(OpenApiException):
Expand Down
1 change: 1 addition & 0 deletions services/iaas/src/stackit/iaas/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
from stackit.iaas.models.server_maintenance import ServerMaintenance
from stackit.iaas.models.server_network import ServerNetwork
from stackit.iaas.models.server_networking import ServerNetworking
from stackit.iaas.models.server_vtpm import ServerVTPM
from stackit.iaas.models.service_account_mail_list_response import (
ServiceAccountMailListResponse,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class AddRoutingTableToAreaPayload(BaseModel):
"""
An object representing a routing table.
An object representing a routing table. Filterable Fields: `dynamicRoutes`, `systemRoutes`.
""" # noqa: E501

created_at: Optional[datetime] = Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CreateNetworkAreaRangePayload(BaseModel):
""" # noqa: E501

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import pprint
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set
from uuid import UUID

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

@field_validator("gateway")
def gateway_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -72,6 +76,21 @@ def prefix_validate_regular_expression(cls, value):
)
return value

@field_validator("vpc_network_range_id")
def vpc_network_range_id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if value is None:
return value

if not isinstance(value, str):
value = str(value)

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):
raise ValueError(
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}$/"
)
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=True,
Expand Down Expand Up @@ -126,6 +145,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate(
{"gateway": obj.get("gateway"), "nameservers": obj.get("nameservers"), "prefix": obj.get("prefix")}
{
"gateway": obj.get("gateway"),
"nameservers": obj.get("nameservers"),
"prefix": obj.get("prefix"),
"vpcNetworkRangeId": obj.get("vpcNetworkRangeId"),
}
)
return _obj
Loading
Loading