gcore 0.2.0__py3-none-any.whl → 0.4.0__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 +2 -1
- gcore/_base_client.py +44 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +75 -78
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +9 -14
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +39 -28
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +11 -12
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +12 -8
- gcore/resources/cloud/inference/deployments/deployments.py +16 -8
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +107 -100
- gcore/resources/cloud/instances/interfaces.py +6 -6
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +30 -22
- gcore/resources/cloud/load_balancers/listeners.py +31 -22
- gcore/resources/cloud/load_balancers/load_balancers.py +99 -43
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +12 -8
- gcore/resources/cloud/networks/networks.py +83 -19
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +55 -15
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -20
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +25 -32
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +26 -26
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +102 -94
- gcore/resources/cloud/users/role_assignments.py +16 -18
- gcore/resources/cloud/volumes.py +155 -65
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +84 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +140 -0
- gcore/resources/waap/domains/advanced_rules.py +876 -0
- gcore/resources/waap/domains/analytics/__init__.py +33 -0
- gcore/resources/waap/domains/analytics/analytics.py +676 -0
- gcore/resources/waap/domains/analytics/requests.py +378 -0
- gcore/resources/waap/domains/api_discovery/__init__.py +33 -0
- gcore/resources/waap/domains/api_discovery/api_discovery.py +530 -0
- gcore/resources/waap/domains/api_discovery/scan_results.py +352 -0
- gcore/resources/waap/domains/api_path_groups.py +163 -0
- gcore/resources/waap/domains/api_paths.py +771 -0
- gcore/resources/waap/domains/custom_rules.py +889 -0
- gcore/resources/waap/domains/domains.py +399 -0
- gcore/resources/waap/domains/firewall_rules.py +884 -0
- gcore/resources/waap/domains/insight_silences.py +689 -0
- gcore/resources/waap/domains/insights.py +425 -0
- gcore/resources/waap/domains/policies.py +173 -0
- gcore/resources/waap/domains/settings.py +5 -5
- gcore/resources/waap/ip_info.py +1017 -0
- gcore/resources/waap/organizations.py +217 -0
- gcore/resources/waap/statistics.py +225 -0
- gcore/resources/waap/tags.py +233 -0
- gcore/resources/waap/waap.py +257 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +13 -17
- gcore/types/cloud/baremetal/server_list_params.py +8 -12
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +1 -1
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -6
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +4 -5
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_server.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +3 -5
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +10 -10
- gcore/types/cloud/gpu_baremetal_flavor.py +3 -3
- gcore/types/cloud/health_monitor.py +6 -1
- gcore/types/cloud/image.py +1 -1
- gcore/types/cloud/inference/deployment_create_params.py +4 -4
- gcore/types/cloud/inference/deployment_update_params.py +6 -6
- gcore/types/cloud/inference/inference.py +2 -4
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +15 -18
- gcore/types/cloud/instance_list_params.py +8 -12
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- gcore/types/cloud/instances/instance_flavor.py +3 -3
- gcore/types/cloud/instances/interface_attach_params.py +10 -10
- gcore/types/cloud/load_balancer_create_params.py +25 -19
- gcore/types/cloud/load_balancer_flavor_detail.py +3 -3
- gcore/types/cloud/load_balancer_l7_policy.py +5 -5
- gcore/types/cloud/load_balancer_list_params.py +5 -9
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +5 -5
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +5 -5
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -4
- gcore/types/cloud/load_balancers/listener_update_params.py +3 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +10 -5
- gcore/types/cloud/load_balancers/pool_update_params.py +10 -5
- gcore/types/cloud/load_balancers/pools/member_add_params.py +9 -4
- gcore/types/cloud/member.py +8 -3
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +5 -6
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -4
- gcore/types/cloud/networks/subnet_list_params.py +2 -6
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- gcore/types/cloud/registry_create_params.py +3 -5
- gcore/types/cloud/reserved_fixed_ip_create_params.py +2 -2
- gcore/types/cloud/reserved_fixed_ip_list_params.py +3 -3
- gcore/types/cloud/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/task.py +1 -1
- gcore/types/cloud/task_list_params.py +49 -45
- gcore/types/cloud/users/role_assignment_create_params.py +1 -1
- gcore/types/cloud/users/role_assignment_update_params.py +1 -1
- gcore/types/cloud/volume_create_params.py +6 -6
- gcore/types/cloud/volume_list_params.py +3 -7
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +97 -2
- gcore/types/waap/custom_page_set_create_params.py +35 -0
- gcore/types/waap/custom_page_set_list_params.py +25 -0
- gcore/types/waap/custom_page_set_preview_params.py +34 -0
- gcore/types/waap/custom_page_set_update_params.py +35 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domains/__init__.py +42 -0
- gcore/types/waap/domains/advanced_rule_create_params.py +80 -0
- gcore/types/waap/domains/advanced_rule_list_params.py +58 -0
- gcore/types/waap/domains/advanced_rule_update_params.py +83 -0
- gcore/types/waap/domains/analytics/__init__.py +5 -0
- gcore/types/waap/domains/analytics/request_list_params.py +53 -0
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +34 -0
- gcore/types/waap/domains/analytics_list_ddos_attacks_params.py +28 -0
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +31 -0
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +26 -0
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +10 -0
- gcore/types/waap/domains/api_discovery/__init__.py +7 -0
- gcore/types/waap/domains/api_discovery/scan_result_get_response.py +29 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_params.py +41 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +29 -0
- gcore/types/waap/domains/api_discovery_get_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_scan_openapi_response.py +10 -0
- gcore/types/waap/domains/api_discovery_update_settings_params.py +34 -0
- gcore/types/waap/domains/api_discovery_update_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_params.py +19 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +10 -0
- gcore/types/waap/domains/api_path_create_params.py +31 -0
- gcore/types/waap/domains/api_path_create_response.py +50 -0
- gcore/types/waap/domains/api_path_get_response.py +50 -0
- gcore/types/waap/domains/api_path_group_list_response.py +12 -0
- gcore/types/waap/domains/api_path_list_params.py +62 -0
- gcore/types/waap/domains/api_path_list_response.py +50 -0
- gcore/types/waap/domains/api_path_update_params.py +29 -0
- gcore/types/waap/domains/custom_rule_create_params.py +372 -0
- gcore/types/waap/domains/custom_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/custom_rule_list_params.py +35 -0
- gcore/types/waap/domains/custom_rule_update_params.py +375 -0
- gcore/types/waap/domains/firewall_rule_create_params.py +75 -0
- gcore/types/waap/domains/firewall_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/firewall_rule_list_params.py +33 -0
- gcore/types/waap/domains/firewall_rule_update_params.py +78 -0
- gcore/types/waap/domains/insight_list_params.py +34 -0
- gcore/types/waap/domains/insight_replace_params.py +17 -0
- gcore/types/waap/domains/insight_silence_create_params.py +28 -0
- gcore/types/waap/domains/insight_silence_list_params.py +33 -0
- gcore/types/waap/domains/insight_silence_update_params.py +28 -0
- gcore/types/waap/domains/setting_update_params.py +7 -0
- gcore/types/waap/ip_info_get_attack_time_series_params.py +12 -0
- gcore/types/waap/ip_info_get_attack_time_series_response.py +10 -0
- gcore/types/waap/ip_info_get_blocked_requests_params.py +15 -0
- gcore/types/waap/ip_info_get_blocked_requests_response.py +10 -0
- gcore/types/waap/ip_info_get_counts_params.py +19 -0
- gcore/types/waap/ip_info_get_ddos_attack_series_params.py +12 -0
- gcore/types/waap/ip_info_get_params.py +12 -0
- gcore/types/waap/ip_info_get_top_sessions_params.py +15 -0
- gcore/types/waap/ip_info_get_top_sessions_response.py +10 -0
- gcore/types/waap/ip_info_get_top_urls_params.py +15 -0
- gcore/types/waap/ip_info_get_top_urls_response.py +10 -0
- gcore/types/waap/ip_info_get_top_user_agents_params.py +15 -0
- gcore/types/waap/ip_info_get_top_user_agents_response.py +10 -0
- gcore/types/waap/ip_info_list_attacked_countries_params.py +12 -0
- gcore/types/waap/ip_info_list_attacked_countries_response.py +10 -0
- gcore/types/waap/organization_list_params.py +22 -0
- gcore/types/waap/statistic_get_usage_series_params.py +25 -0
- gcore/types/waap/tag_list_params.py +28 -0
- gcore/types/waap/waap_advanced_rule.py +83 -0
- gcore/types/waap/waap_advanced_rule_descriptor.py +49 -0
- gcore/types/waap/waap_advanced_rule_descriptor_list.py +15 -0
- gcore/types/waap/waap_block_csrf_page_data.py +28 -0
- gcore/types/waap/waap_block_csrf_page_data_param.py +28 -0
- gcore/types/waap/waap_block_page_data.py +28 -0
- gcore/types/waap/waap_block_page_data_param.py +28 -0
- gcore/types/waap/waap_blocked_statistics.py +36 -0
- gcore/types/waap/waap_captcha_page_data.py +31 -0
- gcore/types/waap/waap_captcha_page_data_param.py +31 -0
- gcore/types/waap/waap_common_tag.py +16 -0
- gcore/types/waap/waap_cookie_disabled_page_data.py +18 -0
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_count_statistics.py +36 -0
- gcore/types/waap/waap_custom_page_preview.py +10 -0
- gcore/types/waap/waap_custom_page_set.py +36 -0
- gcore/types/waap/waap_custom_rule.py +377 -0
- gcore/types/waap/waap_customer_rule_state.py +7 -0
- gcore/types/waap/waap_ddos_attack.py +16 -0
- gcore/types/waap/waap_ddos_info.py +17 -0
- gcore/types/waap/{waap_api_urls.py → waap_domain_api_settings.py} +9 -2
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/{waap_domain_settings.py → waap_domain_settings_model.py} +4 -4
- gcore/types/waap/waap_event_statistics.py +15 -0
- gcore/types/waap/waap_firewall_rule.py +78 -0
- gcore/types/waap/waap_get_account_overview_response.py +34 -0
- gcore/types/waap/waap_handshake_page_data.py +25 -0
- gcore/types/waap/waap_handshake_page_data_param.py +25 -0
- gcore/types/waap/waap_insight.py +38 -0
- gcore/types/waap/waap_insight_silence.py +28 -0
- gcore/types/waap/waap_insight_silence_sort_by.py +9 -0
- gcore/types/waap/waap_insight_sort_by.py +20 -0
- gcore/types/waap/waap_insight_status.py +7 -0
- gcore/types/waap/waap_ip_country_attack.py +16 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +23 -0
- gcore/types/waap/waap_ip_info.py +57 -0
- gcore/types/waap/waap_ip_info_counts.py +16 -0
- gcore/types/waap/waap_javascript_disabled_page_data.py +18 -0
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_network_details.py +17 -0
- gcore/types/waap/waap_organization.py +13 -0
- gcore/types/waap/waap_page_type.py +9 -0
- gcore/types/waap/waap_paginated_custom_page_set.py +22 -0
- gcore/types/waap/waap_paginated_ddos_attack.py +22 -0
- gcore/types/waap/waap_paginated_ddos_info.py +22 -0
- gcore/types/waap/waap_paginated_request_summary.py +22 -0
- gcore/types/waap/waap_pattern_matched_tag.py +37 -0
- gcore/types/waap/waap_policy_action.py +7 -0
- gcore/types/waap/waap_policy_mode.py +10 -0
- gcore/types/waap/waap_request_details.py +92 -0
- gcore/types/waap/waap_request_organization.py +13 -0
- gcore/types/waap/waap_request_summary.py +59 -0
- gcore/types/waap/waap_resolution.py +7 -0
- gcore/types/waap/waap_rule_action_type.py +7 -0
- gcore/types/waap/waap_rule_blocked_requests.py +16 -0
- gcore/types/waap/waap_rule_set.py +41 -0
- gcore/types/waap/waap_statistic_item.py +18 -0
- gcore/types/waap/waap_statistics_series.py +16 -0
- gcore/types/waap/waap_tag.py +16 -0
- gcore/types/waap/waap_time_series_attack.py +23 -0
- gcore/types/waap/waap_top_session.py +24 -0
- gcore/types/waap/waap_top_url.py +13 -0
- gcore/types/waap/waap_top_user_agent.py +13 -0
- gcore/types/waap/waap_traffic_metrics.py +68 -0
- gcore/types/waap/waap_traffic_type.py +28 -0
- gcore/types/waap/waap_user_agent_details.py +40 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/RECORD +312 -149
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -56
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
gcore/__init__.py
CHANGED
|
@@ -26,7 +26,7 @@ from ._exceptions import (
|
|
|
26
26
|
UnprocessableEntityError,
|
|
27
27
|
APIResponseValidationError,
|
|
28
28
|
)
|
|
29
|
-
from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient
|
|
29
|
+
from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient
|
|
30
30
|
from ._utils._logs import setup_logging as _setup_logging
|
|
31
31
|
|
|
32
32
|
__all__ = [
|
|
@@ -68,6 +68,7 @@ __all__ = [
|
|
|
68
68
|
"DEFAULT_CONNECTION_LIMITS",
|
|
69
69
|
"DefaultHttpxClient",
|
|
70
70
|
"DefaultAsyncHttpxClient",
|
|
71
|
+
"DefaultAioHttpClient",
|
|
71
72
|
]
|
|
72
73
|
|
|
73
74
|
if not _t.TYPE_CHECKING:
|
gcore/_base_client.py
CHANGED
|
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
960
960
|
if self.custom_auth is not None:
|
|
961
961
|
kwargs["auth"] = self.custom_auth
|
|
962
962
|
|
|
963
|
+
if options.follow_redirects is not None:
|
|
964
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
|
965
|
+
|
|
963
966
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
|
964
967
|
|
|
965
968
|
response = None
|
|
@@ -1068,7 +1071,14 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1068
1071
|
) -> ResponseT:
|
|
1069
1072
|
origin = get_origin(cast_to) or cast_to
|
|
1070
1073
|
|
|
1071
|
-
if
|
|
1074
|
+
if (
|
|
1075
|
+
inspect.isclass(origin)
|
|
1076
|
+
and issubclass(origin, BaseAPIResponse)
|
|
1077
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
|
1078
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
|
1079
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
|
1080
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
|
1081
|
+
):
|
|
1072
1082
|
if not issubclass(origin, APIResponse):
|
|
1073
1083
|
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
|
|
1074
1084
|
|
|
@@ -1279,6 +1289,24 @@ class _DefaultAsyncHttpxClient(httpx.AsyncClient):
|
|
|
1279
1289
|
super().__init__(**kwargs)
|
|
1280
1290
|
|
|
1281
1291
|
|
|
1292
|
+
try:
|
|
1293
|
+
import httpx_aiohttp
|
|
1294
|
+
except ImportError:
|
|
1295
|
+
|
|
1296
|
+
class _DefaultAioHttpClient(httpx.AsyncClient):
|
|
1297
|
+
def __init__(self, **_kwargs: Any) -> None:
|
|
1298
|
+
raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra")
|
|
1299
|
+
else:
|
|
1300
|
+
|
|
1301
|
+
class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
|
|
1302
|
+
def __init__(self, **kwargs: Any) -> None:
|
|
1303
|
+
kwargs.setdefault("timeout", DEFAULT_TIMEOUT)
|
|
1304
|
+
kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS)
|
|
1305
|
+
kwargs.setdefault("follow_redirects", True)
|
|
1306
|
+
|
|
1307
|
+
super().__init__(**kwargs)
|
|
1308
|
+
|
|
1309
|
+
|
|
1282
1310
|
if TYPE_CHECKING:
|
|
1283
1311
|
DefaultAsyncHttpxClient = httpx.AsyncClient
|
|
1284
1312
|
"""An alias to `httpx.AsyncClient` that provides the same defaults that this SDK
|
|
@@ -1287,8 +1315,12 @@ if TYPE_CHECKING:
|
|
|
1287
1315
|
This is useful because overriding the `http_client` with your own instance of
|
|
1288
1316
|
`httpx.AsyncClient` will result in httpx's defaults being used, not ours.
|
|
1289
1317
|
"""
|
|
1318
|
+
|
|
1319
|
+
DefaultAioHttpClient = httpx.AsyncClient
|
|
1320
|
+
"""An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`."""
|
|
1290
1321
|
else:
|
|
1291
1322
|
DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient
|
|
1323
|
+
DefaultAioHttpClient = _DefaultAioHttpClient
|
|
1292
1324
|
|
|
1293
1325
|
|
|
1294
1326
|
class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
|
|
@@ -1460,6 +1492,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1460
1492
|
if self.custom_auth is not None:
|
|
1461
1493
|
kwargs["auth"] = self.custom_auth
|
|
1462
1494
|
|
|
1495
|
+
if options.follow_redirects is not None:
|
|
1496
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
|
1497
|
+
|
|
1463
1498
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
|
1464
1499
|
|
|
1465
1500
|
response = None
|
|
@@ -1568,7 +1603,14 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1568
1603
|
) -> ResponseT:
|
|
1569
1604
|
origin = get_origin(cast_to) or cast_to
|
|
1570
1605
|
|
|
1571
|
-
if
|
|
1606
|
+
if (
|
|
1607
|
+
inspect.isclass(origin)
|
|
1608
|
+
and issubclass(origin, BaseAPIResponse)
|
|
1609
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
|
1610
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
|
1611
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
|
1612
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
|
1613
|
+
):
|
|
1572
1614
|
if not issubclass(origin, AsyncAPIResponse):
|
|
1573
1615
|
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
|
|
1574
1616
|
|
gcore/_client.py
CHANGED
|
@@ -28,6 +28,7 @@ from ._base_client import (
|
|
|
28
28
|
SyncAPIClient,
|
|
29
29
|
AsyncAPIClient,
|
|
30
30
|
)
|
|
31
|
+
from .resources.iam import iam
|
|
31
32
|
from .resources.waap import waap
|
|
32
33
|
from .resources.cloud import cloud
|
|
33
34
|
|
|
@@ -37,6 +38,7 @@ __all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Gcore", "A
|
|
|
37
38
|
class Gcore(SyncAPIClient):
|
|
38
39
|
cloud: cloud.CloudResource
|
|
39
40
|
waap: waap.WaapResource
|
|
41
|
+
iam: iam.IamResource
|
|
40
42
|
with_raw_response: GcoreWithRawResponse
|
|
41
43
|
with_streaming_response: GcoreWithStreamedResponse
|
|
42
44
|
|
|
@@ -117,6 +119,7 @@ class Gcore(SyncAPIClient):
|
|
|
117
119
|
|
|
118
120
|
self.cloud = cloud.CloudResource(self)
|
|
119
121
|
self.waap = waap.WaapResource(self)
|
|
122
|
+
self.iam = iam.IamResource(self)
|
|
120
123
|
self.with_raw_response = GcoreWithRawResponse(self)
|
|
121
124
|
self.with_streaming_response = GcoreWithStreamedResponse(self)
|
|
122
125
|
|
|
@@ -252,6 +255,7 @@ class Gcore(SyncAPIClient):
|
|
|
252
255
|
class AsyncGcore(AsyncAPIClient):
|
|
253
256
|
cloud: cloud.AsyncCloudResource
|
|
254
257
|
waap: waap.AsyncWaapResource
|
|
258
|
+
iam: iam.AsyncIamResource
|
|
255
259
|
with_raw_response: AsyncGcoreWithRawResponse
|
|
256
260
|
with_streaming_response: AsyncGcoreWithStreamedResponse
|
|
257
261
|
|
|
@@ -332,6 +336,7 @@ class AsyncGcore(AsyncAPIClient):
|
|
|
332
336
|
|
|
333
337
|
self.cloud = cloud.AsyncCloudResource(self)
|
|
334
338
|
self.waap = waap.AsyncWaapResource(self)
|
|
339
|
+
self.iam = iam.AsyncIamResource(self)
|
|
335
340
|
self.with_raw_response = AsyncGcoreWithRawResponse(self)
|
|
336
341
|
self.with_streaming_response = AsyncGcoreWithStreamedResponse(self)
|
|
337
342
|
|
|
@@ -468,24 +473,28 @@ class GcoreWithRawResponse:
|
|
|
468
473
|
def __init__(self, client: Gcore) -> None:
|
|
469
474
|
self.cloud = cloud.CloudResourceWithRawResponse(client.cloud)
|
|
470
475
|
self.waap = waap.WaapResourceWithRawResponse(client.waap)
|
|
476
|
+
self.iam = iam.IamResourceWithRawResponse(client.iam)
|
|
471
477
|
|
|
472
478
|
|
|
473
479
|
class AsyncGcoreWithRawResponse:
|
|
474
480
|
def __init__(self, client: AsyncGcore) -> None:
|
|
475
481
|
self.cloud = cloud.AsyncCloudResourceWithRawResponse(client.cloud)
|
|
476
482
|
self.waap = waap.AsyncWaapResourceWithRawResponse(client.waap)
|
|
483
|
+
self.iam = iam.AsyncIamResourceWithRawResponse(client.iam)
|
|
477
484
|
|
|
478
485
|
|
|
479
486
|
class GcoreWithStreamedResponse:
|
|
480
487
|
def __init__(self, client: Gcore) -> None:
|
|
481
488
|
self.cloud = cloud.CloudResourceWithStreamingResponse(client.cloud)
|
|
482
489
|
self.waap = waap.WaapResourceWithStreamingResponse(client.waap)
|
|
490
|
+
self.iam = iam.IamResourceWithStreamingResponse(client.iam)
|
|
483
491
|
|
|
484
492
|
|
|
485
493
|
class AsyncGcoreWithStreamedResponse:
|
|
486
494
|
def __init__(self, client: AsyncGcore) -> None:
|
|
487
495
|
self.cloud = cloud.AsyncCloudResourceWithStreamingResponse(client.cloud)
|
|
488
496
|
self.waap = waap.AsyncWaapResourceWithStreamingResponse(client.waap)
|
|
497
|
+
self.iam = iam.AsyncIamResourceWithStreamingResponse(client.iam)
|
|
489
498
|
|
|
490
499
|
|
|
491
500
|
Client = Gcore
|
gcore/_models.py
CHANGED
|
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
|
|
|
737
737
|
idempotency_key: str
|
|
738
738
|
json_data: Body
|
|
739
739
|
extra_json: AnyMapping
|
|
740
|
+
follow_redirects: bool
|
|
740
741
|
|
|
741
742
|
|
|
742
743
|
@final
|
|
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
|
750
751
|
files: Union[HttpxRequestFiles, None] = None
|
|
751
752
|
idempotency_key: Union[str, None] = None
|
|
752
753
|
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
|
|
754
|
+
follow_redirects: Union[bool, None] = None
|
|
753
755
|
|
|
754
756
|
# It should be noted that we cannot use `json` here as that would override
|
|
755
757
|
# a BaseModel method in an incompatible fashion.
|
gcore/_types.py
CHANGED
|
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
|
|
|
100
100
|
params: Query
|
|
101
101
|
extra_json: AnyMapping
|
|
102
102
|
idempotency_key: str
|
|
103
|
+
follow_redirects: bool
|
|
103
104
|
|
|
104
105
|
|
|
105
106
|
# Sentinel class used until PEP 0661 is accepted
|
|
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
|
|
|
215
216
|
|
|
216
217
|
class HttpxSendArgs(TypedDict, total=False):
|
|
217
218
|
auth: httpx.Auth
|
|
219
|
+
follow_redirects: bool
|
gcore/_version.py
CHANGED
gcore/pagination.py
CHANGED
|
@@ -5,7 +5,7 @@ from typing_extensions import override
|
|
|
5
5
|
|
|
6
6
|
from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage
|
|
7
7
|
|
|
8
|
-
__all__ = ["SyncOffsetPage", "AsyncOffsetPage"]
|
|
8
|
+
__all__ = ["SyncOffsetPage", "AsyncOffsetPage", "SyncOffsetPageIam", "AsyncOffsetPageIam"]
|
|
9
9
|
|
|
10
10
|
_T = TypeVar("_T")
|
|
11
11
|
|
|
@@ -68,3 +68,63 @@ class AsyncOffsetPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
|
|
68
68
|
return PageInfo(params={"offset": current_count})
|
|
69
69
|
|
|
70
70
|
return None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class SyncOffsetPageIam(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
|
|
74
|
+
result: List[_T]
|
|
75
|
+
count: Optional[int] = None
|
|
76
|
+
|
|
77
|
+
@override
|
|
78
|
+
def _get_page_items(self) -> List[_T]:
|
|
79
|
+
result = self.result
|
|
80
|
+
if not result:
|
|
81
|
+
return []
|
|
82
|
+
return result
|
|
83
|
+
|
|
84
|
+
@override
|
|
85
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
86
|
+
offset = self._options.params.get("offset") or 0
|
|
87
|
+
if not isinstance(offset, int):
|
|
88
|
+
raise ValueError(f'Expected "offset" param to be an integer but got {offset}')
|
|
89
|
+
|
|
90
|
+
length = len(self._get_page_items())
|
|
91
|
+
current_count = offset + length
|
|
92
|
+
|
|
93
|
+
count = self.count
|
|
94
|
+
if count is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if current_count < count:
|
|
98
|
+
return PageInfo(params={"offset": current_count})
|
|
99
|
+
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class AsyncOffsetPageIam(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
|
104
|
+
result: List[_T]
|
|
105
|
+
count: Optional[int] = None
|
|
106
|
+
|
|
107
|
+
@override
|
|
108
|
+
def _get_page_items(self) -> List[_T]:
|
|
109
|
+
result = self.result
|
|
110
|
+
if not result:
|
|
111
|
+
return []
|
|
112
|
+
return result
|
|
113
|
+
|
|
114
|
+
@override
|
|
115
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
116
|
+
offset = self._options.params.get("offset") or 0
|
|
117
|
+
if not isinstance(offset, int):
|
|
118
|
+
raise ValueError(f'Expected "offset" param to be an integer but got {offset}')
|
|
119
|
+
|
|
120
|
+
length = len(self._get_page_items())
|
|
121
|
+
current_count = offset + length
|
|
122
|
+
|
|
123
|
+
count = self.count
|
|
124
|
+
if count is None:
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
if current_count < count:
|
|
128
|
+
return PageInfo(params={"offset": current_count})
|
|
129
|
+
|
|
130
|
+
return None
|
gcore/resources/__init__.py
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from .iam import (
|
|
4
|
+
IamResource,
|
|
5
|
+
AsyncIamResource,
|
|
6
|
+
IamResourceWithRawResponse,
|
|
7
|
+
AsyncIamResourceWithRawResponse,
|
|
8
|
+
IamResourceWithStreamingResponse,
|
|
9
|
+
AsyncIamResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
3
11
|
from .waap import (
|
|
4
12
|
WaapResource,
|
|
5
13
|
AsyncWaapResource,
|
|
@@ -30,4 +38,10 @@ __all__ = [
|
|
|
30
38
|
"AsyncWaapResourceWithRawResponse",
|
|
31
39
|
"WaapResourceWithStreamingResponse",
|
|
32
40
|
"AsyncWaapResourceWithStreamingResponse",
|
|
41
|
+
"IamResource",
|
|
42
|
+
"AsyncIamResource",
|
|
43
|
+
"IamResourceWithRawResponse",
|
|
44
|
+
"AsyncIamResourceWithRawResponse",
|
|
45
|
+
"IamResourceWithStreamingResponse",
|
|
46
|
+
"AsyncIamResourceWithStreamingResponse",
|
|
33
47
|
]
|
|
@@ -15,7 +15,7 @@ from ...._response import (
|
|
|
15
15
|
async_to_streamed_response_wrapper,
|
|
16
16
|
)
|
|
17
17
|
from ...._base_client import make_request_options
|
|
18
|
-
from ....types.cloud.baremetal import flavor_list_params
|
|
18
|
+
from ....types.cloud.baremetal import flavor_list_params
|
|
19
19
|
from ....types.cloud.baremetal_flavor_list import BaremetalFlavorList
|
|
20
20
|
|
|
21
21
|
__all__ = ["FlavorsResource", "AsyncFlavorsResource"]
|
|
@@ -59,11 +59,12 @@ class FlavorsResource(SyncAPIResource):
|
|
|
59
59
|
extra_body: Body | None = None,
|
|
60
60
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
61
|
) -> BaremetalFlavorList:
|
|
62
|
-
"""
|
|
62
|
+
"""List all available bare metal flavors in the specified project and region.
|
|
63
63
|
|
|
64
|
-
When
|
|
65
|
-
specified, the list
|
|
66
|
-
as 0. If you get Pricing Error contact the
|
|
64
|
+
When
|
|
65
|
+
`include_prices` is specified, the list includes pricing information. A client
|
|
66
|
+
in trial mode gets all price values as 0. If you get Pricing Error contact the
|
|
67
|
+
support.
|
|
67
68
|
|
|
68
69
|
Args:
|
|
69
70
|
disabled: Flag for filtering disabled flavors in the region. Defaults to true
|
|
@@ -113,64 +114,6 @@ class FlavorsResource(SyncAPIResource):
|
|
|
113
114
|
cast_to=BaremetalFlavorList,
|
|
114
115
|
)
|
|
115
116
|
|
|
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
117
|
|
|
175
118
|
class AsyncFlavorsResource(AsyncAPIResource):
|
|
176
119
|
@cached_property
|
|
@@ -210,11 +153,12 @@ class AsyncFlavorsResource(AsyncAPIResource):
|
|
|
210
153
|
extra_body: Body | None = None,
|
|
211
154
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
212
155
|
) -> BaremetalFlavorList:
|
|
213
|
-
"""
|
|
156
|
+
"""List all available bare metal flavors in the specified project and region.
|
|
214
157
|
|
|
215
|
-
When
|
|
216
|
-
specified, the list
|
|
217
|
-
as 0. If you get Pricing Error contact the
|
|
158
|
+
When
|
|
159
|
+
`include_prices` is specified, the list includes pricing information. A client
|
|
160
|
+
in trial mode gets all price values as 0. If you get Pricing Error contact the
|
|
161
|
+
support.
|
|
218
162
|
|
|
219
163
|
Args:
|
|
220
164
|
disabled: Flag for filtering disabled flavors in the region. Defaults to true
|
|
@@ -264,64 +208,6 @@ class AsyncFlavorsResource(AsyncAPIResource):
|
|
|
264
208
|
cast_to=BaremetalFlavorList,
|
|
265
209
|
)
|
|
266
210
|
|
|
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
211
|
|
|
326
212
|
class FlavorsResourceWithRawResponse:
|
|
327
213
|
def __init__(self, flavors: FlavorsResource) -> None:
|
|
@@ -330,9 +216,6 @@ class FlavorsResourceWithRawResponse:
|
|
|
330
216
|
self.list = to_raw_response_wrapper(
|
|
331
217
|
flavors.list,
|
|
332
218
|
)
|
|
333
|
-
self.list_suitable = to_raw_response_wrapper(
|
|
334
|
-
flavors.list_suitable,
|
|
335
|
-
)
|
|
336
219
|
|
|
337
220
|
|
|
338
221
|
class AsyncFlavorsResourceWithRawResponse:
|
|
@@ -342,9 +225,6 @@ class AsyncFlavorsResourceWithRawResponse:
|
|
|
342
225
|
self.list = async_to_raw_response_wrapper(
|
|
343
226
|
flavors.list,
|
|
344
227
|
)
|
|
345
|
-
self.list_suitable = async_to_raw_response_wrapper(
|
|
346
|
-
flavors.list_suitable,
|
|
347
|
-
)
|
|
348
228
|
|
|
349
229
|
|
|
350
230
|
class FlavorsResourceWithStreamingResponse:
|
|
@@ -354,9 +234,6 @@ class FlavorsResourceWithStreamingResponse:
|
|
|
354
234
|
self.list = to_streamed_response_wrapper(
|
|
355
235
|
flavors.list,
|
|
356
236
|
)
|
|
357
|
-
self.list_suitable = to_streamed_response_wrapper(
|
|
358
|
-
flavors.list_suitable,
|
|
359
|
-
)
|
|
360
237
|
|
|
361
238
|
|
|
362
239
|
class AsyncFlavorsResourceWithStreamingResponse:
|
|
@@ -366,6 +243,3 @@ class AsyncFlavorsResourceWithStreamingResponse:
|
|
|
366
243
|
self.list = async_to_streamed_response_wrapper(
|
|
367
244
|
flavors.list,
|
|
368
245
|
)
|
|
369
|
-
self.list_suitable = async_to_streamed_response_wrapper(
|
|
370
|
-
flavors.list_suitable,
|
|
371
|
-
)
|
|
@@ -61,10 +61,11 @@ class ImagesResource(SyncAPIResource):
|
|
|
61
61
|
extra_body: Body | None = None,
|
|
62
62
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
63
63
|
) -> ImageList:
|
|
64
|
-
"""Retrieve
|
|
64
|
+
"""Retrieve a list of available images for bare metal servers.
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
The list can be
|
|
67
|
+
filtered by visibility, tags, and other parameters. Returned entities may or may
|
|
68
|
+
not be owned by the project.
|
|
68
69
|
|
|
69
70
|
Args:
|
|
70
71
|
include_prices: Show price
|
|
@@ -73,9 +74,7 @@ class ImagesResource(SyncAPIResource):
|
|
|
73
74
|
|
|
74
75
|
tag_key: Filter by tag keys.
|
|
75
76
|
|
|
76
|
-
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
77
|
-
--data-urlencode 'tag_key_value={"key": "value"}' --url
|
|
78
|
-
'http://localhost:1111/v1/images/1/1'"
|
|
77
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
79
78
|
|
|
80
79
|
visibility: Image visibility. Globally visible images are public
|
|
81
80
|
|
|
@@ -150,10 +149,11 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
150
149
|
extra_body: Body | None = None,
|
|
151
150
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
152
151
|
) -> ImageList:
|
|
153
|
-
"""Retrieve
|
|
152
|
+
"""Retrieve a list of available images for bare metal servers.
|
|
154
153
|
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
The list can be
|
|
155
|
+
filtered by visibility, tags, and other parameters. Returned entities may or may
|
|
156
|
+
not be owned by the project.
|
|
157
157
|
|
|
158
158
|
Args:
|
|
159
159
|
include_prices: Show price
|
|
@@ -162,9 +162,7 @@ class AsyncImagesResource(AsyncAPIResource):
|
|
|
162
162
|
|
|
163
163
|
tag_key: Filter by tag keys.
|
|
164
164
|
|
|
165
|
-
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
166
|
-
--data-urlencode 'tag_key_value={"key": "value"}' --url
|
|
167
|
-
'http://localhost:1111/v1/images/1/1'"
|
|
165
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
168
166
|
|
|
169
167
|
visibility: Image visibility. Globally visible images are public
|
|
170
168
|
|