gcore 0.1.0a1__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.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +84 -0
- gcore/_base_client.py +1943 -0
- gcore/_client.py +484 -0
- gcore/_compat.py +219 -0
- gcore/_constants.py +16 -0
- gcore/_exceptions.py +108 -0
- gcore/_files.py +123 -0
- gcore/_models.py +803 -0
- gcore/_qs.py +150 -0
- gcore/_resource.py +43 -0
- gcore/_response.py +830 -0
- gcore/_streaming.py +333 -0
- gcore/_types.py +217 -0
- gcore/_utils/__init__.py +57 -0
- gcore/_utils/_logs.py +25 -0
- gcore/_utils/_proxy.py +62 -0
- gcore/_utils/_reflection.py +42 -0
- gcore/_utils/_streams.py +12 -0
- gcore/_utils/_sync.py +86 -0
- gcore/_utils/_transform.py +447 -0
- gcore/_utils/_typing.py +151 -0
- gcore/_utils/_utils.py +422 -0
- gcore/_version.py +4 -0
- gcore/lib/.keep +4 -0
- gcore/lib/polling.py +19 -0
- gcore/pagination.py +70 -0
- gcore/py.typed +0 -0
- gcore/resources/__init__.py +19 -0
- gcore/resources/cloud/__init__.py +327 -0
- gcore/resources/cloud/baremetal/__init__.py +61 -0
- gcore/resources/cloud/baremetal/baremetal.py +166 -0
- gcore/resources/cloud/baremetal/flavors.py +371 -0
- gcore/resources/cloud/baremetal/images.py +238 -0
- gcore/resources/cloud/baremetal/servers.py +808 -0
- gcore/resources/cloud/billing_reservations.py +362 -0
- gcore/resources/cloud/cloud.py +774 -0
- gcore/resources/cloud/file_shares/__init__.py +33 -0
- gcore/resources/cloud/file_shares/access_rules.py +434 -0
- gcore/resources/cloud/file_shares/file_shares.py +994 -0
- gcore/resources/cloud/floating_ips.py +765 -0
- gcore/resources/cloud/gpu_baremetal_clusters/__init__.py +75 -0
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +211 -0
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +1143 -0
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +581 -0
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +175 -0
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +1098 -0
- gcore/resources/cloud/inference/__init__.py +89 -0
- gcore/resources/cloud/inference/deployments/__init__.py +33 -0
- gcore/resources/cloud/inference/deployments/deployments.py +1187 -0
- gcore/resources/cloud/inference/deployments/logs.py +235 -0
- gcore/resources/cloud/inference/flavors.py +280 -0
- gcore/resources/cloud/inference/inference.py +295 -0
- gcore/resources/cloud/inference/models.py +289 -0
- gcore/resources/cloud/inference/registry_credentials.py +649 -0
- gcore/resources/cloud/inference/secrets.py +629 -0
- gcore/resources/cloud/instances/__init__.py +75 -0
- gcore/resources/cloud/instances/flavors.py +449 -0
- gcore/resources/cloud/instances/images.py +987 -0
- gcore/resources/cloud/instances/instances.py +2349 -0
- gcore/resources/cloud/instances/interfaces.py +797 -0
- gcore/resources/cloud/instances/metrics.py +217 -0
- gcore/resources/cloud/ip_ranges.py +135 -0
- gcore/resources/cloud/load_balancers/__init__.py +103 -0
- gcore/resources/cloud/load_balancers/flavors.py +193 -0
- gcore/resources/cloud/load_balancers/l7_policies/__init__.py +33 -0
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +738 -0
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +722 -0
- gcore/resources/cloud/load_balancers/listeners.py +788 -0
- gcore/resources/cloud/load_balancers/load_balancers.py +1237 -0
- gcore/resources/cloud/load_balancers/metrics.py +205 -0
- gcore/resources/cloud/load_balancers/pools/__init__.py +47 -0
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +352 -0
- gcore/resources/cloud/load_balancers/pools/members.py +353 -0
- gcore/resources/cloud/load_balancers/pools/pools.py +872 -0
- gcore/resources/cloud/load_balancers/statuses.py +260 -0
- gcore/resources/cloud/networks/__init__.py +47 -0
- gcore/resources/cloud/networks/networks.py +715 -0
- gcore/resources/cloud/networks/routers.py +875 -0
- gcore/resources/cloud/networks/subnets.py +865 -0
- gcore/resources/cloud/placement_groups.py +465 -0
- gcore/resources/cloud/projects.py +608 -0
- gcore/resources/cloud/quotas/__init__.py +33 -0
- gcore/resources/cloud/quotas/quotas.py +335 -0
- gcore/resources/cloud/quotas/requests.py +482 -0
- gcore/resources/cloud/regions.py +328 -0
- gcore/resources/cloud/registries/__init__.py +75 -0
- gcore/resources/cloud/registries/artifacts.py +277 -0
- gcore/resources/cloud/registries/registries.py +688 -0
- gcore/resources/cloud/registries/repositories.py +265 -0
- gcore/resources/cloud/registries/tags.py +190 -0
- gcore/resources/cloud/registries/users.py +701 -0
- gcore/resources/cloud/reserved_fixed_ips/__init__.py +33 -0
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +965 -0
- gcore/resources/cloud/reserved_fixed_ips/vip.py +577 -0
- gcore/resources/cloud/secrets.py +797 -0
- gcore/resources/cloud/security_groups/__init__.py +33 -0
- gcore/resources/cloud/security_groups/rules.py +626 -0
- gcore/resources/cloud/security_groups/security_groups.py +863 -0
- gcore/resources/cloud/ssh_keys.py +635 -0
- gcore/resources/cloud/tasks.py +699 -0
- gcore/resources/cloud/users/__init__.py +33 -0
- gcore/resources/cloud/users/role_assignments.py +533 -0
- gcore/resources/cloud/users/users.py +102 -0
- gcore/resources/cloud/volumes.py +1710 -0
- gcore/types/__init__.py +3 -0
- gcore/types/cloud/__init__.py +199 -0
- gcore/types/cloud/allowed_address_pairs.py +15 -0
- gcore/types/cloud/aws_iam_data.py +13 -0
- gcore/types/cloud/aws_iam_data_param.py +15 -0
- gcore/types/cloud/baremetal/__init__.py +13 -0
- gcore/types/cloud/baremetal/baremetal_fixed_address.py +30 -0
- gcore/types/cloud/baremetal/baremetal_floating_address.py +15 -0
- gcore/types/cloud/baremetal/baremetal_server.py +178 -0
- gcore/types/cloud/baremetal/flavor_list_params.py +35 -0
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +22 -0
- gcore/types/cloud/baremetal/image_list_params.py +33 -0
- gcore/types/cloud/baremetal/server_create_params.py +370 -0
- gcore/types/cloud/baremetal/server_list_params.py +114 -0
- gcore/types/cloud/baremetal/server_rebuild_params.py +23 -0
- gcore/types/cloud/baremetal_flavor.py +58 -0
- gcore/types/cloud/baremetal_flavor_list.py +16 -0
- gcore/types/cloud/billing_reservation.py +153 -0
- gcore/types/cloud/billing_reservation_list_params.py +54 -0
- gcore/types/cloud/blackhole_port.py +66 -0
- gcore/types/cloud/capacity.py +13 -0
- gcore/types/cloud/console.py +18 -0
- gcore/types/cloud/container_probe.py +36 -0
- gcore/types/cloud/container_probe_config.py +16 -0
- gcore/types/cloud/container_probe_config_create_param.py +18 -0
- gcore/types/cloud/container_probe_create_param.py +38 -0
- gcore/types/cloud/container_probe_exec.py +12 -0
- gcore/types/cloud/container_probe_exec_create_param.py +13 -0
- gcore/types/cloud/container_probe_http_get.py +26 -0
- gcore/types/cloud/container_probe_http_get_create_param.py +25 -0
- gcore/types/cloud/container_probe_tcp_socket.py +10 -0
- gcore/types/cloud/container_probe_tcp_socket_create_param.py +12 -0
- gcore/types/cloud/container_scale.py +25 -0
- gcore/types/cloud/container_scale_trigger_rate.py +13 -0
- gcore/types/cloud/container_scale_trigger_sqs.py +33 -0
- gcore/types/cloud/container_scale_trigger_threshold.py +10 -0
- gcore/types/cloud/container_scale_triggers.py +36 -0
- gcore/types/cloud/ddos_profile.py +33 -0
- gcore/types/cloud/ddos_profile_field.py +31 -0
- gcore/types/cloud/ddos_profile_option_list.py +15 -0
- gcore/types/cloud/ddos_profile_status.py +13 -0
- gcore/types/cloud/ddos_profile_template.py +18 -0
- gcore/types/cloud/ddos_profile_template_field.py +23 -0
- gcore/types/cloud/deploy_status.py +13 -0
- gcore/types/cloud/file_share.py +111 -0
- gcore/types/cloud/file_share_create_params.py +104 -0
- gcore/types/cloud/file_share_list_params.py +24 -0
- gcore/types/cloud/file_share_resize_params.py +18 -0
- gcore/types/cloud/file_share_update_params.py +18 -0
- gcore/types/cloud/file_shares/__init__.py +7 -0
- gcore/types/cloud/file_shares/access_rule.py +21 -0
- gcore/types/cloud/file_shares/access_rule_create_params.py +21 -0
- gcore/types/cloud/file_shares/access_rule_list.py +16 -0
- gcore/types/cloud/fixed_address.py +38 -0
- gcore/types/cloud/fixed_address_short.py +24 -0
- gcore/types/cloud/flavor_hardware_description.py +27 -0
- gcore/types/cloud/floating_address.py +15 -0
- gcore/types/cloud/floating_ip.py +77 -0
- gcore/types/cloud/floating_ip_assign_params.py +20 -0
- gcore/types/cloud/floating_ip_create_params.py +40 -0
- gcore/types/cloud/floating_ip_detailed.py +222 -0
- gcore/types/cloud/floating_ip_list_params.py +35 -0
- gcore/types/cloud/floating_ip_status.py +7 -0
- gcore/types/cloud/gpu_baremetal_cluster.py +116 -0
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +135 -0
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +28 -0
- gcore/types/cloud/gpu_baremetal_cluster_list_params.py +19 -0
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +26 -0
- gcore/types/cloud/gpu_baremetal_cluster_resize_params.py +16 -0
- gcore/types/cloud/gpu_baremetal_cluster_server.py +200 -0
- gcore/types/cloud/gpu_baremetal_cluster_server_list.py +16 -0
- gcore/types/cloud/gpu_baremetal_clusters/__init__.py +9 -0
- gcore/types/cloud/gpu_baremetal_clusters/flavor_list_params.py +21 -0
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +58 -0
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +253 -0
- gcore/types/cloud/gpu_baremetal_clusters/server_delete_params.py +21 -0
- gcore/types/cloud/gpu_baremetal_clusters/server_detach_interface_params.py +19 -0
- gcore/types/cloud/gpu_baremetal_flavor.py +133 -0
- gcore/types/cloud/gpu_baremetal_flavor_list.py +16 -0
- gcore/types/cloud/gpu_image.py +70 -0
- gcore/types/cloud/gpu_image_list.py +16 -0
- gcore/types/cloud/health_monitor.py +48 -0
- gcore/types/cloud/health_monitor_status.py +22 -0
- gcore/types/cloud/http_method.py +7 -0
- gcore/types/cloud/image.py +100 -0
- gcore/types/cloud/image_list.py +16 -0
- gcore/types/cloud/inference/__init__.py +25 -0
- gcore/types/cloud/inference/container.py +26 -0
- gcore/types/cloud/inference/deployment_create_params.py +222 -0
- gcore/types/cloud/inference/deployment_list_params.py +21 -0
- gcore/types/cloud/inference/deployment_update_params.py +215 -0
- gcore/types/cloud/inference/deployments/__init__.py +5 -0
- gcore/types/cloud/inference/deployments/log_list_params.py +28 -0
- gcore/types/cloud/inference/flavor_list_params.py +18 -0
- gcore/types/cloud/inference/inference.py +95 -0
- gcore/types/cloud/inference/inference_apikey_secret.py +15 -0
- gcore/types/cloud/inference/inference_flavor.py +34 -0
- gcore/types/cloud/inference/inference_log.py +21 -0
- gcore/types/cloud/inference/inference_registry_credential.py +19 -0
- gcore/types/cloud/inference/inference_registry_credential_full.py +22 -0
- gcore/types/cloud/inference/inference_secret.py +17 -0
- gcore/types/cloud/inference/mlcatalog_model_card.py +65 -0
- gcore/types/cloud/inference/mlcatalog_order_by_choices.py +7 -0
- gcore/types/cloud/inference/model_list_params.py +23 -0
- gcore/types/cloud/inference/registry_credential_create_params.py +24 -0
- gcore/types/cloud/inference/registry_credential_list_params.py +21 -0
- gcore/types/cloud/inference/registry_credential_replace_params.py +21 -0
- gcore/types/cloud/inference/secret_create_params.py +23 -0
- gcore/types/cloud/inference/secret_list_params.py +21 -0
- gcore/types/cloud/inference/secret_replace_params.py +20 -0
- gcore/types/cloud/inference_probes.py +19 -0
- gcore/types/cloud/ingress_opts_out.py +16 -0
- gcore/types/cloud/ingress_opts_param.py +18 -0
- gcore/types/cloud/instance.py +296 -0
- gcore/types/cloud/instance_action_params.py +32 -0
- gcore/types/cloud/instance_add_to_placement_group_params.py +16 -0
- gcore/types/cloud/instance_assign_security_group_params.py +28 -0
- gcore/types/cloud/instance_create_params.py +622 -0
- gcore/types/cloud/instance_delete_params.py +33 -0
- gcore/types/cloud/instance_get_console_params.py +16 -0
- gcore/types/cloud/instance_interface.py +40 -0
- gcore/types/cloud/instance_isolation.py +12 -0
- gcore/types/cloud/instance_list.py +16 -0
- gcore/types/cloud/instance_list_params.py +146 -0
- gcore/types/cloud/instance_metrics_time_unit.py +7 -0
- gcore/types/cloud/instance_resize_params.py +16 -0
- gcore/types/cloud/instance_unassign_security_group_params.py +28 -0
- gcore/types/cloud/instance_update_params.py +18 -0
- gcore/types/cloud/instances/__init__.py +19 -0
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +16 -0
- gcore/types/cloud/instances/flavor_list_params.py +25 -0
- gcore/types/cloud/instances/flavor_list_suitable_params.py +56 -0
- gcore/types/cloud/instances/image_create_from_volume_params.py +53 -0
- gcore/types/cloud/instances/image_get_params.py +16 -0
- gcore/types/cloud/instances/image_list_params.py +33 -0
- gcore/types/cloud/instances/image_update_params.py +43 -0
- gcore/types/cloud/instances/image_upload_params.py +62 -0
- gcore/types/cloud/instances/instance_flavor.py +49 -0
- gcore/types/cloud/instances/instance_flavor_list.py +16 -0
- gcore/types/cloud/instances/interface_attach_params.py +253 -0
- gcore/types/cloud/instances/interface_detach_params.py +19 -0
- gcore/types/cloud/instances/metric_list_params.py +23 -0
- gcore/types/cloud/instances/metrics.py +52 -0
- gcore/types/cloud/instances/metrics_list.py +16 -0
- gcore/types/cloud/interface_ip_family.py +7 -0
- gcore/types/cloud/ip_assignment.py +13 -0
- gcore/types/cloud/ip_ranges.py +12 -0
- gcore/types/cloud/ip_version.py +7 -0
- gcore/types/cloud/laas_index_retention_policy.py +12 -0
- gcore/types/cloud/laas_index_retention_policy_param.py +13 -0
- gcore/types/cloud/lb_algorithm.py +7 -0
- gcore/types/cloud/lb_health_monitor_type.py +7 -0
- gcore/types/cloud/lb_listener_protocol.py +7 -0
- gcore/types/cloud/lb_pool_protocol.py +7 -0
- gcore/types/cloud/lb_session_persistence_type.py +7 -0
- gcore/types/cloud/listener_status.py +27 -0
- gcore/types/cloud/load_balancer.py +144 -0
- gcore/types/cloud/load_balancer_create_params.py +327 -0
- gcore/types/cloud/load_balancer_failover_params.py +16 -0
- gcore/types/cloud/load_balancer_flavor_detail.py +40 -0
- gcore/types/cloud/load_balancer_flavor_list.py +16 -0
- gcore/types/cloud/load_balancer_get_params.py +19 -0
- gcore/types/cloud/load_balancer_instance_role.py +7 -0
- gcore/types/cloud/load_balancer_l7_policy.py +86 -0
- gcore/types/cloud/load_balancer_l7_policy_list.py +16 -0
- gcore/types/cloud/load_balancer_l7_rule.py +72 -0
- gcore/types/cloud/load_balancer_l7_rule_list.py +16 -0
- gcore/types/cloud/load_balancer_list_params.py +53 -0
- gcore/types/cloud/load_balancer_listener_detail.py +97 -0
- gcore/types/cloud/load_balancer_listener_list.py +16 -0
- gcore/types/cloud/load_balancer_member_connectivity.py +7 -0
- gcore/types/cloud/load_balancer_metrics.py +32 -0
- gcore/types/cloud/load_balancer_metrics_list.py +16 -0
- gcore/types/cloud/load_balancer_operating_status.py +7 -0
- gcore/types/cloud/load_balancer_pool.py +87 -0
- gcore/types/cloud/load_balancer_pool_list.py +16 -0
- gcore/types/cloud/load_balancer_resize_params.py +16 -0
- gcore/types/cloud/load_balancer_statistics.py +22 -0
- gcore/types/cloud/load_balancer_status.py +38 -0
- gcore/types/cloud/load_balancer_status_list.py +16 -0
- gcore/types/cloud/load_balancer_update_params.py +43 -0
- gcore/types/cloud/load_balancers/__init__.py +15 -0
- gcore/types/cloud/load_balancers/flavor_list_params.py +16 -0
- gcore/types/cloud/load_balancers/l7_policies/__init__.py +6 -0
- gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +50 -0
- gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +43 -0
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +54 -0
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +51 -0
- gcore/types/cloud/load_balancers/listener_create_params.py +72 -0
- gcore/types/cloud/load_balancers/listener_get_params.py +16 -0
- gcore/types/cloud/load_balancers/listener_list_params.py +19 -0
- gcore/types/cloud/load_balancers/listener_update_params.py +55 -0
- gcore/types/cloud/load_balancers/metric_list_params.py +21 -0
- gcore/types/cloud/load_balancers/pool_create_params.py +141 -0
- gcore/types/cloud/load_balancers/pool_list_params.py +25 -0
- gcore/types/cloud/load_balancers/pool_update_params.py +139 -0
- gcore/types/cloud/load_balancers/pools/__init__.py +6 -0
- gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +49 -0
- gcore/types/cloud/load_balancers/pools/member_add_params.py +44 -0
- gcore/types/cloud/logging.py +22 -0
- gcore/types/cloud/member.py +47 -0
- gcore/types/cloud/member_status.py +24 -0
- gcore/types/cloud/network.py +79 -0
- gcore/types/cloud/network_create_params.py +34 -0
- gcore/types/cloud/network_details.py +79 -0
- gcore/types/cloud/network_interface.py +78 -0
- gcore/types/cloud/network_interface_list.py +16 -0
- gcore/types/cloud/network_list_params.py +36 -0
- gcore/types/cloud/network_update_params.py +16 -0
- gcore/types/cloud/networks/__init__.py +14 -0
- gcore/types/cloud/networks/router.py +83 -0
- gcore/types/cloud/networks/router_attach_subnet_params.py +24 -0
- gcore/types/cloud/networks/router_create_params.py +75 -0
- gcore/types/cloud/networks/router_detach_subnet_params.py +16 -0
- gcore/types/cloud/networks/router_list.py +16 -0
- gcore/types/cloud/networks/router_list_params.py +19 -0
- gcore/types/cloud/networks/router_update_params.py +45 -0
- gcore/types/cloud/networks/subnet_create_params.py +82 -0
- gcore/types/cloud/networks/subnet_list_params.py +58 -0
- gcore/types/cloud/networks/subnet_update_params.py +47 -0
- gcore/types/cloud/placement_group.py +41 -0
- gcore/types/cloud/placement_group_create_params.py +19 -0
- gcore/types/cloud/placement_group_list.py +16 -0
- gcore/types/cloud/pool_status.py +31 -0
- gcore/types/cloud/project.py +47 -0
- gcore/types/cloud/project_create_params.py +22 -0
- gcore/types/cloud/project_list_params.py +27 -0
- gcore/types/cloud/project_replace_params.py +18 -0
- gcore/types/cloud/provisioning_status.py +9 -0
- gcore/types/cloud/quota_get_all_response.py +340 -0
- gcore/types/cloud/quota_get_by_region_response.py +288 -0
- gcore/types/cloud/quota_get_global_response.py +51 -0
- gcore/types/cloud/quotas/__init__.py +8 -0
- gcore/types/cloud/quotas/request_create_params.py +193 -0
- gcore/types/cloud/quotas/request_get_response.py +205 -0
- gcore/types/cloud/quotas/request_list_params.py +22 -0
- gcore/types/cloud/quotas/request_list_response.py +205 -0
- gcore/types/cloud/region.py +101 -0
- gcore/types/cloud/region_capacity.py +16 -0
- gcore/types/cloud/region_capacity_list.py +16 -0
- gcore/types/cloud/region_get_params.py +18 -0
- gcore/types/cloud/region_list_params.py +31 -0
- gcore/types/cloud/registries/__init__.py +14 -0
- gcore/types/cloud/registries/registry_artifact.py +35 -0
- gcore/types/cloud/registries/registry_artifact_list.py +16 -0
- gcore/types/cloud/registries/registry_repository.py +30 -0
- gcore/types/cloud/registries/registry_repository_list.py +16 -0
- gcore/types/cloud/registries/registry_user.py +28 -0
- gcore/types/cloud/registries/registry_user_created.py +31 -0
- gcore/types/cloud/registries/registry_user_list.py +16 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +36 -0
- gcore/types/cloud/registries/user_create_params.py +30 -0
- gcore/types/cloud/registries/user_update_params.py +21 -0
- gcore/types/cloud/registry.py +33 -0
- gcore/types/cloud/registry_create_params.py +24 -0
- gcore/types/cloud/registry_list.py +16 -0
- gcore/types/cloud/registry_resize_params.py +16 -0
- gcore/types/cloud/registry_tag.py +27 -0
- gcore/types/cloud/reserved_fixed_ip.py +98 -0
- gcore/types/cloud/reserved_fixed_ip_create_params.py +107 -0
- gcore/types/cloud/reserved_fixed_ip_list_params.py +47 -0
- gcore/types/cloud/reserved_fixed_ips/__init__.py +12 -0
- gcore/types/cloud/reserved_fixed_ips/candidate_port.py +26 -0
- gcore/types/cloud/reserved_fixed_ips/candidate_port_list.py +16 -0
- gcore/types/cloud/reserved_fixed_ips/connected_port.py +26 -0
- gcore/types/cloud/reserved_fixed_ips/connected_port_list.py +16 -0
- gcore/types/cloud/reserved_fixed_ips/ip_with_subnet.py +17 -0
- gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +17 -0
- gcore/types/cloud/reserved_fixed_ips/vip_toggle_params.py +16 -0
- gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +17 -0
- gcore/types/cloud/route.py +16 -0
- gcore/types/cloud/secret.py +64 -0
- gcore/types/cloud/secret_create_params.py +66 -0
- gcore/types/cloud/secret_list_response.py +16 -0
- gcore/types/cloud/secret_upload_tls_certificate_params.py +39 -0
- gcore/types/cloud/security_group.py +45 -0
- gcore/types/cloud/security_group_copy_params.py +16 -0
- gcore/types/cloud/security_group_create_params.py +94 -0
- gcore/types/cloud/security_group_list_params.py +30 -0
- gcore/types/cloud/security_group_rule.py +83 -0
- gcore/types/cloud/security_group_update_params.py +83 -0
- gcore/types/cloud/security_groups/__init__.py +6 -0
- gcore/types/cloud/security_groups/rule_create_params.py +65 -0
- gcore/types/cloud/security_groups/rule_replace_params.py +72 -0
- gcore/types/cloud/session_persistence.py +22 -0
- gcore/types/cloud/ssh_key.py +39 -0
- gcore/types/cloud/ssh_key_create_params.py +31 -0
- gcore/types/cloud/ssh_key_created.py +53 -0
- gcore/types/cloud/ssh_key_list_params.py +21 -0
- gcore/types/cloud/ssh_key_update_params.py +15 -0
- gcore/types/cloud/subnet.py +87 -0
- gcore/types/cloud/tag.py +16 -0
- gcore/types/cloud/tag_update_map_param.py +10 -0
- gcore/types/cloud/task.py +191 -0
- gcore/types/cloud/task_acknowledge_all_params.py +16 -0
- gcore/types/cloud/task_id_list.py +12 -0
- gcore/types/cloud/task_list_params.py +104 -0
- gcore/types/cloud/users/__init__.py +9 -0
- gcore/types/cloud/users/role_assignment.py +33 -0
- gcore/types/cloud/users/role_assignment_create_params.py +22 -0
- gcore/types/cloud/users/role_assignment_list_params.py +25 -0
- gcore/types/cloud/users/role_assignment_update_delete.py +10 -0
- gcore/types/cloud/users/role_assignment_update_params.py +22 -0
- gcore/types/cloud/volume.py +141 -0
- gcore/types/cloud/volume_attach_to_instance_params.py +21 -0
- gcore/types/cloud/volume_change_type_params.py +18 -0
- gcore/types/cloud/volume_create_params.py +176 -0
- gcore/types/cloud/volume_delete_params.py +18 -0
- gcore/types/cloud/volume_detach_from_instance_params.py +18 -0
- gcore/types/cloud/volume_list_params.py +56 -0
- gcore/types/cloud/volume_resize_params.py +18 -0
- gcore/types/cloud/volume_update_params.py +18 -0
- gcore-0.1.0a1.dist-info/METADATA +485 -0
- gcore-0.1.0a1.dist-info/RECORD +420 -0
- gcore-0.1.0a1.dist-info/WHEEL +4 -0
- gcore-0.1.0a1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ...._compat import cached_property
|
|
10
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ...._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ...._base_client import make_request_options
|
|
18
|
+
from ....types.cloud.baremetal import flavor_list_params, flavor_list_suitable_params
|
|
19
|
+
from ....types.cloud.baremetal_flavor_list import BaremetalFlavorList
|
|
20
|
+
|
|
21
|
+
__all__ = ["FlavorsResource", "AsyncFlavorsResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class FlavorsResource(SyncAPIResource):
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> FlavorsResourceWithRawResponse:
|
|
27
|
+
"""
|
|
28
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
+
the raw response object instead of the parsed content.
|
|
30
|
+
|
|
31
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
32
|
+
"""
|
|
33
|
+
return FlavorsResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> FlavorsResourceWithStreamingResponse:
|
|
37
|
+
"""
|
|
38
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
41
|
+
"""
|
|
42
|
+
return FlavorsResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def list(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
project_id: int | None = None,
|
|
48
|
+
region_id: int | None = None,
|
|
49
|
+
disabled: bool | NotGiven = NOT_GIVEN,
|
|
50
|
+
exclude_linux: bool | NotGiven = NOT_GIVEN,
|
|
51
|
+
exclude_windows: bool | NotGiven = NOT_GIVEN,
|
|
52
|
+
include_capacity: bool | NotGiven = NOT_GIVEN,
|
|
53
|
+
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
54
|
+
include_reservation_stock: bool | NotGiven = NOT_GIVEN,
|
|
55
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
|
+
extra_headers: Headers | None = None,
|
|
58
|
+
extra_query: Query | None = None,
|
|
59
|
+
extra_body: Body | None = None,
|
|
60
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
|
+
) -> BaremetalFlavorList:
|
|
62
|
+
"""Retrieve a list of flavors.
|
|
63
|
+
|
|
64
|
+
When the include_prices query parameter is
|
|
65
|
+
specified, the list shows prices. A client in trial mode gets all price values
|
|
66
|
+
as 0. If you get Pricing Error contact the support
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
disabled: Flag for filtering disabled flavors in the region. Defaults to true
|
|
70
|
+
|
|
71
|
+
exclude_linux: Set to true to exclude flavors dedicated to linux images. Default False
|
|
72
|
+
|
|
73
|
+
exclude_windows: Set to true to exclude flavors dedicated to windows images. Default False
|
|
74
|
+
|
|
75
|
+
include_capacity: Set to true if the response should include flavor capacity
|
|
76
|
+
|
|
77
|
+
include_prices: Set to true if the response should include flavor prices
|
|
78
|
+
|
|
79
|
+
include_reservation_stock: Optional. Set to true if flavor listing should include count of reserved
|
|
80
|
+
resources in stock.
|
|
81
|
+
|
|
82
|
+
extra_headers: Send extra headers
|
|
83
|
+
|
|
84
|
+
extra_query: Add additional query parameters to the request
|
|
85
|
+
|
|
86
|
+
extra_body: Add additional JSON properties to the request
|
|
87
|
+
|
|
88
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
89
|
+
"""
|
|
90
|
+
if project_id is None:
|
|
91
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
92
|
+
if region_id is None:
|
|
93
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
94
|
+
return self._get(
|
|
95
|
+
f"/cloud/v1/bmflavors/{project_id}/{region_id}",
|
|
96
|
+
options=make_request_options(
|
|
97
|
+
extra_headers=extra_headers,
|
|
98
|
+
extra_query=extra_query,
|
|
99
|
+
extra_body=extra_body,
|
|
100
|
+
timeout=timeout,
|
|
101
|
+
query=maybe_transform(
|
|
102
|
+
{
|
|
103
|
+
"disabled": disabled,
|
|
104
|
+
"exclude_linux": exclude_linux,
|
|
105
|
+
"exclude_windows": exclude_windows,
|
|
106
|
+
"include_capacity": include_capacity,
|
|
107
|
+
"include_prices": include_prices,
|
|
108
|
+
"include_reservation_stock": include_reservation_stock,
|
|
109
|
+
},
|
|
110
|
+
flavor_list_params.FlavorListParams,
|
|
111
|
+
),
|
|
112
|
+
),
|
|
113
|
+
cast_to=BaremetalFlavorList,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
def list_suitable(
|
|
117
|
+
self,
|
|
118
|
+
*,
|
|
119
|
+
project_id: int | None = None,
|
|
120
|
+
region_id: int | None = None,
|
|
121
|
+
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
122
|
+
apptemplate_id: str | NotGiven = NOT_GIVEN,
|
|
123
|
+
image_id: str | NotGiven = NOT_GIVEN,
|
|
124
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
125
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
126
|
+
extra_headers: Headers | None = None,
|
|
127
|
+
extra_query: Query | None = None,
|
|
128
|
+
extra_body: Body | None = None,
|
|
129
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
130
|
+
) -> BaremetalFlavorList:
|
|
131
|
+
"""
|
|
132
|
+
List suitalbe flavors for bare metal server creation
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
include_prices: Set to true if flavor listing should include flavor prices
|
|
136
|
+
|
|
137
|
+
apptemplate_id: Apptemplate ID
|
|
138
|
+
|
|
139
|
+
image_id: Image ID
|
|
140
|
+
|
|
141
|
+
extra_headers: Send extra headers
|
|
142
|
+
|
|
143
|
+
extra_query: Add additional query parameters to the request
|
|
144
|
+
|
|
145
|
+
extra_body: Add additional JSON properties to the request
|
|
146
|
+
|
|
147
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
148
|
+
"""
|
|
149
|
+
if project_id is None:
|
|
150
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
151
|
+
if region_id is None:
|
|
152
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
153
|
+
return self._post(
|
|
154
|
+
f"/cloud/v1/bminstances/{project_id}/{region_id}/available_flavors",
|
|
155
|
+
body=maybe_transform(
|
|
156
|
+
{
|
|
157
|
+
"apptemplate_id": apptemplate_id,
|
|
158
|
+
"image_id": image_id,
|
|
159
|
+
},
|
|
160
|
+
flavor_list_suitable_params.FlavorListSuitableParams,
|
|
161
|
+
),
|
|
162
|
+
options=make_request_options(
|
|
163
|
+
extra_headers=extra_headers,
|
|
164
|
+
extra_query=extra_query,
|
|
165
|
+
extra_body=extra_body,
|
|
166
|
+
timeout=timeout,
|
|
167
|
+
query=maybe_transform(
|
|
168
|
+
{"include_prices": include_prices}, flavor_list_suitable_params.FlavorListSuitableParams
|
|
169
|
+
),
|
|
170
|
+
),
|
|
171
|
+
cast_to=BaremetalFlavorList,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class AsyncFlavorsResource(AsyncAPIResource):
|
|
176
|
+
@cached_property
|
|
177
|
+
def with_raw_response(self) -> AsyncFlavorsResourceWithRawResponse:
|
|
178
|
+
"""
|
|
179
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
180
|
+
the raw response object instead of the parsed content.
|
|
181
|
+
|
|
182
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
183
|
+
"""
|
|
184
|
+
return AsyncFlavorsResourceWithRawResponse(self)
|
|
185
|
+
|
|
186
|
+
@cached_property
|
|
187
|
+
def with_streaming_response(self) -> AsyncFlavorsResourceWithStreamingResponse:
|
|
188
|
+
"""
|
|
189
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
190
|
+
|
|
191
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
192
|
+
"""
|
|
193
|
+
return AsyncFlavorsResourceWithStreamingResponse(self)
|
|
194
|
+
|
|
195
|
+
async def list(
|
|
196
|
+
self,
|
|
197
|
+
*,
|
|
198
|
+
project_id: int | None = None,
|
|
199
|
+
region_id: int | None = None,
|
|
200
|
+
disabled: bool | NotGiven = NOT_GIVEN,
|
|
201
|
+
exclude_linux: bool | NotGiven = NOT_GIVEN,
|
|
202
|
+
exclude_windows: bool | NotGiven = NOT_GIVEN,
|
|
203
|
+
include_capacity: bool | NotGiven = NOT_GIVEN,
|
|
204
|
+
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
205
|
+
include_reservation_stock: bool | NotGiven = NOT_GIVEN,
|
|
206
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
207
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
208
|
+
extra_headers: Headers | None = None,
|
|
209
|
+
extra_query: Query | None = None,
|
|
210
|
+
extra_body: Body | None = None,
|
|
211
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
212
|
+
) -> BaremetalFlavorList:
|
|
213
|
+
"""Retrieve a list of flavors.
|
|
214
|
+
|
|
215
|
+
When the include_prices query parameter is
|
|
216
|
+
specified, the list shows prices. A client in trial mode gets all price values
|
|
217
|
+
as 0. If you get Pricing Error contact the support
|
|
218
|
+
|
|
219
|
+
Args:
|
|
220
|
+
disabled: Flag for filtering disabled flavors in the region. Defaults to true
|
|
221
|
+
|
|
222
|
+
exclude_linux: Set to true to exclude flavors dedicated to linux images. Default False
|
|
223
|
+
|
|
224
|
+
exclude_windows: Set to true to exclude flavors dedicated to windows images. Default False
|
|
225
|
+
|
|
226
|
+
include_capacity: Set to true if the response should include flavor capacity
|
|
227
|
+
|
|
228
|
+
include_prices: Set to true if the response should include flavor prices
|
|
229
|
+
|
|
230
|
+
include_reservation_stock: Optional. Set to true if flavor listing should include count of reserved
|
|
231
|
+
resources in stock.
|
|
232
|
+
|
|
233
|
+
extra_headers: Send extra headers
|
|
234
|
+
|
|
235
|
+
extra_query: Add additional query parameters to the request
|
|
236
|
+
|
|
237
|
+
extra_body: Add additional JSON properties to the request
|
|
238
|
+
|
|
239
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
240
|
+
"""
|
|
241
|
+
if project_id is None:
|
|
242
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
243
|
+
if region_id is None:
|
|
244
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
245
|
+
return await self._get(
|
|
246
|
+
f"/cloud/v1/bmflavors/{project_id}/{region_id}",
|
|
247
|
+
options=make_request_options(
|
|
248
|
+
extra_headers=extra_headers,
|
|
249
|
+
extra_query=extra_query,
|
|
250
|
+
extra_body=extra_body,
|
|
251
|
+
timeout=timeout,
|
|
252
|
+
query=await async_maybe_transform(
|
|
253
|
+
{
|
|
254
|
+
"disabled": disabled,
|
|
255
|
+
"exclude_linux": exclude_linux,
|
|
256
|
+
"exclude_windows": exclude_windows,
|
|
257
|
+
"include_capacity": include_capacity,
|
|
258
|
+
"include_prices": include_prices,
|
|
259
|
+
"include_reservation_stock": include_reservation_stock,
|
|
260
|
+
},
|
|
261
|
+
flavor_list_params.FlavorListParams,
|
|
262
|
+
),
|
|
263
|
+
),
|
|
264
|
+
cast_to=BaremetalFlavorList,
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
async def list_suitable(
|
|
268
|
+
self,
|
|
269
|
+
*,
|
|
270
|
+
project_id: int | None = None,
|
|
271
|
+
region_id: int | None = None,
|
|
272
|
+
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
273
|
+
apptemplate_id: str | NotGiven = NOT_GIVEN,
|
|
274
|
+
image_id: str | NotGiven = NOT_GIVEN,
|
|
275
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
276
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
277
|
+
extra_headers: Headers | None = None,
|
|
278
|
+
extra_query: Query | None = None,
|
|
279
|
+
extra_body: Body | None = None,
|
|
280
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
281
|
+
) -> BaremetalFlavorList:
|
|
282
|
+
"""
|
|
283
|
+
List suitalbe flavors for bare metal server creation
|
|
284
|
+
|
|
285
|
+
Args:
|
|
286
|
+
include_prices: Set to true if flavor listing should include flavor prices
|
|
287
|
+
|
|
288
|
+
apptemplate_id: Apptemplate ID
|
|
289
|
+
|
|
290
|
+
image_id: Image ID
|
|
291
|
+
|
|
292
|
+
extra_headers: Send extra headers
|
|
293
|
+
|
|
294
|
+
extra_query: Add additional query parameters to the request
|
|
295
|
+
|
|
296
|
+
extra_body: Add additional JSON properties to the request
|
|
297
|
+
|
|
298
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
299
|
+
"""
|
|
300
|
+
if project_id is None:
|
|
301
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
302
|
+
if region_id is None:
|
|
303
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
304
|
+
return await self._post(
|
|
305
|
+
f"/cloud/v1/bminstances/{project_id}/{region_id}/available_flavors",
|
|
306
|
+
body=await async_maybe_transform(
|
|
307
|
+
{
|
|
308
|
+
"apptemplate_id": apptemplate_id,
|
|
309
|
+
"image_id": image_id,
|
|
310
|
+
},
|
|
311
|
+
flavor_list_suitable_params.FlavorListSuitableParams,
|
|
312
|
+
),
|
|
313
|
+
options=make_request_options(
|
|
314
|
+
extra_headers=extra_headers,
|
|
315
|
+
extra_query=extra_query,
|
|
316
|
+
extra_body=extra_body,
|
|
317
|
+
timeout=timeout,
|
|
318
|
+
query=await async_maybe_transform(
|
|
319
|
+
{"include_prices": include_prices}, flavor_list_suitable_params.FlavorListSuitableParams
|
|
320
|
+
),
|
|
321
|
+
),
|
|
322
|
+
cast_to=BaremetalFlavorList,
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
class FlavorsResourceWithRawResponse:
|
|
327
|
+
def __init__(self, flavors: FlavorsResource) -> None:
|
|
328
|
+
self._flavors = flavors
|
|
329
|
+
|
|
330
|
+
self.list = to_raw_response_wrapper(
|
|
331
|
+
flavors.list,
|
|
332
|
+
)
|
|
333
|
+
self.list_suitable = to_raw_response_wrapper(
|
|
334
|
+
flavors.list_suitable,
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
class AsyncFlavorsResourceWithRawResponse:
|
|
339
|
+
def __init__(self, flavors: AsyncFlavorsResource) -> None:
|
|
340
|
+
self._flavors = flavors
|
|
341
|
+
|
|
342
|
+
self.list = async_to_raw_response_wrapper(
|
|
343
|
+
flavors.list,
|
|
344
|
+
)
|
|
345
|
+
self.list_suitable = async_to_raw_response_wrapper(
|
|
346
|
+
flavors.list_suitable,
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
class FlavorsResourceWithStreamingResponse:
|
|
351
|
+
def __init__(self, flavors: FlavorsResource) -> None:
|
|
352
|
+
self._flavors = flavors
|
|
353
|
+
|
|
354
|
+
self.list = to_streamed_response_wrapper(
|
|
355
|
+
flavors.list,
|
|
356
|
+
)
|
|
357
|
+
self.list_suitable = to_streamed_response_wrapper(
|
|
358
|
+
flavors.list_suitable,
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
class AsyncFlavorsResourceWithStreamingResponse:
|
|
363
|
+
def __init__(self, flavors: AsyncFlavorsResource) -> None:
|
|
364
|
+
self._flavors = flavors
|
|
365
|
+
|
|
366
|
+
self.list = async_to_streamed_response_wrapper(
|
|
367
|
+
flavors.list,
|
|
368
|
+
)
|
|
369
|
+
self.list_suitable = async_to_streamed_response_wrapper(
|
|
370
|
+
flavors.list_suitable,
|
|
371
|
+
)
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ...._compat import cached_property
|
|
13
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ...._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ...._base_client import make_request_options
|
|
21
|
+
from ....types.cloud.baremetal import image_list_params
|
|
22
|
+
from ....types.cloud.image_list import ImageList
|
|
23
|
+
|
|
24
|
+
__all__ = ["ImagesResource", "AsyncImagesResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ImagesResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def with_raw_response(self) -> ImagesResourceWithRawResponse:
|
|
30
|
+
"""
|
|
31
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
32
|
+
the raw response object instead of the parsed content.
|
|
33
|
+
|
|
34
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
35
|
+
"""
|
|
36
|
+
return ImagesResourceWithRawResponse(self)
|
|
37
|
+
|
|
38
|
+
@cached_property
|
|
39
|
+
def with_streaming_response(self) -> ImagesResourceWithStreamingResponse:
|
|
40
|
+
"""
|
|
41
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
42
|
+
|
|
43
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
44
|
+
"""
|
|
45
|
+
return ImagesResourceWithStreamingResponse(self)
|
|
46
|
+
|
|
47
|
+
def list(
|
|
48
|
+
self,
|
|
49
|
+
*,
|
|
50
|
+
project_id: int | None = None,
|
|
51
|
+
region_id: int | None = None,
|
|
52
|
+
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
53
|
+
private: str | NotGiven = NOT_GIVEN,
|
|
54
|
+
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
55
|
+
tag_key_value: str | NotGiven = NOT_GIVEN,
|
|
56
|
+
visibility: Literal["private", "public", "shared"] | NotGiven = NOT_GIVEN,
|
|
57
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
58
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
59
|
+
extra_headers: Headers | None = None,
|
|
60
|
+
extra_query: Query | None = None,
|
|
61
|
+
extra_body: Body | None = None,
|
|
62
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
63
|
+
) -> ImageList:
|
|
64
|
+
"""Retrieve the available images list for bare metal servers.
|
|
65
|
+
|
|
66
|
+
Returned entities may
|
|
67
|
+
or may not be owned by the project
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
include_prices: Show price
|
|
71
|
+
|
|
72
|
+
private: Any value to show private images
|
|
73
|
+
|
|
74
|
+
tag_key: Filter by tag keys.
|
|
75
|
+
|
|
76
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string. 'curl -G
|
|
77
|
+
--data-urlencode 'tag_key_value={"key": "value"}' --url
|
|
78
|
+
'http://localhost:1111/v1/images/1/1'"
|
|
79
|
+
|
|
80
|
+
visibility: Image visibility. Globally visible images are public
|
|
81
|
+
|
|
82
|
+
extra_headers: Send extra headers
|
|
83
|
+
|
|
84
|
+
extra_query: Add additional query parameters to the request
|
|
85
|
+
|
|
86
|
+
extra_body: Add additional JSON properties to the request
|
|
87
|
+
|
|
88
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
89
|
+
"""
|
|
90
|
+
if project_id is None:
|
|
91
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
92
|
+
if region_id is None:
|
|
93
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
94
|
+
return self._get(
|
|
95
|
+
f"/cloud/v1/bmimages/{project_id}/{region_id}",
|
|
96
|
+
options=make_request_options(
|
|
97
|
+
extra_headers=extra_headers,
|
|
98
|
+
extra_query=extra_query,
|
|
99
|
+
extra_body=extra_body,
|
|
100
|
+
timeout=timeout,
|
|
101
|
+
query=maybe_transform(
|
|
102
|
+
{
|
|
103
|
+
"include_prices": include_prices,
|
|
104
|
+
"private": private,
|
|
105
|
+
"tag_key": tag_key,
|
|
106
|
+
"tag_key_value": tag_key_value,
|
|
107
|
+
"visibility": visibility,
|
|
108
|
+
},
|
|
109
|
+
image_list_params.ImageListParams,
|
|
110
|
+
),
|
|
111
|
+
),
|
|
112
|
+
cast_to=ImageList,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class AsyncImagesResource(AsyncAPIResource):
|
|
117
|
+
@cached_property
|
|
118
|
+
def with_raw_response(self) -> AsyncImagesResourceWithRawResponse:
|
|
119
|
+
"""
|
|
120
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
121
|
+
the raw response object instead of the parsed content.
|
|
122
|
+
|
|
123
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
124
|
+
"""
|
|
125
|
+
return AsyncImagesResourceWithRawResponse(self)
|
|
126
|
+
|
|
127
|
+
@cached_property
|
|
128
|
+
def with_streaming_response(self) -> AsyncImagesResourceWithStreamingResponse:
|
|
129
|
+
"""
|
|
130
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
131
|
+
|
|
132
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
133
|
+
"""
|
|
134
|
+
return AsyncImagesResourceWithStreamingResponse(self)
|
|
135
|
+
|
|
136
|
+
async def list(
|
|
137
|
+
self,
|
|
138
|
+
*,
|
|
139
|
+
project_id: int | None = None,
|
|
140
|
+
region_id: int | None = None,
|
|
141
|
+
include_prices: bool | NotGiven = NOT_GIVEN,
|
|
142
|
+
private: str | NotGiven = NOT_GIVEN,
|
|
143
|
+
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
144
|
+
tag_key_value: str | NotGiven = NOT_GIVEN,
|
|
145
|
+
visibility: Literal["private", "public", "shared"] | NotGiven = NOT_GIVEN,
|
|
146
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
147
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
148
|
+
extra_headers: Headers | None = None,
|
|
149
|
+
extra_query: Query | None = None,
|
|
150
|
+
extra_body: Body | None = None,
|
|
151
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
152
|
+
) -> ImageList:
|
|
153
|
+
"""Retrieve the available images list for bare metal servers.
|
|
154
|
+
|
|
155
|
+
Returned entities may
|
|
156
|
+
or may not be owned by the project
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
include_prices: Show price
|
|
160
|
+
|
|
161
|
+
private: Any value to show private images
|
|
162
|
+
|
|
163
|
+
tag_key: Filter by tag keys.
|
|
164
|
+
|
|
165
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string. 'curl -G
|
|
166
|
+
--data-urlencode 'tag_key_value={"key": "value"}' --url
|
|
167
|
+
'http://localhost:1111/v1/images/1/1'"
|
|
168
|
+
|
|
169
|
+
visibility: Image visibility. Globally visible images are public
|
|
170
|
+
|
|
171
|
+
extra_headers: Send extra headers
|
|
172
|
+
|
|
173
|
+
extra_query: Add additional query parameters to the request
|
|
174
|
+
|
|
175
|
+
extra_body: Add additional JSON properties to the request
|
|
176
|
+
|
|
177
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
178
|
+
"""
|
|
179
|
+
if project_id is None:
|
|
180
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
181
|
+
if region_id is None:
|
|
182
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
183
|
+
return await self._get(
|
|
184
|
+
f"/cloud/v1/bmimages/{project_id}/{region_id}",
|
|
185
|
+
options=make_request_options(
|
|
186
|
+
extra_headers=extra_headers,
|
|
187
|
+
extra_query=extra_query,
|
|
188
|
+
extra_body=extra_body,
|
|
189
|
+
timeout=timeout,
|
|
190
|
+
query=await async_maybe_transform(
|
|
191
|
+
{
|
|
192
|
+
"include_prices": include_prices,
|
|
193
|
+
"private": private,
|
|
194
|
+
"tag_key": tag_key,
|
|
195
|
+
"tag_key_value": tag_key_value,
|
|
196
|
+
"visibility": visibility,
|
|
197
|
+
},
|
|
198
|
+
image_list_params.ImageListParams,
|
|
199
|
+
),
|
|
200
|
+
),
|
|
201
|
+
cast_to=ImageList,
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class ImagesResourceWithRawResponse:
|
|
206
|
+
def __init__(self, images: ImagesResource) -> None:
|
|
207
|
+
self._images = images
|
|
208
|
+
|
|
209
|
+
self.list = to_raw_response_wrapper(
|
|
210
|
+
images.list,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
class AsyncImagesResourceWithRawResponse:
|
|
215
|
+
def __init__(self, images: AsyncImagesResource) -> None:
|
|
216
|
+
self._images = images
|
|
217
|
+
|
|
218
|
+
self.list = async_to_raw_response_wrapper(
|
|
219
|
+
images.list,
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class ImagesResourceWithStreamingResponse:
|
|
224
|
+
def __init__(self, images: ImagesResource) -> None:
|
|
225
|
+
self._images = images
|
|
226
|
+
|
|
227
|
+
self.list = to_streamed_response_wrapper(
|
|
228
|
+
images.list,
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class AsyncImagesResourceWithStreamingResponse:
|
|
233
|
+
def __init__(self, images: AsyncImagesResource) -> None:
|
|
234
|
+
self._images = images
|
|
235
|
+
|
|
236
|
+
self.list = async_to_streamed_response_wrapper(
|
|
237
|
+
images.list,
|
|
238
|
+
)
|