hyperstack 1.45.2a0__py3-none-any.whl → 1.46.1a0__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.
- hyperstack/__init__.py +2 -1
- hyperstack/api/__init__.py +1 -0
- hyperstack/api/alive_api.py +10 -10
- hyperstack/api/api_key_api.py +7 -7
- hyperstack/api/auth_api.py +69 -69
- hyperstack/api/beta_access_api.py +50 -50
- hyperstack/api/billing_api.py +1659 -1659
- hyperstack/api/calculate_api.py +7 -7
- hyperstack/api/callbacks_api.py +21 -21
- hyperstack/api/cluster_events_api.py +7 -7
- hyperstack/api/clusters_api.py +445 -445
- hyperstack/api/compliance_api.py +21 -21
- hyperstack/api/credit_api.py +7 -7
- hyperstack/api/customer_contract_api.py +139 -139
- hyperstack/api/dashboard_api.py +7 -7
- hyperstack/api/deployment_api.py +7 -7
- hyperstack/api/environment_api.py +107 -107
- hyperstack/api/fip_exclusions_api.py +313 -0
- hyperstack/api/firewall_attachment_api.py +7 -7
- hyperstack/api/firewalls_api.py +145 -145
- hyperstack/api/floating_ip_api.py +14 -14
- hyperstack/api/image_api.py +14 -14
- hyperstack/api/payment_api.py +102 -102
- hyperstack/api/profile_api.py +56 -56
- hyperstack/api/snapshot_events_api.py +7 -7
- hyperstack/api/snapshots_api.py +167 -167
- hyperstack/api/stock_api.py +7 -7
- hyperstack/api/template_api.py +76 -76
- hyperstack/api/user_api.py +76 -76
- hyperstack/api/user_detail_choice_api.py +10 -10
- hyperstack/api/virtual_machine_api.py +799 -782
- hyperstack/api/virtual_machine_events_api.py +7 -7
- hyperstack/api/vnc_url_api.py +53 -53
- hyperstack/api/volume_api.py +77 -77
- hyperstack/api/volume_attachment_api.py +21 -21
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -1
- {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/METADATA +1 -1
- {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/RECORD +41 -40
- {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/WHEEL +0 -0
- {hyperstack-1.45.2a0.dist-info → hyperstack-1.46.1a0.dist-info}/top_level.txt +0 -0
hyperstack/api/snapshots_api.py
CHANGED
|
@@ -47,7 +47,7 @@ class SnapshotsApi:
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
@validate_call
|
|
50
|
-
def
|
|
50
|
+
def create_custom_image(
|
|
51
51
|
self,
|
|
52
52
|
snapshot_id: StrictInt,
|
|
53
53
|
payload: CreateImagePayload,
|
|
@@ -94,7 +94,7 @@ class SnapshotsApi:
|
|
|
94
94
|
:return: Returns the result object.
|
|
95
95
|
""" # noqa: E501
|
|
96
96
|
|
|
97
|
-
_param = self.
|
|
97
|
+
_param = self._create_custom_image_serialize(
|
|
98
98
|
snapshot_id=snapshot_id,
|
|
99
99
|
payload=payload,
|
|
100
100
|
_request_auth=_request_auth,
|
|
@@ -123,7 +123,7 @@ class SnapshotsApi:
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
@validate_call
|
|
126
|
-
def
|
|
126
|
+
def create_custom_image_with_http_info(
|
|
127
127
|
self,
|
|
128
128
|
snapshot_id: StrictInt,
|
|
129
129
|
payload: CreateImagePayload,
|
|
@@ -170,7 +170,7 @@ class SnapshotsApi:
|
|
|
170
170
|
:return: Returns the result object.
|
|
171
171
|
""" # noqa: E501
|
|
172
172
|
|
|
173
|
-
_param = self.
|
|
173
|
+
_param = self._create_custom_image_serialize(
|
|
174
174
|
snapshot_id=snapshot_id,
|
|
175
175
|
payload=payload,
|
|
176
176
|
_request_auth=_request_auth,
|
|
@@ -199,7 +199,7 @@ class SnapshotsApi:
|
|
|
199
199
|
|
|
200
200
|
|
|
201
201
|
@validate_call
|
|
202
|
-
def
|
|
202
|
+
def create_custom_image_without_preload_content(
|
|
203
203
|
self,
|
|
204
204
|
snapshot_id: StrictInt,
|
|
205
205
|
payload: CreateImagePayload,
|
|
@@ -246,7 +246,7 @@ class SnapshotsApi:
|
|
|
246
246
|
:return: Returns the result object.
|
|
247
247
|
""" # noqa: E501
|
|
248
248
|
|
|
249
|
-
_param = self.
|
|
249
|
+
_param = self._create_custom_image_serialize(
|
|
250
250
|
snapshot_id=snapshot_id,
|
|
251
251
|
payload=payload,
|
|
252
252
|
_request_auth=_request_auth,
|
|
@@ -270,7 +270,7 @@ class SnapshotsApi:
|
|
|
270
270
|
return response_data.response
|
|
271
271
|
|
|
272
272
|
|
|
273
|
-
def
|
|
273
|
+
def _create_custom_image_serialize(
|
|
274
274
|
self,
|
|
275
275
|
snapshot_id,
|
|
276
276
|
payload,
|
|
@@ -351,7 +351,7 @@ class SnapshotsApi:
|
|
|
351
351
|
|
|
352
352
|
|
|
353
353
|
@validate_call
|
|
354
|
-
def
|
|
354
|
+
def delete_snapshot(
|
|
355
355
|
self,
|
|
356
356
|
id: StrictInt,
|
|
357
357
|
_request_timeout: Union[
|
|
@@ -395,7 +395,7 @@ class SnapshotsApi:
|
|
|
395
395
|
:return: Returns the result object.
|
|
396
396
|
""" # noqa: E501
|
|
397
397
|
|
|
398
|
-
_param = self.
|
|
398
|
+
_param = self._delete_snapshot_serialize(
|
|
399
399
|
id=id,
|
|
400
400
|
_request_auth=_request_auth,
|
|
401
401
|
_content_type=_content_type,
|
|
@@ -423,7 +423,7 @@ class SnapshotsApi:
|
|
|
423
423
|
|
|
424
424
|
|
|
425
425
|
@validate_call
|
|
426
|
-
def
|
|
426
|
+
def delete_snapshot_with_http_info(
|
|
427
427
|
self,
|
|
428
428
|
id: StrictInt,
|
|
429
429
|
_request_timeout: Union[
|
|
@@ -467,7 +467,7 @@ class SnapshotsApi:
|
|
|
467
467
|
:return: Returns the result object.
|
|
468
468
|
""" # noqa: E501
|
|
469
469
|
|
|
470
|
-
_param = self.
|
|
470
|
+
_param = self._delete_snapshot_serialize(
|
|
471
471
|
id=id,
|
|
472
472
|
_request_auth=_request_auth,
|
|
473
473
|
_content_type=_content_type,
|
|
@@ -495,7 +495,7 @@ class SnapshotsApi:
|
|
|
495
495
|
|
|
496
496
|
|
|
497
497
|
@validate_call
|
|
498
|
-
def
|
|
498
|
+
def delete_snapshot_without_preload_content(
|
|
499
499
|
self,
|
|
500
500
|
id: StrictInt,
|
|
501
501
|
_request_timeout: Union[
|
|
@@ -539,7 +539,7 @@ class SnapshotsApi:
|
|
|
539
539
|
:return: Returns the result object.
|
|
540
540
|
""" # noqa: E501
|
|
541
541
|
|
|
542
|
-
_param = self.
|
|
542
|
+
_param = self._delete_snapshot_serialize(
|
|
543
543
|
id=id,
|
|
544
544
|
_request_auth=_request_auth,
|
|
545
545
|
_content_type=_content_type,
|
|
@@ -562,7 +562,7 @@ class SnapshotsApi:
|
|
|
562
562
|
return response_data.response
|
|
563
563
|
|
|
564
564
|
|
|
565
|
-
def
|
|
565
|
+
def _delete_snapshot_serialize(
|
|
566
566
|
self,
|
|
567
567
|
id,
|
|
568
568
|
_request_auth,
|
|
@@ -900,10 +900,9 @@ class SnapshotsApi:
|
|
|
900
900
|
|
|
901
901
|
|
|
902
902
|
@validate_call
|
|
903
|
-
def
|
|
903
|
+
def get_snapshot(
|
|
904
904
|
self,
|
|
905
905
|
id: StrictInt,
|
|
906
|
-
payload: SnapshotRestoreRequest,
|
|
907
906
|
_request_timeout: Union[
|
|
908
907
|
None,
|
|
909
908
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -916,15 +915,13 @@ class SnapshotsApi:
|
|
|
916
915
|
_content_type: Optional[StrictStr] = None,
|
|
917
916
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
918
917
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
919
|
-
) ->
|
|
920
|
-
"""
|
|
918
|
+
) -> SnapshotRetrieve:
|
|
919
|
+
"""Retrieve a snapshot
|
|
921
920
|
|
|
922
|
-
|
|
921
|
+
Retrieve a snapshot.
|
|
923
922
|
|
|
924
923
|
:param id: (required)
|
|
925
924
|
:type id: int
|
|
926
|
-
:param payload: (required)
|
|
927
|
-
:type payload: SnapshotRestoreRequest
|
|
928
925
|
:param _request_timeout: timeout setting for this request. If one
|
|
929
926
|
number provided, it will be total request
|
|
930
927
|
timeout. It can also be a pair (tuple) of
|
|
@@ -947,9 +944,8 @@ class SnapshotsApi:
|
|
|
947
944
|
:return: Returns the result object.
|
|
948
945
|
""" # noqa: E501
|
|
949
946
|
|
|
950
|
-
_param = self.
|
|
947
|
+
_param = self._get_snapshot_serialize(
|
|
951
948
|
id=id,
|
|
952
|
-
payload=payload,
|
|
953
949
|
_request_auth=_request_auth,
|
|
954
950
|
_content_type=_content_type,
|
|
955
951
|
_headers=_headers,
|
|
@@ -957,7 +953,7 @@ class SnapshotsApi:
|
|
|
957
953
|
)
|
|
958
954
|
|
|
959
955
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
960
|
-
'200': "
|
|
956
|
+
'200': "SnapshotRetrieve",
|
|
961
957
|
'400': "ErrorResponseModel",
|
|
962
958
|
'401': "ErrorResponseModel",
|
|
963
959
|
'500': None,
|
|
@@ -974,10 +970,9 @@ class SnapshotsApi:
|
|
|
974
970
|
|
|
975
971
|
|
|
976
972
|
@validate_call
|
|
977
|
-
def
|
|
973
|
+
def get_snapshot_with_http_info(
|
|
978
974
|
self,
|
|
979
975
|
id: StrictInt,
|
|
980
|
-
payload: SnapshotRestoreRequest,
|
|
981
976
|
_request_timeout: Union[
|
|
982
977
|
None,
|
|
983
978
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -990,15 +985,13 @@ class SnapshotsApi:
|
|
|
990
985
|
_content_type: Optional[StrictStr] = None,
|
|
991
986
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
992
987
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
993
|
-
) -> ApiResponse[
|
|
994
|
-
"""
|
|
988
|
+
) -> ApiResponse[SnapshotRetrieve]:
|
|
989
|
+
"""Retrieve a snapshot
|
|
995
990
|
|
|
996
|
-
|
|
991
|
+
Retrieve a snapshot.
|
|
997
992
|
|
|
998
993
|
:param id: (required)
|
|
999
994
|
:type id: int
|
|
1000
|
-
:param payload: (required)
|
|
1001
|
-
:type payload: SnapshotRestoreRequest
|
|
1002
995
|
:param _request_timeout: timeout setting for this request. If one
|
|
1003
996
|
number provided, it will be total request
|
|
1004
997
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1021,9 +1014,8 @@ class SnapshotsApi:
|
|
|
1021
1014
|
:return: Returns the result object.
|
|
1022
1015
|
""" # noqa: E501
|
|
1023
1016
|
|
|
1024
|
-
_param = self.
|
|
1017
|
+
_param = self._get_snapshot_serialize(
|
|
1025
1018
|
id=id,
|
|
1026
|
-
payload=payload,
|
|
1027
1019
|
_request_auth=_request_auth,
|
|
1028
1020
|
_content_type=_content_type,
|
|
1029
1021
|
_headers=_headers,
|
|
@@ -1031,7 +1023,7 @@ class SnapshotsApi:
|
|
|
1031
1023
|
)
|
|
1032
1024
|
|
|
1033
1025
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1034
|
-
'200': "
|
|
1026
|
+
'200': "SnapshotRetrieve",
|
|
1035
1027
|
'400': "ErrorResponseModel",
|
|
1036
1028
|
'401': "ErrorResponseModel",
|
|
1037
1029
|
'500': None,
|
|
@@ -1048,10 +1040,9 @@ class SnapshotsApi:
|
|
|
1048
1040
|
|
|
1049
1041
|
|
|
1050
1042
|
@validate_call
|
|
1051
|
-
def
|
|
1043
|
+
def get_snapshot_without_preload_content(
|
|
1052
1044
|
self,
|
|
1053
1045
|
id: StrictInt,
|
|
1054
|
-
payload: SnapshotRestoreRequest,
|
|
1055
1046
|
_request_timeout: Union[
|
|
1056
1047
|
None,
|
|
1057
1048
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1065,14 +1056,12 @@ class SnapshotsApi:
|
|
|
1065
1056
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1066
1057
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1067
1058
|
) -> RESTResponseType:
|
|
1068
|
-
"""
|
|
1059
|
+
"""Retrieve a snapshot
|
|
1069
1060
|
|
|
1070
|
-
|
|
1061
|
+
Retrieve a snapshot.
|
|
1071
1062
|
|
|
1072
1063
|
:param id: (required)
|
|
1073
1064
|
:type id: int
|
|
1074
|
-
:param payload: (required)
|
|
1075
|
-
:type payload: SnapshotRestoreRequest
|
|
1076
1065
|
:param _request_timeout: timeout setting for this request. If one
|
|
1077
1066
|
number provided, it will be total request
|
|
1078
1067
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1095,9 +1084,8 @@ class SnapshotsApi:
|
|
|
1095
1084
|
:return: Returns the result object.
|
|
1096
1085
|
""" # noqa: E501
|
|
1097
1086
|
|
|
1098
|
-
_param = self.
|
|
1087
|
+
_param = self._get_snapshot_serialize(
|
|
1099
1088
|
id=id,
|
|
1100
|
-
payload=payload,
|
|
1101
1089
|
_request_auth=_request_auth,
|
|
1102
1090
|
_content_type=_content_type,
|
|
1103
1091
|
_headers=_headers,
|
|
@@ -1105,7 +1093,7 @@ class SnapshotsApi:
|
|
|
1105
1093
|
)
|
|
1106
1094
|
|
|
1107
1095
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1108
|
-
'200': "
|
|
1096
|
+
'200': "SnapshotRetrieve",
|
|
1109
1097
|
'400': "ErrorResponseModel",
|
|
1110
1098
|
'401': "ErrorResponseModel",
|
|
1111
1099
|
'500': None,
|
|
@@ -1117,10 +1105,9 @@ class SnapshotsApi:
|
|
|
1117
1105
|
return response_data.response
|
|
1118
1106
|
|
|
1119
1107
|
|
|
1120
|
-
def
|
|
1108
|
+
def _get_snapshot_serialize(
|
|
1121
1109
|
self,
|
|
1122
1110
|
id,
|
|
1123
|
-
payload,
|
|
1124
1111
|
_request_auth,
|
|
1125
1112
|
_content_type,
|
|
1126
1113
|
_headers,
|
|
@@ -1148,8 +1135,6 @@ class SnapshotsApi:
|
|
|
1148
1135
|
# process the header parameters
|
|
1149
1136
|
# process the form parameters
|
|
1150
1137
|
# process the body parameter
|
|
1151
|
-
if payload is not None:
|
|
1152
|
-
_body_params = payload
|
|
1153
1138
|
|
|
1154
1139
|
|
|
1155
1140
|
# set the HTTP header `Accept`
|
|
@@ -1160,19 +1145,6 @@ class SnapshotsApi:
|
|
|
1160
1145
|
]
|
|
1161
1146
|
)
|
|
1162
1147
|
|
|
1163
|
-
# set the HTTP header `Content-Type`
|
|
1164
|
-
if _content_type:
|
|
1165
|
-
_header_params['Content-Type'] = _content_type
|
|
1166
|
-
else:
|
|
1167
|
-
_default_content_type = (
|
|
1168
|
-
self.api_client.select_header_content_type(
|
|
1169
|
-
[
|
|
1170
|
-
'application/json'
|
|
1171
|
-
]
|
|
1172
|
-
)
|
|
1173
|
-
)
|
|
1174
|
-
if _default_content_type is not None:
|
|
1175
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1176
1148
|
|
|
1177
1149
|
# authentication setting
|
|
1178
1150
|
_auth_settings: List[str] = [
|
|
@@ -1180,8 +1152,8 @@ class SnapshotsApi:
|
|
|
1180
1152
|
]
|
|
1181
1153
|
|
|
1182
1154
|
return self.api_client.param_serialize(
|
|
1183
|
-
method='
|
|
1184
|
-
resource_path='/core/snapshots/{id}
|
|
1155
|
+
method='GET',
|
|
1156
|
+
resource_path='/core/snapshots/{id}',
|
|
1185
1157
|
path_params=_path_params,
|
|
1186
1158
|
query_params=_query_params,
|
|
1187
1159
|
header_params=_header_params,
|
|
@@ -1198,9 +1170,11 @@ class SnapshotsApi:
|
|
|
1198
1170
|
|
|
1199
1171
|
|
|
1200
1172
|
@validate_call
|
|
1201
|
-
def
|
|
1173
|
+
def list_snapshots(
|
|
1202
1174
|
self,
|
|
1203
|
-
|
|
1175
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1176
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1177
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1204
1178
|
_request_timeout: Union[
|
|
1205
1179
|
None,
|
|
1206
1180
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1213,13 +1187,17 @@ class SnapshotsApi:
|
|
|
1213
1187
|
_content_type: Optional[StrictStr] = None,
|
|
1214
1188
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1215
1189
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1216
|
-
) ->
|
|
1217
|
-
"""Retrieve
|
|
1190
|
+
) -> Snapshots:
|
|
1191
|
+
"""Retrieve list of snapshots with pagination
|
|
1218
1192
|
|
|
1219
|
-
|
|
1193
|
+
Retrieves a list of snapshots, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1220
1194
|
|
|
1221
|
-
:param
|
|
1222
|
-
:type
|
|
1195
|
+
:param page: Page Number
|
|
1196
|
+
:type page: str
|
|
1197
|
+
:param page_size: Data Per Page
|
|
1198
|
+
:type page_size: str
|
|
1199
|
+
:param search: Search By Snapshot ID or Name
|
|
1200
|
+
:type search: str
|
|
1223
1201
|
:param _request_timeout: timeout setting for this request. If one
|
|
1224
1202
|
number provided, it will be total request
|
|
1225
1203
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1242,8 +1220,10 @@ class SnapshotsApi:
|
|
|
1242
1220
|
:return: Returns the result object.
|
|
1243
1221
|
""" # noqa: E501
|
|
1244
1222
|
|
|
1245
|
-
_param = self.
|
|
1246
|
-
|
|
1223
|
+
_param = self._list_snapshots_serialize(
|
|
1224
|
+
page=page,
|
|
1225
|
+
page_size=page_size,
|
|
1226
|
+
search=search,
|
|
1247
1227
|
_request_auth=_request_auth,
|
|
1248
1228
|
_content_type=_content_type,
|
|
1249
1229
|
_headers=_headers,
|
|
@@ -1251,7 +1231,7 @@ class SnapshotsApi:
|
|
|
1251
1231
|
)
|
|
1252
1232
|
|
|
1253
1233
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1254
|
-
'200': "
|
|
1234
|
+
'200': "Snapshots",
|
|
1255
1235
|
'400': "ErrorResponseModel",
|
|
1256
1236
|
'401': "ErrorResponseModel",
|
|
1257
1237
|
'500': None,
|
|
@@ -1268,9 +1248,11 @@ class SnapshotsApi:
|
|
|
1268
1248
|
|
|
1269
1249
|
|
|
1270
1250
|
@validate_call
|
|
1271
|
-
def
|
|
1251
|
+
def list_snapshots_with_http_info(
|
|
1272
1252
|
self,
|
|
1273
|
-
|
|
1253
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1254
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1255
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1274
1256
|
_request_timeout: Union[
|
|
1275
1257
|
None,
|
|
1276
1258
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1283,13 +1265,17 @@ class SnapshotsApi:
|
|
|
1283
1265
|
_content_type: Optional[StrictStr] = None,
|
|
1284
1266
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1285
1267
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1286
|
-
) -> ApiResponse[
|
|
1287
|
-
"""Retrieve
|
|
1268
|
+
) -> ApiResponse[Snapshots]:
|
|
1269
|
+
"""Retrieve list of snapshots with pagination
|
|
1288
1270
|
|
|
1289
|
-
|
|
1271
|
+
Retrieves a list of snapshots, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1290
1272
|
|
|
1291
|
-
:param
|
|
1292
|
-
:type
|
|
1273
|
+
:param page: Page Number
|
|
1274
|
+
:type page: str
|
|
1275
|
+
:param page_size: Data Per Page
|
|
1276
|
+
:type page_size: str
|
|
1277
|
+
:param search: Search By Snapshot ID or Name
|
|
1278
|
+
:type search: str
|
|
1293
1279
|
:param _request_timeout: timeout setting for this request. If one
|
|
1294
1280
|
number provided, it will be total request
|
|
1295
1281
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1312,8 +1298,10 @@ class SnapshotsApi:
|
|
|
1312
1298
|
:return: Returns the result object.
|
|
1313
1299
|
""" # noqa: E501
|
|
1314
1300
|
|
|
1315
|
-
_param = self.
|
|
1316
|
-
|
|
1301
|
+
_param = self._list_snapshots_serialize(
|
|
1302
|
+
page=page,
|
|
1303
|
+
page_size=page_size,
|
|
1304
|
+
search=search,
|
|
1317
1305
|
_request_auth=_request_auth,
|
|
1318
1306
|
_content_type=_content_type,
|
|
1319
1307
|
_headers=_headers,
|
|
@@ -1321,7 +1309,7 @@ class SnapshotsApi:
|
|
|
1321
1309
|
)
|
|
1322
1310
|
|
|
1323
1311
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1324
|
-
'200': "
|
|
1312
|
+
'200': "Snapshots",
|
|
1325
1313
|
'400': "ErrorResponseModel",
|
|
1326
1314
|
'401': "ErrorResponseModel",
|
|
1327
1315
|
'500': None,
|
|
@@ -1338,9 +1326,11 @@ class SnapshotsApi:
|
|
|
1338
1326
|
|
|
1339
1327
|
|
|
1340
1328
|
@validate_call
|
|
1341
|
-
def
|
|
1329
|
+
def list_snapshots_without_preload_content(
|
|
1342
1330
|
self,
|
|
1343
|
-
|
|
1331
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1332
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1333
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1344
1334
|
_request_timeout: Union[
|
|
1345
1335
|
None,
|
|
1346
1336
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1354,12 +1344,16 @@ class SnapshotsApi:
|
|
|
1354
1344
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1355
1345
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1356
1346
|
) -> RESTResponseType:
|
|
1357
|
-
"""Retrieve
|
|
1347
|
+
"""Retrieve list of snapshots with pagination
|
|
1358
1348
|
|
|
1359
|
-
|
|
1349
|
+
Retrieves a list of snapshots, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1360
1350
|
|
|
1361
|
-
:param
|
|
1362
|
-
:type
|
|
1351
|
+
:param page: Page Number
|
|
1352
|
+
:type page: str
|
|
1353
|
+
:param page_size: Data Per Page
|
|
1354
|
+
:type page_size: str
|
|
1355
|
+
:param search: Search By Snapshot ID or Name
|
|
1356
|
+
:type search: str
|
|
1363
1357
|
:param _request_timeout: timeout setting for this request. If one
|
|
1364
1358
|
number provided, it will be total request
|
|
1365
1359
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1382,8 +1376,10 @@ class SnapshotsApi:
|
|
|
1382
1376
|
:return: Returns the result object.
|
|
1383
1377
|
""" # noqa: E501
|
|
1384
1378
|
|
|
1385
|
-
_param = self.
|
|
1386
|
-
|
|
1379
|
+
_param = self._list_snapshots_serialize(
|
|
1380
|
+
page=page,
|
|
1381
|
+
page_size=page_size,
|
|
1382
|
+
search=search,
|
|
1387
1383
|
_request_auth=_request_auth,
|
|
1388
1384
|
_content_type=_content_type,
|
|
1389
1385
|
_headers=_headers,
|
|
@@ -1391,7 +1387,7 @@ class SnapshotsApi:
|
|
|
1391
1387
|
)
|
|
1392
1388
|
|
|
1393
1389
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1394
|
-
'200': "
|
|
1390
|
+
'200': "Snapshots",
|
|
1395
1391
|
'400': "ErrorResponseModel",
|
|
1396
1392
|
'401': "ErrorResponseModel",
|
|
1397
1393
|
'500': None,
|
|
@@ -1403,9 +1399,11 @@ class SnapshotsApi:
|
|
|
1403
1399
|
return response_data.response
|
|
1404
1400
|
|
|
1405
1401
|
|
|
1406
|
-
def
|
|
1402
|
+
def _list_snapshots_serialize(
|
|
1407
1403
|
self,
|
|
1408
|
-
|
|
1404
|
+
page,
|
|
1405
|
+
page_size,
|
|
1406
|
+
search,
|
|
1409
1407
|
_request_auth,
|
|
1410
1408
|
_content_type,
|
|
1411
1409
|
_headers,
|
|
@@ -1427,9 +1425,19 @@ class SnapshotsApi:
|
|
|
1427
1425
|
_body_params: Optional[bytes] = None
|
|
1428
1426
|
|
|
1429
1427
|
# process the path parameters
|
|
1430
|
-
if id is not None:
|
|
1431
|
-
_path_params['id'] = id
|
|
1432
1428
|
# process the query parameters
|
|
1429
|
+
if page is not None:
|
|
1430
|
+
|
|
1431
|
+
_query_params.append(('page', page))
|
|
1432
|
+
|
|
1433
|
+
if page_size is not None:
|
|
1434
|
+
|
|
1435
|
+
_query_params.append(('pageSize', page_size))
|
|
1436
|
+
|
|
1437
|
+
if search is not None:
|
|
1438
|
+
|
|
1439
|
+
_query_params.append(('search', search))
|
|
1440
|
+
|
|
1433
1441
|
# process the header parameters
|
|
1434
1442
|
# process the form parameters
|
|
1435
1443
|
# process the body parameter
|
|
@@ -1451,7 +1459,7 @@ class SnapshotsApi:
|
|
|
1451
1459
|
|
|
1452
1460
|
return self.api_client.param_serialize(
|
|
1453
1461
|
method='GET',
|
|
1454
|
-
resource_path='/core/snapshots
|
|
1462
|
+
resource_path='/core/snapshots',
|
|
1455
1463
|
path_params=_path_params,
|
|
1456
1464
|
query_params=_query_params,
|
|
1457
1465
|
header_params=_header_params,
|
|
@@ -1468,11 +1476,10 @@ class SnapshotsApi:
|
|
|
1468
1476
|
|
|
1469
1477
|
|
|
1470
1478
|
@validate_call
|
|
1471
|
-
def
|
|
1479
|
+
def restore_snapshot(
|
|
1472
1480
|
self,
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1481
|
+
id: StrictInt,
|
|
1482
|
+
payload: SnapshotRestoreRequest,
|
|
1476
1483
|
_request_timeout: Union[
|
|
1477
1484
|
None,
|
|
1478
1485
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1485,17 +1492,15 @@ class SnapshotsApi:
|
|
|
1485
1492
|
_content_type: Optional[StrictStr] = None,
|
|
1486
1493
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1487
1494
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1488
|
-
) ->
|
|
1489
|
-
"""
|
|
1495
|
+
) -> Instance:
|
|
1496
|
+
"""Restore a snapshot
|
|
1490
1497
|
|
|
1491
|
-
|
|
1498
|
+
Restore a snapshot.
|
|
1492
1499
|
|
|
1493
|
-
:param
|
|
1494
|
-
:type
|
|
1495
|
-
:param
|
|
1496
|
-
:type
|
|
1497
|
-
:param search: Search By Snapshot ID or Name
|
|
1498
|
-
:type search: str
|
|
1500
|
+
:param id: (required)
|
|
1501
|
+
:type id: int
|
|
1502
|
+
:param payload: (required)
|
|
1503
|
+
:type payload: SnapshotRestoreRequest
|
|
1499
1504
|
:param _request_timeout: timeout setting for this request. If one
|
|
1500
1505
|
number provided, it will be total request
|
|
1501
1506
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1518,10 +1523,9 @@ class SnapshotsApi:
|
|
|
1518
1523
|
:return: Returns the result object.
|
|
1519
1524
|
""" # noqa: E501
|
|
1520
1525
|
|
|
1521
|
-
_param = self.
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
search=search,
|
|
1526
|
+
_param = self._restore_snapshot_serialize(
|
|
1527
|
+
id=id,
|
|
1528
|
+
payload=payload,
|
|
1525
1529
|
_request_auth=_request_auth,
|
|
1526
1530
|
_content_type=_content_type,
|
|
1527
1531
|
_headers=_headers,
|
|
@@ -1529,7 +1533,7 @@ class SnapshotsApi:
|
|
|
1529
1533
|
)
|
|
1530
1534
|
|
|
1531
1535
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1532
|
-
'200': "
|
|
1536
|
+
'200': "Instance",
|
|
1533
1537
|
'400': "ErrorResponseModel",
|
|
1534
1538
|
'401': "ErrorResponseModel",
|
|
1535
1539
|
'500': None,
|
|
@@ -1546,11 +1550,10 @@ class SnapshotsApi:
|
|
|
1546
1550
|
|
|
1547
1551
|
|
|
1548
1552
|
@validate_call
|
|
1549
|
-
def
|
|
1553
|
+
def restore_snapshot_with_http_info(
|
|
1550
1554
|
self,
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1555
|
+
id: StrictInt,
|
|
1556
|
+
payload: SnapshotRestoreRequest,
|
|
1554
1557
|
_request_timeout: Union[
|
|
1555
1558
|
None,
|
|
1556
1559
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1563,17 +1566,15 @@ class SnapshotsApi:
|
|
|
1563
1566
|
_content_type: Optional[StrictStr] = None,
|
|
1564
1567
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1565
1568
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1566
|
-
) -> ApiResponse[
|
|
1567
|
-
"""
|
|
1569
|
+
) -> ApiResponse[Instance]:
|
|
1570
|
+
"""Restore a snapshot
|
|
1568
1571
|
|
|
1569
|
-
|
|
1572
|
+
Restore a snapshot.
|
|
1570
1573
|
|
|
1571
|
-
:param
|
|
1572
|
-
:type
|
|
1573
|
-
:param
|
|
1574
|
-
:type
|
|
1575
|
-
:param search: Search By Snapshot ID or Name
|
|
1576
|
-
:type search: str
|
|
1574
|
+
:param id: (required)
|
|
1575
|
+
:type id: int
|
|
1576
|
+
:param payload: (required)
|
|
1577
|
+
:type payload: SnapshotRestoreRequest
|
|
1577
1578
|
:param _request_timeout: timeout setting for this request. If one
|
|
1578
1579
|
number provided, it will be total request
|
|
1579
1580
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1596,10 +1597,9 @@ class SnapshotsApi:
|
|
|
1596
1597
|
:return: Returns the result object.
|
|
1597
1598
|
""" # noqa: E501
|
|
1598
1599
|
|
|
1599
|
-
_param = self.
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
search=search,
|
|
1600
|
+
_param = self._restore_snapshot_serialize(
|
|
1601
|
+
id=id,
|
|
1602
|
+
payload=payload,
|
|
1603
1603
|
_request_auth=_request_auth,
|
|
1604
1604
|
_content_type=_content_type,
|
|
1605
1605
|
_headers=_headers,
|
|
@@ -1607,7 +1607,7 @@ class SnapshotsApi:
|
|
|
1607
1607
|
)
|
|
1608
1608
|
|
|
1609
1609
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1610
|
-
'200': "
|
|
1610
|
+
'200': "Instance",
|
|
1611
1611
|
'400': "ErrorResponseModel",
|
|
1612
1612
|
'401': "ErrorResponseModel",
|
|
1613
1613
|
'500': None,
|
|
@@ -1624,11 +1624,10 @@ class SnapshotsApi:
|
|
|
1624
1624
|
|
|
1625
1625
|
|
|
1626
1626
|
@validate_call
|
|
1627
|
-
def
|
|
1627
|
+
def restore_snapshot_without_preload_content(
|
|
1628
1628
|
self,
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1629
|
+
id: StrictInt,
|
|
1630
|
+
payload: SnapshotRestoreRequest,
|
|
1632
1631
|
_request_timeout: Union[
|
|
1633
1632
|
None,
|
|
1634
1633
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1642,16 +1641,14 @@ class SnapshotsApi:
|
|
|
1642
1641
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1643
1642
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1644
1643
|
) -> RESTResponseType:
|
|
1645
|
-
"""
|
|
1644
|
+
"""Restore a snapshot
|
|
1646
1645
|
|
|
1647
|
-
|
|
1646
|
+
Restore a snapshot.
|
|
1648
1647
|
|
|
1649
|
-
:param
|
|
1650
|
-
:type
|
|
1651
|
-
:param
|
|
1652
|
-
:type
|
|
1653
|
-
:param search: Search By Snapshot ID or Name
|
|
1654
|
-
:type search: str
|
|
1648
|
+
:param id: (required)
|
|
1649
|
+
:type id: int
|
|
1650
|
+
:param payload: (required)
|
|
1651
|
+
:type payload: SnapshotRestoreRequest
|
|
1655
1652
|
:param _request_timeout: timeout setting for this request. If one
|
|
1656
1653
|
number provided, it will be total request
|
|
1657
1654
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1674,10 +1671,9 @@ class SnapshotsApi:
|
|
|
1674
1671
|
:return: Returns the result object.
|
|
1675
1672
|
""" # noqa: E501
|
|
1676
1673
|
|
|
1677
|
-
_param = self.
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
search=search,
|
|
1674
|
+
_param = self._restore_snapshot_serialize(
|
|
1675
|
+
id=id,
|
|
1676
|
+
payload=payload,
|
|
1681
1677
|
_request_auth=_request_auth,
|
|
1682
1678
|
_content_type=_content_type,
|
|
1683
1679
|
_headers=_headers,
|
|
@@ -1685,7 +1681,7 @@ class SnapshotsApi:
|
|
|
1685
1681
|
)
|
|
1686
1682
|
|
|
1687
1683
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1688
|
-
'200': "
|
|
1684
|
+
'200': "Instance",
|
|
1689
1685
|
'400': "ErrorResponseModel",
|
|
1690
1686
|
'401': "ErrorResponseModel",
|
|
1691
1687
|
'500': None,
|
|
@@ -1697,11 +1693,10 @@ class SnapshotsApi:
|
|
|
1697
1693
|
return response_data.response
|
|
1698
1694
|
|
|
1699
1695
|
|
|
1700
|
-
def
|
|
1696
|
+
def _restore_snapshot_serialize(
|
|
1701
1697
|
self,
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
search,
|
|
1698
|
+
id,
|
|
1699
|
+
payload,
|
|
1705
1700
|
_request_auth,
|
|
1706
1701
|
_content_type,
|
|
1707
1702
|
_headers,
|
|
@@ -1723,22 +1718,14 @@ class SnapshotsApi:
|
|
|
1723
1718
|
_body_params: Optional[bytes] = None
|
|
1724
1719
|
|
|
1725
1720
|
# process the path parameters
|
|
1721
|
+
if id is not None:
|
|
1722
|
+
_path_params['id'] = id
|
|
1726
1723
|
# process the query parameters
|
|
1727
|
-
if page is not None:
|
|
1728
|
-
|
|
1729
|
-
_query_params.append(('page', page))
|
|
1730
|
-
|
|
1731
|
-
if page_size is not None:
|
|
1732
|
-
|
|
1733
|
-
_query_params.append(('pageSize', page_size))
|
|
1734
|
-
|
|
1735
|
-
if search is not None:
|
|
1736
|
-
|
|
1737
|
-
_query_params.append(('search', search))
|
|
1738
|
-
|
|
1739
1724
|
# process the header parameters
|
|
1740
1725
|
# process the form parameters
|
|
1741
1726
|
# process the body parameter
|
|
1727
|
+
if payload is not None:
|
|
1728
|
+
_body_params = payload
|
|
1742
1729
|
|
|
1743
1730
|
|
|
1744
1731
|
# set the HTTP header `Accept`
|
|
@@ -1749,6 +1736,19 @@ class SnapshotsApi:
|
|
|
1749
1736
|
]
|
|
1750
1737
|
)
|
|
1751
1738
|
|
|
1739
|
+
# set the HTTP header `Content-Type`
|
|
1740
|
+
if _content_type:
|
|
1741
|
+
_header_params['Content-Type'] = _content_type
|
|
1742
|
+
else:
|
|
1743
|
+
_default_content_type = (
|
|
1744
|
+
self.api_client.select_header_content_type(
|
|
1745
|
+
[
|
|
1746
|
+
'application/json'
|
|
1747
|
+
]
|
|
1748
|
+
)
|
|
1749
|
+
)
|
|
1750
|
+
if _default_content_type is not None:
|
|
1751
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1752
1752
|
|
|
1753
1753
|
# authentication setting
|
|
1754
1754
|
_auth_settings: List[str] = [
|
|
@@ -1756,8 +1756,8 @@ class SnapshotsApi:
|
|
|
1756
1756
|
]
|
|
1757
1757
|
|
|
1758
1758
|
return self.api_client.param_serialize(
|
|
1759
|
-
method='
|
|
1760
|
-
resource_path='/core/snapshots',
|
|
1759
|
+
method='POST',
|
|
1760
|
+
resource_path='/core/snapshots/{id}/restore',
|
|
1761
1761
|
path_params=_path_params,
|
|
1762
1762
|
query_params=_query_params,
|
|
1763
1763
|
header_params=_header_params,
|