hyperstack 0.1.23__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 +154 -47
- 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 +10 -8
- 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 +14 -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-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/METADATA +9 -2
- hyperstack-1.41.0a0.dist-info/RECORD +349 -0
- {hyperstack-0.1.23.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-0.1.23.dist-info/RECORD +0 -401
- {hyperstack-0.1.23.dist-info → hyperstack-1.41.0a0.dist-info}/top_level.txt +0 -0
|
@@ -21,6 +21,7 @@ from ..models.attach_volumes import AttachVolumes
|
|
|
21
21
|
from ..models.attach_volumes_payload import AttachVolumesPayload
|
|
22
22
|
from ..models.detach_volumes import DetachVolumes
|
|
23
23
|
from ..models.detach_volumes_payload import DetachVolumesPayload
|
|
24
|
+
from ..models.update_volume_attachment_payload import UpdateVolumeAttachmentPayload
|
|
24
25
|
|
|
25
26
|
from ..api_client import ApiClient, RequestSerialized
|
|
26
27
|
from ..api_response import ApiResponse
|
|
@@ -43,7 +44,7 @@ class VolumeAttachmentApi:
|
|
|
43
44
|
@validate_call
|
|
44
45
|
def attach_volumes_to_virtual_machine(
|
|
45
46
|
self,
|
|
46
|
-
|
|
47
|
+
vm_id: StrictInt,
|
|
47
48
|
payload: AttachVolumesPayload,
|
|
48
49
|
_request_timeout: Union[
|
|
49
50
|
None,
|
|
@@ -60,10 +61,10 @@ class VolumeAttachmentApi:
|
|
|
60
61
|
) -> AttachVolumes:
|
|
61
62
|
"""Attach volumes to virtual machine
|
|
62
63
|
|
|
63
|
-
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the
|
|
64
|
+
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the VM ID in the path and the volume IDs in the request body to attach the specified volumes. For more detailson volume attachment, [**click here**](https://docs...cloud/docs/api-reference/core-resources/volumes/volume-attachment/attach-volumes/).
|
|
64
65
|
|
|
65
|
-
:param
|
|
66
|
-
:type
|
|
66
|
+
:param vm_id: (required)
|
|
67
|
+
:type vm_id: int
|
|
67
68
|
:param payload: (required)
|
|
68
69
|
:type payload: AttachVolumesPayload
|
|
69
70
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -89,7 +90,7 @@ class VolumeAttachmentApi:
|
|
|
89
90
|
""" # noqa: E501
|
|
90
91
|
|
|
91
92
|
_param = self._attach_volumes_to_virtual_machine_serialize(
|
|
92
|
-
|
|
93
|
+
vm_id=vm_id,
|
|
93
94
|
payload=payload,
|
|
94
95
|
_request_auth=_request_auth,
|
|
95
96
|
_content_type=_content_type,
|
|
@@ -119,7 +120,7 @@ class VolumeAttachmentApi:
|
|
|
119
120
|
@validate_call
|
|
120
121
|
def attach_volumes_to_virtual_machine_with_http_info(
|
|
121
122
|
self,
|
|
122
|
-
|
|
123
|
+
vm_id: StrictInt,
|
|
123
124
|
payload: AttachVolumesPayload,
|
|
124
125
|
_request_timeout: Union[
|
|
125
126
|
None,
|
|
@@ -136,10 +137,10 @@ class VolumeAttachmentApi:
|
|
|
136
137
|
) -> ApiResponse[AttachVolumes]:
|
|
137
138
|
"""Attach volumes to virtual machine
|
|
138
139
|
|
|
139
|
-
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the
|
|
140
|
+
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the VM ID in the path and the volume IDs in the request body to attach the specified volumes. For more detailson volume attachment, [**click here**](https://docs...cloud/docs/api-reference/core-resources/volumes/volume-attachment/attach-volumes/).
|
|
140
141
|
|
|
141
|
-
:param
|
|
142
|
-
:type
|
|
142
|
+
:param vm_id: (required)
|
|
143
|
+
:type vm_id: int
|
|
143
144
|
:param payload: (required)
|
|
144
145
|
:type payload: AttachVolumesPayload
|
|
145
146
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -165,7 +166,7 @@ class VolumeAttachmentApi:
|
|
|
165
166
|
""" # noqa: E501
|
|
166
167
|
|
|
167
168
|
_param = self._attach_volumes_to_virtual_machine_serialize(
|
|
168
|
-
|
|
169
|
+
vm_id=vm_id,
|
|
169
170
|
payload=payload,
|
|
170
171
|
_request_auth=_request_auth,
|
|
171
172
|
_content_type=_content_type,
|
|
@@ -195,7 +196,7 @@ class VolumeAttachmentApi:
|
|
|
195
196
|
@validate_call
|
|
196
197
|
def attach_volumes_to_virtual_machine_without_preload_content(
|
|
197
198
|
self,
|
|
198
|
-
|
|
199
|
+
vm_id: StrictInt,
|
|
199
200
|
payload: AttachVolumesPayload,
|
|
200
201
|
_request_timeout: Union[
|
|
201
202
|
None,
|
|
@@ -212,10 +213,10 @@ class VolumeAttachmentApi:
|
|
|
212
213
|
) -> RESTResponseType:
|
|
213
214
|
"""Attach volumes to virtual machine
|
|
214
215
|
|
|
215
|
-
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the
|
|
216
|
+
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the VM ID in the path and the volume IDs in the request body to attach the specified volumes. For more detailson volume attachment, [**click here**](https://docs...cloud/docs/api-reference/core-resources/volumes/volume-attachment/attach-volumes/).
|
|
216
217
|
|
|
217
|
-
:param
|
|
218
|
-
:type
|
|
218
|
+
:param vm_id: (required)
|
|
219
|
+
:type vm_id: int
|
|
219
220
|
:param payload: (required)
|
|
220
221
|
:type payload: AttachVolumesPayload
|
|
221
222
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -241,7 +242,7 @@ class VolumeAttachmentApi:
|
|
|
241
242
|
""" # noqa: E501
|
|
242
243
|
|
|
243
244
|
_param = self._attach_volumes_to_virtual_machine_serialize(
|
|
244
|
-
|
|
245
|
+
vm_id=vm_id,
|
|
245
246
|
payload=payload,
|
|
246
247
|
_request_auth=_request_auth,
|
|
247
248
|
_content_type=_content_type,
|
|
@@ -266,7 +267,7 @@ class VolumeAttachmentApi:
|
|
|
266
267
|
|
|
267
268
|
def _attach_volumes_to_virtual_machine_serialize(
|
|
268
269
|
self,
|
|
269
|
-
|
|
270
|
+
vm_id,
|
|
270
271
|
payload,
|
|
271
272
|
_request_auth,
|
|
272
273
|
_content_type,
|
|
@@ -289,8 +290,8 @@ class VolumeAttachmentApi:
|
|
|
289
290
|
_body_params: Optional[bytes] = None
|
|
290
291
|
|
|
291
292
|
# process the path parameters
|
|
292
|
-
if
|
|
293
|
-
_path_params['
|
|
293
|
+
if vm_id is not None:
|
|
294
|
+
_path_params['vm_id'] = vm_id
|
|
294
295
|
# process the query parameters
|
|
295
296
|
# process the header parameters
|
|
296
297
|
# process the form parameters
|
|
@@ -323,13 +324,12 @@ class VolumeAttachmentApi:
|
|
|
323
324
|
|
|
324
325
|
# authentication setting
|
|
325
326
|
_auth_settings: List[str] = [
|
|
326
|
-
'apiKey'
|
|
327
|
-
'accessToken'
|
|
327
|
+
'apiKey'
|
|
328
328
|
]
|
|
329
329
|
|
|
330
330
|
return self.api_client.param_serialize(
|
|
331
331
|
method='POST',
|
|
332
|
-
resource_path='/core/virtual-machines/{
|
|
332
|
+
resource_path='/core/virtual-machines/{vm_id}/attach-volumes',
|
|
333
333
|
path_params=_path_params,
|
|
334
334
|
query_params=_query_params,
|
|
335
335
|
header_params=_header_params,
|
|
@@ -348,7 +348,7 @@ class VolumeAttachmentApi:
|
|
|
348
348
|
@validate_call
|
|
349
349
|
def detach_volumes_from_virtual_machine(
|
|
350
350
|
self,
|
|
351
|
-
|
|
351
|
+
vm_id: StrictInt,
|
|
352
352
|
payload: DetachVolumesPayload,
|
|
353
353
|
_request_timeout: Union[
|
|
354
354
|
None,
|
|
@@ -365,10 +365,10 @@ class VolumeAttachmentApi:
|
|
|
365
365
|
) -> DetachVolumes:
|
|
366
366
|
"""Detach volumes from virtual machine
|
|
367
367
|
|
|
368
|
-
Detaches one or more volumes
|
|
368
|
+
Detaches one or more volumes attached to an existing virtual machine. Include the VM ID in the path and volume IDs in the request body to detach the specified volumes from the virtual machine.
|
|
369
369
|
|
|
370
|
-
:param
|
|
371
|
-
:type
|
|
370
|
+
:param vm_id: (required)
|
|
371
|
+
:type vm_id: int
|
|
372
372
|
:param payload: (required)
|
|
373
373
|
:type payload: DetachVolumesPayload
|
|
374
374
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -394,7 +394,7 @@ class VolumeAttachmentApi:
|
|
|
394
394
|
""" # noqa: E501
|
|
395
395
|
|
|
396
396
|
_param = self._detach_volumes_from_virtual_machine_serialize(
|
|
397
|
-
|
|
397
|
+
vm_id=vm_id,
|
|
398
398
|
payload=payload,
|
|
399
399
|
_request_auth=_request_auth,
|
|
400
400
|
_content_type=_content_type,
|
|
@@ -424,7 +424,7 @@ class VolumeAttachmentApi:
|
|
|
424
424
|
@validate_call
|
|
425
425
|
def detach_volumes_from_virtual_machine_with_http_info(
|
|
426
426
|
self,
|
|
427
|
-
|
|
427
|
+
vm_id: StrictInt,
|
|
428
428
|
payload: DetachVolumesPayload,
|
|
429
429
|
_request_timeout: Union[
|
|
430
430
|
None,
|
|
@@ -441,10 +441,10 @@ class VolumeAttachmentApi:
|
|
|
441
441
|
) -> ApiResponse[DetachVolumes]:
|
|
442
442
|
"""Detach volumes from virtual machine
|
|
443
443
|
|
|
444
|
-
Detaches one or more volumes
|
|
444
|
+
Detaches one or more volumes attached to an existing virtual machine. Include the VM ID in the path and volume IDs in the request body to detach the specified volumes from the virtual machine.
|
|
445
445
|
|
|
446
|
-
:param
|
|
447
|
-
:type
|
|
446
|
+
:param vm_id: (required)
|
|
447
|
+
:type vm_id: int
|
|
448
448
|
:param payload: (required)
|
|
449
449
|
:type payload: DetachVolumesPayload
|
|
450
450
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -470,7 +470,7 @@ class VolumeAttachmentApi:
|
|
|
470
470
|
""" # noqa: E501
|
|
471
471
|
|
|
472
472
|
_param = self._detach_volumes_from_virtual_machine_serialize(
|
|
473
|
-
|
|
473
|
+
vm_id=vm_id,
|
|
474
474
|
payload=payload,
|
|
475
475
|
_request_auth=_request_auth,
|
|
476
476
|
_content_type=_content_type,
|
|
@@ -500,7 +500,7 @@ class VolumeAttachmentApi:
|
|
|
500
500
|
@validate_call
|
|
501
501
|
def detach_volumes_from_virtual_machine_without_preload_content(
|
|
502
502
|
self,
|
|
503
|
-
|
|
503
|
+
vm_id: StrictInt,
|
|
504
504
|
payload: DetachVolumesPayload,
|
|
505
505
|
_request_timeout: Union[
|
|
506
506
|
None,
|
|
@@ -517,10 +517,10 @@ class VolumeAttachmentApi:
|
|
|
517
517
|
) -> RESTResponseType:
|
|
518
518
|
"""Detach volumes from virtual machine
|
|
519
519
|
|
|
520
|
-
Detaches one or more volumes
|
|
520
|
+
Detaches one or more volumes attached to an existing virtual machine. Include the VM ID in the path and volume IDs in the request body to detach the specified volumes from the virtual machine.
|
|
521
521
|
|
|
522
|
-
:param
|
|
523
|
-
:type
|
|
522
|
+
:param vm_id: (required)
|
|
523
|
+
:type vm_id: int
|
|
524
524
|
:param payload: (required)
|
|
525
525
|
:type payload: DetachVolumesPayload
|
|
526
526
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -546,7 +546,7 @@ class VolumeAttachmentApi:
|
|
|
546
546
|
""" # noqa: E501
|
|
547
547
|
|
|
548
548
|
_param = self._detach_volumes_from_virtual_machine_serialize(
|
|
549
|
-
|
|
549
|
+
vm_id=vm_id,
|
|
550
550
|
payload=payload,
|
|
551
551
|
_request_auth=_request_auth,
|
|
552
552
|
_content_type=_content_type,
|
|
@@ -571,7 +571,7 @@ class VolumeAttachmentApi:
|
|
|
571
571
|
|
|
572
572
|
def _detach_volumes_from_virtual_machine_serialize(
|
|
573
573
|
self,
|
|
574
|
-
|
|
574
|
+
vm_id,
|
|
575
575
|
payload,
|
|
576
576
|
_request_auth,
|
|
577
577
|
_content_type,
|
|
@@ -594,8 +594,8 @@ class VolumeAttachmentApi:
|
|
|
594
594
|
_body_params: Optional[bytes] = None
|
|
595
595
|
|
|
596
596
|
# process the path parameters
|
|
597
|
-
if
|
|
598
|
-
_path_params['
|
|
597
|
+
if vm_id is not None:
|
|
598
|
+
_path_params['vm_id'] = vm_id
|
|
599
599
|
# process the query parameters
|
|
600
600
|
# process the header parameters
|
|
601
601
|
# process the form parameters
|
|
@@ -628,13 +628,313 @@ class VolumeAttachmentApi:
|
|
|
628
628
|
|
|
629
629
|
# authentication setting
|
|
630
630
|
_auth_settings: List[str] = [
|
|
631
|
-
'apiKey'
|
|
632
|
-
'accessToken'
|
|
631
|
+
'apiKey'
|
|
633
632
|
]
|
|
634
633
|
|
|
635
634
|
return self.api_client.param_serialize(
|
|
636
635
|
method='POST',
|
|
637
|
-
resource_path='/core/virtual-machines/{
|
|
636
|
+
resource_path='/core/virtual-machines/{vm_id}/detach-volumes',
|
|
637
|
+
path_params=_path_params,
|
|
638
|
+
query_params=_query_params,
|
|
639
|
+
header_params=_header_params,
|
|
640
|
+
body=_body_params,
|
|
641
|
+
post_params=_form_params,
|
|
642
|
+
files=_files,
|
|
643
|
+
auth_settings=_auth_settings,
|
|
644
|
+
collection_formats=_collection_formats,
|
|
645
|
+
_host=_host,
|
|
646
|
+
_request_auth=_request_auth
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
@validate_call
|
|
653
|
+
def update_a_volume_attachment(
|
|
654
|
+
self,
|
|
655
|
+
volume_attachment_id: StrictInt,
|
|
656
|
+
payload: UpdateVolumeAttachmentPayload,
|
|
657
|
+
_request_timeout: Union[
|
|
658
|
+
None,
|
|
659
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
660
|
+
Tuple[
|
|
661
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
662
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
663
|
+
]
|
|
664
|
+
] = None,
|
|
665
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
666
|
+
_content_type: Optional[StrictStr] = None,
|
|
667
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
668
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
669
|
+
) -> AttachVolumes:
|
|
670
|
+
"""Update a volume attachment
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
:param volume_attachment_id: (required)
|
|
674
|
+
:type volume_attachment_id: int
|
|
675
|
+
:param payload: (required)
|
|
676
|
+
:type payload: UpdateVolumeAttachmentPayload
|
|
677
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
678
|
+
number provided, it will be total request
|
|
679
|
+
timeout. It can also be a pair (tuple) of
|
|
680
|
+
(connection, read) timeouts.
|
|
681
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
682
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
683
|
+
request; this effectively ignores the
|
|
684
|
+
authentication in the spec for a single request.
|
|
685
|
+
:type _request_auth: dict, optional
|
|
686
|
+
:param _content_type: force content-type for the request.
|
|
687
|
+
:type _content_type: str, Optional
|
|
688
|
+
:param _headers: set to override the headers for a single
|
|
689
|
+
request; this effectively ignores the headers
|
|
690
|
+
in the spec for a single request.
|
|
691
|
+
:type _headers: dict, optional
|
|
692
|
+
:param _host_index: set to override the host_index for a single
|
|
693
|
+
request; this effectively ignores the host_index
|
|
694
|
+
in the spec for a single request.
|
|
695
|
+
:type _host_index: int, optional
|
|
696
|
+
:return: Returns the result object.
|
|
697
|
+
""" # noqa: E501
|
|
698
|
+
|
|
699
|
+
_param = self._update_a_volume_attachment_serialize(
|
|
700
|
+
volume_attachment_id=volume_attachment_id,
|
|
701
|
+
payload=payload,
|
|
702
|
+
_request_auth=_request_auth,
|
|
703
|
+
_content_type=_content_type,
|
|
704
|
+
_headers=_headers,
|
|
705
|
+
_host_index=_host_index
|
|
706
|
+
)
|
|
707
|
+
|
|
708
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
709
|
+
'200': "AttachVolumes",
|
|
710
|
+
'400': "ErrorResponseModel",
|
|
711
|
+
'401': "ErrorResponseModel",
|
|
712
|
+
'404': "ErrorResponseModel",
|
|
713
|
+
'405': "ErrorResponseModel",
|
|
714
|
+
'500': None,
|
|
715
|
+
}
|
|
716
|
+
response_data = self.api_client.call_api(
|
|
717
|
+
*_param,
|
|
718
|
+
_request_timeout=_request_timeout
|
|
719
|
+
)
|
|
720
|
+
response_data.read()
|
|
721
|
+
return self.api_client.response_deserialize(
|
|
722
|
+
response_data=response_data,
|
|
723
|
+
response_types_map=_response_types_map,
|
|
724
|
+
).data
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
@validate_call
|
|
728
|
+
def update_a_volume_attachment_with_http_info(
|
|
729
|
+
self,
|
|
730
|
+
volume_attachment_id: StrictInt,
|
|
731
|
+
payload: UpdateVolumeAttachmentPayload,
|
|
732
|
+
_request_timeout: Union[
|
|
733
|
+
None,
|
|
734
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
735
|
+
Tuple[
|
|
736
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
738
|
+
]
|
|
739
|
+
] = None,
|
|
740
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
741
|
+
_content_type: Optional[StrictStr] = None,
|
|
742
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
743
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
744
|
+
) -> ApiResponse[AttachVolumes]:
|
|
745
|
+
"""Update a volume attachment
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
:param volume_attachment_id: (required)
|
|
749
|
+
:type volume_attachment_id: int
|
|
750
|
+
:param payload: (required)
|
|
751
|
+
:type payload: UpdateVolumeAttachmentPayload
|
|
752
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
753
|
+
number provided, it will be total request
|
|
754
|
+
timeout. It can also be a pair (tuple) of
|
|
755
|
+
(connection, read) timeouts.
|
|
756
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
757
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
758
|
+
request; this effectively ignores the
|
|
759
|
+
authentication in the spec for a single request.
|
|
760
|
+
:type _request_auth: dict, optional
|
|
761
|
+
:param _content_type: force content-type for the request.
|
|
762
|
+
:type _content_type: str, Optional
|
|
763
|
+
:param _headers: set to override the headers for a single
|
|
764
|
+
request; this effectively ignores the headers
|
|
765
|
+
in the spec for a single request.
|
|
766
|
+
:type _headers: dict, optional
|
|
767
|
+
:param _host_index: set to override the host_index for a single
|
|
768
|
+
request; this effectively ignores the host_index
|
|
769
|
+
in the spec for a single request.
|
|
770
|
+
:type _host_index: int, optional
|
|
771
|
+
:return: Returns the result object.
|
|
772
|
+
""" # noqa: E501
|
|
773
|
+
|
|
774
|
+
_param = self._update_a_volume_attachment_serialize(
|
|
775
|
+
volume_attachment_id=volume_attachment_id,
|
|
776
|
+
payload=payload,
|
|
777
|
+
_request_auth=_request_auth,
|
|
778
|
+
_content_type=_content_type,
|
|
779
|
+
_headers=_headers,
|
|
780
|
+
_host_index=_host_index
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
784
|
+
'200': "AttachVolumes",
|
|
785
|
+
'400': "ErrorResponseModel",
|
|
786
|
+
'401': "ErrorResponseModel",
|
|
787
|
+
'404': "ErrorResponseModel",
|
|
788
|
+
'405': "ErrorResponseModel",
|
|
789
|
+
'500': None,
|
|
790
|
+
}
|
|
791
|
+
response_data = self.api_client.call_api(
|
|
792
|
+
*_param,
|
|
793
|
+
_request_timeout=_request_timeout
|
|
794
|
+
)
|
|
795
|
+
response_data.read()
|
|
796
|
+
return self.api_client.response_deserialize(
|
|
797
|
+
response_data=response_data,
|
|
798
|
+
response_types_map=_response_types_map,
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
@validate_call
|
|
803
|
+
def update_a_volume_attachment_without_preload_content(
|
|
804
|
+
self,
|
|
805
|
+
volume_attachment_id: StrictInt,
|
|
806
|
+
payload: UpdateVolumeAttachmentPayload,
|
|
807
|
+
_request_timeout: Union[
|
|
808
|
+
None,
|
|
809
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
810
|
+
Tuple[
|
|
811
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
812
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
813
|
+
]
|
|
814
|
+
] = None,
|
|
815
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
816
|
+
_content_type: Optional[StrictStr] = None,
|
|
817
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
818
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
819
|
+
) -> RESTResponseType:
|
|
820
|
+
"""Update a volume attachment
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
:param volume_attachment_id: (required)
|
|
824
|
+
:type volume_attachment_id: int
|
|
825
|
+
:param payload: (required)
|
|
826
|
+
:type payload: UpdateVolumeAttachmentPayload
|
|
827
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
828
|
+
number provided, it will be total request
|
|
829
|
+
timeout. It can also be a pair (tuple) of
|
|
830
|
+
(connection, read) timeouts.
|
|
831
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
832
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
833
|
+
request; this effectively ignores the
|
|
834
|
+
authentication in the spec for a single request.
|
|
835
|
+
:type _request_auth: dict, optional
|
|
836
|
+
:param _content_type: force content-type for the request.
|
|
837
|
+
:type _content_type: str, Optional
|
|
838
|
+
:param _headers: set to override the headers for a single
|
|
839
|
+
request; this effectively ignores the headers
|
|
840
|
+
in the spec for a single request.
|
|
841
|
+
:type _headers: dict, optional
|
|
842
|
+
:param _host_index: set to override the host_index for a single
|
|
843
|
+
request; this effectively ignores the host_index
|
|
844
|
+
in the spec for a single request.
|
|
845
|
+
:type _host_index: int, optional
|
|
846
|
+
:return: Returns the result object.
|
|
847
|
+
""" # noqa: E501
|
|
848
|
+
|
|
849
|
+
_param = self._update_a_volume_attachment_serialize(
|
|
850
|
+
volume_attachment_id=volume_attachment_id,
|
|
851
|
+
payload=payload,
|
|
852
|
+
_request_auth=_request_auth,
|
|
853
|
+
_content_type=_content_type,
|
|
854
|
+
_headers=_headers,
|
|
855
|
+
_host_index=_host_index
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
859
|
+
'200': "AttachVolumes",
|
|
860
|
+
'400': "ErrorResponseModel",
|
|
861
|
+
'401': "ErrorResponseModel",
|
|
862
|
+
'404': "ErrorResponseModel",
|
|
863
|
+
'405': "ErrorResponseModel",
|
|
864
|
+
'500': None,
|
|
865
|
+
}
|
|
866
|
+
response_data = self.api_client.call_api(
|
|
867
|
+
*_param,
|
|
868
|
+
_request_timeout=_request_timeout
|
|
869
|
+
)
|
|
870
|
+
return response_data.response
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
def _update_a_volume_attachment_serialize(
|
|
874
|
+
self,
|
|
875
|
+
volume_attachment_id,
|
|
876
|
+
payload,
|
|
877
|
+
_request_auth,
|
|
878
|
+
_content_type,
|
|
879
|
+
_headers,
|
|
880
|
+
_host_index,
|
|
881
|
+
) -> RequestSerialized:
|
|
882
|
+
|
|
883
|
+
_host = None
|
|
884
|
+
|
|
885
|
+
_collection_formats: Dict[str, str] = {
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
_path_params: Dict[str, str] = {}
|
|
889
|
+
_query_params: List[Tuple[str, str]] = []
|
|
890
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
891
|
+
_form_params: List[Tuple[str, str]] = []
|
|
892
|
+
_files: Dict[
|
|
893
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
894
|
+
] = {}
|
|
895
|
+
_body_params: Optional[bytes] = None
|
|
896
|
+
|
|
897
|
+
# process the path parameters
|
|
898
|
+
if volume_attachment_id is not None:
|
|
899
|
+
_path_params['volume_attachment_id'] = volume_attachment_id
|
|
900
|
+
# process the query parameters
|
|
901
|
+
# process the header parameters
|
|
902
|
+
# process the form parameters
|
|
903
|
+
# process the body parameter
|
|
904
|
+
if payload is not None:
|
|
905
|
+
_body_params = payload
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
# set the HTTP header `Accept`
|
|
909
|
+
if 'Accept' not in _header_params:
|
|
910
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
911
|
+
[
|
|
912
|
+
'application/json'
|
|
913
|
+
]
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
# set the HTTP header `Content-Type`
|
|
917
|
+
if _content_type:
|
|
918
|
+
_header_params['Content-Type'] = _content_type
|
|
919
|
+
else:
|
|
920
|
+
_default_content_type = (
|
|
921
|
+
self.api_client.select_header_content_type(
|
|
922
|
+
[
|
|
923
|
+
'application/json'
|
|
924
|
+
]
|
|
925
|
+
)
|
|
926
|
+
)
|
|
927
|
+
if _default_content_type is not None:
|
|
928
|
+
_header_params['Content-Type'] = _default_content_type
|
|
929
|
+
|
|
930
|
+
# authentication setting
|
|
931
|
+
_auth_settings: List[str] = [
|
|
932
|
+
'apiKey'
|
|
933
|
+
]
|
|
934
|
+
|
|
935
|
+
return self.api_client.param_serialize(
|
|
936
|
+
method='PATCH',
|
|
937
|
+
resource_path='/core/volume-attachments/{volume_attachment_id}',
|
|
638
938
|
path_params=_path_params,
|
|
639
939
|
query_params=_query_params,
|
|
640
940
|
header_params=_header_params,
|
hyperstack/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/v1.41.0-alpha/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|