|
68 | 68 | from stackit.iaas.models.get_server_log200_response import GetServerLog200Response |
69 | 69 | from stackit.iaas.models.image import Image |
70 | 70 | from stackit.iaas.models.image_create_response import ImageCreateResponse |
71 | | -from stackit.iaas.models.image_from_volume_payload import ImageFromVolumePayload |
72 | 71 | from stackit.iaas.models.image_list_response import ImageListResponse |
73 | 72 | from stackit.iaas.models.image_share import ImageShare |
74 | 73 | from stackit.iaas.models.image_share_consumer import ImageShareConsumer |
@@ -22655,327 +22654,6 @@ def _get_volume_performance_class_serialize( |
22655 | 22654 | _request_auth=_request_auth, |
22656 | 22655 | ) |
22657 | 22656 |
|
22658 | | - @validate_call |
22659 | | - def image_from_volume( |
22660 | | - self, |
22661 | | - project_id: Annotated[ |
22662 | | - str, |
22663 | | - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), |
22664 | | - ], |
22665 | | - volume_id: Annotated[ |
22666 | | - str, |
22667 | | - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), |
22668 | | - ], |
22669 | | - region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], |
22670 | | - image_from_volume_payload: Annotated[ |
22671 | | - Optional[ImageFromVolumePayload], Field(description="Create an image from a volume.") |
22672 | | - ] = None, |
22673 | | - _request_timeout: Union[ |
22674 | | - None, |
22675 | | - Annotated[StrictFloat, Field(gt=0)], |
22676 | | - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
22677 | | - ] = None, |
22678 | | - _request_auth: Optional[Dict[StrictStr, Any]] = None, |
22679 | | - _content_type: Optional[StrictStr] = None, |
22680 | | - _headers: Optional[Dict[StrictStr, Any]] = None, |
22681 | | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
22682 | | - ) -> None: |
22683 | | - """Create an image out of a volume. |
22684 | | - |
22685 | | - Create an image out a a volume. |
22686 | | - |
22687 | | - :param project_id: The identifier (ID) of a STACKIT Project. (required) |
22688 | | - :type project_id: str |
22689 | | - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) |
22690 | | - :type volume_id: str |
22691 | | - :param region: The STACKIT Region of the resources. (required) |
22692 | | - :type region: str |
22693 | | - :param image_from_volume_payload: Create an image from a volume. |
22694 | | - :type image_from_volume_payload: ImageFromVolumePayload |
22695 | | - :param _request_timeout: timeout setting for this request. If one |
22696 | | - number provided, it will be total request |
22697 | | - timeout. It can also be a pair (tuple) of |
22698 | | - (connection, read) timeouts. |
22699 | | - :type _request_timeout: int, tuple(int, int), optional |
22700 | | - :param _request_auth: set to override the auth_settings for an a single |
22701 | | - request; this effectively ignores the |
22702 | | - authentication in the spec for a single request. |
22703 | | - :type _request_auth: dict, optional |
22704 | | - :param _content_type: force content-type for the request. |
22705 | | - :type _content_type: str, Optional |
22706 | | - :param _headers: set to override the headers for a single |
22707 | | - request; this effectively ignores the headers |
22708 | | - in the spec for a single request. |
22709 | | - :type _headers: dict, optional |
22710 | | - :param _host_index: set to override the host_index for a single |
22711 | | - request; this effectively ignores the host_index |
22712 | | - in the spec for a single request. |
22713 | | - :type _host_index: int, optional |
22714 | | - :return: Returns the result object. |
22715 | | - """ # noqa: E501 |
22716 | | - |
22717 | | - _param = self._image_from_volume_serialize( |
22718 | | - project_id=project_id, |
22719 | | - volume_id=volume_id, |
22720 | | - region=region, |
22721 | | - image_from_volume_payload=image_from_volume_payload, |
22722 | | - _request_auth=_request_auth, |
22723 | | - _content_type=_content_type, |
22724 | | - _headers=_headers, |
22725 | | - _host_index=_host_index, |
22726 | | - ) |
22727 | | - |
22728 | | - _response_types_map: Dict[str, Optional[str]] = { |
22729 | | - "202": None, |
22730 | | - "400": "Error", |
22731 | | - "401": "Error", |
22732 | | - "403": "Error", |
22733 | | - "404": "Error", |
22734 | | - "409": "Error", |
22735 | | - "500": "Error", |
22736 | | - } |
22737 | | - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) |
22738 | | - response_data.read() |
22739 | | - return self.api_client.response_deserialize( |
22740 | | - response_data=response_data, |
22741 | | - response_types_map=_response_types_map, |
22742 | | - ).data |
22743 | | - |
22744 | | - @validate_call |
22745 | | - def image_from_volume_with_http_info( |
22746 | | - self, |
22747 | | - project_id: Annotated[ |
22748 | | - str, |
22749 | | - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), |
22750 | | - ], |
22751 | | - volume_id: Annotated[ |
22752 | | - str, |
22753 | | - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), |
22754 | | - ], |
22755 | | - region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], |
22756 | | - image_from_volume_payload: Annotated[ |
22757 | | - Optional[ImageFromVolumePayload], Field(description="Create an image from a volume.") |
22758 | | - ] = None, |
22759 | | - _request_timeout: Union[ |
22760 | | - None, |
22761 | | - Annotated[StrictFloat, Field(gt=0)], |
22762 | | - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
22763 | | - ] = None, |
22764 | | - _request_auth: Optional[Dict[StrictStr, Any]] = None, |
22765 | | - _content_type: Optional[StrictStr] = None, |
22766 | | - _headers: Optional[Dict[StrictStr, Any]] = None, |
22767 | | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
22768 | | - ) -> ApiResponse[None]: |
22769 | | - """Create an image out of a volume. |
22770 | | - |
22771 | | - Create an image out a a volume. |
22772 | | - |
22773 | | - :param project_id: The identifier (ID) of a STACKIT Project. (required) |
22774 | | - :type project_id: str |
22775 | | - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) |
22776 | | - :type volume_id: str |
22777 | | - :param region: The STACKIT Region of the resources. (required) |
22778 | | - :type region: str |
22779 | | - :param image_from_volume_payload: Create an image from a volume. |
22780 | | - :type image_from_volume_payload: ImageFromVolumePayload |
22781 | | - :param _request_timeout: timeout setting for this request. If one |
22782 | | - number provided, it will be total request |
22783 | | - timeout. It can also be a pair (tuple) of |
22784 | | - (connection, read) timeouts. |
22785 | | - :type _request_timeout: int, tuple(int, int), optional |
22786 | | - :param _request_auth: set to override the auth_settings for an a single |
22787 | | - request; this effectively ignores the |
22788 | | - authentication in the spec for a single request. |
22789 | | - :type _request_auth: dict, optional |
22790 | | - :param _content_type: force content-type for the request. |
22791 | | - :type _content_type: str, Optional |
22792 | | - :param _headers: set to override the headers for a single |
22793 | | - request; this effectively ignores the headers |
22794 | | - in the spec for a single request. |
22795 | | - :type _headers: dict, optional |
22796 | | - :param _host_index: set to override the host_index for a single |
22797 | | - request; this effectively ignores the host_index |
22798 | | - in the spec for a single request. |
22799 | | - :type _host_index: int, optional |
22800 | | - :return: Returns the result object. |
22801 | | - """ # noqa: E501 |
22802 | | - |
22803 | | - _param = self._image_from_volume_serialize( |
22804 | | - project_id=project_id, |
22805 | | - volume_id=volume_id, |
22806 | | - region=region, |
22807 | | - image_from_volume_payload=image_from_volume_payload, |
22808 | | - _request_auth=_request_auth, |
22809 | | - _content_type=_content_type, |
22810 | | - _headers=_headers, |
22811 | | - _host_index=_host_index, |
22812 | | - ) |
22813 | | - |
22814 | | - _response_types_map: Dict[str, Optional[str]] = { |
22815 | | - "202": None, |
22816 | | - "400": "Error", |
22817 | | - "401": "Error", |
22818 | | - "403": "Error", |
22819 | | - "404": "Error", |
22820 | | - "409": "Error", |
22821 | | - "500": "Error", |
22822 | | - } |
22823 | | - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) |
22824 | | - response_data.read() |
22825 | | - return self.api_client.response_deserialize( |
22826 | | - response_data=response_data, |
22827 | | - response_types_map=_response_types_map, |
22828 | | - ) |
22829 | | - |
22830 | | - @validate_call |
22831 | | - def image_from_volume_without_preload_content( |
22832 | | - self, |
22833 | | - project_id: Annotated[ |
22834 | | - str, |
22835 | | - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), |
22836 | | - ], |
22837 | | - volume_id: Annotated[ |
22838 | | - str, |
22839 | | - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), |
22840 | | - ], |
22841 | | - region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], |
22842 | | - image_from_volume_payload: Annotated[ |
22843 | | - Optional[ImageFromVolumePayload], Field(description="Create an image from a volume.") |
22844 | | - ] = None, |
22845 | | - _request_timeout: Union[ |
22846 | | - None, |
22847 | | - Annotated[StrictFloat, Field(gt=0)], |
22848 | | - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
22849 | | - ] = None, |
22850 | | - _request_auth: Optional[Dict[StrictStr, Any]] = None, |
22851 | | - _content_type: Optional[StrictStr] = None, |
22852 | | - _headers: Optional[Dict[StrictStr, Any]] = None, |
22853 | | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
22854 | | - ) -> RESTResponseType: |
22855 | | - """Create an image out of a volume. |
22856 | | - |
22857 | | - Create an image out a a volume. |
22858 | | - |
22859 | | - :param project_id: The identifier (ID) of a STACKIT Project. (required) |
22860 | | - :type project_id: str |
22861 | | - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) |
22862 | | - :type volume_id: str |
22863 | | - :param region: The STACKIT Region of the resources. (required) |
22864 | | - :type region: str |
22865 | | - :param image_from_volume_payload: Create an image from a volume. |
22866 | | - :type image_from_volume_payload: ImageFromVolumePayload |
22867 | | - :param _request_timeout: timeout setting for this request. If one |
22868 | | - number provided, it will be total request |
22869 | | - timeout. It can also be a pair (tuple) of |
22870 | | - (connection, read) timeouts. |
22871 | | - :type _request_timeout: int, tuple(int, int), optional |
22872 | | - :param _request_auth: set to override the auth_settings for an a single |
22873 | | - request; this effectively ignores the |
22874 | | - authentication in the spec for a single request. |
22875 | | - :type _request_auth: dict, optional |
22876 | | - :param _content_type: force content-type for the request. |
22877 | | - :type _content_type: str, Optional |
22878 | | - :param _headers: set to override the headers for a single |
22879 | | - request; this effectively ignores the headers |
22880 | | - in the spec for a single request. |
22881 | | - :type _headers: dict, optional |
22882 | | - :param _host_index: set to override the host_index for a single |
22883 | | - request; this effectively ignores the host_index |
22884 | | - in the spec for a single request. |
22885 | | - :type _host_index: int, optional |
22886 | | - :return: Returns the result object. |
22887 | | - """ # noqa: E501 |
22888 | | - |
22889 | | - _param = self._image_from_volume_serialize( |
22890 | | - project_id=project_id, |
22891 | | - volume_id=volume_id, |
22892 | | - region=region, |
22893 | | - image_from_volume_payload=image_from_volume_payload, |
22894 | | - _request_auth=_request_auth, |
22895 | | - _content_type=_content_type, |
22896 | | - _headers=_headers, |
22897 | | - _host_index=_host_index, |
22898 | | - ) |
22899 | | - |
22900 | | - _response_types_map: Dict[str, Optional[str]] = { |
22901 | | - "202": None, |
22902 | | - "400": "Error", |
22903 | | - "401": "Error", |
22904 | | - "403": "Error", |
22905 | | - "404": "Error", |
22906 | | - "409": "Error", |
22907 | | - "500": "Error", |
22908 | | - } |
22909 | | - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) |
22910 | | - return response_data.response |
22911 | | - |
22912 | | - def _image_from_volume_serialize( |
22913 | | - self, |
22914 | | - project_id, |
22915 | | - volume_id, |
22916 | | - region, |
22917 | | - image_from_volume_payload, |
22918 | | - _request_auth, |
22919 | | - _content_type, |
22920 | | - _headers, |
22921 | | - _host_index, |
22922 | | - ) -> RequestSerialized: |
22923 | | - |
22924 | | - _host = None |
22925 | | - |
22926 | | - _collection_formats: Dict[str, str] = {} |
22927 | | - |
22928 | | - _path_params: Dict[str, str] = {} |
22929 | | - _query_params: List[Tuple[str, str]] = [] |
22930 | | - _header_params: Dict[str, Optional[str]] = _headers or {} |
22931 | | - _form_params: List[Tuple[str, str]] = [] |
22932 | | - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} |
22933 | | - _body_params: Optional[bytes] = None |
22934 | | - |
22935 | | - # process the path parameters |
22936 | | - if project_id is not None: |
22937 | | - _path_params["projectId"] = project_id |
22938 | | - if volume_id is not None: |
22939 | | - _path_params["volumeId"] = volume_id |
22940 | | - if region is not None: |
22941 | | - _path_params["region"] = region |
22942 | | - # process the query parameters |
22943 | | - # process the header parameters |
22944 | | - # process the form parameters |
22945 | | - # process the body parameter |
22946 | | - if image_from_volume_payload is not None: |
22947 | | - _body_params = image_from_volume_payload |
22948 | | - |
22949 | | - # set the HTTP header `Accept` |
22950 | | - if "Accept" not in _header_params: |
22951 | | - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) |
22952 | | - |
22953 | | - # set the HTTP header `Content-Type` |
22954 | | - if _content_type: |
22955 | | - _header_params["Content-Type"] = _content_type |
22956 | | - else: |
22957 | | - _default_content_type = self.api_client.select_header_content_type(["application/json"]) |
22958 | | - if _default_content_type is not None: |
22959 | | - _header_params["Content-Type"] = _default_content_type |
22960 | | - |
22961 | | - # authentication setting |
22962 | | - _auth_settings: List[str] = [] |
22963 | | - |
22964 | | - return self.api_client.param_serialize( |
22965 | | - method="POST", |
22966 | | - resource_path="/v2/projects/{projectId}/regions/{region}/volumes/{volumeId}/upload", |
22967 | | - path_params=_path_params, |
22968 | | - query_params=_query_params, |
22969 | | - header_params=_header_params, |
22970 | | - body=_body_params, |
22971 | | - post_params=_form_params, |
22972 | | - files=_files, |
22973 | | - auth_settings=_auth_settings, |
22974 | | - collection_formats=_collection_formats, |
22975 | | - _host=_host, |
22976 | | - _request_auth=_request_auth, |
22977 | | - ) |
22978 | | - |
22979 | 22657 | @validate_call |
22980 | 22658 | def list_affinity_groups( |
22981 | 22659 | self, |
|
0 commit comments