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
4 changes: 0 additions & 4 deletions services/iaas/src/stackit/iaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"ImageChecksum",
"ImageConfig",
"ImageCreateResponse",
"ImageFromVolumePayload",
"ImageListResponse",
"ImageShare",
"ImageShareConsumer",
Expand Down Expand Up @@ -314,9 +313,6 @@
from stackit.iaas.models.image_create_response import (
ImageCreateResponse as ImageCreateResponse,
)
from stackit.iaas.models.image_from_volume_payload import (
ImageFromVolumePayload as ImageFromVolumePayload,
)
from stackit.iaas.models.image_list_response import (
ImageListResponse as ImageListResponse,
)
Expand Down
322 changes: 0 additions & 322 deletions services/iaas/src/stackit/iaas/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
from stackit.iaas.models.get_server_log200_response import GetServerLog200Response
from stackit.iaas.models.image import Image
from stackit.iaas.models.image_create_response import ImageCreateResponse
from stackit.iaas.models.image_from_volume_payload import ImageFromVolumePayload
from stackit.iaas.models.image_list_response import ImageListResponse
from stackit.iaas.models.image_share import ImageShare
from stackit.iaas.models.image_share_consumer import ImageShareConsumer
Expand Down Expand Up @@ -22655,327 +22654,6 @@ def _get_volume_performance_class_serialize(
_request_auth=_request_auth,
)

@validate_call
def image_from_volume(
self,
project_id: Annotated[
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
volume_id: Annotated[
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."),
],
region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")],
image_from_volume_payload: Annotated[
Optional[ImageFromVolumePayload], Field(description="Create an image from a volume.")
] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""Create an image out of a volume.

Create an image out a a volume.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: str
:param volume_id: The identifier (ID) of a STACKIT Volume. (required)
:type volume_id: str
:param region: The STACKIT Region of the resources. (required)
:type region: str
:param image_from_volume_payload: Create an image from a volume.
:type image_from_volume_payload: ImageFromVolumePayload
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._image_from_volume_serialize(
project_id=project_id,
volume_id=volume_id,
region=region,
image_from_volume_payload=image_from_volume_payload,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index,
)

_response_types_map: Dict[str, Optional[str]] = {
"202": None,
"400": "Error",
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data

@validate_call
def image_from_volume_with_http_info(
self,
project_id: Annotated[
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
volume_id: Annotated[
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."),
],
region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")],
image_from_volume_payload: Annotated[
Optional[ImageFromVolumePayload], Field(description="Create an image from a volume.")
] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""Create an image out of a volume.

Create an image out a a volume.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: str
:param volume_id: The identifier (ID) of a STACKIT Volume. (required)
:type volume_id: str
:param region: The STACKIT Region of the resources. (required)
:type region: str
:param image_from_volume_payload: Create an image from a volume.
:type image_from_volume_payload: ImageFromVolumePayload
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._image_from_volume_serialize(
project_id=project_id,
volume_id=volume_id,
region=region,
image_from_volume_payload=image_from_volume_payload,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index,
)

_response_types_map: Dict[str, Optional[str]] = {
"202": None,
"400": "Error",
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)

@validate_call
def image_from_volume_without_preload_content(
self,
project_id: Annotated[
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
],
volume_id: Annotated[
str,
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."),
],
region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")],
image_from_volume_payload: Annotated[
Optional[ImageFromVolumePayload], Field(description="Create an image from a volume.")
] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Create an image out of a volume.

Create an image out a a volume.

:param project_id: The identifier (ID) of a STACKIT Project. (required)
:type project_id: str
:param volume_id: The identifier (ID) of a STACKIT Volume. (required)
:type volume_id: str
:param region: The STACKIT Region of the resources. (required)
:type region: str
:param image_from_volume_payload: Create an image from a volume.
:type image_from_volume_payload: ImageFromVolumePayload
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._image_from_volume_serialize(
project_id=project_id,
volume_id=volume_id,
region=region,
image_from_volume_payload=image_from_volume_payload,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index,
)

_response_types_map: Dict[str, Optional[str]] = {
"202": None,
"400": "Error",
"401": "Error",
"403": "Error",
"404": "Error",
"409": "Error",
"500": "Error",
}
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
return response_data.response

def _image_from_volume_serialize(
self,
project_id,
volume_id,
region,
image_from_volume_payload,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:

_host = None

_collection_formats: Dict[str, str] = {}

_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
_body_params: Optional[bytes] = None

# process the path parameters
if project_id is not None:
_path_params["projectId"] = project_id
if volume_id is not None:
_path_params["volumeId"] = volume_id
if region is not None:
_path_params["region"] = region
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if image_from_volume_payload is not None:
_body_params = image_from_volume_payload

# set the HTTP header `Accept`
if "Accept" not in _header_params:
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])

# set the HTTP header `Content-Type`
if _content_type:
_header_params["Content-Type"] = _content_type
else:
_default_content_type = self.api_client.select_header_content_type(["application/json"])
if _default_content_type is not None:
_header_params["Content-Type"] = _default_content_type

# authentication setting
_auth_settings: List[str] = []

return self.api_client.param_serialize(
method="POST",
resource_path="/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}/upload",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth,
)

@validate_call
def list_affinity_groups(
self,
Expand Down
1 change: 0 additions & 1 deletion services/iaas/src/stackit/iaas/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
from stackit.iaas.models.image_checksum import ImageChecksum
from stackit.iaas.models.image_config import ImageConfig
from stackit.iaas.models.image_create_response import ImageCreateResponse
from stackit.iaas.models.image_from_volume_payload import ImageFromVolumePayload
from stackit.iaas.models.image_list_response import ImageListResponse
from stackit.iaas.models.image_share import ImageShare
from stackit.iaas.models.image_share_consumer import ImageShareConsumer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ class AddRoutingTableToAreaPayload(BaseModel):
name: Annotated[str, Field(strict=True, max_length=127)] = Field(
description="The name for a General Object. Matches Names and also UUIDs."
)
system_routes: Optional[StrictBool] = Field(
default=True,
description="A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA.",
alias="systemRoutes",
)
system_routes: Optional[StrictBool] = Field(default=True, alias="systemRoutes")
updated_at: Optional[datetime] = Field(
default=None, description="Date-time when resource was last updated.", alias="updatedAt"
)
Expand Down
Loading