hyperstack 1.25.0a0__py3-none-any.whl → 1.41.0a0__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 +79 -131
- hyperstack/api/__init__.py +2 -0
- hyperstack/api/alive_api.py +240 -0
- hyperstack/api/api_key_api.py +16 -20
- hyperstack/api/assigning_member_role_api.py +15 -17
- hyperstack/api/auth_api.py +1050 -5
- hyperstack/api/beta_access_api.py +856 -0
- hyperstack/api/billing_api.py +6461 -673
- hyperstack/api/calculate_api.py +8 -9
- hyperstack/api/callbacks_api.py +120 -126
- hyperstack/api/cluster_events_api.py +1 -2
- hyperstack/api/clusters_api.py +2492 -146
- hyperstack/api/compliance_api.py +14 -18
- hyperstack/api/credit_api.py +17 -15
- hyperstack/api/customer_contract_api.py +30 -33
- hyperstack/api/dashboard_api.py +4 -5
- hyperstack/api/deployment_api.py +4 -8
- hyperstack/api/environment_api.py +285 -16
- hyperstack/api/firewall_attachment_api.py +11 -9
- hyperstack/api/firewalls_api.py +341 -347
- hyperstack/api/flavor_api.py +4 -5
- hyperstack/api/floating_ip_api.py +50 -49
- hyperstack/api/gpu_api.py +1 -2
- hyperstack/api/image_api.py +35 -39
- hyperstack/api/invite_api.py +288 -18
- hyperstack/api/keypair_api.py +22 -26
- hyperstack/api/organization_api.py +12 -15
- hyperstack/api/partner_config_api.py +564 -0
- hyperstack/api/payment_api.py +299 -18
- hyperstack/api/permission_api.py +4 -5
- hyperstack/api/policy_api.py +4 -5
- hyperstack/api/pricebook_api.py +14 -12
- hyperstack/api/profile_api.py +13 -17
- hyperstack/api/rbac_role_api.py +20 -25
- hyperstack/api/region_api.py +7 -8
- hyperstack/api/security_rules_api.py +1 -2
- hyperstack/api/snapshot_events_api.py +1 -2
- hyperstack/api/snapshots_api.py +166 -172
- hyperstack/api/stock_api.py +4 -5
- hyperstack/api/template_api.py +14 -19
- hyperstack/api/user_api.py +55 -49
- hyperstack/api/user_detail_choice_api.py +1 -2
- hyperstack/api/user_permission_api.py +8 -10
- hyperstack/api/virtual_machine_api.py +1529 -929
- hyperstack/api/virtual_machine_events_api.py +21 -22
- hyperstack/api/vnc_url_api.py +54 -50
- hyperstack/api/volume_api.py +340 -40
- hyperstack/api/volume_attachment_api.py +342 -42
- hyperstack/api_client.py +1 -1
- hyperstack/configuration.py +1 -11
- hyperstack/models/__init__.py +76 -130
- hyperstack/models/{environment_fieldsfor_volume.py → access_token_field.py} +7 -7
- hyperstack/models/attach_volume_fields.py +6 -2
- hyperstack/models/attach_volumes_payload.py +4 -2
- hyperstack/models/{virtual_machine_usage.py → attachments_fields_for_volume.py} +13 -11
- hyperstack/models/{flavor_vm_fields.py → attributes.py} +15 -18
- hyperstack/models/auth_get_token_response_model.py +4 -6
- hyperstack/models/{future_node_model.py → beta_access_request_fields.py} +27 -25
- hyperstack/models/{create_gpu.py → beta_access_request_payload.py} +9 -11
- hyperstack/models/{create_discount_response.py → beta_access_request_response_model.py} +11 -11
- hyperstack/models/{export_billing_data_request.py → beta_access_status_item.py} +20 -23
- hyperstack/models/{get_all_discount_for_all_organization_response.py → beta_access_status_response_model.py} +15 -15
- hyperstack/models/{exclude_billing_post_response.py → billing_history.py} +13 -11
- hyperstack/models/billing_history_data_synthesis_details.py +105 -0
- hyperstack/models/{vm_usage_response.py → billing_history_fine_tuning.py} +23 -19
- hyperstack/models/billing_history_model_evalutation_details.py +105 -0
- hyperstack/models/{get_all_discounts_fields.py → billing_history_serverless_inference.py} +23 -24
- hyperstack/models/billing_history_serverless_inference_details.py +105 -0
- hyperstack/models/{billingmetricesfields.py → billing_metrices_fields.py} +4 -4
- hyperstack/models/{billingmetricesresponse.py → billing_metrices_response.py} +7 -7
- hyperstack/models/cluster_fields.py +27 -9
- hyperstack/models/{add_update_flavor_organization_payload.py → cluster_flavor_fields.py} +28 -26
- hyperstack/models/{historical_instances_fields.py → cluster_node_fields.py} +24 -22
- hyperstack/models/{internal_instance_flavor_fields.py → cluster_node_group_fields.py} +17 -17
- hyperstack/models/{create_update_policy_response_model.py → cluster_node_groups_create_response.py} +21 -11
- hyperstack/models/{create_update_permission_response_model.py → cluster_node_groups_get_response.py} +11 -11
- hyperstack/models/{auth_request_login_response_model.py → cluster_node_groups_list_response.py} +15 -11
- hyperstack/models/{contract_eligible_instance_fields.py → cluster_node_instance_fields.py} +13 -11
- hyperstack/models/{image_logos.py → cluster_nodes_list_response.py} +14 -14
- hyperstack/models/{internal_environment_fields.py → cluster_version.py} +13 -9
- hyperstack/models/cluster_versions.py +10 -2
- hyperstack/models/{future_nodes_stock_model.py → colors.py} +17 -15
- hyperstack/models/contract_discount_plan_fields.py +3 -1
- hyperstack/models/contract_instance_fields.py +7 -1
- hyperstack/models/{future_node_response_model.py → create_cluster_node_fields.py} +23 -18
- hyperstack/models/{update_gpu.py → create_cluster_node_group_payload.py} +12 -11
- hyperstack/models/create_cluster_payload.py +31 -8
- hyperstack/models/create_environment.py +1 -1
- hyperstack/models/create_instances_payload.py +7 -7
- hyperstack/models/create_profile_payload.py +1 -1
- hyperstack/models/create_snapshot_payload.py +2 -4
- hyperstack/models/create_volume_payload.py +1 -1
- hyperstack/models/data_synthesis_billing_history_details_response_schema.py +95 -0
- hyperstack/models/{deployment_fieldsforstartdeployments.py → deployment_fields_for_start_deployments.py} +4 -4
- hyperstack/models/{editlabelofanexisting_vm_payload.py → edit_label_of_an_existing_vm_payload.py} +4 -4
- hyperstack/models/environment_features.py +14 -2
- hyperstack/models/{node_stocks_payload.py → environment_fields_for_volume.py} +10 -12
- hyperstack/models/flavor_fields.py +3 -1
- hyperstack/models/{customer_fields.py → flavor_label_fields.py} +7 -7
- hyperstack/models/{getcreditandthresholdinfo.py → get_credit_and_threshold_info.py} +4 -4
- hyperstack/models/{getcreditandthresholdinfoinresponse.py → get_credit_and_threshold_info_in_response.py} +7 -7
- hyperstack/models/{region_payload.py → get_instance_logs_response.py} +7 -9
- hyperstack/models/instance_fields.py +8 -4
- hyperstack/models/instance_flavor_fields.py +13 -1
- hyperstack/models/{flavor_response.py → keypair_environment_features.py} +20 -16
- hyperstack/models/{internal_instance_keypair_fields.py → keypair_environment_fields.py} +13 -11
- hyperstack/models/keypair_fields.py +6 -2
- hyperstack/models/{lastdaycostfields.py → last_day_cost_fields.py} +4 -4
- hyperstack/models/{lastdaycostresponse.py → last_day_cost_response.py} +7 -7
- hyperstack/models/{export_billing_data_response.py → logos.py} +13 -9
- hyperstack/models/{creditrequestresponse.py → master_flavors_response.py} +14 -14
- hyperstack/models/{customer_payload.py → mfa_status_fields.py} +8 -10
- hyperstack/models/{gpu.py → mfa_status_response.py} +11 -11
- hyperstack/models/model_evaluation_billing_history_details_response_schema.py +95 -0
- hyperstack/models/{organization_thresholdfields.py → organization_threshold_fields.py} +4 -4
- hyperstack/models/{organizationthresholdupdateresponse.py → organization_threshold_update_response.py} +7 -7
- hyperstack/models/{organizationthresholdsresponse.py → organization_thresholds_response.py} +7 -7
- hyperstack/models/{logo_get_response.py → pagination.py} +12 -12
- hyperstack/models/{billing_response.py → partner_config.py} +31 -20
- hyperstack/models/payment_details_fields.py +5 -1
- hyperstack/models/{logout_payload.py → primary_color.py} +10 -8
- hyperstack/models/region_fields.py +16 -2
- hyperstack/models/{vm_usage_request_payload.py → request_instance_logs_payload.py} +8 -8
- hyperstack/models/{stock_visibility_user_payload.py → request_instance_logs_response.py} +8 -8
- hyperstack/models/{contract_billing_history.py → resource_level_billing_bucket_details_resources.py} +10 -10
- hyperstack/models/{node_response_model.py → resource_level_billing_history_resources_cluster.py} +21 -11
- hyperstack/models/resource_level_billing_history_response_attributes.py +3 -1
- hyperstack/models/{get_all_contracts_response_model.py → resource_level_bucket_billing_details_response_model.py} +11 -15
- hyperstack/models/{contract_billing_history_response_model.py → resource_level_bucket_billing_history_response_model.py} +11 -11
- hyperstack/models/resource_level_cluster_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_cluster_billing_history_response_model.py +95 -0
- hyperstack/models/{get_discount_detail_response.py → resource_level_cluster_graph_billing_details_response_model.py} +11 -11
- hyperstack/models/{organization_object_response.py → resource_level_graph_billing_details_bucket.py} +18 -14
- hyperstack/models/{update_discounts_status_payload.py → secondary_color.py} +10 -8
- hyperstack/models/{security_rules_fieldsfor_instance.py → security_rules_fields_for_instance.py} +4 -4
- hyperstack/models/serverless_inferenced_billing_history_details_response_schema.py +95 -0
- hyperstack/models/snapshot_fields.py +6 -1
- hyperstack/models/snapshot_retrieve_fields.py +29 -2
- hyperstack/models/start_deployment.py +3 -3
- hyperstack/models/{subscribeorunsubscribeupdatepayload.py → subscribe_or_unsubscribe_update_payload.py} +4 -4
- hyperstack/models/token_based_billing_history_response.py +95 -0
- hyperstack/models/{update_keypairnameresponse.py → update_keypair_name_response.py} +4 -4
- hyperstack/models/update_volume_attachment_payload.py +87 -0
- hyperstack/models/{verify_api_key_payload.py → update_volume_payload.py} +7 -7
- hyperstack/models/{stock_visibility_user_list_response.py → update_volume_response.py} +14 -16
- hyperstack/models/{auth_request_login_fields.py → uris.py} +19 -9
- hyperstack/models/{userinfopostpayload.py → user_info_post_payload.py} +4 -4
- hyperstack/models/{node_stock_response_model.py → user_organizations_response.py} +14 -14
- hyperstack/models/users_info_fields.py +3 -1
- hyperstack/models/volume_attachment_fields.py +9 -5
- hyperstack/models/volume_fields.py +14 -4
- hyperstack/models/{volume_fieldsfor_instance.py → volume_fields_for_instance.py} +4 -4
- hyperstack/models/volumes.py +17 -11
- hyperstack/models/{instances_summary_fields.py → volumes_fields.py} +33 -29
- hyperstack/models/workload_billing_history_response.py +95 -0
- {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.0a0.dist-info}/METADATA +2 -2
- hyperstack-1.41.0a0.dist-info/RECORD +349 -0
- {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.0a0.dist-info}/WHEEL +1 -1
- hyperstack/models/api_key_verify_fields.py +0 -93
- hyperstack/models/billing_immune_resources_response.py +0 -95
- hyperstack/models/contract_billing_history_response_attributes.py +0 -99
- hyperstack/models/contract_change_payload.py +0 -101
- hyperstack/models/contract_eligible_instances_response.py +0 -101
- hyperstack/models/contract_event_create_model.py +0 -91
- hyperstack/models/contract_resource_payload.py +0 -95
- hyperstack/models/contractl_billing_history_response_metrics.py +0 -87
- hyperstack/models/create_contract_fields.py +0 -110
- hyperstack/models/create_contract_payload.py +0 -106
- hyperstack/models/create_discounts_payload.py +0 -112
- hyperstack/models/create_update_permission_payload.py +0 -93
- hyperstack/models/create_update_policy_payload.py +0 -93
- hyperstack/models/creditrechargelimitfield.py +0 -93
- hyperstack/models/creditrechargelimitresponse.py +0 -99
- hyperstack/models/creditrequests.py +0 -96
- hyperstack/models/data.py +0 -91
- hyperstack/models/discount_entity_model.py +0 -97
- hyperstack/models/discount_fields.py +0 -100
- hyperstack/models/discount_plan_fields.py +0 -108
- hyperstack/models/discount_resource_fields.py +0 -93
- hyperstack/models/discount_resource_payload.py +0 -93
- hyperstack/models/exclude_billing_post_payload.py +0 -91
- hyperstack/models/field_change.py +0 -91
- hyperstack/models/flavor_payload.py +0 -101
- hyperstack/models/flavor_vms_response.py +0 -99
- hyperstack/models/future_node_stock_model.py +0 -93
- hyperstack/models/future_node_update_model.py +0 -98
- hyperstack/models/get_all_contract_fields.py +0 -100
- hyperstack/models/get_discount_response.py +0 -99
- hyperstack/models/get_entity_discount_detail_response.py +0 -108
- hyperstack/models/get_token_payload.py +0 -89
- hyperstack/models/get_version_response.py +0 -91
- hyperstack/models/historical_instance.py +0 -101
- hyperstack/models/infrahub_resource_object_response.py +0 -119
- hyperstack/models/insert_discount_plan_fields.py +0 -112
- hyperstack/models/internal_instance_fields.py +0 -156
- hyperstack/models/internal_instance_image_fields.py +0 -95
- hyperstack/models/internal_instances_response.py +0 -99
- hyperstack/models/internal_security_rules_fields_for_instance.py +0 -104
- hyperstack/models/internal_volume_attachment_fields.py +0 -98
- hyperstack/models/internal_volume_fields.py +0 -95
- hyperstack/models/internal_volumes_response.py +0 -99
- hyperstack/models/new_stock_update_response_model.py +0 -89
- hyperstack/models/node_model.py +0 -114
- hyperstack/models/node_payload_model.py +0 -97
- hyperstack/models/node_power_usage_model.py +0 -120
- hyperstack/models/node_stock_payload_model.py +0 -95
- hyperstack/models/organizationcreditrechargelimitresponse.py +0 -95
- hyperstack/models/power_usage_model.py +0 -89
- hyperstack/models/pricebook_resource_object_response.py +0 -107
- hyperstack/models/refresh_token_payload.py +0 -89
- hyperstack/models/region_response.py +0 -95
- hyperstack/models/set_defaults_payload.py +0 -89
- hyperstack/models/single_visibility_user_response.py +0 -91
- hyperstack/models/success_response_model.py +0 -89
- hyperstack/models/token_fields.py +0 -91
- hyperstack/models/update_contract_payload.py +0 -104
- hyperstack/models/update_discounts_payload.py +0 -102
- hyperstack/models/user_transfer_payload.py +0 -89
- hyperstack/models/verify_api_key_response_model.py +0 -95
- hyperstack/models/volume_status_change_fields.py +0 -96
- hyperstack/models/volumes_last_status_change_response.py +0 -99
- hyperstack/models/warning_mail_log_fields.py +0 -99
- hyperstack/models/warning_mail_log_response.py +0 -101
- hyperstack-1.25.0a0.dist-info/RECORD +0 -401
- {hyperstack-1.25.0a0.dist-info → hyperstack-1.41.0a0.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_a_new_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_a_new_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_a_new_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_a_new_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_a_new_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_a_new_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_a_new_custom_image_serialize(
|
|
274
274
|
self,
|
|
275
275
|
snapshot_id,
|
|
276
276
|
payload,
|
|
@@ -329,8 +329,7 @@ class SnapshotsApi:
|
|
|
329
329
|
|
|
330
330
|
# authentication setting
|
|
331
331
|
_auth_settings: List[str] = [
|
|
332
|
-
'apiKey'
|
|
333
|
-
'accessToken'
|
|
332
|
+
'apiKey'
|
|
334
333
|
]
|
|
335
334
|
|
|
336
335
|
return self.api_client.param_serialize(
|
|
@@ -606,8 +605,7 @@ class SnapshotsApi:
|
|
|
606
605
|
|
|
607
606
|
# authentication setting
|
|
608
607
|
_auth_settings: List[str] = [
|
|
609
|
-
'apiKey'
|
|
610
|
-
'accessToken'
|
|
608
|
+
'apiKey'
|
|
611
609
|
]
|
|
612
610
|
|
|
613
611
|
return self.api_client.param_serialize(
|
|
@@ -880,8 +878,7 @@ class SnapshotsApi:
|
|
|
880
878
|
|
|
881
879
|
# authentication setting
|
|
882
880
|
_auth_settings: List[str] = [
|
|
883
|
-
'apiKey'
|
|
884
|
-
'accessToken'
|
|
881
|
+
'apiKey'
|
|
885
882
|
]
|
|
886
883
|
|
|
887
884
|
return self.api_client.param_serialize(
|
|
@@ -903,10 +900,9 @@ class SnapshotsApi:
|
|
|
903
900
|
|
|
904
901
|
|
|
905
902
|
@validate_call
|
|
906
|
-
def
|
|
903
|
+
def get_snapshot(
|
|
907
904
|
self,
|
|
908
905
|
id: StrictInt,
|
|
909
|
-
payload: SnapshotRestoreRequest,
|
|
910
906
|
_request_timeout: Union[
|
|
911
907
|
None,
|
|
912
908
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -919,15 +915,13 @@ class SnapshotsApi:
|
|
|
919
915
|
_content_type: Optional[StrictStr] = None,
|
|
920
916
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
921
917
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
922
|
-
) ->
|
|
923
|
-
"""
|
|
918
|
+
) -> SnapshotRetrieve:
|
|
919
|
+
"""Retrieve a snapshot
|
|
924
920
|
|
|
925
|
-
|
|
921
|
+
Retrieve a snapshot.
|
|
926
922
|
|
|
927
923
|
:param id: (required)
|
|
928
924
|
:type id: int
|
|
929
|
-
:param payload: (required)
|
|
930
|
-
:type payload: SnapshotRestoreRequest
|
|
931
925
|
:param _request_timeout: timeout setting for this request. If one
|
|
932
926
|
number provided, it will be total request
|
|
933
927
|
timeout. It can also be a pair (tuple) of
|
|
@@ -950,9 +944,8 @@ class SnapshotsApi:
|
|
|
950
944
|
:return: Returns the result object.
|
|
951
945
|
""" # noqa: E501
|
|
952
946
|
|
|
953
|
-
_param = self.
|
|
947
|
+
_param = self._get_snapshot_serialize(
|
|
954
948
|
id=id,
|
|
955
|
-
payload=payload,
|
|
956
949
|
_request_auth=_request_auth,
|
|
957
950
|
_content_type=_content_type,
|
|
958
951
|
_headers=_headers,
|
|
@@ -960,7 +953,7 @@ class SnapshotsApi:
|
|
|
960
953
|
)
|
|
961
954
|
|
|
962
955
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
963
|
-
'200': "
|
|
956
|
+
'200': "SnapshotRetrieve",
|
|
964
957
|
'400': "ErrorResponseModel",
|
|
965
958
|
'401': "ErrorResponseModel",
|
|
966
959
|
'500': None,
|
|
@@ -977,10 +970,9 @@ class SnapshotsApi:
|
|
|
977
970
|
|
|
978
971
|
|
|
979
972
|
@validate_call
|
|
980
|
-
def
|
|
973
|
+
def get_snapshot_with_http_info(
|
|
981
974
|
self,
|
|
982
975
|
id: StrictInt,
|
|
983
|
-
payload: SnapshotRestoreRequest,
|
|
984
976
|
_request_timeout: Union[
|
|
985
977
|
None,
|
|
986
978
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -993,15 +985,13 @@ class SnapshotsApi:
|
|
|
993
985
|
_content_type: Optional[StrictStr] = None,
|
|
994
986
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
995
987
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
996
|
-
) -> ApiResponse[
|
|
997
|
-
"""
|
|
988
|
+
) -> ApiResponse[SnapshotRetrieve]:
|
|
989
|
+
"""Retrieve a snapshot
|
|
998
990
|
|
|
999
|
-
|
|
991
|
+
Retrieve a snapshot.
|
|
1000
992
|
|
|
1001
993
|
:param id: (required)
|
|
1002
994
|
:type id: int
|
|
1003
|
-
:param payload: (required)
|
|
1004
|
-
:type payload: SnapshotRestoreRequest
|
|
1005
995
|
:param _request_timeout: timeout setting for this request. If one
|
|
1006
996
|
number provided, it will be total request
|
|
1007
997
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1024,9 +1014,8 @@ class SnapshotsApi:
|
|
|
1024
1014
|
:return: Returns the result object.
|
|
1025
1015
|
""" # noqa: E501
|
|
1026
1016
|
|
|
1027
|
-
_param = self.
|
|
1017
|
+
_param = self._get_snapshot_serialize(
|
|
1028
1018
|
id=id,
|
|
1029
|
-
payload=payload,
|
|
1030
1019
|
_request_auth=_request_auth,
|
|
1031
1020
|
_content_type=_content_type,
|
|
1032
1021
|
_headers=_headers,
|
|
@@ -1034,7 +1023,7 @@ class SnapshotsApi:
|
|
|
1034
1023
|
)
|
|
1035
1024
|
|
|
1036
1025
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1037
|
-
'200': "
|
|
1026
|
+
'200': "SnapshotRetrieve",
|
|
1038
1027
|
'400': "ErrorResponseModel",
|
|
1039
1028
|
'401': "ErrorResponseModel",
|
|
1040
1029
|
'500': None,
|
|
@@ -1051,10 +1040,9 @@ class SnapshotsApi:
|
|
|
1051
1040
|
|
|
1052
1041
|
|
|
1053
1042
|
@validate_call
|
|
1054
|
-
def
|
|
1043
|
+
def get_snapshot_without_preload_content(
|
|
1055
1044
|
self,
|
|
1056
1045
|
id: StrictInt,
|
|
1057
|
-
payload: SnapshotRestoreRequest,
|
|
1058
1046
|
_request_timeout: Union[
|
|
1059
1047
|
None,
|
|
1060
1048
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1068,14 +1056,12 @@ class SnapshotsApi:
|
|
|
1068
1056
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1069
1057
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1070
1058
|
) -> RESTResponseType:
|
|
1071
|
-
"""
|
|
1059
|
+
"""Retrieve a snapshot
|
|
1072
1060
|
|
|
1073
|
-
|
|
1061
|
+
Retrieve a snapshot.
|
|
1074
1062
|
|
|
1075
1063
|
:param id: (required)
|
|
1076
1064
|
:type id: int
|
|
1077
|
-
:param payload: (required)
|
|
1078
|
-
:type payload: SnapshotRestoreRequest
|
|
1079
1065
|
:param _request_timeout: timeout setting for this request. If one
|
|
1080
1066
|
number provided, it will be total request
|
|
1081
1067
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1098,9 +1084,8 @@ class SnapshotsApi:
|
|
|
1098
1084
|
:return: Returns the result object.
|
|
1099
1085
|
""" # noqa: E501
|
|
1100
1086
|
|
|
1101
|
-
_param = self.
|
|
1087
|
+
_param = self._get_snapshot_serialize(
|
|
1102
1088
|
id=id,
|
|
1103
|
-
payload=payload,
|
|
1104
1089
|
_request_auth=_request_auth,
|
|
1105
1090
|
_content_type=_content_type,
|
|
1106
1091
|
_headers=_headers,
|
|
@@ -1108,7 +1093,7 @@ class SnapshotsApi:
|
|
|
1108
1093
|
)
|
|
1109
1094
|
|
|
1110
1095
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1111
|
-
'200': "
|
|
1096
|
+
'200': "SnapshotRetrieve",
|
|
1112
1097
|
'400': "ErrorResponseModel",
|
|
1113
1098
|
'401': "ErrorResponseModel",
|
|
1114
1099
|
'500': None,
|
|
@@ -1120,10 +1105,9 @@ class SnapshotsApi:
|
|
|
1120
1105
|
return response_data.response
|
|
1121
1106
|
|
|
1122
1107
|
|
|
1123
|
-
def
|
|
1108
|
+
def _get_snapshot_serialize(
|
|
1124
1109
|
self,
|
|
1125
1110
|
id,
|
|
1126
|
-
payload,
|
|
1127
1111
|
_request_auth,
|
|
1128
1112
|
_content_type,
|
|
1129
1113
|
_headers,
|
|
@@ -1151,8 +1135,6 @@ class SnapshotsApi:
|
|
|
1151
1135
|
# process the header parameters
|
|
1152
1136
|
# process the form parameters
|
|
1153
1137
|
# process the body parameter
|
|
1154
|
-
if payload is not None:
|
|
1155
|
-
_body_params = payload
|
|
1156
1138
|
|
|
1157
1139
|
|
|
1158
1140
|
# set the HTTP header `Accept`
|
|
@@ -1163,29 +1145,15 @@ class SnapshotsApi:
|
|
|
1163
1145
|
]
|
|
1164
1146
|
)
|
|
1165
1147
|
|
|
1166
|
-
# set the HTTP header `Content-Type`
|
|
1167
|
-
if _content_type:
|
|
1168
|
-
_header_params['Content-Type'] = _content_type
|
|
1169
|
-
else:
|
|
1170
|
-
_default_content_type = (
|
|
1171
|
-
self.api_client.select_header_content_type(
|
|
1172
|
-
[
|
|
1173
|
-
'application/json'
|
|
1174
|
-
]
|
|
1175
|
-
)
|
|
1176
|
-
)
|
|
1177
|
-
if _default_content_type is not None:
|
|
1178
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1179
1148
|
|
|
1180
1149
|
# authentication setting
|
|
1181
1150
|
_auth_settings: List[str] = [
|
|
1182
|
-
'apiKey'
|
|
1183
|
-
'accessToken'
|
|
1151
|
+
'apiKey'
|
|
1184
1152
|
]
|
|
1185
1153
|
|
|
1186
1154
|
return self.api_client.param_serialize(
|
|
1187
|
-
method='
|
|
1188
|
-
resource_path='/core/snapshots/{id}
|
|
1155
|
+
method='GET',
|
|
1156
|
+
resource_path='/core/snapshots/{id}',
|
|
1189
1157
|
path_params=_path_params,
|
|
1190
1158
|
query_params=_query_params,
|
|
1191
1159
|
header_params=_header_params,
|
|
@@ -1202,9 +1170,11 @@ class SnapshotsApi:
|
|
|
1202
1170
|
|
|
1203
1171
|
|
|
1204
1172
|
@validate_call
|
|
1205
|
-
def
|
|
1173
|
+
def get_snapshots(
|
|
1206
1174
|
self,
|
|
1207
|
-
|
|
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,
|
|
1208
1178
|
_request_timeout: Union[
|
|
1209
1179
|
None,
|
|
1210
1180
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1217,13 +1187,17 @@ class SnapshotsApi:
|
|
|
1217
1187
|
_content_type: Optional[StrictStr] = None,
|
|
1218
1188
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1219
1189
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1220
|
-
) ->
|
|
1221
|
-
"""Retrieve
|
|
1190
|
+
) -> Snapshots:
|
|
1191
|
+
"""Retrieve list of snapshots with pagination
|
|
1222
1192
|
|
|
1223
|
-
|
|
1193
|
+
Retrieves a list of snapshot, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1224
1194
|
|
|
1225
|
-
:param
|
|
1226
|
-
: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
|
|
1227
1201
|
:param _request_timeout: timeout setting for this request. If one
|
|
1228
1202
|
number provided, it will be total request
|
|
1229
1203
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1246,8 +1220,10 @@ class SnapshotsApi:
|
|
|
1246
1220
|
:return: Returns the result object.
|
|
1247
1221
|
""" # noqa: E501
|
|
1248
1222
|
|
|
1249
|
-
_param = self.
|
|
1250
|
-
|
|
1223
|
+
_param = self._get_snapshots_serialize(
|
|
1224
|
+
page=page,
|
|
1225
|
+
page_size=page_size,
|
|
1226
|
+
search=search,
|
|
1251
1227
|
_request_auth=_request_auth,
|
|
1252
1228
|
_content_type=_content_type,
|
|
1253
1229
|
_headers=_headers,
|
|
@@ -1255,7 +1231,7 @@ class SnapshotsApi:
|
|
|
1255
1231
|
)
|
|
1256
1232
|
|
|
1257
1233
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1258
|
-
'200': "
|
|
1234
|
+
'200': "Snapshots",
|
|
1259
1235
|
'400': "ErrorResponseModel",
|
|
1260
1236
|
'401': "ErrorResponseModel",
|
|
1261
1237
|
'500': None,
|
|
@@ -1272,9 +1248,11 @@ class SnapshotsApi:
|
|
|
1272
1248
|
|
|
1273
1249
|
|
|
1274
1250
|
@validate_call
|
|
1275
|
-
def
|
|
1251
|
+
def get_snapshots_with_http_info(
|
|
1276
1252
|
self,
|
|
1277
|
-
|
|
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,
|
|
1278
1256
|
_request_timeout: Union[
|
|
1279
1257
|
None,
|
|
1280
1258
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1287,13 +1265,17 @@ class SnapshotsApi:
|
|
|
1287
1265
|
_content_type: Optional[StrictStr] = None,
|
|
1288
1266
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
1267
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1290
|
-
) -> ApiResponse[
|
|
1291
|
-
"""Retrieve
|
|
1268
|
+
) -> ApiResponse[Snapshots]:
|
|
1269
|
+
"""Retrieve list of snapshots with pagination
|
|
1292
1270
|
|
|
1293
|
-
|
|
1271
|
+
Retrieves a list of snapshot, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1294
1272
|
|
|
1295
|
-
:param
|
|
1296
|
-
: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
|
|
1297
1279
|
:param _request_timeout: timeout setting for this request. If one
|
|
1298
1280
|
number provided, it will be total request
|
|
1299
1281
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1316,8 +1298,10 @@ class SnapshotsApi:
|
|
|
1316
1298
|
:return: Returns the result object.
|
|
1317
1299
|
""" # noqa: E501
|
|
1318
1300
|
|
|
1319
|
-
_param = self.
|
|
1320
|
-
|
|
1301
|
+
_param = self._get_snapshots_serialize(
|
|
1302
|
+
page=page,
|
|
1303
|
+
page_size=page_size,
|
|
1304
|
+
search=search,
|
|
1321
1305
|
_request_auth=_request_auth,
|
|
1322
1306
|
_content_type=_content_type,
|
|
1323
1307
|
_headers=_headers,
|
|
@@ -1325,7 +1309,7 @@ class SnapshotsApi:
|
|
|
1325
1309
|
)
|
|
1326
1310
|
|
|
1327
1311
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1328
|
-
'200': "
|
|
1312
|
+
'200': "Snapshots",
|
|
1329
1313
|
'400': "ErrorResponseModel",
|
|
1330
1314
|
'401': "ErrorResponseModel",
|
|
1331
1315
|
'500': None,
|
|
@@ -1342,9 +1326,11 @@ class SnapshotsApi:
|
|
|
1342
1326
|
|
|
1343
1327
|
|
|
1344
1328
|
@validate_call
|
|
1345
|
-
def
|
|
1329
|
+
def get_snapshots_without_preload_content(
|
|
1346
1330
|
self,
|
|
1347
|
-
|
|
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,
|
|
1348
1334
|
_request_timeout: Union[
|
|
1349
1335
|
None,
|
|
1350
1336
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1358,12 +1344,16 @@ class SnapshotsApi:
|
|
|
1358
1344
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1359
1345
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1360
1346
|
) -> RESTResponseType:
|
|
1361
|
-
"""Retrieve
|
|
1347
|
+
"""Retrieve list of snapshots with pagination
|
|
1362
1348
|
|
|
1363
|
-
|
|
1349
|
+
Retrieves a list of snapshot, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1364
1350
|
|
|
1365
|
-
:param
|
|
1366
|
-
: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
|
|
1367
1357
|
:param _request_timeout: timeout setting for this request. If one
|
|
1368
1358
|
number provided, it will be total request
|
|
1369
1359
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1386,8 +1376,10 @@ class SnapshotsApi:
|
|
|
1386
1376
|
:return: Returns the result object.
|
|
1387
1377
|
""" # noqa: E501
|
|
1388
1378
|
|
|
1389
|
-
_param = self.
|
|
1390
|
-
|
|
1379
|
+
_param = self._get_snapshots_serialize(
|
|
1380
|
+
page=page,
|
|
1381
|
+
page_size=page_size,
|
|
1382
|
+
search=search,
|
|
1391
1383
|
_request_auth=_request_auth,
|
|
1392
1384
|
_content_type=_content_type,
|
|
1393
1385
|
_headers=_headers,
|
|
@@ -1395,7 +1387,7 @@ class SnapshotsApi:
|
|
|
1395
1387
|
)
|
|
1396
1388
|
|
|
1397
1389
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1398
|
-
'200': "
|
|
1390
|
+
'200': "Snapshots",
|
|
1399
1391
|
'400': "ErrorResponseModel",
|
|
1400
1392
|
'401': "ErrorResponseModel",
|
|
1401
1393
|
'500': None,
|
|
@@ -1407,9 +1399,11 @@ class SnapshotsApi:
|
|
|
1407
1399
|
return response_data.response
|
|
1408
1400
|
|
|
1409
1401
|
|
|
1410
|
-
def
|
|
1402
|
+
def _get_snapshots_serialize(
|
|
1411
1403
|
self,
|
|
1412
|
-
|
|
1404
|
+
page,
|
|
1405
|
+
page_size,
|
|
1406
|
+
search,
|
|
1413
1407
|
_request_auth,
|
|
1414
1408
|
_content_type,
|
|
1415
1409
|
_headers,
|
|
@@ -1431,9 +1425,19 @@ class SnapshotsApi:
|
|
|
1431
1425
|
_body_params: Optional[bytes] = None
|
|
1432
1426
|
|
|
1433
1427
|
# process the path parameters
|
|
1434
|
-
if id is not None:
|
|
1435
|
-
_path_params['id'] = id
|
|
1436
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
|
+
|
|
1437
1441
|
# process the header parameters
|
|
1438
1442
|
# process the form parameters
|
|
1439
1443
|
# process the body parameter
|
|
@@ -1450,13 +1454,12 @@ class SnapshotsApi:
|
|
|
1450
1454
|
|
|
1451
1455
|
# authentication setting
|
|
1452
1456
|
_auth_settings: List[str] = [
|
|
1453
|
-
'apiKey'
|
|
1454
|
-
'accessToken'
|
|
1457
|
+
'apiKey'
|
|
1455
1458
|
]
|
|
1456
1459
|
|
|
1457
1460
|
return self.api_client.param_serialize(
|
|
1458
1461
|
method='GET',
|
|
1459
|
-
resource_path='/core/snapshots
|
|
1462
|
+
resource_path='/core/snapshots',
|
|
1460
1463
|
path_params=_path_params,
|
|
1461
1464
|
query_params=_query_params,
|
|
1462
1465
|
header_params=_header_params,
|
|
@@ -1473,11 +1476,10 @@ class SnapshotsApi:
|
|
|
1473
1476
|
|
|
1474
1477
|
|
|
1475
1478
|
@validate_call
|
|
1476
|
-
def
|
|
1479
|
+
def post_snapshot_restore(
|
|
1477
1480
|
self,
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1481
|
+
id: StrictInt,
|
|
1482
|
+
payload: SnapshotRestoreRequest,
|
|
1481
1483
|
_request_timeout: Union[
|
|
1482
1484
|
None,
|
|
1483
1485
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1490,17 +1492,15 @@ class SnapshotsApi:
|
|
|
1490
1492
|
_content_type: Optional[StrictStr] = None,
|
|
1491
1493
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1492
1494
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1493
|
-
) ->
|
|
1494
|
-
"""
|
|
1495
|
+
) -> Instance:
|
|
1496
|
+
"""Restore a snapshot
|
|
1495
1497
|
|
|
1496
|
-
|
|
1498
|
+
Restore a snapshot.
|
|
1497
1499
|
|
|
1498
|
-
:param
|
|
1499
|
-
:type
|
|
1500
|
-
:param
|
|
1501
|
-
:type
|
|
1502
|
-
:param search: Search By Snapshot ID or Name
|
|
1503
|
-
:type search: str
|
|
1500
|
+
:param id: (required)
|
|
1501
|
+
:type id: int
|
|
1502
|
+
:param payload: (required)
|
|
1503
|
+
:type payload: SnapshotRestoreRequest
|
|
1504
1504
|
:param _request_timeout: timeout setting for this request. If one
|
|
1505
1505
|
number provided, it will be total request
|
|
1506
1506
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1523,10 +1523,9 @@ class SnapshotsApi:
|
|
|
1523
1523
|
:return: Returns the result object.
|
|
1524
1524
|
""" # noqa: E501
|
|
1525
1525
|
|
|
1526
|
-
_param = self.
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
search=search,
|
|
1526
|
+
_param = self._post_snapshot_restore_serialize(
|
|
1527
|
+
id=id,
|
|
1528
|
+
payload=payload,
|
|
1530
1529
|
_request_auth=_request_auth,
|
|
1531
1530
|
_content_type=_content_type,
|
|
1532
1531
|
_headers=_headers,
|
|
@@ -1534,7 +1533,7 @@ class SnapshotsApi:
|
|
|
1534
1533
|
)
|
|
1535
1534
|
|
|
1536
1535
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1537
|
-
'200': "
|
|
1536
|
+
'200': "Instance",
|
|
1538
1537
|
'400': "ErrorResponseModel",
|
|
1539
1538
|
'401': "ErrorResponseModel",
|
|
1540
1539
|
'500': None,
|
|
@@ -1551,11 +1550,10 @@ class SnapshotsApi:
|
|
|
1551
1550
|
|
|
1552
1551
|
|
|
1553
1552
|
@validate_call
|
|
1554
|
-
def
|
|
1553
|
+
def post_snapshot_restore_with_http_info(
|
|
1555
1554
|
self,
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1555
|
+
id: StrictInt,
|
|
1556
|
+
payload: SnapshotRestoreRequest,
|
|
1559
1557
|
_request_timeout: Union[
|
|
1560
1558
|
None,
|
|
1561
1559
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1568,17 +1566,15 @@ class SnapshotsApi:
|
|
|
1568
1566
|
_content_type: Optional[StrictStr] = None,
|
|
1569
1567
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1570
1568
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1571
|
-
) -> ApiResponse[
|
|
1572
|
-
"""
|
|
1569
|
+
) -> ApiResponse[Instance]:
|
|
1570
|
+
"""Restore a snapshot
|
|
1573
1571
|
|
|
1574
|
-
|
|
1572
|
+
Restore a snapshot.
|
|
1575
1573
|
|
|
1576
|
-
:param
|
|
1577
|
-
:type
|
|
1578
|
-
:param
|
|
1579
|
-
:type
|
|
1580
|
-
:param search: Search By Snapshot ID or Name
|
|
1581
|
-
:type search: str
|
|
1574
|
+
:param id: (required)
|
|
1575
|
+
:type id: int
|
|
1576
|
+
:param payload: (required)
|
|
1577
|
+
:type payload: SnapshotRestoreRequest
|
|
1582
1578
|
:param _request_timeout: timeout setting for this request. If one
|
|
1583
1579
|
number provided, it will be total request
|
|
1584
1580
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1601,10 +1597,9 @@ class SnapshotsApi:
|
|
|
1601
1597
|
:return: Returns the result object.
|
|
1602
1598
|
""" # noqa: E501
|
|
1603
1599
|
|
|
1604
|
-
_param = self.
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
search=search,
|
|
1600
|
+
_param = self._post_snapshot_restore_serialize(
|
|
1601
|
+
id=id,
|
|
1602
|
+
payload=payload,
|
|
1608
1603
|
_request_auth=_request_auth,
|
|
1609
1604
|
_content_type=_content_type,
|
|
1610
1605
|
_headers=_headers,
|
|
@@ -1612,7 +1607,7 @@ class SnapshotsApi:
|
|
|
1612
1607
|
)
|
|
1613
1608
|
|
|
1614
1609
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1615
|
-
'200': "
|
|
1610
|
+
'200': "Instance",
|
|
1616
1611
|
'400': "ErrorResponseModel",
|
|
1617
1612
|
'401': "ErrorResponseModel",
|
|
1618
1613
|
'500': None,
|
|
@@ -1629,11 +1624,10 @@ class SnapshotsApi:
|
|
|
1629
1624
|
|
|
1630
1625
|
|
|
1631
1626
|
@validate_call
|
|
1632
|
-
def
|
|
1627
|
+
def post_snapshot_restore_without_preload_content(
|
|
1633
1628
|
self,
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1629
|
+
id: StrictInt,
|
|
1630
|
+
payload: SnapshotRestoreRequest,
|
|
1637
1631
|
_request_timeout: Union[
|
|
1638
1632
|
None,
|
|
1639
1633
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1647,16 +1641,14 @@ class SnapshotsApi:
|
|
|
1647
1641
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1648
1642
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1649
1643
|
) -> RESTResponseType:
|
|
1650
|
-
"""
|
|
1644
|
+
"""Restore a snapshot
|
|
1651
1645
|
|
|
1652
|
-
|
|
1646
|
+
Restore a snapshot.
|
|
1653
1647
|
|
|
1654
|
-
:param
|
|
1655
|
-
:type
|
|
1656
|
-
:param
|
|
1657
|
-
:type
|
|
1658
|
-
:param search: Search By Snapshot ID or Name
|
|
1659
|
-
:type search: str
|
|
1648
|
+
:param id: (required)
|
|
1649
|
+
:type id: int
|
|
1650
|
+
:param payload: (required)
|
|
1651
|
+
:type payload: SnapshotRestoreRequest
|
|
1660
1652
|
:param _request_timeout: timeout setting for this request. If one
|
|
1661
1653
|
number provided, it will be total request
|
|
1662
1654
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1679,10 +1671,9 @@ class SnapshotsApi:
|
|
|
1679
1671
|
:return: Returns the result object.
|
|
1680
1672
|
""" # noqa: E501
|
|
1681
1673
|
|
|
1682
|
-
_param = self.
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
search=search,
|
|
1674
|
+
_param = self._post_snapshot_restore_serialize(
|
|
1675
|
+
id=id,
|
|
1676
|
+
payload=payload,
|
|
1686
1677
|
_request_auth=_request_auth,
|
|
1687
1678
|
_content_type=_content_type,
|
|
1688
1679
|
_headers=_headers,
|
|
@@ -1690,7 +1681,7 @@ class SnapshotsApi:
|
|
|
1690
1681
|
)
|
|
1691
1682
|
|
|
1692
1683
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1693
|
-
'200': "
|
|
1684
|
+
'200': "Instance",
|
|
1694
1685
|
'400': "ErrorResponseModel",
|
|
1695
1686
|
'401': "ErrorResponseModel",
|
|
1696
1687
|
'500': None,
|
|
@@ -1702,11 +1693,10 @@ class SnapshotsApi:
|
|
|
1702
1693
|
return response_data.response
|
|
1703
1694
|
|
|
1704
1695
|
|
|
1705
|
-
def
|
|
1696
|
+
def _post_snapshot_restore_serialize(
|
|
1706
1697
|
self,
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
search,
|
|
1698
|
+
id,
|
|
1699
|
+
payload,
|
|
1710
1700
|
_request_auth,
|
|
1711
1701
|
_content_type,
|
|
1712
1702
|
_headers,
|
|
@@ -1728,22 +1718,14 @@ class SnapshotsApi:
|
|
|
1728
1718
|
_body_params: Optional[bytes] = None
|
|
1729
1719
|
|
|
1730
1720
|
# process the path parameters
|
|
1721
|
+
if id is not None:
|
|
1722
|
+
_path_params['id'] = id
|
|
1731
1723
|
# process the query parameters
|
|
1732
|
-
if page is not None:
|
|
1733
|
-
|
|
1734
|
-
_query_params.append(('page', page))
|
|
1735
|
-
|
|
1736
|
-
if page_size is not None:
|
|
1737
|
-
|
|
1738
|
-
_query_params.append(('pageSize', page_size))
|
|
1739
|
-
|
|
1740
|
-
if search is not None:
|
|
1741
|
-
|
|
1742
|
-
_query_params.append(('search', search))
|
|
1743
|
-
|
|
1744
1724
|
# process the header parameters
|
|
1745
1725
|
# process the form parameters
|
|
1746
1726
|
# process the body parameter
|
|
1727
|
+
if payload is not None:
|
|
1728
|
+
_body_params = payload
|
|
1747
1729
|
|
|
1748
1730
|
|
|
1749
1731
|
# set the HTTP header `Accept`
|
|
@@ -1754,16 +1736,28 @@ class SnapshotsApi:
|
|
|
1754
1736
|
]
|
|
1755
1737
|
)
|
|
1756
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
|
|
1757
1752
|
|
|
1758
1753
|
# authentication setting
|
|
1759
1754
|
_auth_settings: List[str] = [
|
|
1760
|
-
'apiKey'
|
|
1761
|
-
'accessToken'
|
|
1755
|
+
'apiKey'
|
|
1762
1756
|
]
|
|
1763
1757
|
|
|
1764
1758
|
return self.api_client.param_serialize(
|
|
1765
|
-
method='
|
|
1766
|
-
resource_path='/core/snapshots',
|
|
1759
|
+
method='POST',
|
|
1760
|
+
resource_path='/core/snapshots/{id}/restore',
|
|
1767
1761
|
path_params=_path_params,
|
|
1768
1762
|
query_params=_query_params,
|
|
1769
1763
|
header_params=_header_params,
|