latitudesh-python-sdk 3.4.4__py3-none-any.whl → 3.4.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- latitudesh_python_sdk/_version.py +3 -3
- latitudesh_python_sdk/block_storage.py +271 -13
- latitudesh_python_sdk/filesystem_storage.py +652 -64
- latitudesh_python_sdk/inference.py +984 -0
- latitudesh_python_sdk/ipaddresses_sdk.py +2 -2
- latitudesh_python_sdk/kubernetes_clusters_sdk.py +14 -6
- latitudesh_python_sdk/lks.py +442 -10
- latitudesh_python_sdk/models/__init__.py +752 -108
- latitudesh_python_sdk/models/attach_filesystemop.py +62 -0
- latitudesh_python_sdk/models/baseline_data.py +15 -1
- latitudesh_python_sdk/models/baseline_disk_layout_group.py +4 -3
- latitudesh_python_sdk/models/create_baselineop.py +15 -1
- latitudesh_python_sdk/models/create_filesystemop.py +111 -0
- latitudesh_python_sdk/models/create_inference_api_key.py +44 -0
- latitudesh_python_sdk/models/create_lks_node_pool.py +30 -9
- latitudesh_python_sdk/models/create_sandboxop.py +104 -0
- latitudesh_python_sdk/models/create_server_reinstallop.py +22 -8
- latitudesh_python_sdk/models/create_serverop.py +8 -6
- latitudesh_python_sdk/models/{delete_storage_filesystemsop.py → delete_filesystemop.py} +2 -2
- latitudesh_python_sdk/models/delete_inference_api_keyop.py +67 -0
- latitudesh_python_sdk/models/deploy_config.py +14 -1
- latitudesh_python_sdk/models/destroy_sandboxop.py +18 -0
- latitudesh_python_sdk/models/detach_filesystemop.py +62 -0
- latitudesh_python_sdk/models/exec_sandboxop.py +119 -0
- latitudesh_python_sdk/models/filesystem_attachment_data.py +173 -0
- latitudesh_python_sdk/models/filesystem_data.py +111 -2
- latitudesh_python_sdk/models/get_filesystem_attachmentop.py +74 -0
- latitudesh_python_sdk/models/get_inference_api_keysop.py +18 -0
- latitudesh_python_sdk/models/get_inference_modelsop.py +18 -0
- latitudesh_python_sdk/models/get_inference_usageop.py +52 -0
- latitudesh_python_sdk/models/get_ipsop.py +2 -2
- latitudesh_python_sdk/models/get_sandboxesop.py +44 -0
- latitudesh_python_sdk/models/get_sandboxop.py +18 -0
- latitudesh_python_sdk/models/inference_api_key.py +127 -0
- latitudesh_python_sdk/models/inference_api_keys.py +43 -0
- latitudesh_python_sdk/models/inference_model.py +146 -0
- latitudesh_python_sdk/models/inference_models.py +32 -0
- latitudesh_python_sdk/models/inference_usage.py +178 -0
- latitudesh_python_sdk/models/{get_storage_filesystemsop.py → list_filesystemsop.py} +2 -2
- latitudesh_python_sdk/models/list_lks_allocatable_serversop.py +30 -0
- latitudesh_python_sdk/models/list_lks_available_versionsop.py +39 -0
- latitudesh_python_sdk/models/list_lks_nodesop.py +57 -0
- latitudesh_python_sdk/models/lks_allocatable_server_data.py +153 -0
- latitudesh_python_sdk/models/lks_allocatable_servers.py +62 -0
- latitudesh_python_sdk/models/lks_node_data.py +173 -0
- latitudesh_python_sdk/models/lks_node_pool_data.py +13 -2
- latitudesh_python_sdk/models/lks_nodes.py +59 -0
- latitudesh_python_sdk/models/managed_database_payload.py +6 -14
- latitudesh_python_sdk/models/mount_volumeop.py +15 -15
- latitudesh_python_sdk/models/operating_system_data.py +12 -1
- latitudesh_python_sdk/models/plan_data.py +6 -1
- latitudesh_python_sdk/models/post_inference_api_keyop.py +47 -0
- latitudesh_python_sdk/models/public_network_data.py +110 -1
- latitudesh_python_sdk/models/region.py +2 -2
- latitudesh_python_sdk/models/regions.py +2 -2
- latitudesh_python_sdk/models/sandbox.py +32 -0
- latitudesh_python_sdk/models/sandbox_data.py +118 -0
- latitudesh_python_sdk/models/sandbox_exec.py +124 -0
- latitudesh_python_sdk/models/sandboxes.py +61 -0
- latitudesh_python_sdk/models/server_data.py +14 -1
- latitudesh_python_sdk/models/unmap_volumeop.py +109 -1
- latitudesh_python_sdk/models/{patch_storage_filesystemsop.py → update_filesystemop.py} +37 -21
- latitudesh_python_sdk/models/update_lks_node_pool.py +20 -7
- latitudesh_python_sdk/models/update_public_network_ip.py +62 -0
- latitudesh_python_sdk/models/update_public_network_ipop.py +30 -0
- latitudesh_python_sdk/models/update_server_deploy_configop.py +5 -3
- latitudesh_python_sdk/models/update_volumeop.py +104 -0
- latitudesh_python_sdk/models/virtual_machine_attributes.py +14 -1
- latitudesh_python_sdk/models/virtual_machine_network_attachment_create_payload.py +2 -2
- latitudesh_python_sdk/models/virtual_machine_network_attachment_resource.py +30 -3
- latitudesh_python_sdk/models/virtual_machine_payload.py +6 -0
- latitudesh_python_sdk/models/volume_data.py +129 -34
- latitudesh_python_sdk/object_storage.py +2 -2
- latitudesh_python_sdk/public_networks_sdk.py +216 -0
- latitudesh_python_sdk/sandboxes_preview_.py +981 -0
- latitudesh_python_sdk/sdk.py +10 -0
- latitudesh_python_sdk/servers_sdk.py +10 -2
- latitudesh_python_sdk/utils/datetimes.py +5 -1
- latitudesh_python_sdk/utils/url.py +2 -3
- latitudesh_python_sdk/utils/values.py +4 -1
- latitudesh_python_sdk/virtualmachines_sdk.py +32 -6
- {latitudesh_python_sdk-3.4.4.dist-info → latitudesh_python_sdk-3.4.6.dist-info}/METADATA +28 -11
- {latitudesh_python_sdk-3.4.4.dist-info → latitudesh_python_sdk-3.4.6.dist-info}/RECORD +85 -49
- latitudesh_python_sdk/models/post_storage_filesystemsop.py +0 -96
- {latitudesh_python_sdk-3.4.4.dist-info → latitudesh_python_sdk-3.4.6.dist-info}/WHEEL +0 -0
- {latitudesh_python_sdk-3.4.4.dist-info → latitudesh_python_sdk-3.4.6.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "latitudesh-python-sdk"
|
|
6
|
-
__version__: str = "3.4.
|
|
6
|
+
__version__: str = "3.4.6"
|
|
7
7
|
__openapi_doc_version__: str = "2023-06-01"
|
|
8
|
-
__gen_version__: str = "2.
|
|
8
|
+
__gen_version__: str = "2.950.13"
|
|
9
9
|
__user_agent__: str = (
|
|
10
|
-
"speakeasy-sdk/python 3.4.
|
|
10
|
+
"speakeasy-sdk/python 3.4.6 2.950.13 2023-06-01 latitudesh-python-sdk"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
try:
|
|
@@ -6,7 +6,7 @@ from latitudesh_python_sdk._hooks import HookContext
|
|
|
6
6
|
from latitudesh_python_sdk.types import OptionalNullable, UNSET
|
|
7
7
|
from latitudesh_python_sdk.utils import get_security_from_env
|
|
8
8
|
from latitudesh_python_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Mapping, Optional, Union
|
|
9
|
+
from typing import Any, Mapping, Optional, Union
|
|
10
10
|
from typing_extensions import deprecated
|
|
11
11
|
|
|
12
12
|
|
|
@@ -268,8 +268,12 @@ class BlockStorage(BaseSDK):
|
|
|
268
268
|
retry_config=retry_config,
|
|
269
269
|
)
|
|
270
270
|
|
|
271
|
+
response_data: Any = None
|
|
271
272
|
if utils.match_response(http_res, "201", "application/vnd.api+json"):
|
|
272
273
|
return unmarshal_json_response(models.CreateVolumeResponseBody, http_res)
|
|
274
|
+
if utils.match_response(http_res, "422", "application/vnd.api+json"):
|
|
275
|
+
response_data = unmarshal_json_response(models.ErrorObjectData, http_res)
|
|
276
|
+
raise models.ErrorObject(response_data, http_res)
|
|
273
277
|
if utils.match_response(http_res, "4XX", "*"):
|
|
274
278
|
http_res_text = utils.stream_to_text(http_res)
|
|
275
279
|
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
@@ -364,8 +368,12 @@ class BlockStorage(BaseSDK):
|
|
|
364
368
|
retry_config=retry_config,
|
|
365
369
|
)
|
|
366
370
|
|
|
371
|
+
response_data: Any = None
|
|
367
372
|
if utils.match_response(http_res, "201", "application/vnd.api+json"):
|
|
368
373
|
return unmarshal_json_response(models.CreateVolumeResponseBody, http_res)
|
|
374
|
+
if utils.match_response(http_res, "422", "application/vnd.api+json"):
|
|
375
|
+
response_data = unmarshal_json_response(models.ErrorObjectData, http_res)
|
|
376
|
+
raise models.ErrorObject(response_data, http_res)
|
|
369
377
|
if utils.match_response(http_res, "4XX", "*"):
|
|
370
378
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
371
379
|
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
@@ -719,6 +727,212 @@ class BlockStorage(BaseSDK):
|
|
|
719
727
|
|
|
720
728
|
raise models.APIError("Unexpected response received", http_res)
|
|
721
729
|
|
|
730
|
+
def update_volume(
|
|
731
|
+
self,
|
|
732
|
+
*,
|
|
733
|
+
id: str,
|
|
734
|
+
data: Union[
|
|
735
|
+
models.UpdateVolumeBlockStorageData,
|
|
736
|
+
models.UpdateVolumeBlockStorageDataTypedDict,
|
|
737
|
+
],
|
|
738
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
739
|
+
server_url: Optional[str] = None,
|
|
740
|
+
timeout_ms: Optional[int] = None,
|
|
741
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
742
|
+
) -> models.UpdateVolumeResponseBody:
|
|
743
|
+
r"""Update volume
|
|
744
|
+
|
|
745
|
+
Increases the size of a high performance volume. Shrinking is not supported. Billing is prorated to the new size.
|
|
746
|
+
|
|
747
|
+
:param id: Volume ID
|
|
748
|
+
:param data:
|
|
749
|
+
:param retries: Override the default retry configuration for this method
|
|
750
|
+
:param server_url: Override the default server URL for this method
|
|
751
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
752
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
753
|
+
"""
|
|
754
|
+
base_url = None
|
|
755
|
+
url_variables = None
|
|
756
|
+
if timeout_ms is None:
|
|
757
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
758
|
+
|
|
759
|
+
if server_url is not None:
|
|
760
|
+
base_url = server_url
|
|
761
|
+
else:
|
|
762
|
+
base_url = self._get_url(base_url, url_variables)
|
|
763
|
+
|
|
764
|
+
request = models.UpdateVolumeRequest(
|
|
765
|
+
id=id,
|
|
766
|
+
request_body=models.UpdateVolumeBlockStorageRequestBody(
|
|
767
|
+
data=utils.get_pydantic_model(
|
|
768
|
+
data, models.UpdateVolumeBlockStorageData
|
|
769
|
+
),
|
|
770
|
+
),
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
req = self._build_request(
|
|
774
|
+
method="PATCH",
|
|
775
|
+
path="/storage/volumes/{id}",
|
|
776
|
+
base_url=base_url,
|
|
777
|
+
url_variables=url_variables,
|
|
778
|
+
request=request,
|
|
779
|
+
request_body_required=True,
|
|
780
|
+
request_has_path_params=True,
|
|
781
|
+
request_has_query_params=True,
|
|
782
|
+
user_agent_header="user-agent",
|
|
783
|
+
accept_header_value="application/vnd.api+json",
|
|
784
|
+
http_headers=http_headers,
|
|
785
|
+
security=self.sdk_configuration.security,
|
|
786
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
787
|
+
request.request_body,
|
|
788
|
+
False,
|
|
789
|
+
False,
|
|
790
|
+
"json",
|
|
791
|
+
models.UpdateVolumeBlockStorageRequestBody,
|
|
792
|
+
),
|
|
793
|
+
allow_empty_value=None,
|
|
794
|
+
timeout_ms=timeout_ms,
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
if retries == UNSET:
|
|
798
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
799
|
+
retries = self.sdk_configuration.retry_config
|
|
800
|
+
|
|
801
|
+
retry_config = None
|
|
802
|
+
if isinstance(retries, utils.RetryConfig):
|
|
803
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
804
|
+
|
|
805
|
+
http_res = self.do_request(
|
|
806
|
+
hook_ctx=HookContext(
|
|
807
|
+
config=self.sdk_configuration,
|
|
808
|
+
base_url=base_url or "",
|
|
809
|
+
operation_id="update-volume",
|
|
810
|
+
oauth2_scopes=None,
|
|
811
|
+
security_source=get_security_from_env(
|
|
812
|
+
self.sdk_configuration.security, models.Security
|
|
813
|
+
),
|
|
814
|
+
tags=["Block Storage"],
|
|
815
|
+
extensions={"x-mint": {"href": "/api-reference/update-volume"}},
|
|
816
|
+
),
|
|
817
|
+
request=req,
|
|
818
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
819
|
+
retry_config=retry_config,
|
|
820
|
+
)
|
|
821
|
+
|
|
822
|
+
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
823
|
+
return unmarshal_json_response(models.UpdateVolumeResponseBody, http_res)
|
|
824
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
825
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
826
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
827
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
828
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
829
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
830
|
+
|
|
831
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
832
|
+
|
|
833
|
+
async def update_volume_async(
|
|
834
|
+
self,
|
|
835
|
+
*,
|
|
836
|
+
id: str,
|
|
837
|
+
data: Union[
|
|
838
|
+
models.UpdateVolumeBlockStorageData,
|
|
839
|
+
models.UpdateVolumeBlockStorageDataTypedDict,
|
|
840
|
+
],
|
|
841
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
842
|
+
server_url: Optional[str] = None,
|
|
843
|
+
timeout_ms: Optional[int] = None,
|
|
844
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
845
|
+
) -> models.UpdateVolumeResponseBody:
|
|
846
|
+
r"""Update volume
|
|
847
|
+
|
|
848
|
+
Increases the size of a high performance volume. Shrinking is not supported. Billing is prorated to the new size.
|
|
849
|
+
|
|
850
|
+
:param id: Volume ID
|
|
851
|
+
:param data:
|
|
852
|
+
:param retries: Override the default retry configuration for this method
|
|
853
|
+
:param server_url: Override the default server URL for this method
|
|
854
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
855
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
856
|
+
"""
|
|
857
|
+
base_url = None
|
|
858
|
+
url_variables = None
|
|
859
|
+
if timeout_ms is None:
|
|
860
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
861
|
+
|
|
862
|
+
if server_url is not None:
|
|
863
|
+
base_url = server_url
|
|
864
|
+
else:
|
|
865
|
+
base_url = self._get_url(base_url, url_variables)
|
|
866
|
+
|
|
867
|
+
request = models.UpdateVolumeRequest(
|
|
868
|
+
id=id,
|
|
869
|
+
request_body=models.UpdateVolumeBlockStorageRequestBody(
|
|
870
|
+
data=utils.get_pydantic_model(
|
|
871
|
+
data, models.UpdateVolumeBlockStorageData
|
|
872
|
+
),
|
|
873
|
+
),
|
|
874
|
+
)
|
|
875
|
+
|
|
876
|
+
req = self._build_request_async(
|
|
877
|
+
method="PATCH",
|
|
878
|
+
path="/storage/volumes/{id}",
|
|
879
|
+
base_url=base_url,
|
|
880
|
+
url_variables=url_variables,
|
|
881
|
+
request=request,
|
|
882
|
+
request_body_required=True,
|
|
883
|
+
request_has_path_params=True,
|
|
884
|
+
request_has_query_params=True,
|
|
885
|
+
user_agent_header="user-agent",
|
|
886
|
+
accept_header_value="application/vnd.api+json",
|
|
887
|
+
http_headers=http_headers,
|
|
888
|
+
security=self.sdk_configuration.security,
|
|
889
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
890
|
+
request.request_body,
|
|
891
|
+
False,
|
|
892
|
+
False,
|
|
893
|
+
"json",
|
|
894
|
+
models.UpdateVolumeBlockStorageRequestBody,
|
|
895
|
+
),
|
|
896
|
+
allow_empty_value=None,
|
|
897
|
+
timeout_ms=timeout_ms,
|
|
898
|
+
)
|
|
899
|
+
|
|
900
|
+
if retries == UNSET:
|
|
901
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
902
|
+
retries = self.sdk_configuration.retry_config
|
|
903
|
+
|
|
904
|
+
retry_config = None
|
|
905
|
+
if isinstance(retries, utils.RetryConfig):
|
|
906
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
907
|
+
|
|
908
|
+
http_res = await self.do_request_async(
|
|
909
|
+
hook_ctx=HookContext(
|
|
910
|
+
config=self.sdk_configuration,
|
|
911
|
+
base_url=base_url or "",
|
|
912
|
+
operation_id="update-volume",
|
|
913
|
+
oauth2_scopes=None,
|
|
914
|
+
security_source=get_security_from_env(
|
|
915
|
+
self.sdk_configuration.security, models.Security
|
|
916
|
+
),
|
|
917
|
+
tags=["Block Storage"],
|
|
918
|
+
extensions={"x-mint": {"href": "/api-reference/update-volume"}},
|
|
919
|
+
),
|
|
920
|
+
request=req,
|
|
921
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
922
|
+
retry_config=retry_config,
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
if utils.match_response(http_res, "200", "application/vnd.api+json"):
|
|
926
|
+
return unmarshal_json_response(models.UpdateVolumeResponseBody, http_res)
|
|
927
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
928
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
929
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
930
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
931
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
932
|
+
raise models.APIError("API error occurred", http_res, http_res_text)
|
|
933
|
+
|
|
934
|
+
raise models.APIError("Unexpected response received", http_res)
|
|
935
|
+
|
|
722
936
|
@deprecated(
|
|
723
937
|
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
724
938
|
)
|
|
@@ -726,7 +940,10 @@ class BlockStorage(BaseSDK):
|
|
|
726
940
|
self,
|
|
727
941
|
*,
|
|
728
942
|
id: str,
|
|
729
|
-
data: Union[
|
|
943
|
+
data: Union[
|
|
944
|
+
models.MountVolumeBlockStorageData,
|
|
945
|
+
models.MountVolumeBlockStorageDataTypedDict,
|
|
946
|
+
],
|
|
730
947
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
731
948
|
server_url: Optional[str] = None,
|
|
732
949
|
timeout_ms: Optional[int] = None,
|
|
@@ -755,8 +972,8 @@ class BlockStorage(BaseSDK):
|
|
|
755
972
|
|
|
756
973
|
request = models.MountVolumeRequest(
|
|
757
974
|
id=id,
|
|
758
|
-
request_body=models.
|
|
759
|
-
data=utils.get_pydantic_model(data, models.
|
|
975
|
+
request_body=models.MountVolumeBlockStorageRequestBody(
|
|
976
|
+
data=utils.get_pydantic_model(data, models.MountVolumeBlockStorageData),
|
|
760
977
|
),
|
|
761
978
|
)
|
|
762
979
|
|
|
@@ -778,7 +995,7 @@ class BlockStorage(BaseSDK):
|
|
|
778
995
|
False,
|
|
779
996
|
False,
|
|
780
997
|
"json",
|
|
781
|
-
models.
|
|
998
|
+
models.MountVolumeBlockStorageRequestBody,
|
|
782
999
|
),
|
|
783
1000
|
allow_empty_value=None,
|
|
784
1001
|
timeout_ms=timeout_ms,
|
|
@@ -827,7 +1044,10 @@ class BlockStorage(BaseSDK):
|
|
|
827
1044
|
self,
|
|
828
1045
|
*,
|
|
829
1046
|
id: str,
|
|
830
|
-
data: Union[
|
|
1047
|
+
data: Union[
|
|
1048
|
+
models.MountVolumeBlockStorageData,
|
|
1049
|
+
models.MountVolumeBlockStorageDataTypedDict,
|
|
1050
|
+
],
|
|
831
1051
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
832
1052
|
server_url: Optional[str] = None,
|
|
833
1053
|
timeout_ms: Optional[int] = None,
|
|
@@ -856,8 +1076,8 @@ class BlockStorage(BaseSDK):
|
|
|
856
1076
|
|
|
857
1077
|
request = models.MountVolumeRequest(
|
|
858
1078
|
id=id,
|
|
859
|
-
request_body=models.
|
|
860
|
-
data=utils.get_pydantic_model(data, models.
|
|
1079
|
+
request_body=models.MountVolumeBlockStorageRequestBody(
|
|
1080
|
+
data=utils.get_pydantic_model(data, models.MountVolumeBlockStorageData),
|
|
861
1081
|
),
|
|
862
1082
|
)
|
|
863
1083
|
|
|
@@ -879,7 +1099,7 @@ class BlockStorage(BaseSDK):
|
|
|
879
1099
|
False,
|
|
880
1100
|
False,
|
|
881
1101
|
"json",
|
|
882
|
-
models.
|
|
1102
|
+
models.MountVolumeBlockStorageRequestBody,
|
|
883
1103
|
),
|
|
884
1104
|
allow_empty_value=None,
|
|
885
1105
|
timeout_ms=timeout_ms,
|
|
@@ -935,7 +1155,7 @@ class BlockStorage(BaseSDK):
|
|
|
935
1155
|
) -> models.MapVolumeResponseBody:
|
|
936
1156
|
r"""Map volume
|
|
937
1157
|
|
|
938
|
-
Maps a high performance volume to a server over NVMe-TCP.
|
|
1158
|
+
Maps a high performance volume to a server over NVMe-TCP. Teams with multi-host mapping enabled can map a volume to several servers, once per server; otherwise a volume maps to one server. Every mapped server writes to the same NVMe namespace, so use a cluster-aware filesystem when more than one server mounts the volume.
|
|
939
1159
|
|
|
940
1160
|
:param id: Volume ID
|
|
941
1161
|
:param data:
|
|
@@ -1035,7 +1255,7 @@ class BlockStorage(BaseSDK):
|
|
|
1035
1255
|
) -> models.MapVolumeResponseBody:
|
|
1036
1256
|
r"""Map volume
|
|
1037
1257
|
|
|
1038
|
-
Maps a high performance volume to a server over NVMe-TCP.
|
|
1258
|
+
Maps a high performance volume to a server over NVMe-TCP. Teams with multi-host mapping enabled can map a volume to several servers, once per server; otherwise a volume maps to one server. Every mapped server writes to the same NVMe namespace, so use a cluster-aware filesystem when more than one server mounts the volume.
|
|
1039
1259
|
|
|
1040
1260
|
:param id: Volume ID
|
|
1041
1261
|
:param data:
|
|
@@ -1125,6 +1345,12 @@ class BlockStorage(BaseSDK):
|
|
|
1125
1345
|
self,
|
|
1126
1346
|
*,
|
|
1127
1347
|
id: str,
|
|
1348
|
+
data: Optional[
|
|
1349
|
+
Union[
|
|
1350
|
+
models.UnmapVolumeBlockStorageData,
|
|
1351
|
+
models.UnmapVolumeBlockStorageDataTypedDict,
|
|
1352
|
+
]
|
|
1353
|
+
] = None,
|
|
1128
1354
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1129
1355
|
server_url: Optional[str] = None,
|
|
1130
1356
|
timeout_ms: Optional[int] = None,
|
|
@@ -1132,9 +1358,10 @@ class BlockStorage(BaseSDK):
|
|
|
1132
1358
|
) -> models.UnmapVolumeResponseBody:
|
|
1133
1359
|
r"""Unmap volume
|
|
1134
1360
|
|
|
1135
|
-
Unmaps a high performance volume from the
|
|
1361
|
+
Unmaps a high performance volume from one of the servers it is mapped to.
|
|
1136
1362
|
|
|
1137
1363
|
:param id: Volume ID
|
|
1364
|
+
:param data:
|
|
1138
1365
|
:param retries: Override the default retry configuration for this method
|
|
1139
1366
|
:param server_url: Override the default server URL for this method
|
|
1140
1367
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1152,6 +1379,11 @@ class BlockStorage(BaseSDK):
|
|
|
1152
1379
|
|
|
1153
1380
|
request = models.UnmapVolumeRequest(
|
|
1154
1381
|
id=id,
|
|
1382
|
+
request_body=models.UnmapVolumeBlockStorageRequestBody(
|
|
1383
|
+
data=utils.get_pydantic_model(
|
|
1384
|
+
data, Optional[models.UnmapVolumeBlockStorageData]
|
|
1385
|
+
),
|
|
1386
|
+
),
|
|
1155
1387
|
)
|
|
1156
1388
|
|
|
1157
1389
|
req = self._build_request(
|
|
@@ -1167,6 +1399,13 @@ class BlockStorage(BaseSDK):
|
|
|
1167
1399
|
accept_header_value="application/vnd.api+json",
|
|
1168
1400
|
http_headers=http_headers,
|
|
1169
1401
|
security=self.sdk_configuration.security,
|
|
1402
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1403
|
+
request.request_body if request is not None else None,
|
|
1404
|
+
False,
|
|
1405
|
+
True,
|
|
1406
|
+
"json",
|
|
1407
|
+
Optional[models.UnmapVolumeBlockStorageRequestBody],
|
|
1408
|
+
),
|
|
1170
1409
|
allow_empty_value=None,
|
|
1171
1410
|
timeout_ms=timeout_ms,
|
|
1172
1411
|
)
|
|
@@ -1211,6 +1450,12 @@ class BlockStorage(BaseSDK):
|
|
|
1211
1450
|
self,
|
|
1212
1451
|
*,
|
|
1213
1452
|
id: str,
|
|
1453
|
+
data: Optional[
|
|
1454
|
+
Union[
|
|
1455
|
+
models.UnmapVolumeBlockStorageData,
|
|
1456
|
+
models.UnmapVolumeBlockStorageDataTypedDict,
|
|
1457
|
+
]
|
|
1458
|
+
] = None,
|
|
1214
1459
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1215
1460
|
server_url: Optional[str] = None,
|
|
1216
1461
|
timeout_ms: Optional[int] = None,
|
|
@@ -1218,9 +1463,10 @@ class BlockStorage(BaseSDK):
|
|
|
1218
1463
|
) -> models.UnmapVolumeResponseBody:
|
|
1219
1464
|
r"""Unmap volume
|
|
1220
1465
|
|
|
1221
|
-
Unmaps a high performance volume from the
|
|
1466
|
+
Unmaps a high performance volume from one of the servers it is mapped to.
|
|
1222
1467
|
|
|
1223
1468
|
:param id: Volume ID
|
|
1469
|
+
:param data:
|
|
1224
1470
|
:param retries: Override the default retry configuration for this method
|
|
1225
1471
|
:param server_url: Override the default server URL for this method
|
|
1226
1472
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -1238,6 +1484,11 @@ class BlockStorage(BaseSDK):
|
|
|
1238
1484
|
|
|
1239
1485
|
request = models.UnmapVolumeRequest(
|
|
1240
1486
|
id=id,
|
|
1487
|
+
request_body=models.UnmapVolumeBlockStorageRequestBody(
|
|
1488
|
+
data=utils.get_pydantic_model(
|
|
1489
|
+
data, Optional[models.UnmapVolumeBlockStorageData]
|
|
1490
|
+
),
|
|
1491
|
+
),
|
|
1241
1492
|
)
|
|
1242
1493
|
|
|
1243
1494
|
req = self._build_request_async(
|
|
@@ -1253,6 +1504,13 @@ class BlockStorage(BaseSDK):
|
|
|
1253
1504
|
accept_header_value="application/vnd.api+json",
|
|
1254
1505
|
http_headers=http_headers,
|
|
1255
1506
|
security=self.sdk_configuration.security,
|
|
1507
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1508
|
+
request.request_body if request is not None else None,
|
|
1509
|
+
False,
|
|
1510
|
+
True,
|
|
1511
|
+
"json",
|
|
1512
|
+
Optional[models.UnmapVolumeBlockStorageRequestBody],
|
|
1513
|
+
),
|
|
1256
1514
|
allow_empty_value=None,
|
|
1257
1515
|
timeout_ms=timeout_ms,
|
|
1258
1516
|
)
|