hyperstack 0.1.23__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 +488 -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 +132 -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 +156 -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-0.1.23.dist-info/METADATA +16 -0
- hyperstack-0.1.23.dist-info/RECORD +401 -0
- hyperstack-0.1.23.dist-info/WHEEL +5 -0
- hyperstack-0.1.23.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1779 @@
|
|
|
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 Field, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from ..models.create_image import CreateImage
|
|
23
|
+
from ..models.create_image_payload import CreateImagePayload
|
|
24
|
+
from ..models.instance import Instance
|
|
25
|
+
from ..models.name_available_model import NameAvailableModel
|
|
26
|
+
from ..models.response_model import ResponseModel
|
|
27
|
+
from ..models.snapshot_restore_request import SnapshotRestoreRequest
|
|
28
|
+
from ..models.snapshot_retrieve import SnapshotRetrieve
|
|
29
|
+
from ..models.snapshots import Snapshots
|
|
30
|
+
|
|
31
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
32
|
+
from ..api_response import ApiResponse
|
|
33
|
+
from ..rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class SnapshotsApi:
|
|
37
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
38
|
+
Ref: https://openapi-generator.tech
|
|
39
|
+
|
|
40
|
+
Do not edit the class manually.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, api_client=None) -> None:
|
|
44
|
+
if api_client is None:
|
|
45
|
+
api_client = ApiClient.get_default()
|
|
46
|
+
self.api_client = api_client
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def create_an_image_from_a_snapshot(
|
|
51
|
+
self,
|
|
52
|
+
snapshot_id: StrictInt,
|
|
53
|
+
payload: CreateImagePayload,
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> CreateImage:
|
|
67
|
+
"""Create an image from a snapshot
|
|
68
|
+
|
|
69
|
+
Create a new custom image from an existing snapshot.Requires a name and any labels for your new custom image.
|
|
70
|
+
|
|
71
|
+
:param snapshot_id: (required)
|
|
72
|
+
:type snapshot_id: int
|
|
73
|
+
:param payload: (required)
|
|
74
|
+
:type payload: CreateImagePayload
|
|
75
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
76
|
+
number provided, it will be total request
|
|
77
|
+
timeout. It can also be a pair (tuple) of
|
|
78
|
+
(connection, read) timeouts.
|
|
79
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
80
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
81
|
+
request; this effectively ignores the
|
|
82
|
+
authentication in the spec for a single request.
|
|
83
|
+
:type _request_auth: dict, optional
|
|
84
|
+
:param _content_type: force content-type for the request.
|
|
85
|
+
:type _content_type: str, Optional
|
|
86
|
+
:param _headers: set to override the headers for a single
|
|
87
|
+
request; this effectively ignores the headers
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _headers: dict, optional
|
|
90
|
+
:param _host_index: set to override the host_index for a single
|
|
91
|
+
request; this effectively ignores the host_index
|
|
92
|
+
in the spec for a single request.
|
|
93
|
+
:type _host_index: int, optional
|
|
94
|
+
:return: Returns the result object.
|
|
95
|
+
""" # noqa: E501
|
|
96
|
+
|
|
97
|
+
_param = self._create_an_image_from_a_snapshot_serialize(
|
|
98
|
+
snapshot_id=snapshot_id,
|
|
99
|
+
payload=payload,
|
|
100
|
+
_request_auth=_request_auth,
|
|
101
|
+
_content_type=_content_type,
|
|
102
|
+
_headers=_headers,
|
|
103
|
+
_host_index=_host_index
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
107
|
+
'200': "CreateImage",
|
|
108
|
+
'400': "ErrorResponseModel",
|
|
109
|
+
'401': "ErrorResponseModel",
|
|
110
|
+
'404': "ErrorResponseModel",
|
|
111
|
+
'406': "ErrorResponseModel",
|
|
112
|
+
'500': None,
|
|
113
|
+
}
|
|
114
|
+
response_data = self.api_client.call_api(
|
|
115
|
+
*_param,
|
|
116
|
+
_request_timeout=_request_timeout
|
|
117
|
+
)
|
|
118
|
+
response_data.read()
|
|
119
|
+
return self.api_client.response_deserialize(
|
|
120
|
+
response_data=response_data,
|
|
121
|
+
response_types_map=_response_types_map,
|
|
122
|
+
).data
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@validate_call
|
|
126
|
+
def create_an_image_from_a_snapshot_with_http_info(
|
|
127
|
+
self,
|
|
128
|
+
snapshot_id: StrictInt,
|
|
129
|
+
payload: CreateImagePayload,
|
|
130
|
+
_request_timeout: Union[
|
|
131
|
+
None,
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
133
|
+
Tuple[
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
136
|
+
]
|
|
137
|
+
] = None,
|
|
138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
+
_content_type: Optional[StrictStr] = None,
|
|
140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
142
|
+
) -> ApiResponse[CreateImage]:
|
|
143
|
+
"""Create an image from a snapshot
|
|
144
|
+
|
|
145
|
+
Create a new custom image from an existing snapshot.Requires a name and any labels for your new custom image.
|
|
146
|
+
|
|
147
|
+
:param snapshot_id: (required)
|
|
148
|
+
:type snapshot_id: int
|
|
149
|
+
:param payload: (required)
|
|
150
|
+
:type payload: CreateImagePayload
|
|
151
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
152
|
+
number provided, it will be total request
|
|
153
|
+
timeout. It can also be a pair (tuple) of
|
|
154
|
+
(connection, read) timeouts.
|
|
155
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
156
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
157
|
+
request; this effectively ignores the
|
|
158
|
+
authentication in the spec for a single request.
|
|
159
|
+
:type _request_auth: dict, optional
|
|
160
|
+
:param _content_type: force content-type for the request.
|
|
161
|
+
:type _content_type: str, Optional
|
|
162
|
+
:param _headers: set to override the headers for a single
|
|
163
|
+
request; this effectively ignores the headers
|
|
164
|
+
in the spec for a single request.
|
|
165
|
+
:type _headers: dict, optional
|
|
166
|
+
:param _host_index: set to override the host_index for a single
|
|
167
|
+
request; this effectively ignores the host_index
|
|
168
|
+
in the spec for a single request.
|
|
169
|
+
:type _host_index: int, optional
|
|
170
|
+
:return: Returns the result object.
|
|
171
|
+
""" # noqa: E501
|
|
172
|
+
|
|
173
|
+
_param = self._create_an_image_from_a_snapshot_serialize(
|
|
174
|
+
snapshot_id=snapshot_id,
|
|
175
|
+
payload=payload,
|
|
176
|
+
_request_auth=_request_auth,
|
|
177
|
+
_content_type=_content_type,
|
|
178
|
+
_headers=_headers,
|
|
179
|
+
_host_index=_host_index
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
183
|
+
'200': "CreateImage",
|
|
184
|
+
'400': "ErrorResponseModel",
|
|
185
|
+
'401': "ErrorResponseModel",
|
|
186
|
+
'404': "ErrorResponseModel",
|
|
187
|
+
'406': "ErrorResponseModel",
|
|
188
|
+
'500': None,
|
|
189
|
+
}
|
|
190
|
+
response_data = self.api_client.call_api(
|
|
191
|
+
*_param,
|
|
192
|
+
_request_timeout=_request_timeout
|
|
193
|
+
)
|
|
194
|
+
response_data.read()
|
|
195
|
+
return self.api_client.response_deserialize(
|
|
196
|
+
response_data=response_data,
|
|
197
|
+
response_types_map=_response_types_map,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
@validate_call
|
|
202
|
+
def create_an_image_from_a_snapshot_without_preload_content(
|
|
203
|
+
self,
|
|
204
|
+
snapshot_id: StrictInt,
|
|
205
|
+
payload: CreateImagePayload,
|
|
206
|
+
_request_timeout: Union[
|
|
207
|
+
None,
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Tuple[
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
212
|
+
]
|
|
213
|
+
] = None,
|
|
214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_content_type: Optional[StrictStr] = None,
|
|
216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
218
|
+
) -> RESTResponseType:
|
|
219
|
+
"""Create an image from a snapshot
|
|
220
|
+
|
|
221
|
+
Create a new custom image from an existing snapshot.Requires a name and any labels for your new custom image.
|
|
222
|
+
|
|
223
|
+
:param snapshot_id: (required)
|
|
224
|
+
:type snapshot_id: int
|
|
225
|
+
:param payload: (required)
|
|
226
|
+
:type payload: CreateImagePayload
|
|
227
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
228
|
+
number provided, it will be total request
|
|
229
|
+
timeout. It can also be a pair (tuple) of
|
|
230
|
+
(connection, read) timeouts.
|
|
231
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
232
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
233
|
+
request; this effectively ignores the
|
|
234
|
+
authentication in the spec for a single request.
|
|
235
|
+
:type _request_auth: dict, optional
|
|
236
|
+
:param _content_type: force content-type for the request.
|
|
237
|
+
:type _content_type: str, Optional
|
|
238
|
+
:param _headers: set to override the headers for a single
|
|
239
|
+
request; this effectively ignores the headers
|
|
240
|
+
in the spec for a single request.
|
|
241
|
+
:type _headers: dict, optional
|
|
242
|
+
:param _host_index: set to override the host_index for a single
|
|
243
|
+
request; this effectively ignores the host_index
|
|
244
|
+
in the spec for a single request.
|
|
245
|
+
:type _host_index: int, optional
|
|
246
|
+
:return: Returns the result object.
|
|
247
|
+
""" # noqa: E501
|
|
248
|
+
|
|
249
|
+
_param = self._create_an_image_from_a_snapshot_serialize(
|
|
250
|
+
snapshot_id=snapshot_id,
|
|
251
|
+
payload=payload,
|
|
252
|
+
_request_auth=_request_auth,
|
|
253
|
+
_content_type=_content_type,
|
|
254
|
+
_headers=_headers,
|
|
255
|
+
_host_index=_host_index
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
259
|
+
'200': "CreateImage",
|
|
260
|
+
'400': "ErrorResponseModel",
|
|
261
|
+
'401': "ErrorResponseModel",
|
|
262
|
+
'404': "ErrorResponseModel",
|
|
263
|
+
'406': "ErrorResponseModel",
|
|
264
|
+
'500': None,
|
|
265
|
+
}
|
|
266
|
+
response_data = self.api_client.call_api(
|
|
267
|
+
*_param,
|
|
268
|
+
_request_timeout=_request_timeout
|
|
269
|
+
)
|
|
270
|
+
return response_data.response
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def _create_an_image_from_a_snapshot_serialize(
|
|
274
|
+
self,
|
|
275
|
+
snapshot_id,
|
|
276
|
+
payload,
|
|
277
|
+
_request_auth,
|
|
278
|
+
_content_type,
|
|
279
|
+
_headers,
|
|
280
|
+
_host_index,
|
|
281
|
+
) -> RequestSerialized:
|
|
282
|
+
|
|
283
|
+
_host = None
|
|
284
|
+
|
|
285
|
+
_collection_formats: Dict[str, str] = {
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
_path_params: Dict[str, str] = {}
|
|
289
|
+
_query_params: List[Tuple[str, str]] = []
|
|
290
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
291
|
+
_form_params: List[Tuple[str, str]] = []
|
|
292
|
+
_files: Dict[
|
|
293
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
294
|
+
] = {}
|
|
295
|
+
_body_params: Optional[bytes] = None
|
|
296
|
+
|
|
297
|
+
# process the path parameters
|
|
298
|
+
if snapshot_id is not None:
|
|
299
|
+
_path_params['snapshot_id'] = snapshot_id
|
|
300
|
+
# process the query parameters
|
|
301
|
+
# process the header parameters
|
|
302
|
+
# process the form parameters
|
|
303
|
+
# process the body parameter
|
|
304
|
+
if payload is not None:
|
|
305
|
+
_body_params = payload
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# set the HTTP header `Accept`
|
|
309
|
+
if 'Accept' not in _header_params:
|
|
310
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
311
|
+
[
|
|
312
|
+
'application/json'
|
|
313
|
+
]
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
# set the HTTP header `Content-Type`
|
|
317
|
+
if _content_type:
|
|
318
|
+
_header_params['Content-Type'] = _content_type
|
|
319
|
+
else:
|
|
320
|
+
_default_content_type = (
|
|
321
|
+
self.api_client.select_header_content_type(
|
|
322
|
+
[
|
|
323
|
+
'application/json'
|
|
324
|
+
]
|
|
325
|
+
)
|
|
326
|
+
)
|
|
327
|
+
if _default_content_type is not None:
|
|
328
|
+
_header_params['Content-Type'] = _default_content_type
|
|
329
|
+
|
|
330
|
+
# authentication setting
|
|
331
|
+
_auth_settings: List[str] = [
|
|
332
|
+
'apiKey',
|
|
333
|
+
'accessToken'
|
|
334
|
+
]
|
|
335
|
+
|
|
336
|
+
return self.api_client.param_serialize(
|
|
337
|
+
method='POST',
|
|
338
|
+
resource_path='/core/snapshots/{snapshot_id}/image',
|
|
339
|
+
path_params=_path_params,
|
|
340
|
+
query_params=_query_params,
|
|
341
|
+
header_params=_header_params,
|
|
342
|
+
body=_body_params,
|
|
343
|
+
post_params=_form_params,
|
|
344
|
+
files=_files,
|
|
345
|
+
auth_settings=_auth_settings,
|
|
346
|
+
collection_formats=_collection_formats,
|
|
347
|
+
_host=_host,
|
|
348
|
+
_request_auth=_request_auth
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
@validate_call
|
|
355
|
+
def delete_snapshot(
|
|
356
|
+
self,
|
|
357
|
+
id: StrictInt,
|
|
358
|
+
_request_timeout: Union[
|
|
359
|
+
None,
|
|
360
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
361
|
+
Tuple[
|
|
362
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
363
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
364
|
+
]
|
|
365
|
+
] = None,
|
|
366
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
367
|
+
_content_type: Optional[StrictStr] = None,
|
|
368
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
369
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
370
|
+
) -> ResponseModel:
|
|
371
|
+
"""Delete snapshot
|
|
372
|
+
|
|
373
|
+
Delete a snapshot. Provide the snapshot ID in the path to delete the specified snapshot. If the snapshot is connected with an image, that image will also bedeleted and the deleted image ID will be returned in the success message response.
|
|
374
|
+
|
|
375
|
+
:param id: (required)
|
|
376
|
+
:type id: int
|
|
377
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
378
|
+
number provided, it will be total request
|
|
379
|
+
timeout. It can also be a pair (tuple) of
|
|
380
|
+
(connection, read) timeouts.
|
|
381
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
382
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
383
|
+
request; this effectively ignores the
|
|
384
|
+
authentication in the spec for a single request.
|
|
385
|
+
:type _request_auth: dict, optional
|
|
386
|
+
:param _content_type: force content-type for the request.
|
|
387
|
+
:type _content_type: str, Optional
|
|
388
|
+
:param _headers: set to override the headers for a single
|
|
389
|
+
request; this effectively ignores the headers
|
|
390
|
+
in the spec for a single request.
|
|
391
|
+
:type _headers: dict, optional
|
|
392
|
+
:param _host_index: set to override the host_index for a single
|
|
393
|
+
request; this effectively ignores the host_index
|
|
394
|
+
in the spec for a single request.
|
|
395
|
+
:type _host_index: int, optional
|
|
396
|
+
:return: Returns the result object.
|
|
397
|
+
""" # noqa: E501
|
|
398
|
+
|
|
399
|
+
_param = self._delete_snapshot_serialize(
|
|
400
|
+
id=id,
|
|
401
|
+
_request_auth=_request_auth,
|
|
402
|
+
_content_type=_content_type,
|
|
403
|
+
_headers=_headers,
|
|
404
|
+
_host_index=_host_index
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
408
|
+
'200': "ResponseModel",
|
|
409
|
+
'400': "ErrorResponseModel",
|
|
410
|
+
'401': "ErrorResponseModel",
|
|
411
|
+
'404': "ErrorResponseModel",
|
|
412
|
+
'409': "ErrorResponseModel",
|
|
413
|
+
'500': None,
|
|
414
|
+
}
|
|
415
|
+
response_data = self.api_client.call_api(
|
|
416
|
+
*_param,
|
|
417
|
+
_request_timeout=_request_timeout
|
|
418
|
+
)
|
|
419
|
+
response_data.read()
|
|
420
|
+
return self.api_client.response_deserialize(
|
|
421
|
+
response_data=response_data,
|
|
422
|
+
response_types_map=_response_types_map,
|
|
423
|
+
).data
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
@validate_call
|
|
427
|
+
def delete_snapshot_with_http_info(
|
|
428
|
+
self,
|
|
429
|
+
id: StrictInt,
|
|
430
|
+
_request_timeout: Union[
|
|
431
|
+
None,
|
|
432
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
433
|
+
Tuple[
|
|
434
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
435
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
436
|
+
]
|
|
437
|
+
] = None,
|
|
438
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
439
|
+
_content_type: Optional[StrictStr] = None,
|
|
440
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
441
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
442
|
+
) -> ApiResponse[ResponseModel]:
|
|
443
|
+
"""Delete snapshot
|
|
444
|
+
|
|
445
|
+
Delete a snapshot. Provide the snapshot ID in the path to delete the specified snapshot. If the snapshot is connected with an image, that image will also bedeleted and the deleted image ID will be returned in the success message response.
|
|
446
|
+
|
|
447
|
+
:param id: (required)
|
|
448
|
+
:type id: int
|
|
449
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
450
|
+
number provided, it will be total request
|
|
451
|
+
timeout. It can also be a pair (tuple) of
|
|
452
|
+
(connection, read) timeouts.
|
|
453
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
454
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
455
|
+
request; this effectively ignores the
|
|
456
|
+
authentication in the spec for a single request.
|
|
457
|
+
:type _request_auth: dict, optional
|
|
458
|
+
:param _content_type: force content-type for the request.
|
|
459
|
+
:type _content_type: str, Optional
|
|
460
|
+
:param _headers: set to override the headers for a single
|
|
461
|
+
request; this effectively ignores the headers
|
|
462
|
+
in the spec for a single request.
|
|
463
|
+
:type _headers: dict, optional
|
|
464
|
+
:param _host_index: set to override the host_index for a single
|
|
465
|
+
request; this effectively ignores the host_index
|
|
466
|
+
in the spec for a single request.
|
|
467
|
+
:type _host_index: int, optional
|
|
468
|
+
:return: Returns the result object.
|
|
469
|
+
""" # noqa: E501
|
|
470
|
+
|
|
471
|
+
_param = self._delete_snapshot_serialize(
|
|
472
|
+
id=id,
|
|
473
|
+
_request_auth=_request_auth,
|
|
474
|
+
_content_type=_content_type,
|
|
475
|
+
_headers=_headers,
|
|
476
|
+
_host_index=_host_index
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
480
|
+
'200': "ResponseModel",
|
|
481
|
+
'400': "ErrorResponseModel",
|
|
482
|
+
'401': "ErrorResponseModel",
|
|
483
|
+
'404': "ErrorResponseModel",
|
|
484
|
+
'409': "ErrorResponseModel",
|
|
485
|
+
'500': None,
|
|
486
|
+
}
|
|
487
|
+
response_data = self.api_client.call_api(
|
|
488
|
+
*_param,
|
|
489
|
+
_request_timeout=_request_timeout
|
|
490
|
+
)
|
|
491
|
+
response_data.read()
|
|
492
|
+
return self.api_client.response_deserialize(
|
|
493
|
+
response_data=response_data,
|
|
494
|
+
response_types_map=_response_types_map,
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
@validate_call
|
|
499
|
+
def delete_snapshot_without_preload_content(
|
|
500
|
+
self,
|
|
501
|
+
id: StrictInt,
|
|
502
|
+
_request_timeout: Union[
|
|
503
|
+
None,
|
|
504
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
505
|
+
Tuple[
|
|
506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
507
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
508
|
+
]
|
|
509
|
+
] = None,
|
|
510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
511
|
+
_content_type: Optional[StrictStr] = None,
|
|
512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
514
|
+
) -> RESTResponseType:
|
|
515
|
+
"""Delete snapshot
|
|
516
|
+
|
|
517
|
+
Delete a snapshot. Provide the snapshot ID in the path to delete the specified snapshot. If the snapshot is connected with an image, that image will also bedeleted and the deleted image ID will be returned in the success message response.
|
|
518
|
+
|
|
519
|
+
:param id: (required)
|
|
520
|
+
:type id: int
|
|
521
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
522
|
+
number provided, it will be total request
|
|
523
|
+
timeout. It can also be a pair (tuple) of
|
|
524
|
+
(connection, read) timeouts.
|
|
525
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
526
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
527
|
+
request; this effectively ignores the
|
|
528
|
+
authentication in the spec for a single request.
|
|
529
|
+
:type _request_auth: dict, optional
|
|
530
|
+
:param _content_type: force content-type for the request.
|
|
531
|
+
:type _content_type: str, Optional
|
|
532
|
+
:param _headers: set to override the headers for a single
|
|
533
|
+
request; this effectively ignores the headers
|
|
534
|
+
in the spec for a single request.
|
|
535
|
+
:type _headers: dict, optional
|
|
536
|
+
:param _host_index: set to override the host_index for a single
|
|
537
|
+
request; this effectively ignores the host_index
|
|
538
|
+
in the spec for a single request.
|
|
539
|
+
:type _host_index: int, optional
|
|
540
|
+
:return: Returns the result object.
|
|
541
|
+
""" # noqa: E501
|
|
542
|
+
|
|
543
|
+
_param = self._delete_snapshot_serialize(
|
|
544
|
+
id=id,
|
|
545
|
+
_request_auth=_request_auth,
|
|
546
|
+
_content_type=_content_type,
|
|
547
|
+
_headers=_headers,
|
|
548
|
+
_host_index=_host_index
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
552
|
+
'200': "ResponseModel",
|
|
553
|
+
'400': "ErrorResponseModel",
|
|
554
|
+
'401': "ErrorResponseModel",
|
|
555
|
+
'404': "ErrorResponseModel",
|
|
556
|
+
'409': "ErrorResponseModel",
|
|
557
|
+
'500': None,
|
|
558
|
+
}
|
|
559
|
+
response_data = self.api_client.call_api(
|
|
560
|
+
*_param,
|
|
561
|
+
_request_timeout=_request_timeout
|
|
562
|
+
)
|
|
563
|
+
return response_data.response
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
def _delete_snapshot_serialize(
|
|
567
|
+
self,
|
|
568
|
+
id,
|
|
569
|
+
_request_auth,
|
|
570
|
+
_content_type,
|
|
571
|
+
_headers,
|
|
572
|
+
_host_index,
|
|
573
|
+
) -> RequestSerialized:
|
|
574
|
+
|
|
575
|
+
_host = None
|
|
576
|
+
|
|
577
|
+
_collection_formats: Dict[str, str] = {
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
_path_params: Dict[str, str] = {}
|
|
581
|
+
_query_params: List[Tuple[str, str]] = []
|
|
582
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
583
|
+
_form_params: List[Tuple[str, str]] = []
|
|
584
|
+
_files: Dict[
|
|
585
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
586
|
+
] = {}
|
|
587
|
+
_body_params: Optional[bytes] = None
|
|
588
|
+
|
|
589
|
+
# process the path parameters
|
|
590
|
+
if id is not None:
|
|
591
|
+
_path_params['id'] = id
|
|
592
|
+
# process the query parameters
|
|
593
|
+
# process the header parameters
|
|
594
|
+
# process the form parameters
|
|
595
|
+
# process the body parameter
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
# set the HTTP header `Accept`
|
|
599
|
+
if 'Accept' not in _header_params:
|
|
600
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
601
|
+
[
|
|
602
|
+
'application/json'
|
|
603
|
+
]
|
|
604
|
+
)
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
# authentication setting
|
|
608
|
+
_auth_settings: List[str] = [
|
|
609
|
+
'apiKey',
|
|
610
|
+
'accessToken'
|
|
611
|
+
]
|
|
612
|
+
|
|
613
|
+
return self.api_client.param_serialize(
|
|
614
|
+
method='DELETE',
|
|
615
|
+
resource_path='/core/snapshots/{id}',
|
|
616
|
+
path_params=_path_params,
|
|
617
|
+
query_params=_query_params,
|
|
618
|
+
header_params=_header_params,
|
|
619
|
+
body=_body_params,
|
|
620
|
+
post_params=_form_params,
|
|
621
|
+
files=_files,
|
|
622
|
+
auth_settings=_auth_settings,
|
|
623
|
+
collection_formats=_collection_formats,
|
|
624
|
+
_host=_host,
|
|
625
|
+
_request_auth=_request_auth
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
@validate_call
|
|
632
|
+
def fetch_snapshot_name_availability(
|
|
633
|
+
self,
|
|
634
|
+
name: StrictStr,
|
|
635
|
+
_request_timeout: Union[
|
|
636
|
+
None,
|
|
637
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
638
|
+
Tuple[
|
|
639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
640
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
641
|
+
]
|
|
642
|
+
] = None,
|
|
643
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
644
|
+
_content_type: Optional[StrictStr] = None,
|
|
645
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
646
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
647
|
+
) -> NameAvailableModel:
|
|
648
|
+
"""Fetch snapshot name availability
|
|
649
|
+
|
|
650
|
+
Check if a Snapshot name is available
|
|
651
|
+
|
|
652
|
+
:param name: (required)
|
|
653
|
+
:type name: str
|
|
654
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
655
|
+
number provided, it will be total request
|
|
656
|
+
timeout. It can also be a pair (tuple) of
|
|
657
|
+
(connection, read) timeouts.
|
|
658
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
659
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
660
|
+
request; this effectively ignores the
|
|
661
|
+
authentication in the spec for a single request.
|
|
662
|
+
:type _request_auth: dict, optional
|
|
663
|
+
:param _content_type: force content-type for the request.
|
|
664
|
+
:type _content_type: str, Optional
|
|
665
|
+
:param _headers: set to override the headers for a single
|
|
666
|
+
request; this effectively ignores the headers
|
|
667
|
+
in the spec for a single request.
|
|
668
|
+
:type _headers: dict, optional
|
|
669
|
+
:param _host_index: set to override the host_index for a single
|
|
670
|
+
request; this effectively ignores the host_index
|
|
671
|
+
in the spec for a single request.
|
|
672
|
+
:type _host_index: int, optional
|
|
673
|
+
:return: Returns the result object.
|
|
674
|
+
""" # noqa: E501
|
|
675
|
+
|
|
676
|
+
_param = self._fetch_snapshot_name_availability_serialize(
|
|
677
|
+
name=name,
|
|
678
|
+
_request_auth=_request_auth,
|
|
679
|
+
_content_type=_content_type,
|
|
680
|
+
_headers=_headers,
|
|
681
|
+
_host_index=_host_index
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
685
|
+
'200': "NameAvailableModel",
|
|
686
|
+
'400': "ErrorResponseModel",
|
|
687
|
+
'401': "ErrorResponseModel",
|
|
688
|
+
'404': "ErrorResponseModel",
|
|
689
|
+
'500': None,
|
|
690
|
+
}
|
|
691
|
+
response_data = self.api_client.call_api(
|
|
692
|
+
*_param,
|
|
693
|
+
_request_timeout=_request_timeout
|
|
694
|
+
)
|
|
695
|
+
response_data.read()
|
|
696
|
+
return self.api_client.response_deserialize(
|
|
697
|
+
response_data=response_data,
|
|
698
|
+
response_types_map=_response_types_map,
|
|
699
|
+
).data
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
@validate_call
|
|
703
|
+
def fetch_snapshot_name_availability_with_http_info(
|
|
704
|
+
self,
|
|
705
|
+
name: StrictStr,
|
|
706
|
+
_request_timeout: Union[
|
|
707
|
+
None,
|
|
708
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
709
|
+
Tuple[
|
|
710
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
711
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
712
|
+
]
|
|
713
|
+
] = None,
|
|
714
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
715
|
+
_content_type: Optional[StrictStr] = None,
|
|
716
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
717
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
718
|
+
) -> ApiResponse[NameAvailableModel]:
|
|
719
|
+
"""Fetch snapshot name availability
|
|
720
|
+
|
|
721
|
+
Check if a Snapshot name is available
|
|
722
|
+
|
|
723
|
+
:param name: (required)
|
|
724
|
+
:type name: str
|
|
725
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
726
|
+
number provided, it will be total request
|
|
727
|
+
timeout. It can also be a pair (tuple) of
|
|
728
|
+
(connection, read) timeouts.
|
|
729
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
730
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
731
|
+
request; this effectively ignores the
|
|
732
|
+
authentication in the spec for a single request.
|
|
733
|
+
:type _request_auth: dict, optional
|
|
734
|
+
:param _content_type: force content-type for the request.
|
|
735
|
+
:type _content_type: str, Optional
|
|
736
|
+
:param _headers: set to override the headers for a single
|
|
737
|
+
request; this effectively ignores the headers
|
|
738
|
+
in the spec for a single request.
|
|
739
|
+
:type _headers: dict, optional
|
|
740
|
+
:param _host_index: set to override the host_index for a single
|
|
741
|
+
request; this effectively ignores the host_index
|
|
742
|
+
in the spec for a single request.
|
|
743
|
+
:type _host_index: int, optional
|
|
744
|
+
:return: Returns the result object.
|
|
745
|
+
""" # noqa: E501
|
|
746
|
+
|
|
747
|
+
_param = self._fetch_snapshot_name_availability_serialize(
|
|
748
|
+
name=name,
|
|
749
|
+
_request_auth=_request_auth,
|
|
750
|
+
_content_type=_content_type,
|
|
751
|
+
_headers=_headers,
|
|
752
|
+
_host_index=_host_index
|
|
753
|
+
)
|
|
754
|
+
|
|
755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
756
|
+
'200': "NameAvailableModel",
|
|
757
|
+
'400': "ErrorResponseModel",
|
|
758
|
+
'401': "ErrorResponseModel",
|
|
759
|
+
'404': "ErrorResponseModel",
|
|
760
|
+
'500': None,
|
|
761
|
+
}
|
|
762
|
+
response_data = self.api_client.call_api(
|
|
763
|
+
*_param,
|
|
764
|
+
_request_timeout=_request_timeout
|
|
765
|
+
)
|
|
766
|
+
response_data.read()
|
|
767
|
+
return self.api_client.response_deserialize(
|
|
768
|
+
response_data=response_data,
|
|
769
|
+
response_types_map=_response_types_map,
|
|
770
|
+
)
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
@validate_call
|
|
774
|
+
def fetch_snapshot_name_availability_without_preload_content(
|
|
775
|
+
self,
|
|
776
|
+
name: StrictStr,
|
|
777
|
+
_request_timeout: Union[
|
|
778
|
+
None,
|
|
779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
780
|
+
Tuple[
|
|
781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
783
|
+
]
|
|
784
|
+
] = None,
|
|
785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
786
|
+
_content_type: Optional[StrictStr] = None,
|
|
787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
789
|
+
) -> RESTResponseType:
|
|
790
|
+
"""Fetch snapshot name availability
|
|
791
|
+
|
|
792
|
+
Check if a Snapshot name is available
|
|
793
|
+
|
|
794
|
+
:param name: (required)
|
|
795
|
+
:type name: str
|
|
796
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
797
|
+
number provided, it will be total request
|
|
798
|
+
timeout. It can also be a pair (tuple) of
|
|
799
|
+
(connection, read) timeouts.
|
|
800
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
801
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
802
|
+
request; this effectively ignores the
|
|
803
|
+
authentication in the spec for a single request.
|
|
804
|
+
:type _request_auth: dict, optional
|
|
805
|
+
:param _content_type: force content-type for the request.
|
|
806
|
+
:type _content_type: str, Optional
|
|
807
|
+
:param _headers: set to override the headers for a single
|
|
808
|
+
request; this effectively ignores the headers
|
|
809
|
+
in the spec for a single request.
|
|
810
|
+
:type _headers: dict, optional
|
|
811
|
+
:param _host_index: set to override the host_index for a single
|
|
812
|
+
request; this effectively ignores the host_index
|
|
813
|
+
in the spec for a single request.
|
|
814
|
+
:type _host_index: int, optional
|
|
815
|
+
:return: Returns the result object.
|
|
816
|
+
""" # noqa: E501
|
|
817
|
+
|
|
818
|
+
_param = self._fetch_snapshot_name_availability_serialize(
|
|
819
|
+
name=name,
|
|
820
|
+
_request_auth=_request_auth,
|
|
821
|
+
_content_type=_content_type,
|
|
822
|
+
_headers=_headers,
|
|
823
|
+
_host_index=_host_index
|
|
824
|
+
)
|
|
825
|
+
|
|
826
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
827
|
+
'200': "NameAvailableModel",
|
|
828
|
+
'400': "ErrorResponseModel",
|
|
829
|
+
'401': "ErrorResponseModel",
|
|
830
|
+
'404': "ErrorResponseModel",
|
|
831
|
+
'500': None,
|
|
832
|
+
}
|
|
833
|
+
response_data = self.api_client.call_api(
|
|
834
|
+
*_param,
|
|
835
|
+
_request_timeout=_request_timeout
|
|
836
|
+
)
|
|
837
|
+
return response_data.response
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
def _fetch_snapshot_name_availability_serialize(
|
|
841
|
+
self,
|
|
842
|
+
name,
|
|
843
|
+
_request_auth,
|
|
844
|
+
_content_type,
|
|
845
|
+
_headers,
|
|
846
|
+
_host_index,
|
|
847
|
+
) -> RequestSerialized:
|
|
848
|
+
|
|
849
|
+
_host = None
|
|
850
|
+
|
|
851
|
+
_collection_formats: Dict[str, str] = {
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
_path_params: Dict[str, str] = {}
|
|
855
|
+
_query_params: List[Tuple[str, str]] = []
|
|
856
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
857
|
+
_form_params: List[Tuple[str, str]] = []
|
|
858
|
+
_files: Dict[
|
|
859
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
860
|
+
] = {}
|
|
861
|
+
_body_params: Optional[bytes] = None
|
|
862
|
+
|
|
863
|
+
# process the path parameters
|
|
864
|
+
if name is not None:
|
|
865
|
+
_path_params['name'] = name
|
|
866
|
+
# process the query parameters
|
|
867
|
+
# process the header parameters
|
|
868
|
+
# process the form parameters
|
|
869
|
+
# process the body parameter
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
# set the HTTP header `Accept`
|
|
873
|
+
if 'Accept' not in _header_params:
|
|
874
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
875
|
+
[
|
|
876
|
+
'application/json'
|
|
877
|
+
]
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
# authentication setting
|
|
882
|
+
_auth_settings: List[str] = [
|
|
883
|
+
'apiKey',
|
|
884
|
+
'accessToken'
|
|
885
|
+
]
|
|
886
|
+
|
|
887
|
+
return self.api_client.param_serialize(
|
|
888
|
+
method='GET',
|
|
889
|
+
resource_path='/core/snapshots/name-availability/{name}',
|
|
890
|
+
path_params=_path_params,
|
|
891
|
+
query_params=_query_params,
|
|
892
|
+
header_params=_header_params,
|
|
893
|
+
body=_body_params,
|
|
894
|
+
post_params=_form_params,
|
|
895
|
+
files=_files,
|
|
896
|
+
auth_settings=_auth_settings,
|
|
897
|
+
collection_formats=_collection_formats,
|
|
898
|
+
_host=_host,
|
|
899
|
+
_request_auth=_request_auth
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
@validate_call
|
|
906
|
+
def restore_a_snapshot(
|
|
907
|
+
self,
|
|
908
|
+
id: StrictInt,
|
|
909
|
+
payload: SnapshotRestoreRequest,
|
|
910
|
+
_request_timeout: Union[
|
|
911
|
+
None,
|
|
912
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
913
|
+
Tuple[
|
|
914
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
915
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
916
|
+
]
|
|
917
|
+
] = None,
|
|
918
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
919
|
+
_content_type: Optional[StrictStr] = None,
|
|
920
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
921
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
922
|
+
) -> Instance:
|
|
923
|
+
"""Restore a snapshot
|
|
924
|
+
|
|
925
|
+
Restore a snapshot.
|
|
926
|
+
|
|
927
|
+
:param id: (required)
|
|
928
|
+
:type id: int
|
|
929
|
+
:param payload: (required)
|
|
930
|
+
:type payload: SnapshotRestoreRequest
|
|
931
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
932
|
+
number provided, it will be total request
|
|
933
|
+
timeout. It can also be a pair (tuple) of
|
|
934
|
+
(connection, read) timeouts.
|
|
935
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
936
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
937
|
+
request; this effectively ignores the
|
|
938
|
+
authentication in the spec for a single request.
|
|
939
|
+
:type _request_auth: dict, optional
|
|
940
|
+
:param _content_type: force content-type for the request.
|
|
941
|
+
:type _content_type: str, Optional
|
|
942
|
+
:param _headers: set to override the headers for a single
|
|
943
|
+
request; this effectively ignores the headers
|
|
944
|
+
in the spec for a single request.
|
|
945
|
+
:type _headers: dict, optional
|
|
946
|
+
:param _host_index: set to override the host_index for a single
|
|
947
|
+
request; this effectively ignores the host_index
|
|
948
|
+
in the spec for a single request.
|
|
949
|
+
:type _host_index: int, optional
|
|
950
|
+
:return: Returns the result object.
|
|
951
|
+
""" # noqa: E501
|
|
952
|
+
|
|
953
|
+
_param = self._restore_a_snapshot_serialize(
|
|
954
|
+
id=id,
|
|
955
|
+
payload=payload,
|
|
956
|
+
_request_auth=_request_auth,
|
|
957
|
+
_content_type=_content_type,
|
|
958
|
+
_headers=_headers,
|
|
959
|
+
_host_index=_host_index
|
|
960
|
+
)
|
|
961
|
+
|
|
962
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
963
|
+
'200': "Instance",
|
|
964
|
+
'400': "ErrorResponseModel",
|
|
965
|
+
'401': "ErrorResponseModel",
|
|
966
|
+
'500': None,
|
|
967
|
+
}
|
|
968
|
+
response_data = self.api_client.call_api(
|
|
969
|
+
*_param,
|
|
970
|
+
_request_timeout=_request_timeout
|
|
971
|
+
)
|
|
972
|
+
response_data.read()
|
|
973
|
+
return self.api_client.response_deserialize(
|
|
974
|
+
response_data=response_data,
|
|
975
|
+
response_types_map=_response_types_map,
|
|
976
|
+
).data
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
@validate_call
|
|
980
|
+
def restore_a_snapshot_with_http_info(
|
|
981
|
+
self,
|
|
982
|
+
id: StrictInt,
|
|
983
|
+
payload: SnapshotRestoreRequest,
|
|
984
|
+
_request_timeout: Union[
|
|
985
|
+
None,
|
|
986
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
987
|
+
Tuple[
|
|
988
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
989
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
990
|
+
]
|
|
991
|
+
] = None,
|
|
992
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
993
|
+
_content_type: Optional[StrictStr] = None,
|
|
994
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
995
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
996
|
+
) -> ApiResponse[Instance]:
|
|
997
|
+
"""Restore a snapshot
|
|
998
|
+
|
|
999
|
+
Restore a snapshot.
|
|
1000
|
+
|
|
1001
|
+
:param id: (required)
|
|
1002
|
+
:type id: int
|
|
1003
|
+
:param payload: (required)
|
|
1004
|
+
:type payload: SnapshotRestoreRequest
|
|
1005
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1006
|
+
number provided, it will be total request
|
|
1007
|
+
timeout. It can also be a pair (tuple) of
|
|
1008
|
+
(connection, read) timeouts.
|
|
1009
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1010
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1011
|
+
request; this effectively ignores the
|
|
1012
|
+
authentication in the spec for a single request.
|
|
1013
|
+
:type _request_auth: dict, optional
|
|
1014
|
+
:param _content_type: force content-type for the request.
|
|
1015
|
+
:type _content_type: str, Optional
|
|
1016
|
+
:param _headers: set to override the headers for a single
|
|
1017
|
+
request; this effectively ignores the headers
|
|
1018
|
+
in the spec for a single request.
|
|
1019
|
+
:type _headers: dict, optional
|
|
1020
|
+
:param _host_index: set to override the host_index for a single
|
|
1021
|
+
request; this effectively ignores the host_index
|
|
1022
|
+
in the spec for a single request.
|
|
1023
|
+
:type _host_index: int, optional
|
|
1024
|
+
:return: Returns the result object.
|
|
1025
|
+
""" # noqa: E501
|
|
1026
|
+
|
|
1027
|
+
_param = self._restore_a_snapshot_serialize(
|
|
1028
|
+
id=id,
|
|
1029
|
+
payload=payload,
|
|
1030
|
+
_request_auth=_request_auth,
|
|
1031
|
+
_content_type=_content_type,
|
|
1032
|
+
_headers=_headers,
|
|
1033
|
+
_host_index=_host_index
|
|
1034
|
+
)
|
|
1035
|
+
|
|
1036
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1037
|
+
'200': "Instance",
|
|
1038
|
+
'400': "ErrorResponseModel",
|
|
1039
|
+
'401': "ErrorResponseModel",
|
|
1040
|
+
'500': None,
|
|
1041
|
+
}
|
|
1042
|
+
response_data = self.api_client.call_api(
|
|
1043
|
+
*_param,
|
|
1044
|
+
_request_timeout=_request_timeout
|
|
1045
|
+
)
|
|
1046
|
+
response_data.read()
|
|
1047
|
+
return self.api_client.response_deserialize(
|
|
1048
|
+
response_data=response_data,
|
|
1049
|
+
response_types_map=_response_types_map,
|
|
1050
|
+
)
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
@validate_call
|
|
1054
|
+
def restore_a_snapshot_without_preload_content(
|
|
1055
|
+
self,
|
|
1056
|
+
id: StrictInt,
|
|
1057
|
+
payload: SnapshotRestoreRequest,
|
|
1058
|
+
_request_timeout: Union[
|
|
1059
|
+
None,
|
|
1060
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1061
|
+
Tuple[
|
|
1062
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1063
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1064
|
+
]
|
|
1065
|
+
] = None,
|
|
1066
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1067
|
+
_content_type: Optional[StrictStr] = None,
|
|
1068
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1069
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1070
|
+
) -> RESTResponseType:
|
|
1071
|
+
"""Restore a snapshot
|
|
1072
|
+
|
|
1073
|
+
Restore a snapshot.
|
|
1074
|
+
|
|
1075
|
+
:param id: (required)
|
|
1076
|
+
:type id: int
|
|
1077
|
+
:param payload: (required)
|
|
1078
|
+
:type payload: SnapshotRestoreRequest
|
|
1079
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1080
|
+
number provided, it will be total request
|
|
1081
|
+
timeout. It can also be a pair (tuple) of
|
|
1082
|
+
(connection, read) timeouts.
|
|
1083
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1084
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1085
|
+
request; this effectively ignores the
|
|
1086
|
+
authentication in the spec for a single request.
|
|
1087
|
+
:type _request_auth: dict, optional
|
|
1088
|
+
:param _content_type: force content-type for the request.
|
|
1089
|
+
:type _content_type: str, Optional
|
|
1090
|
+
:param _headers: set to override the headers for a single
|
|
1091
|
+
request; this effectively ignores the headers
|
|
1092
|
+
in the spec for a single request.
|
|
1093
|
+
:type _headers: dict, optional
|
|
1094
|
+
:param _host_index: set to override the host_index for a single
|
|
1095
|
+
request; this effectively ignores the host_index
|
|
1096
|
+
in the spec for a single request.
|
|
1097
|
+
:type _host_index: int, optional
|
|
1098
|
+
:return: Returns the result object.
|
|
1099
|
+
""" # noqa: E501
|
|
1100
|
+
|
|
1101
|
+
_param = self._restore_a_snapshot_serialize(
|
|
1102
|
+
id=id,
|
|
1103
|
+
payload=payload,
|
|
1104
|
+
_request_auth=_request_auth,
|
|
1105
|
+
_content_type=_content_type,
|
|
1106
|
+
_headers=_headers,
|
|
1107
|
+
_host_index=_host_index
|
|
1108
|
+
)
|
|
1109
|
+
|
|
1110
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1111
|
+
'200': "Instance",
|
|
1112
|
+
'400': "ErrorResponseModel",
|
|
1113
|
+
'401': "ErrorResponseModel",
|
|
1114
|
+
'500': None,
|
|
1115
|
+
}
|
|
1116
|
+
response_data = self.api_client.call_api(
|
|
1117
|
+
*_param,
|
|
1118
|
+
_request_timeout=_request_timeout
|
|
1119
|
+
)
|
|
1120
|
+
return response_data.response
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
def _restore_a_snapshot_serialize(
|
|
1124
|
+
self,
|
|
1125
|
+
id,
|
|
1126
|
+
payload,
|
|
1127
|
+
_request_auth,
|
|
1128
|
+
_content_type,
|
|
1129
|
+
_headers,
|
|
1130
|
+
_host_index,
|
|
1131
|
+
) -> RequestSerialized:
|
|
1132
|
+
|
|
1133
|
+
_host = None
|
|
1134
|
+
|
|
1135
|
+
_collection_formats: Dict[str, str] = {
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
_path_params: Dict[str, str] = {}
|
|
1139
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1140
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1141
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1142
|
+
_files: Dict[
|
|
1143
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1144
|
+
] = {}
|
|
1145
|
+
_body_params: Optional[bytes] = None
|
|
1146
|
+
|
|
1147
|
+
# process the path parameters
|
|
1148
|
+
if id is not None:
|
|
1149
|
+
_path_params['id'] = id
|
|
1150
|
+
# process the query parameters
|
|
1151
|
+
# process the header parameters
|
|
1152
|
+
# process the form parameters
|
|
1153
|
+
# process the body parameter
|
|
1154
|
+
if payload is not None:
|
|
1155
|
+
_body_params = payload
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
# set the HTTP header `Accept`
|
|
1159
|
+
if 'Accept' not in _header_params:
|
|
1160
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1161
|
+
[
|
|
1162
|
+
'application/json'
|
|
1163
|
+
]
|
|
1164
|
+
)
|
|
1165
|
+
|
|
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
|
+
|
|
1180
|
+
# authentication setting
|
|
1181
|
+
_auth_settings: List[str] = [
|
|
1182
|
+
'apiKey',
|
|
1183
|
+
'accessToken'
|
|
1184
|
+
]
|
|
1185
|
+
|
|
1186
|
+
return self.api_client.param_serialize(
|
|
1187
|
+
method='POST',
|
|
1188
|
+
resource_path='/core/snapshots/{id}/restore',
|
|
1189
|
+
path_params=_path_params,
|
|
1190
|
+
query_params=_query_params,
|
|
1191
|
+
header_params=_header_params,
|
|
1192
|
+
body=_body_params,
|
|
1193
|
+
post_params=_form_params,
|
|
1194
|
+
files=_files,
|
|
1195
|
+
auth_settings=_auth_settings,
|
|
1196
|
+
collection_formats=_collection_formats,
|
|
1197
|
+
_host=_host,
|
|
1198
|
+
_request_auth=_request_auth
|
|
1199
|
+
)
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
@validate_call
|
|
1205
|
+
def retrieve_a_snapshot(
|
|
1206
|
+
self,
|
|
1207
|
+
id: StrictInt,
|
|
1208
|
+
_request_timeout: Union[
|
|
1209
|
+
None,
|
|
1210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1211
|
+
Tuple[
|
|
1212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1213
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1214
|
+
]
|
|
1215
|
+
] = None,
|
|
1216
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1217
|
+
_content_type: Optional[StrictStr] = None,
|
|
1218
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1219
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1220
|
+
) -> SnapshotRetrieve:
|
|
1221
|
+
"""Retrieve a snapshot
|
|
1222
|
+
|
|
1223
|
+
Retrieve a snapshot.
|
|
1224
|
+
|
|
1225
|
+
:param id: (required)
|
|
1226
|
+
:type id: int
|
|
1227
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1228
|
+
number provided, it will be total request
|
|
1229
|
+
timeout. It can also be a pair (tuple) of
|
|
1230
|
+
(connection, read) timeouts.
|
|
1231
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1232
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1233
|
+
request; this effectively ignores the
|
|
1234
|
+
authentication in the spec for a single request.
|
|
1235
|
+
:type _request_auth: dict, optional
|
|
1236
|
+
:param _content_type: force content-type for the request.
|
|
1237
|
+
:type _content_type: str, Optional
|
|
1238
|
+
:param _headers: set to override the headers for a single
|
|
1239
|
+
request; this effectively ignores the headers
|
|
1240
|
+
in the spec for a single request.
|
|
1241
|
+
:type _headers: dict, optional
|
|
1242
|
+
:param _host_index: set to override the host_index for a single
|
|
1243
|
+
request; this effectively ignores the host_index
|
|
1244
|
+
in the spec for a single request.
|
|
1245
|
+
:type _host_index: int, optional
|
|
1246
|
+
:return: Returns the result object.
|
|
1247
|
+
""" # noqa: E501
|
|
1248
|
+
|
|
1249
|
+
_param = self._retrieve_a_snapshot_serialize(
|
|
1250
|
+
id=id,
|
|
1251
|
+
_request_auth=_request_auth,
|
|
1252
|
+
_content_type=_content_type,
|
|
1253
|
+
_headers=_headers,
|
|
1254
|
+
_host_index=_host_index
|
|
1255
|
+
)
|
|
1256
|
+
|
|
1257
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1258
|
+
'200': "SnapshotRetrieve",
|
|
1259
|
+
'400': "ErrorResponseModel",
|
|
1260
|
+
'401': "ErrorResponseModel",
|
|
1261
|
+
'500': None,
|
|
1262
|
+
}
|
|
1263
|
+
response_data = self.api_client.call_api(
|
|
1264
|
+
*_param,
|
|
1265
|
+
_request_timeout=_request_timeout
|
|
1266
|
+
)
|
|
1267
|
+
response_data.read()
|
|
1268
|
+
return self.api_client.response_deserialize(
|
|
1269
|
+
response_data=response_data,
|
|
1270
|
+
response_types_map=_response_types_map,
|
|
1271
|
+
).data
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
@validate_call
|
|
1275
|
+
def retrieve_a_snapshot_with_http_info(
|
|
1276
|
+
self,
|
|
1277
|
+
id: StrictInt,
|
|
1278
|
+
_request_timeout: Union[
|
|
1279
|
+
None,
|
|
1280
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1281
|
+
Tuple[
|
|
1282
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1283
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1284
|
+
]
|
|
1285
|
+
] = None,
|
|
1286
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1287
|
+
_content_type: Optional[StrictStr] = None,
|
|
1288
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1290
|
+
) -> ApiResponse[SnapshotRetrieve]:
|
|
1291
|
+
"""Retrieve a snapshot
|
|
1292
|
+
|
|
1293
|
+
Retrieve a snapshot.
|
|
1294
|
+
|
|
1295
|
+
:param id: (required)
|
|
1296
|
+
:type id: int
|
|
1297
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1298
|
+
number provided, it will be total request
|
|
1299
|
+
timeout. It can also be a pair (tuple) of
|
|
1300
|
+
(connection, read) timeouts.
|
|
1301
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1302
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1303
|
+
request; this effectively ignores the
|
|
1304
|
+
authentication in the spec for a single request.
|
|
1305
|
+
:type _request_auth: dict, optional
|
|
1306
|
+
:param _content_type: force content-type for the request.
|
|
1307
|
+
:type _content_type: str, Optional
|
|
1308
|
+
:param _headers: set to override the headers for a single
|
|
1309
|
+
request; this effectively ignores the headers
|
|
1310
|
+
in the spec for a single request.
|
|
1311
|
+
:type _headers: dict, optional
|
|
1312
|
+
:param _host_index: set to override the host_index for a single
|
|
1313
|
+
request; this effectively ignores the host_index
|
|
1314
|
+
in the spec for a single request.
|
|
1315
|
+
:type _host_index: int, optional
|
|
1316
|
+
:return: Returns the result object.
|
|
1317
|
+
""" # noqa: E501
|
|
1318
|
+
|
|
1319
|
+
_param = self._retrieve_a_snapshot_serialize(
|
|
1320
|
+
id=id,
|
|
1321
|
+
_request_auth=_request_auth,
|
|
1322
|
+
_content_type=_content_type,
|
|
1323
|
+
_headers=_headers,
|
|
1324
|
+
_host_index=_host_index
|
|
1325
|
+
)
|
|
1326
|
+
|
|
1327
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1328
|
+
'200': "SnapshotRetrieve",
|
|
1329
|
+
'400': "ErrorResponseModel",
|
|
1330
|
+
'401': "ErrorResponseModel",
|
|
1331
|
+
'500': None,
|
|
1332
|
+
}
|
|
1333
|
+
response_data = self.api_client.call_api(
|
|
1334
|
+
*_param,
|
|
1335
|
+
_request_timeout=_request_timeout
|
|
1336
|
+
)
|
|
1337
|
+
response_data.read()
|
|
1338
|
+
return self.api_client.response_deserialize(
|
|
1339
|
+
response_data=response_data,
|
|
1340
|
+
response_types_map=_response_types_map,
|
|
1341
|
+
)
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
@validate_call
|
|
1345
|
+
def retrieve_a_snapshot_without_preload_content(
|
|
1346
|
+
self,
|
|
1347
|
+
id: StrictInt,
|
|
1348
|
+
_request_timeout: Union[
|
|
1349
|
+
None,
|
|
1350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1351
|
+
Tuple[
|
|
1352
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1353
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1354
|
+
]
|
|
1355
|
+
] = None,
|
|
1356
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1357
|
+
_content_type: Optional[StrictStr] = None,
|
|
1358
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1359
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1360
|
+
) -> RESTResponseType:
|
|
1361
|
+
"""Retrieve a snapshot
|
|
1362
|
+
|
|
1363
|
+
Retrieve a snapshot.
|
|
1364
|
+
|
|
1365
|
+
:param id: (required)
|
|
1366
|
+
:type id: int
|
|
1367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1368
|
+
number provided, it will be total request
|
|
1369
|
+
timeout. It can also be a pair (tuple) of
|
|
1370
|
+
(connection, read) timeouts.
|
|
1371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1373
|
+
request; this effectively ignores the
|
|
1374
|
+
authentication in the spec for a single request.
|
|
1375
|
+
:type _request_auth: dict, optional
|
|
1376
|
+
:param _content_type: force content-type for the request.
|
|
1377
|
+
:type _content_type: str, Optional
|
|
1378
|
+
:param _headers: set to override the headers for a single
|
|
1379
|
+
request; this effectively ignores the headers
|
|
1380
|
+
in the spec for a single request.
|
|
1381
|
+
:type _headers: dict, optional
|
|
1382
|
+
:param _host_index: set to override the host_index for a single
|
|
1383
|
+
request; this effectively ignores the host_index
|
|
1384
|
+
in the spec for a single request.
|
|
1385
|
+
:type _host_index: int, optional
|
|
1386
|
+
:return: Returns the result object.
|
|
1387
|
+
""" # noqa: E501
|
|
1388
|
+
|
|
1389
|
+
_param = self._retrieve_a_snapshot_serialize(
|
|
1390
|
+
id=id,
|
|
1391
|
+
_request_auth=_request_auth,
|
|
1392
|
+
_content_type=_content_type,
|
|
1393
|
+
_headers=_headers,
|
|
1394
|
+
_host_index=_host_index
|
|
1395
|
+
)
|
|
1396
|
+
|
|
1397
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1398
|
+
'200': "SnapshotRetrieve",
|
|
1399
|
+
'400': "ErrorResponseModel",
|
|
1400
|
+
'401': "ErrorResponseModel",
|
|
1401
|
+
'500': None,
|
|
1402
|
+
}
|
|
1403
|
+
response_data = self.api_client.call_api(
|
|
1404
|
+
*_param,
|
|
1405
|
+
_request_timeout=_request_timeout
|
|
1406
|
+
)
|
|
1407
|
+
return response_data.response
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
def _retrieve_a_snapshot_serialize(
|
|
1411
|
+
self,
|
|
1412
|
+
id,
|
|
1413
|
+
_request_auth,
|
|
1414
|
+
_content_type,
|
|
1415
|
+
_headers,
|
|
1416
|
+
_host_index,
|
|
1417
|
+
) -> RequestSerialized:
|
|
1418
|
+
|
|
1419
|
+
_host = None
|
|
1420
|
+
|
|
1421
|
+
_collection_formats: Dict[str, str] = {
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
_path_params: Dict[str, str] = {}
|
|
1425
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1426
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1427
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1428
|
+
_files: Dict[
|
|
1429
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1430
|
+
] = {}
|
|
1431
|
+
_body_params: Optional[bytes] = None
|
|
1432
|
+
|
|
1433
|
+
# process the path parameters
|
|
1434
|
+
if id is not None:
|
|
1435
|
+
_path_params['id'] = id
|
|
1436
|
+
# process the query parameters
|
|
1437
|
+
# process the header parameters
|
|
1438
|
+
# process the form parameters
|
|
1439
|
+
# process the body parameter
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
# set the HTTP header `Accept`
|
|
1443
|
+
if 'Accept' not in _header_params:
|
|
1444
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1445
|
+
[
|
|
1446
|
+
'application/json'
|
|
1447
|
+
]
|
|
1448
|
+
)
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
# authentication setting
|
|
1452
|
+
_auth_settings: List[str] = [
|
|
1453
|
+
'apiKey',
|
|
1454
|
+
'accessToken'
|
|
1455
|
+
]
|
|
1456
|
+
|
|
1457
|
+
return self.api_client.param_serialize(
|
|
1458
|
+
method='GET',
|
|
1459
|
+
resource_path='/core/snapshots/{id}',
|
|
1460
|
+
path_params=_path_params,
|
|
1461
|
+
query_params=_query_params,
|
|
1462
|
+
header_params=_header_params,
|
|
1463
|
+
body=_body_params,
|
|
1464
|
+
post_params=_form_params,
|
|
1465
|
+
files=_files,
|
|
1466
|
+
auth_settings=_auth_settings,
|
|
1467
|
+
collection_formats=_collection_formats,
|
|
1468
|
+
_host=_host,
|
|
1469
|
+
_request_auth=_request_auth
|
|
1470
|
+
)
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
@validate_call
|
|
1476
|
+
def retrieve_list_of_snapshots_with_pagination(
|
|
1477
|
+
self,
|
|
1478
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1479
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1480
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1481
|
+
_request_timeout: Union[
|
|
1482
|
+
None,
|
|
1483
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1484
|
+
Tuple[
|
|
1485
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1486
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1487
|
+
]
|
|
1488
|
+
] = None,
|
|
1489
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1490
|
+
_content_type: Optional[StrictStr] = None,
|
|
1491
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1492
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1493
|
+
) -> Snapshots:
|
|
1494
|
+
"""Retrieve list of snapshots with pagination
|
|
1495
|
+
|
|
1496
|
+
Retrieves a list of snapshot, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1497
|
+
|
|
1498
|
+
:param page: Page Number
|
|
1499
|
+
:type page: str
|
|
1500
|
+
:param page_size: Data Per Page
|
|
1501
|
+
:type page_size: str
|
|
1502
|
+
:param search: Search By Snapshot ID or Name
|
|
1503
|
+
:type search: str
|
|
1504
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1505
|
+
number provided, it will be total request
|
|
1506
|
+
timeout. It can also be a pair (tuple) of
|
|
1507
|
+
(connection, read) timeouts.
|
|
1508
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1509
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1510
|
+
request; this effectively ignores the
|
|
1511
|
+
authentication in the spec for a single request.
|
|
1512
|
+
:type _request_auth: dict, optional
|
|
1513
|
+
:param _content_type: force content-type for the request.
|
|
1514
|
+
:type _content_type: str, Optional
|
|
1515
|
+
:param _headers: set to override the headers for a single
|
|
1516
|
+
request; this effectively ignores the headers
|
|
1517
|
+
in the spec for a single request.
|
|
1518
|
+
:type _headers: dict, optional
|
|
1519
|
+
:param _host_index: set to override the host_index for a single
|
|
1520
|
+
request; this effectively ignores the host_index
|
|
1521
|
+
in the spec for a single request.
|
|
1522
|
+
:type _host_index: int, optional
|
|
1523
|
+
:return: Returns the result object.
|
|
1524
|
+
""" # noqa: E501
|
|
1525
|
+
|
|
1526
|
+
_param = self._retrieve_list_of_snapshots_with_pagination_serialize(
|
|
1527
|
+
page=page,
|
|
1528
|
+
page_size=page_size,
|
|
1529
|
+
search=search,
|
|
1530
|
+
_request_auth=_request_auth,
|
|
1531
|
+
_content_type=_content_type,
|
|
1532
|
+
_headers=_headers,
|
|
1533
|
+
_host_index=_host_index
|
|
1534
|
+
)
|
|
1535
|
+
|
|
1536
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1537
|
+
'200': "Snapshots",
|
|
1538
|
+
'400': "ErrorResponseModel",
|
|
1539
|
+
'401': "ErrorResponseModel",
|
|
1540
|
+
'500': None,
|
|
1541
|
+
}
|
|
1542
|
+
response_data = self.api_client.call_api(
|
|
1543
|
+
*_param,
|
|
1544
|
+
_request_timeout=_request_timeout
|
|
1545
|
+
)
|
|
1546
|
+
response_data.read()
|
|
1547
|
+
return self.api_client.response_deserialize(
|
|
1548
|
+
response_data=response_data,
|
|
1549
|
+
response_types_map=_response_types_map,
|
|
1550
|
+
).data
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
@validate_call
|
|
1554
|
+
def retrieve_list_of_snapshots_with_pagination_with_http_info(
|
|
1555
|
+
self,
|
|
1556
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1557
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1558
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1559
|
+
_request_timeout: Union[
|
|
1560
|
+
None,
|
|
1561
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1562
|
+
Tuple[
|
|
1563
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1564
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1565
|
+
]
|
|
1566
|
+
] = None,
|
|
1567
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1568
|
+
_content_type: Optional[StrictStr] = None,
|
|
1569
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1570
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1571
|
+
) -> ApiResponse[Snapshots]:
|
|
1572
|
+
"""Retrieve list of snapshots with pagination
|
|
1573
|
+
|
|
1574
|
+
Retrieves a list of snapshot, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1575
|
+
|
|
1576
|
+
:param page: Page Number
|
|
1577
|
+
:type page: str
|
|
1578
|
+
:param page_size: Data Per Page
|
|
1579
|
+
:type page_size: str
|
|
1580
|
+
:param search: Search By Snapshot ID or Name
|
|
1581
|
+
:type search: str
|
|
1582
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1583
|
+
number provided, it will be total request
|
|
1584
|
+
timeout. It can also be a pair (tuple) of
|
|
1585
|
+
(connection, read) timeouts.
|
|
1586
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1587
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1588
|
+
request; this effectively ignores the
|
|
1589
|
+
authentication in the spec for a single request.
|
|
1590
|
+
:type _request_auth: dict, optional
|
|
1591
|
+
:param _content_type: force content-type for the request.
|
|
1592
|
+
:type _content_type: str, Optional
|
|
1593
|
+
:param _headers: set to override the headers for a single
|
|
1594
|
+
request; this effectively ignores the headers
|
|
1595
|
+
in the spec for a single request.
|
|
1596
|
+
:type _headers: dict, optional
|
|
1597
|
+
:param _host_index: set to override the host_index for a single
|
|
1598
|
+
request; this effectively ignores the host_index
|
|
1599
|
+
in the spec for a single request.
|
|
1600
|
+
:type _host_index: int, optional
|
|
1601
|
+
:return: Returns the result object.
|
|
1602
|
+
""" # noqa: E501
|
|
1603
|
+
|
|
1604
|
+
_param = self._retrieve_list_of_snapshots_with_pagination_serialize(
|
|
1605
|
+
page=page,
|
|
1606
|
+
page_size=page_size,
|
|
1607
|
+
search=search,
|
|
1608
|
+
_request_auth=_request_auth,
|
|
1609
|
+
_content_type=_content_type,
|
|
1610
|
+
_headers=_headers,
|
|
1611
|
+
_host_index=_host_index
|
|
1612
|
+
)
|
|
1613
|
+
|
|
1614
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1615
|
+
'200': "Snapshots",
|
|
1616
|
+
'400': "ErrorResponseModel",
|
|
1617
|
+
'401': "ErrorResponseModel",
|
|
1618
|
+
'500': None,
|
|
1619
|
+
}
|
|
1620
|
+
response_data = self.api_client.call_api(
|
|
1621
|
+
*_param,
|
|
1622
|
+
_request_timeout=_request_timeout
|
|
1623
|
+
)
|
|
1624
|
+
response_data.read()
|
|
1625
|
+
return self.api_client.response_deserialize(
|
|
1626
|
+
response_data=response_data,
|
|
1627
|
+
response_types_map=_response_types_map,
|
|
1628
|
+
)
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
@validate_call
|
|
1632
|
+
def retrieve_list_of_snapshots_with_pagination_without_preload_content(
|
|
1633
|
+
self,
|
|
1634
|
+
page: Annotated[Optional[StrictStr], Field(description="Page Number")] = None,
|
|
1635
|
+
page_size: Annotated[Optional[StrictStr], Field(description="Data Per Page")] = None,
|
|
1636
|
+
search: Annotated[Optional[StrictStr], Field(description="Search By Snapshot ID or Name")] = None,
|
|
1637
|
+
_request_timeout: Union[
|
|
1638
|
+
None,
|
|
1639
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1640
|
+
Tuple[
|
|
1641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1642
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1643
|
+
]
|
|
1644
|
+
] = None,
|
|
1645
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1646
|
+
_content_type: Optional[StrictStr] = None,
|
|
1647
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1648
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1649
|
+
) -> RESTResponseType:
|
|
1650
|
+
"""Retrieve list of snapshots with pagination
|
|
1651
|
+
|
|
1652
|
+
Retrieves a list of snapshot, providing details such as snapshot name, timestamp, VM ID, and other relevant information.
|
|
1653
|
+
|
|
1654
|
+
:param page: Page Number
|
|
1655
|
+
:type page: str
|
|
1656
|
+
:param page_size: Data Per Page
|
|
1657
|
+
:type page_size: str
|
|
1658
|
+
:param search: Search By Snapshot ID or Name
|
|
1659
|
+
:type search: str
|
|
1660
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1661
|
+
number provided, it will be total request
|
|
1662
|
+
timeout. It can also be a pair (tuple) of
|
|
1663
|
+
(connection, read) timeouts.
|
|
1664
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1665
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1666
|
+
request; this effectively ignores the
|
|
1667
|
+
authentication in the spec for a single request.
|
|
1668
|
+
:type _request_auth: dict, optional
|
|
1669
|
+
:param _content_type: force content-type for the request.
|
|
1670
|
+
:type _content_type: str, Optional
|
|
1671
|
+
:param _headers: set to override the headers for a single
|
|
1672
|
+
request; this effectively ignores the headers
|
|
1673
|
+
in the spec for a single request.
|
|
1674
|
+
:type _headers: dict, optional
|
|
1675
|
+
:param _host_index: set to override the host_index for a single
|
|
1676
|
+
request; this effectively ignores the host_index
|
|
1677
|
+
in the spec for a single request.
|
|
1678
|
+
:type _host_index: int, optional
|
|
1679
|
+
:return: Returns the result object.
|
|
1680
|
+
""" # noqa: E501
|
|
1681
|
+
|
|
1682
|
+
_param = self._retrieve_list_of_snapshots_with_pagination_serialize(
|
|
1683
|
+
page=page,
|
|
1684
|
+
page_size=page_size,
|
|
1685
|
+
search=search,
|
|
1686
|
+
_request_auth=_request_auth,
|
|
1687
|
+
_content_type=_content_type,
|
|
1688
|
+
_headers=_headers,
|
|
1689
|
+
_host_index=_host_index
|
|
1690
|
+
)
|
|
1691
|
+
|
|
1692
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1693
|
+
'200': "Snapshots",
|
|
1694
|
+
'400': "ErrorResponseModel",
|
|
1695
|
+
'401': "ErrorResponseModel",
|
|
1696
|
+
'500': None,
|
|
1697
|
+
}
|
|
1698
|
+
response_data = self.api_client.call_api(
|
|
1699
|
+
*_param,
|
|
1700
|
+
_request_timeout=_request_timeout
|
|
1701
|
+
)
|
|
1702
|
+
return response_data.response
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
def _retrieve_list_of_snapshots_with_pagination_serialize(
|
|
1706
|
+
self,
|
|
1707
|
+
page,
|
|
1708
|
+
page_size,
|
|
1709
|
+
search,
|
|
1710
|
+
_request_auth,
|
|
1711
|
+
_content_type,
|
|
1712
|
+
_headers,
|
|
1713
|
+
_host_index,
|
|
1714
|
+
) -> RequestSerialized:
|
|
1715
|
+
|
|
1716
|
+
_host = None
|
|
1717
|
+
|
|
1718
|
+
_collection_formats: Dict[str, str] = {
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
_path_params: Dict[str, str] = {}
|
|
1722
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1723
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1724
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1725
|
+
_files: Dict[
|
|
1726
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1727
|
+
] = {}
|
|
1728
|
+
_body_params: Optional[bytes] = None
|
|
1729
|
+
|
|
1730
|
+
# process the path parameters
|
|
1731
|
+
# 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
|
+
# process the header parameters
|
|
1745
|
+
# process the form parameters
|
|
1746
|
+
# process the body parameter
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
# set the HTTP header `Accept`
|
|
1750
|
+
if 'Accept' not in _header_params:
|
|
1751
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1752
|
+
[
|
|
1753
|
+
'application/json'
|
|
1754
|
+
]
|
|
1755
|
+
)
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
# authentication setting
|
|
1759
|
+
_auth_settings: List[str] = [
|
|
1760
|
+
'apiKey',
|
|
1761
|
+
'accessToken'
|
|
1762
|
+
]
|
|
1763
|
+
|
|
1764
|
+
return self.api_client.param_serialize(
|
|
1765
|
+
method='GET',
|
|
1766
|
+
resource_path='/core/snapshots',
|
|
1767
|
+
path_params=_path_params,
|
|
1768
|
+
query_params=_query_params,
|
|
1769
|
+
header_params=_header_params,
|
|
1770
|
+
body=_body_params,
|
|
1771
|
+
post_params=_form_params,
|
|
1772
|
+
files=_files,
|
|
1773
|
+
auth_settings=_auth_settings,
|
|
1774
|
+
collection_formats=_collection_formats,
|
|
1775
|
+
_host=_host,
|
|
1776
|
+
_request_auth=_request_auth
|
|
1777
|
+
)
|
|
1778
|
+
|
|
1779
|
+
|