hyperstack 1.25.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 +420 -0
- hyperstack/api/__init__.py +48 -0
- hyperstack/api/alive_api.py +270 -0
- hyperstack/api/api_key_api.py +1161 -0
- hyperstack/api/assigning_member_role_api.py +615 -0
- hyperstack/api/auth_api.py +292 -0
- hyperstack/api/billing_api.py +5946 -0
- hyperstack/api/calculate_api.py +326 -0
- hyperstack/api/callbacks_api.py +1795 -0
- hyperstack/api/cluster_events_api.py +308 -0
- hyperstack/api/clusters_api.py +1651 -0
- hyperstack/api/compliance_api.py +1169 -0
- hyperstack/api/credit_api.py +295 -0
- hyperstack/api/customer_contract_api.py +922 -0
- hyperstack/api/dashboard_api.py +292 -0
- hyperstack/api/deployment_api.py +1122 -0
- hyperstack/api/environment_api.py +1490 -0
- hyperstack/api/firewall_attachment_api.py +343 -0
- hyperstack/api/firewalls_api.py +1819 -0
- hyperstack/api/flavor_api.py +315 -0
- hyperstack/api/floating_ip_api.py +585 -0
- hyperstack/api/gpu_api.py +292 -0
- hyperstack/api/image_api.py +1228 -0
- hyperstack/api/invite_api.py +857 -0
- hyperstack/api/keypair_api.py +1217 -0
- hyperstack/api/organization_api.py +864 -0
- hyperstack/api/payment_api.py +584 -0
- hyperstack/api/permission_api.py +292 -0
- hyperstack/api/policy_api.py +292 -0
- hyperstack/api/pricebook_api.py +293 -0
- hyperstack/api/profile_api.py +1131 -0
- hyperstack/api/rbac_role_api.py +1434 -0
- hyperstack/api/region_api.py +292 -0
- hyperstack/api/security_rules_api.py +292 -0
- hyperstack/api/snapshot_events_api.py +291 -0
- hyperstack/api/snapshots_api.py +1779 -0
- hyperstack/api/stock_api.py +292 -0
- hyperstack/api/template_api.py +1497 -0
- hyperstack/api/user_api.py +871 -0
- hyperstack/api/user_detail_choice_api.py +295 -0
- hyperstack/api/user_permission_api.py +567 -0
- hyperstack/api/virtual_machine_api.py +5289 -0
- hyperstack/api/virtual_machine_events_api.py +311 -0
- hyperstack/api/vnc_url_api.py +595 -0
- hyperstack/api/volume_api.py +1742 -0
- hyperstack/api/volume_attachment_api.py +650 -0
- hyperstack/api_client.py +797 -0
- hyperstack/api_response.py +21 -0
- hyperstack/configuration.py +605 -0
- hyperstack/exceptions.py +199 -0
- hyperstack/models/__init__.py +360 -0
- hyperstack/models/add_update_flavor_organization_payload.py +111 -0
- hyperstack/models/add_user_info_success_response_model.py +95 -0
- hyperstack/models/allocated_gpu_count_graph.py +89 -0
- hyperstack/models/api_key_fields.py +96 -0
- hyperstack/models/api_key_verify_fields.py +93 -0
- hyperstack/models/assign_rbac_role_payload.py +87 -0
- hyperstack/models/attach_callback_payload.py +87 -0
- hyperstack/models/attach_callback_response.py +91 -0
- hyperstack/models/attach_firewall_with_vm.py +87 -0
- hyperstack/models/attach_firewalls_to_vm_payload.py +87 -0
- hyperstack/models/attach_volume_fields.py +96 -0
- hyperstack/models/attach_volumes.py +99 -0
- hyperstack/models/attach_volumes_payload.py +87 -0
- hyperstack/models/auth_get_token_response_model.py +97 -0
- hyperstack/models/auth_request_login_fields.py +89 -0
- hyperstack/models/auth_request_login_response_model.py +95 -0
- hyperstack/models/auth_user_fields.py +94 -0
- hyperstack/models/auth_user_info_response_model.py +95 -0
- hyperstack/models/billing_immune_resources_response.py +95 -0
- hyperstack/models/billing_response.py +100 -0
- hyperstack/models/billingmetricesfields.py +108 -0
- hyperstack/models/billingmetricesresponse.py +99 -0
- hyperstack/models/cluster_events.py +99 -0
- hyperstack/models/cluster_events_fields.py +104 -0
- hyperstack/models/cluster_fields.py +114 -0
- hyperstack/models/cluster_list_response.py +99 -0
- hyperstack/models/cluster_response.py +95 -0
- hyperstack/models/cluster_versions.py +91 -0
- hyperstack/models/common_response_model.py +89 -0
- hyperstack/models/compliance_fields.py +93 -0
- hyperstack/models/compliance_model_fields.py +99 -0
- hyperstack/models/compliance_payload.py +97 -0
- hyperstack/models/compliance_response.py +95 -0
- hyperstack/models/container_overview_fields.py +95 -0
- hyperstack/models/contract.py +105 -0
- hyperstack/models/contract_billing_history.py +97 -0
- hyperstack/models/contract_billing_history_response_attributes.py +99 -0
- hyperstack/models/contract_billing_history_response_model.py +95 -0
- hyperstack/models/contract_change_payload.py +101 -0
- hyperstack/models/contract_discount_plan_fields.py +103 -0
- hyperstack/models/contract_eligible_instance_fields.py +99 -0
- hyperstack/models/contract_eligible_instances_response.py +101 -0
- hyperstack/models/contract_event_create_model.py +91 -0
- hyperstack/models/contract_gpu_allocation_graph_response.py +95 -0
- hyperstack/models/contract_instance_fields.py +102 -0
- hyperstack/models/contract_instances_response.py +99 -0
- hyperstack/models/contract_resource_payload.py +95 -0
- hyperstack/models/contractl_billing_history_response_metrics.py +87 -0
- hyperstack/models/create_cluster_payload.py +101 -0
- hyperstack/models/create_contract_fields.py +110 -0
- hyperstack/models/create_contract_payload.py +106 -0
- hyperstack/models/create_discount_response.py +95 -0
- hyperstack/models/create_discounts_payload.py +112 -0
- hyperstack/models/create_environment.py +90 -0
- hyperstack/models/create_firewall_payload.py +91 -0
- hyperstack/models/create_firewall_rule_payload.py +104 -0
- hyperstack/models/create_gpu.py +91 -0
- hyperstack/models/create_image.py +91 -0
- hyperstack/models/create_image_payload.py +89 -0
- hyperstack/models/create_instances_payload.py +134 -0
- hyperstack/models/create_instances_response.py +99 -0
- hyperstack/models/create_profile_payload.py +92 -0
- hyperstack/models/create_profile_response.py +95 -0
- hyperstack/models/create_security_rule_payload.py +104 -0
- hyperstack/models/create_snapshot_payload.py +93 -0
- hyperstack/models/create_snapshot_response.py +95 -0
- hyperstack/models/create_update_compliance_response.py +95 -0
- hyperstack/models/create_update_permission_payload.py +93 -0
- hyperstack/models/create_update_permission_response_model.py +95 -0
- hyperstack/models/create_update_policy_payload.py +93 -0
- hyperstack/models/create_update_policy_response_model.py +95 -0
- hyperstack/models/create_update_rbac_role_payload.py +94 -0
- hyperstack/models/create_volume_payload.py +100 -0
- hyperstack/models/creditrechargelimitfield.py +93 -0
- hyperstack/models/creditrechargelimitresponse.py +99 -0
- hyperstack/models/creditrequestresponse.py +99 -0
- hyperstack/models/creditrequests.py +96 -0
- hyperstack/models/customer_contract_detail_response_model.py +95 -0
- hyperstack/models/customer_contract_fields.py +112 -0
- hyperstack/models/customer_fields.py +89 -0
- hyperstack/models/customer_payload.py +89 -0
- hyperstack/models/dashboard_info_response.py +95 -0
- hyperstack/models/data.py +91 -0
- hyperstack/models/deployment_fields.py +98 -0
- hyperstack/models/deployment_fieldsforstartdeployments.py +100 -0
- hyperstack/models/deployments.py +99 -0
- hyperstack/models/detach_volumes.py +99 -0
- hyperstack/models/detach_volumes_payload.py +87 -0
- hyperstack/models/discount_entity_model.py +97 -0
- hyperstack/models/discount_fields.py +100 -0
- hyperstack/models/discount_plan_fields.py +108 -0
- hyperstack/models/discount_resource_fields.py +93 -0
- hyperstack/models/discount_resource_payload.py +93 -0
- hyperstack/models/editlabelofanexisting_vm_payload.py +87 -0
- hyperstack/models/environment.py +95 -0
- hyperstack/models/environment_features.py +87 -0
- hyperstack/models/environment_fields.py +100 -0
- hyperstack/models/environment_fieldsfor_volume.py +87 -0
- hyperstack/models/environments.py +105 -0
- hyperstack/models/error_response_model.py +91 -0
- hyperstack/models/exclude_billing_post_payload.py +91 -0
- hyperstack/models/exclude_billing_post_response.py +91 -0
- hyperstack/models/export_billing_data_request.py +105 -0
- hyperstack/models/export_billing_data_response.py +89 -0
- hyperstack/models/field_change.py +91 -0
- hyperstack/models/firewall_attachment_model.py +98 -0
- hyperstack/models/firewall_attachment_vm_model.py +98 -0
- hyperstack/models/firewall_detail_fields.py +122 -0
- hyperstack/models/firewall_detail_response.py +95 -0
- hyperstack/models/firewall_environment_fields.py +91 -0
- hyperstack/models/firewall_fields.py +102 -0
- hyperstack/models/firewall_response.py +95 -0
- hyperstack/models/firewall_rule.py +95 -0
- hyperstack/models/firewalls_list_response.py +105 -0
- hyperstack/models/flavor_fields.py +120 -0
- hyperstack/models/flavor_item_get_response.py +99 -0
- hyperstack/models/flavor_list_response.py +99 -0
- hyperstack/models/flavor_object_fields.py +95 -0
- hyperstack/models/flavor_payload.py +101 -0
- hyperstack/models/flavor_response.py +95 -0
- hyperstack/models/flavor_vm_fields.py +100 -0
- hyperstack/models/flavor_vms_response.py +99 -0
- hyperstack/models/future_node_model.py +106 -0
- hyperstack/models/future_node_response_model.py +97 -0
- hyperstack/models/future_node_stock_model.py +93 -0
- hyperstack/models/future_node_update_model.py +98 -0
- hyperstack/models/future_nodes_stock_model.py +95 -0
- hyperstack/models/generate_update_api_key_payload.py +89 -0
- hyperstack/models/generate_update_api_key_response_model.py +95 -0
- hyperstack/models/get_all_contract_fields.py +100 -0
- hyperstack/models/get_all_contracts_response_model.py +99 -0
- hyperstack/models/get_all_discount_for_all_organization_response.py +99 -0
- hyperstack/models/get_all_discounts_fields.py +106 -0
- hyperstack/models/get_api_keys_response_model.py +99 -0
- hyperstack/models/get_customer_contracts_list_response_model.py +101 -0
- hyperstack/models/get_discount_detail_response.py +95 -0
- hyperstack/models/get_discount_response.py +99 -0
- hyperstack/models/get_entity_discount_detail_response.py +108 -0
- hyperstack/models/get_invites_response_model.py +99 -0
- hyperstack/models/get_organization_response_model.py +95 -0
- hyperstack/models/get_permissions_response_model.py +99 -0
- hyperstack/models/get_policies_response_model.py +99 -0
- hyperstack/models/get_rbac_roles_response_model.py +99 -0
- hyperstack/models/get_token_payload.py +89 -0
- hyperstack/models/get_user_permissions_response_model.py +99 -0
- hyperstack/models/get_version_response.py +91 -0
- hyperstack/models/getcreditandthresholdinfo.py +91 -0
- hyperstack/models/getcreditandthresholdinfoinresponse.py +95 -0
- hyperstack/models/gpu.py +95 -0
- hyperstack/models/gpu_fields.py +106 -0
- hyperstack/models/gpu_list.py +99 -0
- hyperstack/models/gpu_region_fields.py +89 -0
- hyperstack/models/graph_datetime_value_model.py +89 -0
- hyperstack/models/historical_instance.py +101 -0
- hyperstack/models/historical_instances_fields.py +110 -0
- hyperstack/models/image.py +91 -0
- hyperstack/models/image_fields.py +113 -0
- hyperstack/models/image_get_response.py +101 -0
- hyperstack/models/image_logos.py +99 -0
- hyperstack/models/images.py +99 -0
- hyperstack/models/import_keypair_payload.py +92 -0
- hyperstack/models/import_keypair_response.py +95 -0
- hyperstack/models/infrahub_resource_object_response.py +119 -0
- hyperstack/models/infrahub_resource_object_response_for_customer.py +109 -0
- hyperstack/models/insert_discount_plan_fields.py +112 -0
- hyperstack/models/instance.py +95 -0
- hyperstack/models/instance_environment_fields.py +99 -0
- hyperstack/models/instance_events.py +99 -0
- hyperstack/models/instance_events_fields.py +102 -0
- hyperstack/models/instance_fields.py +162 -0
- hyperstack/models/instance_flavor_fields.py +101 -0
- hyperstack/models/instance_image_fields.py +87 -0
- hyperstack/models/instance_keypair_fields.py +87 -0
- hyperstack/models/instance_overview_fields.py +95 -0
- hyperstack/models/instance_resize_payload.py +93 -0
- hyperstack/models/instances.py +105 -0
- hyperstack/models/instances_summary_fields.py +120 -0
- hyperstack/models/internal_environment_fields.py +94 -0
- hyperstack/models/internal_instance_fields.py +156 -0
- hyperstack/models/internal_instance_flavor_fields.py +104 -0
- hyperstack/models/internal_instance_image_fields.py +95 -0
- hyperstack/models/internal_instance_keypair_fields.py +98 -0
- hyperstack/models/internal_instances_response.py +99 -0
- hyperstack/models/internal_security_rules_fields_for_instance.py +104 -0
- hyperstack/models/internal_volume_attachment_fields.py +98 -0
- hyperstack/models/internal_volume_fields.py +95 -0
- hyperstack/models/internal_volumes_response.py +99 -0
- hyperstack/models/invite_fields.py +94 -0
- hyperstack/models/invite_user_payload.py +88 -0
- hyperstack/models/invite_user_response_model.py +95 -0
- hyperstack/models/keypair_fields.py +98 -0
- hyperstack/models/keypairs.py +105 -0
- hyperstack/models/lable_resonse.py +89 -0
- hyperstack/models/lastdaycostfields.py +93 -0
- hyperstack/models/lastdaycostresponse.py +95 -0
- hyperstack/models/logo_get_response.py +91 -0
- hyperstack/models/logout_payload.py +87 -0
- hyperstack/models/metric_item_fields.py +91 -0
- hyperstack/models/metrics_fields.py +116 -0
- hyperstack/models/name_available_model.py +91 -0
- hyperstack/models/new_configurations_response.py +95 -0
- hyperstack/models/new_model_response.py +101 -0
- hyperstack/models/new_stock_response.py +99 -0
- hyperstack/models/new_stock_retrive_response.py +95 -0
- hyperstack/models/new_stock_update_response_model.py +89 -0
- hyperstack/models/node_model.py +114 -0
- hyperstack/models/node_payload_model.py +97 -0
- hyperstack/models/node_power_usage_model.py +120 -0
- hyperstack/models/node_response_model.py +97 -0
- hyperstack/models/node_stock_payload_model.py +95 -0
- hyperstack/models/node_stock_response_model.py +95 -0
- hyperstack/models/node_stocks_payload.py +93 -0
- hyperstack/models/organization_fields.py +114 -0
- hyperstack/models/organization_level_billing_history.py +99 -0
- hyperstack/models/organization_level_billing_history_resources.py +97 -0
- hyperstack/models/organization_level_billing_history_response_attributes.py +87 -0
- hyperstack/models/organization_level_billing_history_response_metrics.py +97 -0
- hyperstack/models/organization_level_billing_history_response_model.py +95 -0
- hyperstack/models/organization_object_response.py +97 -0
- hyperstack/models/organization_thresholdfields.py +95 -0
- hyperstack/models/organization_user_response_model.py +112 -0
- hyperstack/models/organizationcreditrechargelimitresponse.py +95 -0
- hyperstack/models/organizationthresholdsresponse.py +99 -0
- hyperstack/models/organizationthresholdupdateresponse.py +95 -0
- hyperstack/models/overview_info.py +103 -0
- hyperstack/models/pagination_data.py +91 -0
- hyperstack/models/payment_details_fields.py +106 -0
- hyperstack/models/payment_details_response.py +95 -0
- hyperstack/models/payment_initiate_fields.py +87 -0
- hyperstack/models/payment_initiate_payload.py +87 -0
- hyperstack/models/payment_initiate_response.py +95 -0
- hyperstack/models/permission_fields.py +98 -0
- hyperstack/models/policy_fields.py +104 -0
- hyperstack/models/policy_permission_fields.py +91 -0
- hyperstack/models/power_usage_model.py +89 -0
- hyperstack/models/pricebook_model.py +100 -0
- hyperstack/models/pricebook_resource_object_response.py +107 -0
- hyperstack/models/pricebook_resource_object_response_for_customer.py +99 -0
- hyperstack/models/profile_fields.py +96 -0
- hyperstack/models/profile_list_response.py +99 -0
- hyperstack/models/profile_object_fields.py +89 -0
- hyperstack/models/rbac_role_detail_response_model.py +95 -0
- hyperstack/models/rbac_role_detail_response_model_fixed.py +95 -0
- hyperstack/models/rbac_role_field.py +87 -0
- hyperstack/models/rbac_role_fields.py +114 -0
- hyperstack/models/refresh_token_payload.py +89 -0
- hyperstack/models/region_fields.py +91 -0
- hyperstack/models/region_payload.py +89 -0
- hyperstack/models/region_response.py +95 -0
- hyperstack/models/regions.py +99 -0
- hyperstack/models/remove_member_from_organization_response_model.py +89 -0
- hyperstack/models/remove_member_payload.py +88 -0
- hyperstack/models/request_console.py +91 -0
- hyperstack/models/resource_billing_events_history_metrics.py +95 -0
- hyperstack/models/resource_billing_events_history_response.py +99 -0
- hyperstack/models/resource_billing_response_for_customer.py +95 -0
- hyperstack/models/resource_level_billing_details_attributes.py +91 -0
- hyperstack/models/resource_level_billing_details_metrics.py +101 -0
- hyperstack/models/resource_level_billing_details_vm.py +99 -0
- hyperstack/models/resource_level_billing_details_volume.py +99 -0
- hyperstack/models/resource_level_billing_details_volume_attributes.py +95 -0
- hyperstack/models/resource_level_billing_details_volume_metrics.py +95 -0
- hyperstack/models/resource_level_billing_history.py +105 -0
- hyperstack/models/resource_level_billing_history_resources.py +97 -0
- hyperstack/models/resource_level_billing_history_response_attributes.py +93 -0
- hyperstack/models/resource_level_billing_history_response_metrics.py +91 -0
- hyperstack/models/resource_level_billing_vm_details_resources.py +97 -0
- hyperstack/models/resource_level_billing_volume_details_resources.py +97 -0
- hyperstack/models/resource_level_graph_billing_detail_volume.py +101 -0
- hyperstack/models/resource_level_graph_billing_details_attributes.py +91 -0
- hyperstack/models/resource_level_graph_billing_details_metrics.py +97 -0
- hyperstack/models/resource_level_graph_billing_details_vm.py +101 -0
- hyperstack/models/resource_level_graph_billing_vm_details_resources.py +97 -0
- hyperstack/models/resource_level_graph_billing_volume_details_resources.py +97 -0
- hyperstack/models/resource_level_vm_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_vm_billing_history_response_model.py +95 -0
- hyperstack/models/resource_level_vm_graph_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_volume_billing_details_response_model.py +95 -0
- hyperstack/models/resource_level_volume_billing_history_response_model.py +95 -0
- hyperstack/models/resource_level_volume_graph_billing_details_response_model.py +95 -0
- hyperstack/models/resource_object_response_for_customer.py +93 -0
- hyperstack/models/response_model.py +89 -0
- hyperstack/models/role_permission_fields.py +91 -0
- hyperstack/models/role_policy_fields.py +91 -0
- hyperstack/models/security_group_rule.py +95 -0
- hyperstack/models/security_group_rule_fields.py +104 -0
- hyperstack/models/security_rules_fieldsfor_instance.py +104 -0
- hyperstack/models/security_rules_protocol_fields.py +91 -0
- hyperstack/models/set_defaults_payload.py +89 -0
- hyperstack/models/single_visibility_user_response.py +91 -0
- hyperstack/models/snapshot_fields.py +105 -0
- hyperstack/models/snapshot_restore_request.py +89 -0
- hyperstack/models/snapshot_retrieve.py +95 -0
- hyperstack/models/snapshot_retrieve_fields.py +103 -0
- hyperstack/models/snapshots.py +105 -0
- hyperstack/models/start_deployment.py +95 -0
- hyperstack/models/start_deployment_payload.py +93 -0
- hyperstack/models/stock_visibility_user_list_response.py +99 -0
- hyperstack/models/stock_visibility_user_payload.py +87 -0
- hyperstack/models/sub_resource_graph_billing_details_metrics.py +152 -0
- hyperstack/models/sub_resources_costs_response_model.py +101 -0
- hyperstack/models/sub_resources_graph_billing_history_fields.py +97 -0
- hyperstack/models/sub_resources_graph_response_model.py +95 -0
- hyperstack/models/subscribeorunsubscribeupdatepayload.py +87 -0
- hyperstack/models/success_response_model.py +89 -0
- hyperstack/models/template.py +95 -0
- hyperstack/models/template_fields.py +98 -0
- hyperstack/models/templates.py +99 -0
- hyperstack/models/token_fields.py +91 -0
- hyperstack/models/update_contract_payload.py +104 -0
- hyperstack/models/update_discounts_payload.py +102 -0
- hyperstack/models/update_discounts_status_payload.py +87 -0
- hyperstack/models/update_environment.py +88 -0
- hyperstack/models/update_gpu.py +91 -0
- hyperstack/models/update_keypair_name.py +88 -0
- hyperstack/models/update_keypairnameresponse.py +95 -0
- hyperstack/models/update_organization_payload.py +88 -0
- hyperstack/models/update_organization_response_model.py +89 -0
- hyperstack/models/update_template.py +91 -0
- hyperstack/models/user_default_choice_for_user_fields.py +91 -0
- hyperstack/models/user_default_choices_for_user_response.py +99 -0
- hyperstack/models/user_permission_fields.py +91 -0
- hyperstack/models/user_transfer_payload.py +89 -0
- hyperstack/models/userinfopostpayload.py +107 -0
- hyperstack/models/users_info_fields.py +114 -0
- hyperstack/models/users_info_list_response.py +95 -0
- hyperstack/models/verify_api_key_payload.py +87 -0
- hyperstack/models/verify_api_key_response_model.py +95 -0
- hyperstack/models/virtual_machine_usage.py +93 -0
- hyperstack/models/vm_usage_request_payload.py +87 -0
- hyperstack/models/vm_usage_response.py +101 -0
- hyperstack/models/vncurl.py +95 -0
- hyperstack/models/vncurl_fields.py +89 -0
- hyperstack/models/volume.py +95 -0
- hyperstack/models/volume_attachment_fields.py +98 -0
- hyperstack/models/volume_fields.py +116 -0
- hyperstack/models/volume_fieldsfor_instance.py +97 -0
- hyperstack/models/volume_overview_fields.py +91 -0
- hyperstack/models/volume_status_change_fields.py +96 -0
- hyperstack/models/volume_types.py +91 -0
- hyperstack/models/volumes.py +99 -0
- hyperstack/models/volumes_last_status_change_response.py +99 -0
- hyperstack/models/warning_mail_log_fields.py +99 -0
- hyperstack/models/warning_mail_log_response.py +101 -0
- hyperstack/py.typed +0 -0
- hyperstack/rest.py +257 -0
- hyperstack-1.25.0a0.dist-info/METADATA +23 -0
- hyperstack-1.25.0a0.dist-info/RECORD +401 -0
- hyperstack-1.25.0a0.dist-info/WHEEL +5 -0
- hyperstack-1.25.0a0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Infrahub-API
|
|
5
|
+
|
|
6
|
+
Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictInt
|
|
20
|
+
from ..models.attach_volumes import AttachVolumes
|
|
21
|
+
from ..models.attach_volumes_payload import AttachVolumesPayload
|
|
22
|
+
from ..models.detach_volumes import DetachVolumes
|
|
23
|
+
from ..models.detach_volumes_payload import DetachVolumesPayload
|
|
24
|
+
|
|
25
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
26
|
+
from ..api_response import ApiResponse
|
|
27
|
+
from ..rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class VolumeAttachmentApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def attach_volumes_to_virtual_machine(
|
|
45
|
+
self,
|
|
46
|
+
virtual_machine_id: StrictInt,
|
|
47
|
+
payload: AttachVolumesPayload,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> AttachVolumes:
|
|
61
|
+
"""Attach volumes to virtual machine
|
|
62
|
+
|
|
63
|
+
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1).
|
|
64
|
+
|
|
65
|
+
:param virtual_machine_id: (required)
|
|
66
|
+
:type virtual_machine_id: int
|
|
67
|
+
:param payload: (required)
|
|
68
|
+
:type payload: AttachVolumesPayload
|
|
69
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
70
|
+
number provided, it will be total request
|
|
71
|
+
timeout. It can also be a pair (tuple) of
|
|
72
|
+
(connection, read) timeouts.
|
|
73
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
74
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
75
|
+
request; this effectively ignores the
|
|
76
|
+
authentication in the spec for a single request.
|
|
77
|
+
:type _request_auth: dict, optional
|
|
78
|
+
:param _content_type: force content-type for the request.
|
|
79
|
+
:type _content_type: str, Optional
|
|
80
|
+
:param _headers: set to override the headers for a single
|
|
81
|
+
request; this effectively ignores the headers
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _headers: dict, optional
|
|
84
|
+
:param _host_index: set to override the host_index for a single
|
|
85
|
+
request; this effectively ignores the host_index
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _host_index: int, optional
|
|
88
|
+
:return: Returns the result object.
|
|
89
|
+
""" # noqa: E501
|
|
90
|
+
|
|
91
|
+
_param = self._attach_volumes_to_virtual_machine_serialize(
|
|
92
|
+
virtual_machine_id=virtual_machine_id,
|
|
93
|
+
payload=payload,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "AttachVolumes",
|
|
102
|
+
'400': "ErrorResponseModel",
|
|
103
|
+
'401': "ErrorResponseModel",
|
|
104
|
+
'404': "ErrorResponseModel",
|
|
105
|
+
'405': "ErrorResponseModel",
|
|
106
|
+
'500': None,
|
|
107
|
+
}
|
|
108
|
+
response_data = self.api_client.call_api(
|
|
109
|
+
*_param,
|
|
110
|
+
_request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
@validate_call
|
|
120
|
+
def attach_volumes_to_virtual_machine_with_http_info(
|
|
121
|
+
self,
|
|
122
|
+
virtual_machine_id: StrictInt,
|
|
123
|
+
payload: AttachVolumesPayload,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[AttachVolumes]:
|
|
137
|
+
"""Attach volumes to virtual machine
|
|
138
|
+
|
|
139
|
+
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1).
|
|
140
|
+
|
|
141
|
+
:param virtual_machine_id: (required)
|
|
142
|
+
:type virtual_machine_id: int
|
|
143
|
+
:param payload: (required)
|
|
144
|
+
:type payload: AttachVolumesPayload
|
|
145
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
146
|
+
number provided, it will be total request
|
|
147
|
+
timeout. It can also be a pair (tuple) of
|
|
148
|
+
(connection, read) timeouts.
|
|
149
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
150
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
151
|
+
request; this effectively ignores the
|
|
152
|
+
authentication in the spec for a single request.
|
|
153
|
+
:type _request_auth: dict, optional
|
|
154
|
+
:param _content_type: force content-type for the request.
|
|
155
|
+
:type _content_type: str, Optional
|
|
156
|
+
:param _headers: set to override the headers for a single
|
|
157
|
+
request; this effectively ignores the headers
|
|
158
|
+
in the spec for a single request.
|
|
159
|
+
:type _headers: dict, optional
|
|
160
|
+
:param _host_index: set to override the host_index for a single
|
|
161
|
+
request; this effectively ignores the host_index
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _host_index: int, optional
|
|
164
|
+
:return: Returns the result object.
|
|
165
|
+
""" # noqa: E501
|
|
166
|
+
|
|
167
|
+
_param = self._attach_volumes_to_virtual_machine_serialize(
|
|
168
|
+
virtual_machine_id=virtual_machine_id,
|
|
169
|
+
payload=payload,
|
|
170
|
+
_request_auth=_request_auth,
|
|
171
|
+
_content_type=_content_type,
|
|
172
|
+
_headers=_headers,
|
|
173
|
+
_host_index=_host_index
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
177
|
+
'200': "AttachVolumes",
|
|
178
|
+
'400': "ErrorResponseModel",
|
|
179
|
+
'401': "ErrorResponseModel",
|
|
180
|
+
'404': "ErrorResponseModel",
|
|
181
|
+
'405': "ErrorResponseModel",
|
|
182
|
+
'500': None,
|
|
183
|
+
}
|
|
184
|
+
response_data = self.api_client.call_api(
|
|
185
|
+
*_param,
|
|
186
|
+
_request_timeout=_request_timeout
|
|
187
|
+
)
|
|
188
|
+
response_data.read()
|
|
189
|
+
return self.api_client.response_deserialize(
|
|
190
|
+
response_data=response_data,
|
|
191
|
+
response_types_map=_response_types_map,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@validate_call
|
|
196
|
+
def attach_volumes_to_virtual_machine_without_preload_content(
|
|
197
|
+
self,
|
|
198
|
+
virtual_machine_id: StrictInt,
|
|
199
|
+
payload: AttachVolumesPayload,
|
|
200
|
+
_request_timeout: Union[
|
|
201
|
+
None,
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Tuple[
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
206
|
+
]
|
|
207
|
+
] = None,
|
|
208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_content_type: Optional[StrictStr] = None,
|
|
210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
212
|
+
) -> RESTResponseType:
|
|
213
|
+
"""Attach volumes to virtual machine
|
|
214
|
+
|
|
215
|
+
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1).
|
|
216
|
+
|
|
217
|
+
:param virtual_machine_id: (required)
|
|
218
|
+
:type virtual_machine_id: int
|
|
219
|
+
:param payload: (required)
|
|
220
|
+
:type payload: AttachVolumesPayload
|
|
221
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
222
|
+
number provided, it will be total request
|
|
223
|
+
timeout. It can also be a pair (tuple) of
|
|
224
|
+
(connection, read) timeouts.
|
|
225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
226
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
227
|
+
request; this effectively ignores the
|
|
228
|
+
authentication in the spec for a single request.
|
|
229
|
+
:type _request_auth: dict, optional
|
|
230
|
+
:param _content_type: force content-type for the request.
|
|
231
|
+
:type _content_type: str, Optional
|
|
232
|
+
:param _headers: set to override the headers for a single
|
|
233
|
+
request; this effectively ignores the headers
|
|
234
|
+
in the spec for a single request.
|
|
235
|
+
:type _headers: dict, optional
|
|
236
|
+
:param _host_index: set to override the host_index for a single
|
|
237
|
+
request; this effectively ignores the host_index
|
|
238
|
+
in the spec for a single request.
|
|
239
|
+
:type _host_index: int, optional
|
|
240
|
+
:return: Returns the result object.
|
|
241
|
+
""" # noqa: E501
|
|
242
|
+
|
|
243
|
+
_param = self._attach_volumes_to_virtual_machine_serialize(
|
|
244
|
+
virtual_machine_id=virtual_machine_id,
|
|
245
|
+
payload=payload,
|
|
246
|
+
_request_auth=_request_auth,
|
|
247
|
+
_content_type=_content_type,
|
|
248
|
+
_headers=_headers,
|
|
249
|
+
_host_index=_host_index
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
253
|
+
'200': "AttachVolumes",
|
|
254
|
+
'400': "ErrorResponseModel",
|
|
255
|
+
'401': "ErrorResponseModel",
|
|
256
|
+
'404': "ErrorResponseModel",
|
|
257
|
+
'405': "ErrorResponseModel",
|
|
258
|
+
'500': None,
|
|
259
|
+
}
|
|
260
|
+
response_data = self.api_client.call_api(
|
|
261
|
+
*_param,
|
|
262
|
+
_request_timeout=_request_timeout
|
|
263
|
+
)
|
|
264
|
+
return response_data.response
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
def _attach_volumes_to_virtual_machine_serialize(
|
|
268
|
+
self,
|
|
269
|
+
virtual_machine_id,
|
|
270
|
+
payload,
|
|
271
|
+
_request_auth,
|
|
272
|
+
_content_type,
|
|
273
|
+
_headers,
|
|
274
|
+
_host_index,
|
|
275
|
+
) -> RequestSerialized:
|
|
276
|
+
|
|
277
|
+
_host = None
|
|
278
|
+
|
|
279
|
+
_collection_formats: Dict[str, str] = {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_path_params: Dict[str, str] = {}
|
|
283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
286
|
+
_files: Dict[
|
|
287
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
288
|
+
] = {}
|
|
289
|
+
_body_params: Optional[bytes] = None
|
|
290
|
+
|
|
291
|
+
# process the path parameters
|
|
292
|
+
if virtual_machine_id is not None:
|
|
293
|
+
_path_params['virtual_machine_id'] = virtual_machine_id
|
|
294
|
+
# process the query parameters
|
|
295
|
+
# process the header parameters
|
|
296
|
+
# process the form parameters
|
|
297
|
+
# process the body parameter
|
|
298
|
+
if payload is not None:
|
|
299
|
+
_body_params = payload
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
# set the HTTP header `Accept`
|
|
303
|
+
if 'Accept' not in _header_params:
|
|
304
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
305
|
+
[
|
|
306
|
+
'application/json'
|
|
307
|
+
]
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
# set the HTTP header `Content-Type`
|
|
311
|
+
if _content_type:
|
|
312
|
+
_header_params['Content-Type'] = _content_type
|
|
313
|
+
else:
|
|
314
|
+
_default_content_type = (
|
|
315
|
+
self.api_client.select_header_content_type(
|
|
316
|
+
[
|
|
317
|
+
'application/json'
|
|
318
|
+
]
|
|
319
|
+
)
|
|
320
|
+
)
|
|
321
|
+
if _default_content_type is not None:
|
|
322
|
+
_header_params['Content-Type'] = _default_content_type
|
|
323
|
+
|
|
324
|
+
# authentication setting
|
|
325
|
+
_auth_settings: List[str] = [
|
|
326
|
+
'apiKey',
|
|
327
|
+
'accessToken'
|
|
328
|
+
]
|
|
329
|
+
|
|
330
|
+
return self.api_client.param_serialize(
|
|
331
|
+
method='POST',
|
|
332
|
+
resource_path='/core/virtual-machines/{virtual_machine_id}/attach-volumes',
|
|
333
|
+
path_params=_path_params,
|
|
334
|
+
query_params=_query_params,
|
|
335
|
+
header_params=_header_params,
|
|
336
|
+
body=_body_params,
|
|
337
|
+
post_params=_form_params,
|
|
338
|
+
files=_files,
|
|
339
|
+
auth_settings=_auth_settings,
|
|
340
|
+
collection_formats=_collection_formats,
|
|
341
|
+
_host=_host,
|
|
342
|
+
_request_auth=_request_auth
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
@validate_call
|
|
349
|
+
def detach_volumes_from_virtual_machine(
|
|
350
|
+
self,
|
|
351
|
+
virtual_machine_id: StrictInt,
|
|
352
|
+
payload: DetachVolumesPayload,
|
|
353
|
+
_request_timeout: Union[
|
|
354
|
+
None,
|
|
355
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
356
|
+
Tuple[
|
|
357
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
358
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
359
|
+
]
|
|
360
|
+
] = None,
|
|
361
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
362
|
+
_content_type: Optional[StrictStr] = None,
|
|
363
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
364
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
365
|
+
) -> DetachVolumes:
|
|
366
|
+
"""Detach volumes from virtual machine
|
|
367
|
+
|
|
368
|
+
Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine.
|
|
369
|
+
|
|
370
|
+
:param virtual_machine_id: (required)
|
|
371
|
+
:type virtual_machine_id: int
|
|
372
|
+
:param payload: (required)
|
|
373
|
+
:type payload: DetachVolumesPayload
|
|
374
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
375
|
+
number provided, it will be total request
|
|
376
|
+
timeout. It can also be a pair (tuple) of
|
|
377
|
+
(connection, read) timeouts.
|
|
378
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
379
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
380
|
+
request; this effectively ignores the
|
|
381
|
+
authentication in the spec for a single request.
|
|
382
|
+
:type _request_auth: dict, optional
|
|
383
|
+
:param _content_type: force content-type for the request.
|
|
384
|
+
:type _content_type: str, Optional
|
|
385
|
+
:param _headers: set to override the headers for a single
|
|
386
|
+
request; this effectively ignores the headers
|
|
387
|
+
in the spec for a single request.
|
|
388
|
+
:type _headers: dict, optional
|
|
389
|
+
:param _host_index: set to override the host_index for a single
|
|
390
|
+
request; this effectively ignores the host_index
|
|
391
|
+
in the spec for a single request.
|
|
392
|
+
:type _host_index: int, optional
|
|
393
|
+
:return: Returns the result object.
|
|
394
|
+
""" # noqa: E501
|
|
395
|
+
|
|
396
|
+
_param = self._detach_volumes_from_virtual_machine_serialize(
|
|
397
|
+
virtual_machine_id=virtual_machine_id,
|
|
398
|
+
payload=payload,
|
|
399
|
+
_request_auth=_request_auth,
|
|
400
|
+
_content_type=_content_type,
|
|
401
|
+
_headers=_headers,
|
|
402
|
+
_host_index=_host_index
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
406
|
+
'200': "DetachVolumes",
|
|
407
|
+
'400': "ErrorResponseModel",
|
|
408
|
+
'401': "ErrorResponseModel",
|
|
409
|
+
'404': "ErrorResponseModel",
|
|
410
|
+
'405': "ErrorResponseModel",
|
|
411
|
+
'500': None,
|
|
412
|
+
}
|
|
413
|
+
response_data = self.api_client.call_api(
|
|
414
|
+
*_param,
|
|
415
|
+
_request_timeout=_request_timeout
|
|
416
|
+
)
|
|
417
|
+
response_data.read()
|
|
418
|
+
return self.api_client.response_deserialize(
|
|
419
|
+
response_data=response_data,
|
|
420
|
+
response_types_map=_response_types_map,
|
|
421
|
+
).data
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
@validate_call
|
|
425
|
+
def detach_volumes_from_virtual_machine_with_http_info(
|
|
426
|
+
self,
|
|
427
|
+
virtual_machine_id: StrictInt,
|
|
428
|
+
payload: DetachVolumesPayload,
|
|
429
|
+
_request_timeout: Union[
|
|
430
|
+
None,
|
|
431
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
432
|
+
Tuple[
|
|
433
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
434
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
435
|
+
]
|
|
436
|
+
] = None,
|
|
437
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
438
|
+
_content_type: Optional[StrictStr] = None,
|
|
439
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
440
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
441
|
+
) -> ApiResponse[DetachVolumes]:
|
|
442
|
+
"""Detach volumes from virtual machine
|
|
443
|
+
|
|
444
|
+
Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine.
|
|
445
|
+
|
|
446
|
+
:param virtual_machine_id: (required)
|
|
447
|
+
:type virtual_machine_id: int
|
|
448
|
+
:param payload: (required)
|
|
449
|
+
:type payload: DetachVolumesPayload
|
|
450
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
451
|
+
number provided, it will be total request
|
|
452
|
+
timeout. It can also be a pair (tuple) of
|
|
453
|
+
(connection, read) timeouts.
|
|
454
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
455
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
456
|
+
request; this effectively ignores the
|
|
457
|
+
authentication in the spec for a single request.
|
|
458
|
+
:type _request_auth: dict, optional
|
|
459
|
+
:param _content_type: force content-type for the request.
|
|
460
|
+
:type _content_type: str, Optional
|
|
461
|
+
:param _headers: set to override the headers for a single
|
|
462
|
+
request; this effectively ignores the headers
|
|
463
|
+
in the spec for a single request.
|
|
464
|
+
:type _headers: dict, optional
|
|
465
|
+
:param _host_index: set to override the host_index for a single
|
|
466
|
+
request; this effectively ignores the host_index
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _host_index: int, optional
|
|
469
|
+
:return: Returns the result object.
|
|
470
|
+
""" # noqa: E501
|
|
471
|
+
|
|
472
|
+
_param = self._detach_volumes_from_virtual_machine_serialize(
|
|
473
|
+
virtual_machine_id=virtual_machine_id,
|
|
474
|
+
payload=payload,
|
|
475
|
+
_request_auth=_request_auth,
|
|
476
|
+
_content_type=_content_type,
|
|
477
|
+
_headers=_headers,
|
|
478
|
+
_host_index=_host_index
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
482
|
+
'200': "DetachVolumes",
|
|
483
|
+
'400': "ErrorResponseModel",
|
|
484
|
+
'401': "ErrorResponseModel",
|
|
485
|
+
'404': "ErrorResponseModel",
|
|
486
|
+
'405': "ErrorResponseModel",
|
|
487
|
+
'500': None,
|
|
488
|
+
}
|
|
489
|
+
response_data = self.api_client.call_api(
|
|
490
|
+
*_param,
|
|
491
|
+
_request_timeout=_request_timeout
|
|
492
|
+
)
|
|
493
|
+
response_data.read()
|
|
494
|
+
return self.api_client.response_deserialize(
|
|
495
|
+
response_data=response_data,
|
|
496
|
+
response_types_map=_response_types_map,
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
@validate_call
|
|
501
|
+
def detach_volumes_from_virtual_machine_without_preload_content(
|
|
502
|
+
self,
|
|
503
|
+
virtual_machine_id: StrictInt,
|
|
504
|
+
payload: DetachVolumesPayload,
|
|
505
|
+
_request_timeout: Union[
|
|
506
|
+
None,
|
|
507
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
508
|
+
Tuple[
|
|
509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
510
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
511
|
+
]
|
|
512
|
+
] = None,
|
|
513
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
514
|
+
_content_type: Optional[StrictStr] = None,
|
|
515
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
516
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
517
|
+
) -> RESTResponseType:
|
|
518
|
+
"""Detach volumes from virtual machine
|
|
519
|
+
|
|
520
|
+
Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine.
|
|
521
|
+
|
|
522
|
+
:param virtual_machine_id: (required)
|
|
523
|
+
:type virtual_machine_id: int
|
|
524
|
+
:param payload: (required)
|
|
525
|
+
:type payload: DetachVolumesPayload
|
|
526
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
527
|
+
number provided, it will be total request
|
|
528
|
+
timeout. It can also be a pair (tuple) of
|
|
529
|
+
(connection, read) timeouts.
|
|
530
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
531
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
532
|
+
request; this effectively ignores the
|
|
533
|
+
authentication in the spec for a single request.
|
|
534
|
+
:type _request_auth: dict, optional
|
|
535
|
+
:param _content_type: force content-type for the request.
|
|
536
|
+
:type _content_type: str, Optional
|
|
537
|
+
:param _headers: set to override the headers for a single
|
|
538
|
+
request; this effectively ignores the headers
|
|
539
|
+
in the spec for a single request.
|
|
540
|
+
:type _headers: dict, optional
|
|
541
|
+
:param _host_index: set to override the host_index for a single
|
|
542
|
+
request; this effectively ignores the host_index
|
|
543
|
+
in the spec for a single request.
|
|
544
|
+
:type _host_index: int, optional
|
|
545
|
+
:return: Returns the result object.
|
|
546
|
+
""" # noqa: E501
|
|
547
|
+
|
|
548
|
+
_param = self._detach_volumes_from_virtual_machine_serialize(
|
|
549
|
+
virtual_machine_id=virtual_machine_id,
|
|
550
|
+
payload=payload,
|
|
551
|
+
_request_auth=_request_auth,
|
|
552
|
+
_content_type=_content_type,
|
|
553
|
+
_headers=_headers,
|
|
554
|
+
_host_index=_host_index
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
558
|
+
'200': "DetachVolumes",
|
|
559
|
+
'400': "ErrorResponseModel",
|
|
560
|
+
'401': "ErrorResponseModel",
|
|
561
|
+
'404': "ErrorResponseModel",
|
|
562
|
+
'405': "ErrorResponseModel",
|
|
563
|
+
'500': None,
|
|
564
|
+
}
|
|
565
|
+
response_data = self.api_client.call_api(
|
|
566
|
+
*_param,
|
|
567
|
+
_request_timeout=_request_timeout
|
|
568
|
+
)
|
|
569
|
+
return response_data.response
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
def _detach_volumes_from_virtual_machine_serialize(
|
|
573
|
+
self,
|
|
574
|
+
virtual_machine_id,
|
|
575
|
+
payload,
|
|
576
|
+
_request_auth,
|
|
577
|
+
_content_type,
|
|
578
|
+
_headers,
|
|
579
|
+
_host_index,
|
|
580
|
+
) -> RequestSerialized:
|
|
581
|
+
|
|
582
|
+
_host = None
|
|
583
|
+
|
|
584
|
+
_collection_formats: Dict[str, str] = {
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
_path_params: Dict[str, str] = {}
|
|
588
|
+
_query_params: List[Tuple[str, str]] = []
|
|
589
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
590
|
+
_form_params: List[Tuple[str, str]] = []
|
|
591
|
+
_files: Dict[
|
|
592
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
593
|
+
] = {}
|
|
594
|
+
_body_params: Optional[bytes] = None
|
|
595
|
+
|
|
596
|
+
# process the path parameters
|
|
597
|
+
if virtual_machine_id is not None:
|
|
598
|
+
_path_params['virtual_machine_id'] = virtual_machine_id
|
|
599
|
+
# process the query parameters
|
|
600
|
+
# process the header parameters
|
|
601
|
+
# process the form parameters
|
|
602
|
+
# process the body parameter
|
|
603
|
+
if payload is not None:
|
|
604
|
+
_body_params = payload
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
# set the HTTP header `Accept`
|
|
608
|
+
if 'Accept' not in _header_params:
|
|
609
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
610
|
+
[
|
|
611
|
+
'application/json'
|
|
612
|
+
]
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
# set the HTTP header `Content-Type`
|
|
616
|
+
if _content_type:
|
|
617
|
+
_header_params['Content-Type'] = _content_type
|
|
618
|
+
else:
|
|
619
|
+
_default_content_type = (
|
|
620
|
+
self.api_client.select_header_content_type(
|
|
621
|
+
[
|
|
622
|
+
'application/json'
|
|
623
|
+
]
|
|
624
|
+
)
|
|
625
|
+
)
|
|
626
|
+
if _default_content_type is not None:
|
|
627
|
+
_header_params['Content-Type'] = _default_content_type
|
|
628
|
+
|
|
629
|
+
# authentication setting
|
|
630
|
+
_auth_settings: List[str] = [
|
|
631
|
+
'apiKey',
|
|
632
|
+
'accessToken'
|
|
633
|
+
]
|
|
634
|
+
|
|
635
|
+
return self.api_client.param_serialize(
|
|
636
|
+
method='POST',
|
|
637
|
+
resource_path='/core/virtual-machines/{virtual_machine_id}/detach-volumes',
|
|
638
|
+
path_params=_path_params,
|
|
639
|
+
query_params=_query_params,
|
|
640
|
+
header_params=_header_params,
|
|
641
|
+
body=_body_params,
|
|
642
|
+
post_params=_form_params,
|
|
643
|
+
files=_files,
|
|
644
|
+
auth_settings=_auth_settings,
|
|
645
|
+
collection_formats=_collection_formats,
|
|
646
|
+
_host=_host,
|
|
647
|
+
_request_auth=_request_auth
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
|