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,1228 @@
|
|
|
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, StrictBool, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from ..models.image import Image
|
|
23
|
+
from ..models.images import Images
|
|
24
|
+
from ..models.name_available_model import NameAvailableModel
|
|
25
|
+
from ..models.response_model import ResponseModel
|
|
26
|
+
|
|
27
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
28
|
+
from ..api_response import ApiResponse
|
|
29
|
+
from ..rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ImageApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
def delete_an_image(
|
|
47
|
+
self,
|
|
48
|
+
id: StrictInt,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
55
|
+
]
|
|
56
|
+
] = None,
|
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
|
+
) -> ResponseModel:
|
|
62
|
+
"""Delete an image
|
|
63
|
+
|
|
64
|
+
Deletes an image permanently. Provide the image ID in the path to specify the image to be deleted.
|
|
65
|
+
|
|
66
|
+
:param id: (required)
|
|
67
|
+
:type id: int
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._delete_an_image_serialize(
|
|
91
|
+
id=id,
|
|
92
|
+
_request_auth=_request_auth,
|
|
93
|
+
_content_type=_content_type,
|
|
94
|
+
_headers=_headers,
|
|
95
|
+
_host_index=_host_index
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
+
'200': "ResponseModel",
|
|
100
|
+
'400': "ErrorResponseModel",
|
|
101
|
+
'401': "ErrorResponseModel",
|
|
102
|
+
'404': "ErrorResponseModel",
|
|
103
|
+
'500': None,
|
|
104
|
+
}
|
|
105
|
+
response_data = self.api_client.call_api(
|
|
106
|
+
*_param,
|
|
107
|
+
_request_timeout=_request_timeout
|
|
108
|
+
)
|
|
109
|
+
response_data.read()
|
|
110
|
+
return self.api_client.response_deserialize(
|
|
111
|
+
response_data=response_data,
|
|
112
|
+
response_types_map=_response_types_map,
|
|
113
|
+
).data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@validate_call
|
|
117
|
+
def delete_an_image_with_http_info(
|
|
118
|
+
self,
|
|
119
|
+
id: StrictInt,
|
|
120
|
+
_request_timeout: Union[
|
|
121
|
+
None,
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Tuple[
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
126
|
+
]
|
|
127
|
+
] = None,
|
|
128
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_content_type: Optional[StrictStr] = None,
|
|
130
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
132
|
+
) -> ApiResponse[ResponseModel]:
|
|
133
|
+
"""Delete an image
|
|
134
|
+
|
|
135
|
+
Deletes an image permanently. Provide the image ID in the path to specify the image to be deleted.
|
|
136
|
+
|
|
137
|
+
:param id: (required)
|
|
138
|
+
:type id: int
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._delete_an_image_serialize(
|
|
162
|
+
id=id,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'200': "ResponseModel",
|
|
171
|
+
'400': "ErrorResponseModel",
|
|
172
|
+
'401': "ErrorResponseModel",
|
|
173
|
+
'404': "ErrorResponseModel",
|
|
174
|
+
'500': None,
|
|
175
|
+
}
|
|
176
|
+
response_data = self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
def delete_an_image_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
id: StrictInt,
|
|
191
|
+
_request_timeout: Union[
|
|
192
|
+
None,
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Tuple[
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
197
|
+
]
|
|
198
|
+
] = None,
|
|
199
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_content_type: Optional[StrictStr] = None,
|
|
201
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
203
|
+
) -> RESTResponseType:
|
|
204
|
+
"""Delete an image
|
|
205
|
+
|
|
206
|
+
Deletes an image permanently. Provide the image ID in the path to specify the image to be deleted.
|
|
207
|
+
|
|
208
|
+
:param id: (required)
|
|
209
|
+
:type id: int
|
|
210
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
211
|
+
number provided, it will be total request
|
|
212
|
+
timeout. It can also be a pair (tuple) of
|
|
213
|
+
(connection, read) timeouts.
|
|
214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
216
|
+
request; this effectively ignores the
|
|
217
|
+
authentication in the spec for a single request.
|
|
218
|
+
:type _request_auth: dict, optional
|
|
219
|
+
:param _content_type: force content-type for the request.
|
|
220
|
+
:type _content_type: str, Optional
|
|
221
|
+
:param _headers: set to override the headers for a single
|
|
222
|
+
request; this effectively ignores the headers
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _headers: dict, optional
|
|
225
|
+
:param _host_index: set to override the host_index for a single
|
|
226
|
+
request; this effectively ignores the host_index
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _host_index: int, optional
|
|
229
|
+
:return: Returns the result object.
|
|
230
|
+
""" # noqa: E501
|
|
231
|
+
|
|
232
|
+
_param = self._delete_an_image_serialize(
|
|
233
|
+
id=id,
|
|
234
|
+
_request_auth=_request_auth,
|
|
235
|
+
_content_type=_content_type,
|
|
236
|
+
_headers=_headers,
|
|
237
|
+
_host_index=_host_index
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
241
|
+
'200': "ResponseModel",
|
|
242
|
+
'400': "ErrorResponseModel",
|
|
243
|
+
'401': "ErrorResponseModel",
|
|
244
|
+
'404': "ErrorResponseModel",
|
|
245
|
+
'500': None,
|
|
246
|
+
}
|
|
247
|
+
response_data = self.api_client.call_api(
|
|
248
|
+
*_param,
|
|
249
|
+
_request_timeout=_request_timeout
|
|
250
|
+
)
|
|
251
|
+
return response_data.response
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _delete_an_image_serialize(
|
|
255
|
+
self,
|
|
256
|
+
id,
|
|
257
|
+
_request_auth,
|
|
258
|
+
_content_type,
|
|
259
|
+
_headers,
|
|
260
|
+
_host_index,
|
|
261
|
+
) -> RequestSerialized:
|
|
262
|
+
|
|
263
|
+
_host = None
|
|
264
|
+
|
|
265
|
+
_collection_formats: Dict[str, str] = {
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
_path_params: Dict[str, str] = {}
|
|
269
|
+
_query_params: List[Tuple[str, str]] = []
|
|
270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
271
|
+
_form_params: List[Tuple[str, str]] = []
|
|
272
|
+
_files: Dict[
|
|
273
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
274
|
+
] = {}
|
|
275
|
+
_body_params: Optional[bytes] = None
|
|
276
|
+
|
|
277
|
+
# process the path parameters
|
|
278
|
+
if id is not None:
|
|
279
|
+
_path_params['id'] = id
|
|
280
|
+
# process the query parameters
|
|
281
|
+
# process the header parameters
|
|
282
|
+
# process the form parameters
|
|
283
|
+
# process the body parameter
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Accept`
|
|
287
|
+
if 'Accept' not in _header_params:
|
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
289
|
+
[
|
|
290
|
+
'application/json'
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
# authentication setting
|
|
296
|
+
_auth_settings: List[str] = [
|
|
297
|
+
'apiKey',
|
|
298
|
+
'accessToken'
|
|
299
|
+
]
|
|
300
|
+
|
|
301
|
+
return self.api_client.param_serialize(
|
|
302
|
+
method='DELETE',
|
|
303
|
+
resource_path='/core/images/{id}',
|
|
304
|
+
path_params=_path_params,
|
|
305
|
+
query_params=_query_params,
|
|
306
|
+
header_params=_header_params,
|
|
307
|
+
body=_body_params,
|
|
308
|
+
post_params=_form_params,
|
|
309
|
+
files=_files,
|
|
310
|
+
auth_settings=_auth_settings,
|
|
311
|
+
collection_formats=_collection_formats,
|
|
312
|
+
_host=_host,
|
|
313
|
+
_request_auth=_request_auth
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
@validate_call
|
|
320
|
+
def fetch_name_availability_for_images(
|
|
321
|
+
self,
|
|
322
|
+
name: StrictStr,
|
|
323
|
+
_request_timeout: Union[
|
|
324
|
+
None,
|
|
325
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
326
|
+
Tuple[
|
|
327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
328
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
329
|
+
]
|
|
330
|
+
] = None,
|
|
331
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
332
|
+
_content_type: Optional[StrictStr] = None,
|
|
333
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
334
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
335
|
+
) -> NameAvailableModel:
|
|
336
|
+
"""Fetch name availability for Images
|
|
337
|
+
|
|
338
|
+
Check if an Image name is available
|
|
339
|
+
|
|
340
|
+
:param name: (required)
|
|
341
|
+
:type name: str
|
|
342
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
343
|
+
number provided, it will be total request
|
|
344
|
+
timeout. It can also be a pair (tuple) of
|
|
345
|
+
(connection, read) timeouts.
|
|
346
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
347
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
348
|
+
request; this effectively ignores the
|
|
349
|
+
authentication in the spec for a single request.
|
|
350
|
+
:type _request_auth: dict, optional
|
|
351
|
+
:param _content_type: force content-type for the request.
|
|
352
|
+
:type _content_type: str, Optional
|
|
353
|
+
:param _headers: set to override the headers for a single
|
|
354
|
+
request; this effectively ignores the headers
|
|
355
|
+
in the spec for a single request.
|
|
356
|
+
:type _headers: dict, optional
|
|
357
|
+
:param _host_index: set to override the host_index for a single
|
|
358
|
+
request; this effectively ignores the host_index
|
|
359
|
+
in the spec for a single request.
|
|
360
|
+
:type _host_index: int, optional
|
|
361
|
+
:return: Returns the result object.
|
|
362
|
+
""" # noqa: E501
|
|
363
|
+
|
|
364
|
+
_param = self._fetch_name_availability_for_images_serialize(
|
|
365
|
+
name=name,
|
|
366
|
+
_request_auth=_request_auth,
|
|
367
|
+
_content_type=_content_type,
|
|
368
|
+
_headers=_headers,
|
|
369
|
+
_host_index=_host_index
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
373
|
+
'200': "NameAvailableModel",
|
|
374
|
+
'400': "ErrorResponseModel",
|
|
375
|
+
'401': "ErrorResponseModel",
|
|
376
|
+
'404': "ErrorResponseModel",
|
|
377
|
+
'500': None,
|
|
378
|
+
}
|
|
379
|
+
response_data = self.api_client.call_api(
|
|
380
|
+
*_param,
|
|
381
|
+
_request_timeout=_request_timeout
|
|
382
|
+
)
|
|
383
|
+
response_data.read()
|
|
384
|
+
return self.api_client.response_deserialize(
|
|
385
|
+
response_data=response_data,
|
|
386
|
+
response_types_map=_response_types_map,
|
|
387
|
+
).data
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
@validate_call
|
|
391
|
+
def fetch_name_availability_for_images_with_http_info(
|
|
392
|
+
self,
|
|
393
|
+
name: StrictStr,
|
|
394
|
+
_request_timeout: Union[
|
|
395
|
+
None,
|
|
396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
397
|
+
Tuple[
|
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
400
|
+
]
|
|
401
|
+
] = None,
|
|
402
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
403
|
+
_content_type: Optional[StrictStr] = None,
|
|
404
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
405
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
406
|
+
) -> ApiResponse[NameAvailableModel]:
|
|
407
|
+
"""Fetch name availability for Images
|
|
408
|
+
|
|
409
|
+
Check if an Image name is available
|
|
410
|
+
|
|
411
|
+
:param name: (required)
|
|
412
|
+
:type name: str
|
|
413
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
414
|
+
number provided, it will be total request
|
|
415
|
+
timeout. It can also be a pair (tuple) of
|
|
416
|
+
(connection, read) timeouts.
|
|
417
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
418
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
419
|
+
request; this effectively ignores the
|
|
420
|
+
authentication in the spec for a single request.
|
|
421
|
+
:type _request_auth: dict, optional
|
|
422
|
+
:param _content_type: force content-type for the request.
|
|
423
|
+
:type _content_type: str, Optional
|
|
424
|
+
:param _headers: set to override the headers for a single
|
|
425
|
+
request; this effectively ignores the headers
|
|
426
|
+
in the spec for a single request.
|
|
427
|
+
:type _headers: dict, optional
|
|
428
|
+
:param _host_index: set to override the host_index for a single
|
|
429
|
+
request; this effectively ignores the host_index
|
|
430
|
+
in the spec for a single request.
|
|
431
|
+
:type _host_index: int, optional
|
|
432
|
+
:return: Returns the result object.
|
|
433
|
+
""" # noqa: E501
|
|
434
|
+
|
|
435
|
+
_param = self._fetch_name_availability_for_images_serialize(
|
|
436
|
+
name=name,
|
|
437
|
+
_request_auth=_request_auth,
|
|
438
|
+
_content_type=_content_type,
|
|
439
|
+
_headers=_headers,
|
|
440
|
+
_host_index=_host_index
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
444
|
+
'200': "NameAvailableModel",
|
|
445
|
+
'400': "ErrorResponseModel",
|
|
446
|
+
'401': "ErrorResponseModel",
|
|
447
|
+
'404': "ErrorResponseModel",
|
|
448
|
+
'500': None,
|
|
449
|
+
}
|
|
450
|
+
response_data = self.api_client.call_api(
|
|
451
|
+
*_param,
|
|
452
|
+
_request_timeout=_request_timeout
|
|
453
|
+
)
|
|
454
|
+
response_data.read()
|
|
455
|
+
return self.api_client.response_deserialize(
|
|
456
|
+
response_data=response_data,
|
|
457
|
+
response_types_map=_response_types_map,
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
@validate_call
|
|
462
|
+
def fetch_name_availability_for_images_without_preload_content(
|
|
463
|
+
self,
|
|
464
|
+
name: StrictStr,
|
|
465
|
+
_request_timeout: Union[
|
|
466
|
+
None,
|
|
467
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
468
|
+
Tuple[
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
470
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
471
|
+
]
|
|
472
|
+
] = None,
|
|
473
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
474
|
+
_content_type: Optional[StrictStr] = None,
|
|
475
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
476
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
477
|
+
) -> RESTResponseType:
|
|
478
|
+
"""Fetch name availability for Images
|
|
479
|
+
|
|
480
|
+
Check if an Image name is available
|
|
481
|
+
|
|
482
|
+
:param name: (required)
|
|
483
|
+
:type name: str
|
|
484
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
485
|
+
number provided, it will be total request
|
|
486
|
+
timeout. It can also be a pair (tuple) of
|
|
487
|
+
(connection, read) timeouts.
|
|
488
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
489
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
490
|
+
request; this effectively ignores the
|
|
491
|
+
authentication in the spec for a single request.
|
|
492
|
+
:type _request_auth: dict, optional
|
|
493
|
+
:param _content_type: force content-type for the request.
|
|
494
|
+
:type _content_type: str, Optional
|
|
495
|
+
:param _headers: set to override the headers for a single
|
|
496
|
+
request; this effectively ignores the headers
|
|
497
|
+
in the spec for a single request.
|
|
498
|
+
:type _headers: dict, optional
|
|
499
|
+
:param _host_index: set to override the host_index for a single
|
|
500
|
+
request; this effectively ignores the host_index
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _host_index: int, optional
|
|
503
|
+
:return: Returns the result object.
|
|
504
|
+
""" # noqa: E501
|
|
505
|
+
|
|
506
|
+
_param = self._fetch_name_availability_for_images_serialize(
|
|
507
|
+
name=name,
|
|
508
|
+
_request_auth=_request_auth,
|
|
509
|
+
_content_type=_content_type,
|
|
510
|
+
_headers=_headers,
|
|
511
|
+
_host_index=_host_index
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
515
|
+
'200': "NameAvailableModel",
|
|
516
|
+
'400': "ErrorResponseModel",
|
|
517
|
+
'401': "ErrorResponseModel",
|
|
518
|
+
'404': "ErrorResponseModel",
|
|
519
|
+
'500': None,
|
|
520
|
+
}
|
|
521
|
+
response_data = self.api_client.call_api(
|
|
522
|
+
*_param,
|
|
523
|
+
_request_timeout=_request_timeout
|
|
524
|
+
)
|
|
525
|
+
return response_data.response
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
def _fetch_name_availability_for_images_serialize(
|
|
529
|
+
self,
|
|
530
|
+
name,
|
|
531
|
+
_request_auth,
|
|
532
|
+
_content_type,
|
|
533
|
+
_headers,
|
|
534
|
+
_host_index,
|
|
535
|
+
) -> RequestSerialized:
|
|
536
|
+
|
|
537
|
+
_host = None
|
|
538
|
+
|
|
539
|
+
_collection_formats: Dict[str, str] = {
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
_path_params: Dict[str, str] = {}
|
|
543
|
+
_query_params: List[Tuple[str, str]] = []
|
|
544
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
545
|
+
_form_params: List[Tuple[str, str]] = []
|
|
546
|
+
_files: Dict[
|
|
547
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
548
|
+
] = {}
|
|
549
|
+
_body_params: Optional[bytes] = None
|
|
550
|
+
|
|
551
|
+
# process the path parameters
|
|
552
|
+
if name is not None:
|
|
553
|
+
_path_params['name'] = name
|
|
554
|
+
# process the query parameters
|
|
555
|
+
# process the header parameters
|
|
556
|
+
# process the form parameters
|
|
557
|
+
# process the body parameter
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
# set the HTTP header `Accept`
|
|
561
|
+
if 'Accept' not in _header_params:
|
|
562
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
563
|
+
[
|
|
564
|
+
'application/json'
|
|
565
|
+
]
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# authentication setting
|
|
570
|
+
_auth_settings: List[str] = [
|
|
571
|
+
'apiKey',
|
|
572
|
+
'accessToken'
|
|
573
|
+
]
|
|
574
|
+
|
|
575
|
+
return self.api_client.param_serialize(
|
|
576
|
+
method='GET',
|
|
577
|
+
resource_path='/core/image/name-availability/{name}',
|
|
578
|
+
path_params=_path_params,
|
|
579
|
+
query_params=_query_params,
|
|
580
|
+
header_params=_header_params,
|
|
581
|
+
body=_body_params,
|
|
582
|
+
post_params=_form_params,
|
|
583
|
+
files=_files,
|
|
584
|
+
auth_settings=_auth_settings,
|
|
585
|
+
collection_formats=_collection_formats,
|
|
586
|
+
_host=_host,
|
|
587
|
+
_request_auth=_request_auth
|
|
588
|
+
)
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
@validate_call
|
|
594
|
+
def get_private_image_details(
|
|
595
|
+
self,
|
|
596
|
+
id: StrictInt,
|
|
597
|
+
include_related_vms: Optional[StrictBool] = None,
|
|
598
|
+
_request_timeout: Union[
|
|
599
|
+
None,
|
|
600
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
601
|
+
Tuple[
|
|
602
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
603
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
604
|
+
]
|
|
605
|
+
] = None,
|
|
606
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
607
|
+
_content_type: Optional[StrictStr] = None,
|
|
608
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
609
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
610
|
+
) -> Image:
|
|
611
|
+
"""Get Private Image Details
|
|
612
|
+
|
|
613
|
+
Retrieve details of a specific image by providing the image ID.
|
|
614
|
+
|
|
615
|
+
:param id: (required)
|
|
616
|
+
:type id: int
|
|
617
|
+
:param include_related_vms:
|
|
618
|
+
:type include_related_vms: bool
|
|
619
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
620
|
+
number provided, it will be total request
|
|
621
|
+
timeout. It can also be a pair (tuple) of
|
|
622
|
+
(connection, read) timeouts.
|
|
623
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
624
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
625
|
+
request; this effectively ignores the
|
|
626
|
+
authentication in the spec for a single request.
|
|
627
|
+
:type _request_auth: dict, optional
|
|
628
|
+
:param _content_type: force content-type for the request.
|
|
629
|
+
:type _content_type: str, Optional
|
|
630
|
+
:param _headers: set to override the headers for a single
|
|
631
|
+
request; this effectively ignores the headers
|
|
632
|
+
in the spec for a single request.
|
|
633
|
+
:type _headers: dict, optional
|
|
634
|
+
:param _host_index: set to override the host_index for a single
|
|
635
|
+
request; this effectively ignores the host_index
|
|
636
|
+
in the spec for a single request.
|
|
637
|
+
:type _host_index: int, optional
|
|
638
|
+
:return: Returns the result object.
|
|
639
|
+
""" # noqa: E501
|
|
640
|
+
|
|
641
|
+
_param = self._get_private_image_details_serialize(
|
|
642
|
+
id=id,
|
|
643
|
+
include_related_vms=include_related_vms,
|
|
644
|
+
_request_auth=_request_auth,
|
|
645
|
+
_content_type=_content_type,
|
|
646
|
+
_headers=_headers,
|
|
647
|
+
_host_index=_host_index
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
651
|
+
'200': "Image",
|
|
652
|
+
'400': "ErrorResponseModel",
|
|
653
|
+
'401': "ErrorResponseModel",
|
|
654
|
+
'404': "ErrorResponseModel",
|
|
655
|
+
'500': None,
|
|
656
|
+
}
|
|
657
|
+
response_data = self.api_client.call_api(
|
|
658
|
+
*_param,
|
|
659
|
+
_request_timeout=_request_timeout
|
|
660
|
+
)
|
|
661
|
+
response_data.read()
|
|
662
|
+
return self.api_client.response_deserialize(
|
|
663
|
+
response_data=response_data,
|
|
664
|
+
response_types_map=_response_types_map,
|
|
665
|
+
).data
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
@validate_call
|
|
669
|
+
def get_private_image_details_with_http_info(
|
|
670
|
+
self,
|
|
671
|
+
id: StrictInt,
|
|
672
|
+
include_related_vms: Optional[StrictBool] = None,
|
|
673
|
+
_request_timeout: Union[
|
|
674
|
+
None,
|
|
675
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
676
|
+
Tuple[
|
|
677
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
678
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
679
|
+
]
|
|
680
|
+
] = None,
|
|
681
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
682
|
+
_content_type: Optional[StrictStr] = None,
|
|
683
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
684
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
685
|
+
) -> ApiResponse[Image]:
|
|
686
|
+
"""Get Private Image Details
|
|
687
|
+
|
|
688
|
+
Retrieve details of a specific image by providing the image ID.
|
|
689
|
+
|
|
690
|
+
:param id: (required)
|
|
691
|
+
:type id: int
|
|
692
|
+
:param include_related_vms:
|
|
693
|
+
:type include_related_vms: bool
|
|
694
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
695
|
+
number provided, it will be total request
|
|
696
|
+
timeout. It can also be a pair (tuple) of
|
|
697
|
+
(connection, read) timeouts.
|
|
698
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
699
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
700
|
+
request; this effectively ignores the
|
|
701
|
+
authentication in the spec for a single request.
|
|
702
|
+
:type _request_auth: dict, optional
|
|
703
|
+
:param _content_type: force content-type for the request.
|
|
704
|
+
:type _content_type: str, Optional
|
|
705
|
+
:param _headers: set to override the headers for a single
|
|
706
|
+
request; this effectively ignores the headers
|
|
707
|
+
in the spec for a single request.
|
|
708
|
+
:type _headers: dict, optional
|
|
709
|
+
:param _host_index: set to override the host_index for a single
|
|
710
|
+
request; this effectively ignores the host_index
|
|
711
|
+
in the spec for a single request.
|
|
712
|
+
:type _host_index: int, optional
|
|
713
|
+
:return: Returns the result object.
|
|
714
|
+
""" # noqa: E501
|
|
715
|
+
|
|
716
|
+
_param = self._get_private_image_details_serialize(
|
|
717
|
+
id=id,
|
|
718
|
+
include_related_vms=include_related_vms,
|
|
719
|
+
_request_auth=_request_auth,
|
|
720
|
+
_content_type=_content_type,
|
|
721
|
+
_headers=_headers,
|
|
722
|
+
_host_index=_host_index
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
726
|
+
'200': "Image",
|
|
727
|
+
'400': "ErrorResponseModel",
|
|
728
|
+
'401': "ErrorResponseModel",
|
|
729
|
+
'404': "ErrorResponseModel",
|
|
730
|
+
'500': None,
|
|
731
|
+
}
|
|
732
|
+
response_data = self.api_client.call_api(
|
|
733
|
+
*_param,
|
|
734
|
+
_request_timeout=_request_timeout
|
|
735
|
+
)
|
|
736
|
+
response_data.read()
|
|
737
|
+
return self.api_client.response_deserialize(
|
|
738
|
+
response_data=response_data,
|
|
739
|
+
response_types_map=_response_types_map,
|
|
740
|
+
)
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
@validate_call
|
|
744
|
+
def get_private_image_details_without_preload_content(
|
|
745
|
+
self,
|
|
746
|
+
id: StrictInt,
|
|
747
|
+
include_related_vms: Optional[StrictBool] = None,
|
|
748
|
+
_request_timeout: Union[
|
|
749
|
+
None,
|
|
750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
751
|
+
Tuple[
|
|
752
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
753
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
754
|
+
]
|
|
755
|
+
] = None,
|
|
756
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
757
|
+
_content_type: Optional[StrictStr] = None,
|
|
758
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
759
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
760
|
+
) -> RESTResponseType:
|
|
761
|
+
"""Get Private Image Details
|
|
762
|
+
|
|
763
|
+
Retrieve details of a specific image by providing the image ID.
|
|
764
|
+
|
|
765
|
+
:param id: (required)
|
|
766
|
+
:type id: int
|
|
767
|
+
:param include_related_vms:
|
|
768
|
+
:type include_related_vms: bool
|
|
769
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
770
|
+
number provided, it will be total request
|
|
771
|
+
timeout. It can also be a pair (tuple) of
|
|
772
|
+
(connection, read) timeouts.
|
|
773
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
774
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
775
|
+
request; this effectively ignores the
|
|
776
|
+
authentication in the spec for a single request.
|
|
777
|
+
:type _request_auth: dict, optional
|
|
778
|
+
:param _content_type: force content-type for the request.
|
|
779
|
+
:type _content_type: str, Optional
|
|
780
|
+
:param _headers: set to override the headers for a single
|
|
781
|
+
request; this effectively ignores the headers
|
|
782
|
+
in the spec for a single request.
|
|
783
|
+
:type _headers: dict, optional
|
|
784
|
+
:param _host_index: set to override the host_index for a single
|
|
785
|
+
request; this effectively ignores the host_index
|
|
786
|
+
in the spec for a single request.
|
|
787
|
+
:type _host_index: int, optional
|
|
788
|
+
:return: Returns the result object.
|
|
789
|
+
""" # noqa: E501
|
|
790
|
+
|
|
791
|
+
_param = self._get_private_image_details_serialize(
|
|
792
|
+
id=id,
|
|
793
|
+
include_related_vms=include_related_vms,
|
|
794
|
+
_request_auth=_request_auth,
|
|
795
|
+
_content_type=_content_type,
|
|
796
|
+
_headers=_headers,
|
|
797
|
+
_host_index=_host_index
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
801
|
+
'200': "Image",
|
|
802
|
+
'400': "ErrorResponseModel",
|
|
803
|
+
'401': "ErrorResponseModel",
|
|
804
|
+
'404': "ErrorResponseModel",
|
|
805
|
+
'500': None,
|
|
806
|
+
}
|
|
807
|
+
response_data = self.api_client.call_api(
|
|
808
|
+
*_param,
|
|
809
|
+
_request_timeout=_request_timeout
|
|
810
|
+
)
|
|
811
|
+
return response_data.response
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
def _get_private_image_details_serialize(
|
|
815
|
+
self,
|
|
816
|
+
id,
|
|
817
|
+
include_related_vms,
|
|
818
|
+
_request_auth,
|
|
819
|
+
_content_type,
|
|
820
|
+
_headers,
|
|
821
|
+
_host_index,
|
|
822
|
+
) -> RequestSerialized:
|
|
823
|
+
|
|
824
|
+
_host = None
|
|
825
|
+
|
|
826
|
+
_collection_formats: Dict[str, str] = {
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
_path_params: Dict[str, str] = {}
|
|
830
|
+
_query_params: List[Tuple[str, str]] = []
|
|
831
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
832
|
+
_form_params: List[Tuple[str, str]] = []
|
|
833
|
+
_files: Dict[
|
|
834
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
835
|
+
] = {}
|
|
836
|
+
_body_params: Optional[bytes] = None
|
|
837
|
+
|
|
838
|
+
# process the path parameters
|
|
839
|
+
if id is not None:
|
|
840
|
+
_path_params['id'] = id
|
|
841
|
+
# process the query parameters
|
|
842
|
+
if include_related_vms is not None:
|
|
843
|
+
|
|
844
|
+
_query_params.append(('include_related_vms', include_related_vms))
|
|
845
|
+
|
|
846
|
+
# process the header parameters
|
|
847
|
+
# process the form parameters
|
|
848
|
+
# process the body parameter
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
# set the HTTP header `Accept`
|
|
852
|
+
if 'Accept' not in _header_params:
|
|
853
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
854
|
+
[
|
|
855
|
+
'application/json'
|
|
856
|
+
]
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
# authentication setting
|
|
861
|
+
_auth_settings: List[str] = [
|
|
862
|
+
'apiKey',
|
|
863
|
+
'accessToken'
|
|
864
|
+
]
|
|
865
|
+
|
|
866
|
+
return self.api_client.param_serialize(
|
|
867
|
+
method='GET',
|
|
868
|
+
resource_path='/core/images/{id}',
|
|
869
|
+
path_params=_path_params,
|
|
870
|
+
query_params=_query_params,
|
|
871
|
+
header_params=_header_params,
|
|
872
|
+
body=_body_params,
|
|
873
|
+
post_params=_form_params,
|
|
874
|
+
files=_files,
|
|
875
|
+
auth_settings=_auth_settings,
|
|
876
|
+
collection_formats=_collection_formats,
|
|
877
|
+
_host=_host,
|
|
878
|
+
_request_auth=_request_auth
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
@validate_call
|
|
885
|
+
def list_images(
|
|
886
|
+
self,
|
|
887
|
+
region: Annotated[Optional[StrictStr], Field(description="Region Name")] = None,
|
|
888
|
+
include_public: Annotated[Optional[StrictBool], Field(description="Flag to include public images in the response (true/false). Default is true.")] = None,
|
|
889
|
+
search: Annotated[Optional[StrictStr], Field(description="Search query to filter images by name")] = None,
|
|
890
|
+
page: Annotated[Optional[StrictInt], Field(description="Page number for pagination")] = None,
|
|
891
|
+
per_page: Annotated[Optional[StrictInt], Field(description="Number of Images per page")] = None,
|
|
892
|
+
_request_timeout: Union[
|
|
893
|
+
None,
|
|
894
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
895
|
+
Tuple[
|
|
896
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
897
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
898
|
+
]
|
|
899
|
+
] = None,
|
|
900
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
901
|
+
_content_type: Optional[StrictStr] = None,
|
|
902
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
903
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
904
|
+
) -> Images:
|
|
905
|
+
"""List Images
|
|
906
|
+
|
|
907
|
+
Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. You can include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. Additionally, use the `include_public` parameter to specify whether to include public images in the response. For more information onOS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images).
|
|
908
|
+
|
|
909
|
+
:param region: Region Name
|
|
910
|
+
:type region: str
|
|
911
|
+
:param include_public: Flag to include public images in the response (true/false). Default is true.
|
|
912
|
+
:type include_public: bool
|
|
913
|
+
:param search: Search query to filter images by name
|
|
914
|
+
:type search: str
|
|
915
|
+
:param page: Page number for pagination
|
|
916
|
+
:type page: int
|
|
917
|
+
:param per_page: Number of Images per page
|
|
918
|
+
:type per_page: int
|
|
919
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
920
|
+
number provided, it will be total request
|
|
921
|
+
timeout. It can also be a pair (tuple) of
|
|
922
|
+
(connection, read) timeouts.
|
|
923
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
924
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
925
|
+
request; this effectively ignores the
|
|
926
|
+
authentication in the spec for a single request.
|
|
927
|
+
:type _request_auth: dict, optional
|
|
928
|
+
:param _content_type: force content-type for the request.
|
|
929
|
+
:type _content_type: str, Optional
|
|
930
|
+
:param _headers: set to override the headers for a single
|
|
931
|
+
request; this effectively ignores the headers
|
|
932
|
+
in the spec for a single request.
|
|
933
|
+
:type _headers: dict, optional
|
|
934
|
+
:param _host_index: set to override the host_index for a single
|
|
935
|
+
request; this effectively ignores the host_index
|
|
936
|
+
in the spec for a single request.
|
|
937
|
+
:type _host_index: int, optional
|
|
938
|
+
:return: Returns the result object.
|
|
939
|
+
""" # noqa: E501
|
|
940
|
+
|
|
941
|
+
_param = self._list_images_serialize(
|
|
942
|
+
region=region,
|
|
943
|
+
include_public=include_public,
|
|
944
|
+
search=search,
|
|
945
|
+
page=page,
|
|
946
|
+
per_page=per_page,
|
|
947
|
+
_request_auth=_request_auth,
|
|
948
|
+
_content_type=_content_type,
|
|
949
|
+
_headers=_headers,
|
|
950
|
+
_host_index=_host_index
|
|
951
|
+
)
|
|
952
|
+
|
|
953
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
954
|
+
'200': "Images",
|
|
955
|
+
'400': "ErrorResponseModel",
|
|
956
|
+
'401': "ErrorResponseModel",
|
|
957
|
+
'404': "ErrorResponseModel",
|
|
958
|
+
'406': "ErrorResponseModel",
|
|
959
|
+
'500': None,
|
|
960
|
+
}
|
|
961
|
+
response_data = self.api_client.call_api(
|
|
962
|
+
*_param,
|
|
963
|
+
_request_timeout=_request_timeout
|
|
964
|
+
)
|
|
965
|
+
response_data.read()
|
|
966
|
+
return self.api_client.response_deserialize(
|
|
967
|
+
response_data=response_data,
|
|
968
|
+
response_types_map=_response_types_map,
|
|
969
|
+
).data
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
@validate_call
|
|
973
|
+
def list_images_with_http_info(
|
|
974
|
+
self,
|
|
975
|
+
region: Annotated[Optional[StrictStr], Field(description="Region Name")] = None,
|
|
976
|
+
include_public: Annotated[Optional[StrictBool], Field(description="Flag to include public images in the response (true/false). Default is true.")] = None,
|
|
977
|
+
search: Annotated[Optional[StrictStr], Field(description="Search query to filter images by name")] = None,
|
|
978
|
+
page: Annotated[Optional[StrictInt], Field(description="Page number for pagination")] = None,
|
|
979
|
+
per_page: Annotated[Optional[StrictInt], Field(description="Number of Images per page")] = None,
|
|
980
|
+
_request_timeout: Union[
|
|
981
|
+
None,
|
|
982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
983
|
+
Tuple[
|
|
984
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
985
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
986
|
+
]
|
|
987
|
+
] = None,
|
|
988
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
989
|
+
_content_type: Optional[StrictStr] = None,
|
|
990
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
991
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
992
|
+
) -> ApiResponse[Images]:
|
|
993
|
+
"""List Images
|
|
994
|
+
|
|
995
|
+
Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. You can include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. Additionally, use the `include_public` parameter to specify whether to include public images in the response. For more information onOS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images).
|
|
996
|
+
|
|
997
|
+
:param region: Region Name
|
|
998
|
+
:type region: str
|
|
999
|
+
:param include_public: Flag to include public images in the response (true/false). Default is true.
|
|
1000
|
+
:type include_public: bool
|
|
1001
|
+
:param search: Search query to filter images by name
|
|
1002
|
+
:type search: str
|
|
1003
|
+
:param page: Page number for pagination
|
|
1004
|
+
:type page: int
|
|
1005
|
+
:param per_page: Number of Images per page
|
|
1006
|
+
:type per_page: int
|
|
1007
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1008
|
+
number provided, it will be total request
|
|
1009
|
+
timeout. It can also be a pair (tuple) of
|
|
1010
|
+
(connection, read) timeouts.
|
|
1011
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1012
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1013
|
+
request; this effectively ignores the
|
|
1014
|
+
authentication in the spec for a single request.
|
|
1015
|
+
:type _request_auth: dict, optional
|
|
1016
|
+
:param _content_type: force content-type for the request.
|
|
1017
|
+
:type _content_type: str, Optional
|
|
1018
|
+
:param _headers: set to override the headers for a single
|
|
1019
|
+
request; this effectively ignores the headers
|
|
1020
|
+
in the spec for a single request.
|
|
1021
|
+
:type _headers: dict, optional
|
|
1022
|
+
:param _host_index: set to override the host_index for a single
|
|
1023
|
+
request; this effectively ignores the host_index
|
|
1024
|
+
in the spec for a single request.
|
|
1025
|
+
:type _host_index: int, optional
|
|
1026
|
+
:return: Returns the result object.
|
|
1027
|
+
""" # noqa: E501
|
|
1028
|
+
|
|
1029
|
+
_param = self._list_images_serialize(
|
|
1030
|
+
region=region,
|
|
1031
|
+
include_public=include_public,
|
|
1032
|
+
search=search,
|
|
1033
|
+
page=page,
|
|
1034
|
+
per_page=per_page,
|
|
1035
|
+
_request_auth=_request_auth,
|
|
1036
|
+
_content_type=_content_type,
|
|
1037
|
+
_headers=_headers,
|
|
1038
|
+
_host_index=_host_index
|
|
1039
|
+
)
|
|
1040
|
+
|
|
1041
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1042
|
+
'200': "Images",
|
|
1043
|
+
'400': "ErrorResponseModel",
|
|
1044
|
+
'401': "ErrorResponseModel",
|
|
1045
|
+
'404': "ErrorResponseModel",
|
|
1046
|
+
'406': "ErrorResponseModel",
|
|
1047
|
+
'500': None,
|
|
1048
|
+
}
|
|
1049
|
+
response_data = self.api_client.call_api(
|
|
1050
|
+
*_param,
|
|
1051
|
+
_request_timeout=_request_timeout
|
|
1052
|
+
)
|
|
1053
|
+
response_data.read()
|
|
1054
|
+
return self.api_client.response_deserialize(
|
|
1055
|
+
response_data=response_data,
|
|
1056
|
+
response_types_map=_response_types_map,
|
|
1057
|
+
)
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
@validate_call
|
|
1061
|
+
def list_images_without_preload_content(
|
|
1062
|
+
self,
|
|
1063
|
+
region: Annotated[Optional[StrictStr], Field(description="Region Name")] = None,
|
|
1064
|
+
include_public: Annotated[Optional[StrictBool], Field(description="Flag to include public images in the response (true/false). Default is true.")] = None,
|
|
1065
|
+
search: Annotated[Optional[StrictStr], Field(description="Search query to filter images by name")] = None,
|
|
1066
|
+
page: Annotated[Optional[StrictInt], Field(description="Page number for pagination")] = None,
|
|
1067
|
+
per_page: Annotated[Optional[StrictInt], Field(description="Number of Images per page")] = None,
|
|
1068
|
+
_request_timeout: Union[
|
|
1069
|
+
None,
|
|
1070
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1071
|
+
Tuple[
|
|
1072
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1073
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1074
|
+
]
|
|
1075
|
+
] = None,
|
|
1076
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1077
|
+
_content_type: Optional[StrictStr] = None,
|
|
1078
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1079
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1080
|
+
) -> RESTResponseType:
|
|
1081
|
+
"""List Images
|
|
1082
|
+
|
|
1083
|
+
Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. You can include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. Additionally, use the `include_public` parameter to specify whether to include public images in the response. For more information onOS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images).
|
|
1084
|
+
|
|
1085
|
+
:param region: Region Name
|
|
1086
|
+
:type region: str
|
|
1087
|
+
:param include_public: Flag to include public images in the response (true/false). Default is true.
|
|
1088
|
+
:type include_public: bool
|
|
1089
|
+
:param search: Search query to filter images by name
|
|
1090
|
+
:type search: str
|
|
1091
|
+
:param page: Page number for pagination
|
|
1092
|
+
:type page: int
|
|
1093
|
+
:param per_page: Number of Images per page
|
|
1094
|
+
:type per_page: int
|
|
1095
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1096
|
+
number provided, it will be total request
|
|
1097
|
+
timeout. It can also be a pair (tuple) of
|
|
1098
|
+
(connection, read) timeouts.
|
|
1099
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1100
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1101
|
+
request; this effectively ignores the
|
|
1102
|
+
authentication in the spec for a single request.
|
|
1103
|
+
:type _request_auth: dict, optional
|
|
1104
|
+
:param _content_type: force content-type for the request.
|
|
1105
|
+
:type _content_type: str, Optional
|
|
1106
|
+
:param _headers: set to override the headers for a single
|
|
1107
|
+
request; this effectively ignores the headers
|
|
1108
|
+
in the spec for a single request.
|
|
1109
|
+
:type _headers: dict, optional
|
|
1110
|
+
:param _host_index: set to override the host_index for a single
|
|
1111
|
+
request; this effectively ignores the host_index
|
|
1112
|
+
in the spec for a single request.
|
|
1113
|
+
:type _host_index: int, optional
|
|
1114
|
+
:return: Returns the result object.
|
|
1115
|
+
""" # noqa: E501
|
|
1116
|
+
|
|
1117
|
+
_param = self._list_images_serialize(
|
|
1118
|
+
region=region,
|
|
1119
|
+
include_public=include_public,
|
|
1120
|
+
search=search,
|
|
1121
|
+
page=page,
|
|
1122
|
+
per_page=per_page,
|
|
1123
|
+
_request_auth=_request_auth,
|
|
1124
|
+
_content_type=_content_type,
|
|
1125
|
+
_headers=_headers,
|
|
1126
|
+
_host_index=_host_index
|
|
1127
|
+
)
|
|
1128
|
+
|
|
1129
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1130
|
+
'200': "Images",
|
|
1131
|
+
'400': "ErrorResponseModel",
|
|
1132
|
+
'401': "ErrorResponseModel",
|
|
1133
|
+
'404': "ErrorResponseModel",
|
|
1134
|
+
'406': "ErrorResponseModel",
|
|
1135
|
+
'500': None,
|
|
1136
|
+
}
|
|
1137
|
+
response_data = self.api_client.call_api(
|
|
1138
|
+
*_param,
|
|
1139
|
+
_request_timeout=_request_timeout
|
|
1140
|
+
)
|
|
1141
|
+
return response_data.response
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
def _list_images_serialize(
|
|
1145
|
+
self,
|
|
1146
|
+
region,
|
|
1147
|
+
include_public,
|
|
1148
|
+
search,
|
|
1149
|
+
page,
|
|
1150
|
+
per_page,
|
|
1151
|
+
_request_auth,
|
|
1152
|
+
_content_type,
|
|
1153
|
+
_headers,
|
|
1154
|
+
_host_index,
|
|
1155
|
+
) -> RequestSerialized:
|
|
1156
|
+
|
|
1157
|
+
_host = None
|
|
1158
|
+
|
|
1159
|
+
_collection_formats: Dict[str, str] = {
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
_path_params: Dict[str, str] = {}
|
|
1163
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1164
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1165
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1166
|
+
_files: Dict[
|
|
1167
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1168
|
+
] = {}
|
|
1169
|
+
_body_params: Optional[bytes] = None
|
|
1170
|
+
|
|
1171
|
+
# process the path parameters
|
|
1172
|
+
# process the query parameters
|
|
1173
|
+
if region is not None:
|
|
1174
|
+
|
|
1175
|
+
_query_params.append(('region', region))
|
|
1176
|
+
|
|
1177
|
+
if include_public is not None:
|
|
1178
|
+
|
|
1179
|
+
_query_params.append(('include_public', include_public))
|
|
1180
|
+
|
|
1181
|
+
if search is not None:
|
|
1182
|
+
|
|
1183
|
+
_query_params.append(('search', search))
|
|
1184
|
+
|
|
1185
|
+
if page is not None:
|
|
1186
|
+
|
|
1187
|
+
_query_params.append(('page', page))
|
|
1188
|
+
|
|
1189
|
+
if per_page is not None:
|
|
1190
|
+
|
|
1191
|
+
_query_params.append(('per_page', per_page))
|
|
1192
|
+
|
|
1193
|
+
# process the header parameters
|
|
1194
|
+
# process the form parameters
|
|
1195
|
+
# process the body parameter
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
# set the HTTP header `Accept`
|
|
1199
|
+
if 'Accept' not in _header_params:
|
|
1200
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1201
|
+
[
|
|
1202
|
+
'application/json'
|
|
1203
|
+
]
|
|
1204
|
+
)
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
# authentication setting
|
|
1208
|
+
_auth_settings: List[str] = [
|
|
1209
|
+
'apiKey',
|
|
1210
|
+
'accessToken'
|
|
1211
|
+
]
|
|
1212
|
+
|
|
1213
|
+
return self.api_client.param_serialize(
|
|
1214
|
+
method='GET',
|
|
1215
|
+
resource_path='/core/images',
|
|
1216
|
+
path_params=_path_params,
|
|
1217
|
+
query_params=_query_params,
|
|
1218
|
+
header_params=_header_params,
|
|
1219
|
+
body=_body_params,
|
|
1220
|
+
post_params=_form_params,
|
|
1221
|
+
files=_files,
|
|
1222
|
+
auth_settings=_auth_settings,
|
|
1223
|
+
collection_formats=_collection_formats,
|
|
1224
|
+
_host=_host,
|
|
1225
|
+
_request_auth=_request_auth
|
|
1226
|
+
)
|
|
1227
|
+
|
|
1228
|
+
|