gcore 0.10.0__py3-none-any.whl → 0.12.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/_base_client.py +3 -3
- gcore/_client.py +18 -0
- gcore/_compat.py +48 -48
- gcore/_models.py +41 -41
- gcore/_types.py +35 -1
- gcore/_utils/__init__.py +9 -2
- gcore/_utils/_compat.py +45 -0
- gcore/_utils/_datetime_parse.py +136 -0
- gcore/_utils/_transform.py +11 -1
- gcore/_utils/_typing.py +6 -1
- gcore/_utils/_utils.py +0 -1
- gcore/_version.py +1 -1
- gcore/resources/__init__.py +28 -0
- gcore/resources/cloud/__init__.py +14 -0
- gcore/resources/cloud/audit_logs.py +3 -3
- gcore/resources/cloud/baremetal/images.py +3 -4
- gcore/resources/cloud/baremetal/servers.py +16 -4
- gcore/resources/cloud/cloud.py +32 -0
- gcore/resources/cloud/cost_reports.py +24 -16
- gcore/resources/cloud/file_shares/access_rules.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +30 -14
- gcore/resources/cloud/floating_ips.py +196 -4
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +1 -1
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +166 -190
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +268 -12
- gcore/resources/cloud/inference/__init__.py +14 -14
- gcore/resources/cloud/inference/applications/__init__.py +47 -0
- gcore/resources/cloud/inference/applications/applications.py +134 -0
- gcore/resources/cloud/inference/applications/deployments.py +649 -0
- gcore/resources/cloud/inference/applications/templates.py +238 -0
- gcore/resources/cloud/inference/deployments/deployments.py +41 -22
- gcore/resources/cloud/inference/inference.py +32 -32
- gcore/resources/cloud/inference/registry_credentials.py +8 -9
- gcore/resources/cloud/instances/images.py +4 -4
- gcore/resources/cloud/instances/instances.py +254 -4
- gcore/resources/cloud/instances/interfaces.py +544 -0
- gcore/resources/cloud/k8s/__init__.py +47 -0
- gcore/resources/cloud/k8s/clusters/__init__.py +47 -0
- gcore/resources/cloud/k8s/clusters/clusters.py +1391 -0
- gcore/resources/cloud/k8s/clusters/nodes.py +291 -0
- gcore/resources/cloud/k8s/clusters/pools/__init__.py +33 -0
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +303 -0
- gcore/resources/cloud/k8s/clusters/pools/pools.py +870 -0
- gcore/resources/cloud/k8s/flavors.py +209 -0
- gcore/resources/cloud/k8s/k8s.py +233 -0
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +11 -12
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +9 -10
- gcore/resources/cloud/load_balancers/listeners.py +18 -18
- gcore/resources/cloud/load_balancers/load_balancers.py +4 -4
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +18 -6
- gcore/resources/cloud/load_balancers/pools/members.py +32 -2
- gcore/resources/cloud/load_balancers/pools/pools.py +32 -8
- gcore/resources/cloud/networks/networks.py +192 -4
- gcore/resources/cloud/networks/subnets.py +140 -8
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +608 -0
- gcore/resources/cloud/reserved_fixed_ips/vip.py +5 -7
- gcore/resources/cloud/security_groups/security_groups.py +6 -6
- gcore/resources/cloud/tasks.py +46 -46
- gcore/resources/cloud/users/role_assignments.py +5 -4
- gcore/resources/cloud/volumes.py +1125 -223
- gcore/resources/dns/__init__.py +75 -0
- gcore/resources/dns/dns.py +374 -0
- gcore/resources/dns/locations.py +288 -0
- gcore/resources/dns/metrics.py +214 -0
- gcore/resources/dns/pickers/__init__.py +33 -0
- gcore/resources/dns/pickers/pickers.py +167 -0
- gcore/resources/dns/pickers/presets.py +135 -0
- gcore/resources/dns/zones/__init__.py +47 -0
- gcore/resources/{cloud/inference/models.py → dns/zones/dnssec.py} +80 -122
- gcore/resources/dns/zones/rrsets.py +1005 -0
- gcore/resources/dns/zones/zones.py +1493 -0
- gcore/resources/storage/__init__.py +75 -0
- gcore/resources/storage/buckets/__init__.py +61 -0
- gcore/resources/storage/buckets/buckets.py +470 -0
- gcore/resources/storage/buckets/cors.py +265 -0
- gcore/resources/storage/buckets/lifecycle.py +276 -0
- gcore/resources/storage/buckets/policy.py +345 -0
- gcore/resources/storage/credentials.py +221 -0
- gcore/resources/storage/locations.py +190 -0
- gcore/resources/storage/statistics.py +364 -0
- gcore/resources/storage/storage.py +1046 -0
- gcore/resources/streaming/ai_tasks.py +56 -70
- gcore/resources/streaming/playlists.py +18 -18
- gcore/resources/streaming/quality_sets.py +8 -8
- gcore/resources/streaming/statistics.py +4 -122
- gcore/resources/streaming/streams/overlays.py +6 -6
- gcore/resources/streaming/streams/streams.py +40 -64
- gcore/resources/streaming/videos/subtitles.py +32 -30
- gcore/resources/streaming/videos/videos.py +78 -72
- gcore/resources/waap/domains/advanced_rules.py +2 -2
- gcore/resources/waap/domains/api_paths.py +13 -13
- gcore/resources/waap/domains/custom_rules.py +2 -2
- gcore/resources/waap/domains/domains.py +4 -4
- gcore/resources/waap/domains/firewall_rules.py +2 -2
- gcore/resources/waap/domains/insight_silences.py +6 -6
- gcore/resources/waap/domains/insights.py +7 -7
- gcore/resources/waap/domains/statistics.py +47 -47
- gcore/types/cloud/__init__.py +2 -4
- gcore/types/cloud/audit_log_list_params.py +2 -1
- gcore/types/cloud/baremetal/image_list_params.py +3 -2
- gcore/types/cloud/baremetal/server_create_params.py +8 -6
- gcore/types/cloud/baremetal/server_list_params.py +3 -2
- gcore/types/cloud/baremetal/server_rebuild_params.py +2 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +35 -31
- gcore/types/cloud/cost_report_get_aggregated_params.py +26 -25
- gcore/types/cloud/cost_report_get_detailed_params.py +26 -25
- gcore/types/cloud/ddos_profile.py +13 -7
- gcore/types/cloud/ddos_profile_field.py +21 -8
- gcore/types/cloud/ddos_profile_option_list.py +7 -6
- gcore/types/cloud/ddos_profile_status.py +2 -2
- gcore/types/cloud/ddos_profile_template.py +7 -3
- gcore/types/cloud/ddos_profile_template_field.py +12 -3
- gcore/types/cloud/file_share.py +2 -2
- gcore/types/cloud/file_share_create_params.py +12 -6
- gcore/types/cloud/floating_ip_list_params.py +3 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +101 -74
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +76 -93
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +17 -10
- gcore/types/cloud/gpu_baremetal_cluster_list_params.py +14 -3
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +4 -2
- gcore/types/cloud/gpu_baremetal_clusters/__init__.py +6 -0
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +74 -0
- gcore/types/cloud/{gpu_baremetal_cluster_server.py → gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1.py} +10 -10
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1_list.py +16 -0
- gcore/types/cloud/{gpu_baremetal_flavor.py → gpu_baremetal_clusters/gpu_baremetal_flavor.py} +1 -1
- gcore/types/cloud/{gpu_baremetal_flavor_list.py → gpu_baremetal_clusters/gpu_baremetal_flavor_list.py} +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/server_list_params.py +75 -0
- gcore/types/cloud/inference/__init__.py +0 -5
- gcore/types/cloud/inference/applications/__init__.py +12 -0
- gcore/types/cloud/inference/applications/deployment_create_params.py +68 -0
- gcore/types/cloud/inference/applications/deployment_patch_params.py +62 -0
- gcore/types/cloud/inference/applications/inference_application_deployment.py +111 -0
- gcore/types/cloud/inference/applications/inference_application_deployment_list.py +16 -0
- gcore/types/cloud/inference/applications/inference_application_template.py +94 -0
- gcore/types/cloud/inference/applications/inference_application_template_list.py +16 -0
- gcore/types/cloud/inference/deployment_create_params.py +7 -6
- gcore/types/cloud/inference/deployment_update_params.py +7 -6
- gcore/types/cloud/instance_assign_security_group_params.py +4 -2
- gcore/types/cloud/instance_list_params.py +3 -2
- gcore/types/cloud/instance_unassign_security_group_params.py +4 -2
- gcore/types/cloud/instances/image_list_params.py +3 -2
- gcore/types/cloud/k8s/__init__.py +13 -0
- gcore/types/cloud/k8s/cluster_create_params.py +299 -0
- gcore/types/cloud/k8s/cluster_delete_params.py +16 -0
- gcore/types/cloud/k8s/cluster_update_params.py +203 -0
- gcore/types/cloud/k8s/cluster_upgrade_params.py +16 -0
- gcore/types/cloud/k8s/clusters/__init__.py +10 -0
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +66 -0
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +16 -0
- gcore/types/cloud/k8s/clusters/node_list_params.py +16 -0
- gcore/types/cloud/k8s/clusters/pool_create_params.py +53 -0
- gcore/types/cloud/k8s/clusters/pool_resize_params.py +18 -0
- gcore/types/cloud/k8s/clusters/pool_update_params.py +34 -0
- gcore/types/cloud/k8s/clusters/pools/__init__.py +5 -0
- gcore/types/cloud/k8s/clusters/pools/node_list_params.py +18 -0
- gcore/types/cloud/k8s/flavor_list_params.py +19 -0
- gcore/types/cloud/k8s/k8s_cluster.py +209 -0
- gcore/types/cloud/k8s/k8s_cluster_certificate.py +13 -0
- gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +19 -0
- gcore/types/cloud/k8s/k8s_cluster_list.py +16 -0
- gcore/types/cloud/k8s_cluster_version.py +10 -0
- gcore/types/cloud/{gpu_baremetal_cluster_server_list.py → k8s_cluster_version_list.py} +4 -4
- gcore/types/cloud/load_balancer_create_params.py +23 -4
- gcore/types/cloud/load_balancer_list_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +3 -2
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -3
- gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +19 -1
- gcore/types/cloud/load_balancers/pool_update_params.py +19 -1
- gcore/types/cloud/load_balancers/pools/member_add_params.py +19 -1
- gcore/types/cloud/member.py +19 -1
- gcore/types/cloud/network_list_params.py +3 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -2
- gcore/types/cloud/networks/subnet_list_params.py +3 -2
- gcore/types/cloud/networks/subnet_update_params.py +3 -2
- gcore/types/cloud/project.py +9 -9
- gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +3 -2
- gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +3 -2
- gcore/types/cloud/security_group_create_params.py +4 -2
- gcore/types/cloud/security_group_list_params.py +3 -2
- gcore/types/cloud/task_id_list.py +8 -1
- gcore/types/cloud/task_list_params.py +23 -23
- gcore/types/cloud/usage_report_get_params.py +26 -25
- gcore/types/cloud/users/role_assignment.py +2 -1
- gcore/types/cloud/users/role_assignment_create_params.py +4 -2
- gcore/types/cloud/users/role_assignment_update_params.py +4 -2
- gcore/types/cloud/volume_list_params.py +3 -2
- gcore/types/dns/__init__.py +31 -0
- gcore/types/dns/dns_get_account_overview_response.py +21 -0
- gcore/types/dns/dns_label_name.py +13 -0
- gcore/types/dns/dns_location_translations.py +11 -0
- gcore/types/dns/dns_lookup_params.py +15 -0
- gcore/types/dns/dns_lookup_response.py +21 -0
- gcore/types/dns/dns_name_server.py +17 -0
- gcore/types/dns/location_list_continents_response.py +10 -0
- gcore/types/dns/location_list_countries_response.py +10 -0
- gcore/types/dns/location_list_regions_response.py +10 -0
- gcore/types/dns/location_list_response.py +16 -0
- gcore/types/dns/metric_list_params.py +24 -0
- gcore/types/dns/metric_list_response.py +7 -0
- gcore/types/dns/picker_list_response.py +10 -0
- gcore/types/dns/pickers/__init__.py +5 -0
- gcore/types/dns/pickers/preset_list_response.py +10 -0
- gcore/types/dns/zone_check_delegation_status_response.py +20 -0
- gcore/types/dns/zone_create_params.py +59 -0
- gcore/types/dns/zone_create_response.py +13 -0
- gcore/types/dns/zone_export_response.py +11 -0
- gcore/types/dns/zone_get_response.py +106 -0
- gcore/types/dns/zone_get_statistics_params.py +43 -0
- gcore/types/dns/zone_get_statistics_response.py +19 -0
- gcore/types/dns/zone_import_params.py +32 -0
- gcore/types/dns/zone_import_response.py +26 -0
- gcore/types/dns/zone_list_params.py +57 -0
- gcore/types/dns/zone_list_response.py +105 -0
- gcore/types/dns/zone_replace_params.py +61 -0
- gcore/types/dns/zones/__init__.py +15 -0
- gcore/types/dns/zones/dns_failover_log.py +19 -0
- gcore/types/dns/zones/dns_output_rrset.py +123 -0
- gcore/types/dns/zones/dnssec_get_response.py +38 -0
- gcore/types/dns/zones/dnssec_update_params.py +11 -0
- gcore/types/dns/zones/dnssec_update_response.py +38 -0
- gcore/types/dns/zones/rrset_create_params.py +82 -0
- gcore/types/dns/zones/rrset_get_failover_logs_params.py +21 -0
- gcore/types/dns/zones/rrset_get_failover_logs_response.py +15 -0
- gcore/types/dns/zones/rrset_list_params.py +21 -0
- gcore/types/dns/zones/rrset_list_response.py +14 -0
- gcore/types/dns/zones/rrset_replace_params.py +82 -0
- gcore/types/security/client_profile.py +1 -1
- gcore/types/security/profile_create_params.py +2 -2
- gcore/types/security/profile_recreate_params.py +2 -2
- gcore/types/security/profile_replace_params.py +2 -2
- gcore/types/storage/__init__.py +21 -0
- gcore/types/storage/bucket.py +15 -0
- gcore/types/storage/bucket_list_params.py +15 -0
- gcore/types/storage/buckets/__init__.py +9 -0
- gcore/types/storage/buckets/bucket_cors.py +18 -0
- gcore/types/storage/buckets/bucket_policy.py +7 -0
- gcore/types/storage/buckets/cor_create_params.py +17 -0
- gcore/types/storage/buckets/lifecycle_create_params.py +18 -0
- gcore/types/storage/buckets/policy_get_response.py +7 -0
- gcore/types/storage/credential_recreate_params.py +36 -0
- gcore/types/storage/location.py +24 -0
- gcore/types/storage/location_list_params.py +13 -0
- gcore/types/storage/statistic_get_usage_aggregated_params.py +24 -0
- gcore/types/storage/statistic_get_usage_series_params.py +38 -0
- gcore/types/storage/statistic_get_usage_series_response.py +12 -0
- gcore/types/storage/storage.py +101 -0
- gcore/types/storage/storage_create_params.py +44 -0
- gcore/types/storage/storage_list_params.py +39 -0
- gcore/types/storage/storage_restore_params.py +11 -0
- gcore/types/storage/storage_update_params.py +18 -0
- gcore/types/storage/usage_series.py +201 -0
- gcore/types/storage/usage_total.py +54 -0
- gcore/types/streaming/__init__.py +0 -4
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +1 -1
- gcore/types/streaming/ai_contentmoderation_nsfw.py +1 -1
- gcore/types/streaming/ai_contentmoderation_softnudity.py +1 -1
- gcore/types/streaming/ai_contentmoderation_sport.py +1 -1
- gcore/types/streaming/ai_task.py +1 -5
- gcore/types/streaming/ai_task_create_params.py +2 -2
- gcore/types/streaming/ai_task_get_response.py +0 -46
- gcore/types/streaming/clip.py +2 -1
- gcore/types/streaming/create_video_param.py +13 -12
- gcore/types/streaming/max_stream_series.py +5 -5
- gcore/types/streaming/playlist.py +1 -1
- gcore/types/streaming/playlist_create_params.py +1 -1
- gcore/types/streaming/playlist_update_params.py +1 -1
- gcore/types/streaming/playlist_video.py +13 -12
- gcore/types/streaming/storage_series.py +5 -5
- gcore/types/streaming/stream.py +86 -49
- gcore/types/streaming/stream_create_clip_params.py +2 -1
- gcore/types/streaming/stream_create_params.py +9 -23
- gcore/types/streaming/stream_series.py +5 -5
- gcore/types/streaming/stream_update_params.py +9 -23
- gcore/types/streaming/video.py +53 -42
- gcore/types/streaming/video_update_params.py +13 -12
- gcore/types/streaming/vod_statistics_series.py +5 -5
- gcore/types/streaming/vod_total_stream_duration_series.py +3 -3
- gcore/types/waap/domain_list_params.py +1 -1
- gcore/types/waap/domain_update_params.py +1 -1
- gcore/types/waap/domains/advanced_rule_create_params.py +7 -4
- gcore/types/waap/domains/advanced_rule_update_params.py +6 -3
- gcore/types/waap/domains/api_path_create_params.py +4 -3
- gcore/types/waap/domains/api_path_list_params.py +3 -1
- gcore/types/waap/domains/api_path_update_params.py +5 -4
- gcore/types/waap/domains/custom_rule_create_params.py +13 -14
- gcore/types/waap/domains/custom_rule_update_params.py +12 -13
- gcore/types/waap/domains/firewall_rule_create_params.py +3 -2
- gcore/types/waap/domains/firewall_rule_update_params.py +2 -1
- gcore/types/waap/domains/insight_list_params.py +4 -2
- gcore/types/waap/domains/insight_replace_params.py +1 -1
- gcore/types/waap/domains/insight_silence_list_params.py +5 -3
- gcore/types/waap/domains/setting_update_params.py +3 -2
- gcore/types/waap/domains/statistic_get_ddos_info_params.py +6 -9
- gcore/types/waap/domains/statistic_get_events_aggregated_params.py +9 -10
- gcore/types/waap/domains/statistic_get_requests_series_params.py +8 -9
- gcore/types/waap/domains/statistic_get_traffic_series_params.py +6 -9
- gcore/types/waap/domains/waap_advanced_rule.py +3 -2
- gcore/types/waap/domains/waap_api_path.py +4 -4
- gcore/types/waap/domains/waap_api_scan_result.py +2 -2
- gcore/types/waap/domains/waap_custom_rule.py +4 -7
- gcore/types/waap/domains/waap_firewall_rule.py +3 -2
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/domains/waap_request_details.py +5 -4
- gcore/types/waap/waap_ip_ddos_info_model.py +3 -3
- gcore/types/waap/waap_rule_set.py +1 -1
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/METADATA +7 -2
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/RECORD +313 -193
- gcore/types/cloud/inference/inference_model.py +0 -65
- gcore/types/cloud/inference/inference_registry_credentials_create.py +0 -22
- gcore/types/cloud/inference/model_list_params.py +0 -21
- gcore/types/streaming/ai_contentmoderation_casm.py +0 -39
- gcore/types/streaming/ai_contentmoderation_weapon.py +0 -39
- gcore/types/streaming/meet_series.py +0 -23
- gcore/types/streaming/statistic_get_meet_series_params.py +0 -20
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/WHEEL +0 -0
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Iterable
|
|
5
|
+
from typing import Union, Iterable
|
|
6
|
+
from datetime import datetime
|
|
6
7
|
from typing_extensions import Literal, overload
|
|
7
8
|
|
|
8
9
|
import httpx
|
|
9
10
|
|
|
10
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
11
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
|
|
11
12
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
13
|
from ...._compat import cached_property
|
|
13
14
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -17,15 +18,18 @@ from ...._response import (
|
|
|
17
18
|
async_to_raw_response_wrapper,
|
|
18
19
|
async_to_streamed_response_wrapper,
|
|
19
20
|
)
|
|
20
|
-
from ....
|
|
21
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
22
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
21
23
|
from ....types.cloud.console import Console
|
|
22
24
|
from ....types.cloud.task_id_list import TaskIDList
|
|
23
25
|
from ....types.cloud.gpu_baremetal_clusters import (
|
|
26
|
+
server_list_params,
|
|
24
27
|
server_delete_params,
|
|
25
28
|
server_attach_interface_params,
|
|
26
29
|
server_detach_interface_params,
|
|
27
30
|
)
|
|
28
|
-
from ....types.cloud.gpu_baremetal_cluster_server import GPUBaremetalClusterServer
|
|
31
|
+
from ....types.cloud.gpu_baremetal_clusters.gpu_baremetal_cluster_server import GPUBaremetalClusterServer
|
|
32
|
+
from ....types.cloud.gpu_baremetal_clusters.gpu_baremetal_cluster_server_v1 import GPUBaremetalClusterServerV1
|
|
29
33
|
|
|
30
34
|
__all__ = ["ServersResource", "AsyncServersResource"]
|
|
31
35
|
|
|
@@ -50,6 +54,120 @@ class ServersResource(SyncAPIResource):
|
|
|
50
54
|
"""
|
|
51
55
|
return ServersResourceWithStreamingResponse(self)
|
|
52
56
|
|
|
57
|
+
def list(
|
|
58
|
+
self,
|
|
59
|
+
cluster_id: str,
|
|
60
|
+
*,
|
|
61
|
+
project_id: int | None = None,
|
|
62
|
+
region_id: int | None = None,
|
|
63
|
+
changed_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
64
|
+
changed_since: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
65
|
+
ip_address: str | NotGiven = NOT_GIVEN,
|
|
66
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
67
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
68
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
69
|
+
order_by: Literal["created_at.asc", "created_at.desc", "status.asc", "status.desc"] | NotGiven = NOT_GIVEN,
|
|
70
|
+
status: Literal[
|
|
71
|
+
"ACTIVE",
|
|
72
|
+
"BUILD",
|
|
73
|
+
"ERROR",
|
|
74
|
+
"HARD_REBOOT",
|
|
75
|
+
"MIGRATING",
|
|
76
|
+
"PAUSED",
|
|
77
|
+
"REBOOT",
|
|
78
|
+
"REBUILD",
|
|
79
|
+
"RESIZE",
|
|
80
|
+
"REVERT_RESIZE",
|
|
81
|
+
"SHELVED",
|
|
82
|
+
"SHELVED_OFFLOADED",
|
|
83
|
+
"SHUTOFF",
|
|
84
|
+
"SOFT_DELETED",
|
|
85
|
+
"SUSPENDED",
|
|
86
|
+
"VERIFY_RESIZE",
|
|
87
|
+
]
|
|
88
|
+
| NotGiven = NOT_GIVEN,
|
|
89
|
+
uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
90
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
91
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
92
|
+
extra_headers: Headers | None = None,
|
|
93
|
+
extra_query: Query | None = None,
|
|
94
|
+
extra_body: Body | None = None,
|
|
95
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
96
|
+
) -> SyncOffsetPage[GPUBaremetalClusterServer]:
|
|
97
|
+
"""List all servers in a bare metal GPU cluster.
|
|
98
|
+
|
|
99
|
+
Results can be filtered and
|
|
100
|
+
paginated.
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
project_id: Project ID
|
|
104
|
+
|
|
105
|
+
region_id: Region ID
|
|
106
|
+
|
|
107
|
+
cluster_id: Cluster unique identifier
|
|
108
|
+
|
|
109
|
+
changed_before: Filters the results to include only servers whose last change timestamp is less
|
|
110
|
+
than the specified datetime. Format: ISO 8601.
|
|
111
|
+
|
|
112
|
+
changed_since: Filters the results to include only servers whose last change timestamp is
|
|
113
|
+
greater than or equal to the specified datetime. Format: ISO 8601.
|
|
114
|
+
|
|
115
|
+
ip_address: Filter servers by ip address.
|
|
116
|
+
|
|
117
|
+
limit: Limit of items on a single page
|
|
118
|
+
|
|
119
|
+
name: Filter servers by name. You can provide a full or partial name, servers with
|
|
120
|
+
matching names will be returned. For example, entering 'test' will return all
|
|
121
|
+
servers that contain 'test' in their name.
|
|
122
|
+
|
|
123
|
+
offset: Offset in results list
|
|
124
|
+
|
|
125
|
+
order_by: Order field
|
|
126
|
+
|
|
127
|
+
status: Filters servers by status.
|
|
128
|
+
|
|
129
|
+
uuids: Filter servers by uuid.
|
|
130
|
+
|
|
131
|
+
extra_headers: Send extra headers
|
|
132
|
+
|
|
133
|
+
extra_query: Add additional query parameters to the request
|
|
134
|
+
|
|
135
|
+
extra_body: Add additional JSON properties to the request
|
|
136
|
+
|
|
137
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
138
|
+
"""
|
|
139
|
+
if project_id is None:
|
|
140
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
141
|
+
if region_id is None:
|
|
142
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
143
|
+
if not cluster_id:
|
|
144
|
+
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
145
|
+
return self._get_api_list(
|
|
146
|
+
f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers",
|
|
147
|
+
page=SyncOffsetPage[GPUBaremetalClusterServer],
|
|
148
|
+
options=make_request_options(
|
|
149
|
+
extra_headers=extra_headers,
|
|
150
|
+
extra_query=extra_query,
|
|
151
|
+
extra_body=extra_body,
|
|
152
|
+
timeout=timeout,
|
|
153
|
+
query=maybe_transform(
|
|
154
|
+
{
|
|
155
|
+
"changed_before": changed_before,
|
|
156
|
+
"changed_since": changed_since,
|
|
157
|
+
"ip_address": ip_address,
|
|
158
|
+
"limit": limit,
|
|
159
|
+
"name": name,
|
|
160
|
+
"offset": offset,
|
|
161
|
+
"order_by": order_by,
|
|
162
|
+
"status": status,
|
|
163
|
+
"uuids": uuids,
|
|
164
|
+
},
|
|
165
|
+
server_list_params.ServerListParams,
|
|
166
|
+
),
|
|
167
|
+
),
|
|
168
|
+
model=GPUBaremetalClusterServer,
|
|
169
|
+
)
|
|
170
|
+
|
|
53
171
|
def delete(
|
|
54
172
|
self,
|
|
55
173
|
instance_id: str,
|
|
@@ -342,11 +460,17 @@ class ServersResource(SyncAPIResource):
|
|
|
342
460
|
project_id: int | None = None,
|
|
343
461
|
region_id: int | None = None,
|
|
344
462
|
ddos_profile: server_attach_interface_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
463
|
+
| server_attach_interface_params.NewInterfaceSpecificSubnetSchemaDDOSProfile
|
|
464
|
+
| server_attach_interface_params.NewInterfaceAnySubnetSchemaDDOSProfile
|
|
465
|
+
| server_attach_interface_params.NewInterfaceReservedFixedIPSchemaDDOSProfile
|
|
345
466
|
| NotGiven = NOT_GIVEN,
|
|
346
467
|
interface_name: str | NotGiven = NOT_GIVEN,
|
|
347
468
|
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
348
469
|
port_group: int | NotGiven = NOT_GIVEN,
|
|
349
470
|
security_groups: Iterable[server_attach_interface_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
471
|
+
| Iterable[server_attach_interface_params.NewInterfaceSpecificSubnetSchemaSecurityGroup]
|
|
472
|
+
| Iterable[server_attach_interface_params.NewInterfaceAnySubnetSchemaSecurityGroup]
|
|
473
|
+
| Iterable[server_attach_interface_params.NewInterfaceReservedFixedIPSchemaSecurityGroup]
|
|
350
474
|
| NotGiven = NOT_GIVEN,
|
|
351
475
|
type: str | NotGiven = NOT_GIVEN,
|
|
352
476
|
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
@@ -490,7 +614,7 @@ class ServersResource(SyncAPIResource):
|
|
|
490
614
|
extra_query: Query | None = None,
|
|
491
615
|
extra_body: Body | None = None,
|
|
492
616
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
493
|
-
) ->
|
|
617
|
+
) -> GPUBaremetalClusterServerV1:
|
|
494
618
|
"""
|
|
495
619
|
Stops and then starts the server, effectively performing a hard reboot.
|
|
496
620
|
|
|
@@ -514,7 +638,7 @@ class ServersResource(SyncAPIResource):
|
|
|
514
638
|
options=make_request_options(
|
|
515
639
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
516
640
|
),
|
|
517
|
-
cast_to=
|
|
641
|
+
cast_to=GPUBaremetalClusterServerV1,
|
|
518
642
|
)
|
|
519
643
|
|
|
520
644
|
def reboot(
|
|
@@ -529,7 +653,7 @@ class ServersResource(SyncAPIResource):
|
|
|
529
653
|
extra_query: Query | None = None,
|
|
530
654
|
extra_body: Body | None = None,
|
|
531
655
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
532
|
-
) ->
|
|
656
|
+
) -> GPUBaremetalClusterServerV1:
|
|
533
657
|
"""
|
|
534
658
|
Reboot one bare metal GPU cluster server
|
|
535
659
|
|
|
@@ -553,7 +677,7 @@ class ServersResource(SyncAPIResource):
|
|
|
553
677
|
options=make_request_options(
|
|
554
678
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
555
679
|
),
|
|
556
|
-
cast_to=
|
|
680
|
+
cast_to=GPUBaremetalClusterServerV1,
|
|
557
681
|
)
|
|
558
682
|
|
|
559
683
|
|
|
@@ -577,6 +701,120 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
577
701
|
"""
|
|
578
702
|
return AsyncServersResourceWithStreamingResponse(self)
|
|
579
703
|
|
|
704
|
+
def list(
|
|
705
|
+
self,
|
|
706
|
+
cluster_id: str,
|
|
707
|
+
*,
|
|
708
|
+
project_id: int | None = None,
|
|
709
|
+
region_id: int | None = None,
|
|
710
|
+
changed_before: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
711
|
+
changed_since: Union[str, datetime] | NotGiven = NOT_GIVEN,
|
|
712
|
+
ip_address: str | NotGiven = NOT_GIVEN,
|
|
713
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
714
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
715
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
716
|
+
order_by: Literal["created_at.asc", "created_at.desc", "status.asc", "status.desc"] | NotGiven = NOT_GIVEN,
|
|
717
|
+
status: Literal[
|
|
718
|
+
"ACTIVE",
|
|
719
|
+
"BUILD",
|
|
720
|
+
"ERROR",
|
|
721
|
+
"HARD_REBOOT",
|
|
722
|
+
"MIGRATING",
|
|
723
|
+
"PAUSED",
|
|
724
|
+
"REBOOT",
|
|
725
|
+
"REBUILD",
|
|
726
|
+
"RESIZE",
|
|
727
|
+
"REVERT_RESIZE",
|
|
728
|
+
"SHELVED",
|
|
729
|
+
"SHELVED_OFFLOADED",
|
|
730
|
+
"SHUTOFF",
|
|
731
|
+
"SOFT_DELETED",
|
|
732
|
+
"SUSPENDED",
|
|
733
|
+
"VERIFY_RESIZE",
|
|
734
|
+
]
|
|
735
|
+
| NotGiven = NOT_GIVEN,
|
|
736
|
+
uuids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
737
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
738
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
739
|
+
extra_headers: Headers | None = None,
|
|
740
|
+
extra_query: Query | None = None,
|
|
741
|
+
extra_body: Body | None = None,
|
|
742
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
743
|
+
) -> AsyncPaginator[GPUBaremetalClusterServer, AsyncOffsetPage[GPUBaremetalClusterServer]]:
|
|
744
|
+
"""List all servers in a bare metal GPU cluster.
|
|
745
|
+
|
|
746
|
+
Results can be filtered and
|
|
747
|
+
paginated.
|
|
748
|
+
|
|
749
|
+
Args:
|
|
750
|
+
project_id: Project ID
|
|
751
|
+
|
|
752
|
+
region_id: Region ID
|
|
753
|
+
|
|
754
|
+
cluster_id: Cluster unique identifier
|
|
755
|
+
|
|
756
|
+
changed_before: Filters the results to include only servers whose last change timestamp is less
|
|
757
|
+
than the specified datetime. Format: ISO 8601.
|
|
758
|
+
|
|
759
|
+
changed_since: Filters the results to include only servers whose last change timestamp is
|
|
760
|
+
greater than or equal to the specified datetime. Format: ISO 8601.
|
|
761
|
+
|
|
762
|
+
ip_address: Filter servers by ip address.
|
|
763
|
+
|
|
764
|
+
limit: Limit of items on a single page
|
|
765
|
+
|
|
766
|
+
name: Filter servers by name. You can provide a full or partial name, servers with
|
|
767
|
+
matching names will be returned. For example, entering 'test' will return all
|
|
768
|
+
servers that contain 'test' in their name.
|
|
769
|
+
|
|
770
|
+
offset: Offset in results list
|
|
771
|
+
|
|
772
|
+
order_by: Order field
|
|
773
|
+
|
|
774
|
+
status: Filters servers by status.
|
|
775
|
+
|
|
776
|
+
uuids: Filter servers by uuid.
|
|
777
|
+
|
|
778
|
+
extra_headers: Send extra headers
|
|
779
|
+
|
|
780
|
+
extra_query: Add additional query parameters to the request
|
|
781
|
+
|
|
782
|
+
extra_body: Add additional JSON properties to the request
|
|
783
|
+
|
|
784
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
785
|
+
"""
|
|
786
|
+
if project_id is None:
|
|
787
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
788
|
+
if region_id is None:
|
|
789
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
790
|
+
if not cluster_id:
|
|
791
|
+
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
|
|
792
|
+
return self._get_api_list(
|
|
793
|
+
f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers",
|
|
794
|
+
page=AsyncOffsetPage[GPUBaremetalClusterServer],
|
|
795
|
+
options=make_request_options(
|
|
796
|
+
extra_headers=extra_headers,
|
|
797
|
+
extra_query=extra_query,
|
|
798
|
+
extra_body=extra_body,
|
|
799
|
+
timeout=timeout,
|
|
800
|
+
query=maybe_transform(
|
|
801
|
+
{
|
|
802
|
+
"changed_before": changed_before,
|
|
803
|
+
"changed_since": changed_since,
|
|
804
|
+
"ip_address": ip_address,
|
|
805
|
+
"limit": limit,
|
|
806
|
+
"name": name,
|
|
807
|
+
"offset": offset,
|
|
808
|
+
"order_by": order_by,
|
|
809
|
+
"status": status,
|
|
810
|
+
"uuids": uuids,
|
|
811
|
+
},
|
|
812
|
+
server_list_params.ServerListParams,
|
|
813
|
+
),
|
|
814
|
+
),
|
|
815
|
+
model=GPUBaremetalClusterServer,
|
|
816
|
+
)
|
|
817
|
+
|
|
580
818
|
async def delete(
|
|
581
819
|
self,
|
|
582
820
|
instance_id: str,
|
|
@@ -871,11 +1109,17 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
871
1109
|
project_id: int | None = None,
|
|
872
1110
|
region_id: int | None = None,
|
|
873
1111
|
ddos_profile: server_attach_interface_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
1112
|
+
| server_attach_interface_params.NewInterfaceSpecificSubnetSchemaDDOSProfile
|
|
1113
|
+
| server_attach_interface_params.NewInterfaceAnySubnetSchemaDDOSProfile
|
|
1114
|
+
| server_attach_interface_params.NewInterfaceReservedFixedIPSchemaDDOSProfile
|
|
874
1115
|
| NotGiven = NOT_GIVEN,
|
|
875
1116
|
interface_name: str | NotGiven = NOT_GIVEN,
|
|
876
1117
|
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
877
1118
|
port_group: int | NotGiven = NOT_GIVEN,
|
|
878
1119
|
security_groups: Iterable[server_attach_interface_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
1120
|
+
| Iterable[server_attach_interface_params.NewInterfaceSpecificSubnetSchemaSecurityGroup]
|
|
1121
|
+
| Iterable[server_attach_interface_params.NewInterfaceAnySubnetSchemaSecurityGroup]
|
|
1122
|
+
| Iterable[server_attach_interface_params.NewInterfaceReservedFixedIPSchemaSecurityGroup]
|
|
879
1123
|
| NotGiven = NOT_GIVEN,
|
|
880
1124
|
type: str | NotGiven = NOT_GIVEN,
|
|
881
1125
|
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
@@ -1019,7 +1263,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
1019
1263
|
extra_query: Query | None = None,
|
|
1020
1264
|
extra_body: Body | None = None,
|
|
1021
1265
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1022
|
-
) ->
|
|
1266
|
+
) -> GPUBaremetalClusterServerV1:
|
|
1023
1267
|
"""
|
|
1024
1268
|
Stops and then starts the server, effectively performing a hard reboot.
|
|
1025
1269
|
|
|
@@ -1043,7 +1287,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
1043
1287
|
options=make_request_options(
|
|
1044
1288
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1045
1289
|
),
|
|
1046
|
-
cast_to=
|
|
1290
|
+
cast_to=GPUBaremetalClusterServerV1,
|
|
1047
1291
|
)
|
|
1048
1292
|
|
|
1049
1293
|
async def reboot(
|
|
@@ -1058,7 +1302,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
1058
1302
|
extra_query: Query | None = None,
|
|
1059
1303
|
extra_body: Body | None = None,
|
|
1060
1304
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1061
|
-
) ->
|
|
1305
|
+
) -> GPUBaremetalClusterServerV1:
|
|
1062
1306
|
"""
|
|
1063
1307
|
Reboot one bare metal GPU cluster server
|
|
1064
1308
|
|
|
@@ -1082,7 +1326,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
1082
1326
|
options=make_request_options(
|
|
1083
1327
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1084
1328
|
),
|
|
1085
|
-
cast_to=
|
|
1329
|
+
cast_to=GPUBaremetalClusterServerV1,
|
|
1086
1330
|
)
|
|
1087
1331
|
|
|
1088
1332
|
|
|
@@ -1090,6 +1334,9 @@ class ServersResourceWithRawResponse:
|
|
|
1090
1334
|
def __init__(self, servers: ServersResource) -> None:
|
|
1091
1335
|
self._servers = servers
|
|
1092
1336
|
|
|
1337
|
+
self.list = to_raw_response_wrapper(
|
|
1338
|
+
servers.list,
|
|
1339
|
+
)
|
|
1093
1340
|
self.delete = to_raw_response_wrapper(
|
|
1094
1341
|
servers.delete,
|
|
1095
1342
|
)
|
|
@@ -1114,6 +1361,9 @@ class AsyncServersResourceWithRawResponse:
|
|
|
1114
1361
|
def __init__(self, servers: AsyncServersResource) -> None:
|
|
1115
1362
|
self._servers = servers
|
|
1116
1363
|
|
|
1364
|
+
self.list = async_to_raw_response_wrapper(
|
|
1365
|
+
servers.list,
|
|
1366
|
+
)
|
|
1117
1367
|
self.delete = async_to_raw_response_wrapper(
|
|
1118
1368
|
servers.delete,
|
|
1119
1369
|
)
|
|
@@ -1138,6 +1388,9 @@ class ServersResourceWithStreamingResponse:
|
|
|
1138
1388
|
def __init__(self, servers: ServersResource) -> None:
|
|
1139
1389
|
self._servers = servers
|
|
1140
1390
|
|
|
1391
|
+
self.list = to_streamed_response_wrapper(
|
|
1392
|
+
servers.list,
|
|
1393
|
+
)
|
|
1141
1394
|
self.delete = to_streamed_response_wrapper(
|
|
1142
1395
|
servers.delete,
|
|
1143
1396
|
)
|
|
@@ -1162,6 +1415,9 @@ class AsyncServersResourceWithStreamingResponse:
|
|
|
1162
1415
|
def __init__(self, servers: AsyncServersResource) -> None:
|
|
1163
1416
|
self._servers = servers
|
|
1164
1417
|
|
|
1418
|
+
self.list = async_to_streamed_response_wrapper(
|
|
1419
|
+
servers.list,
|
|
1420
|
+
)
|
|
1165
1421
|
self.delete = async_to_streamed_response_wrapper(
|
|
1166
1422
|
servers.delete,
|
|
1167
1423
|
)
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from .models import (
|
|
4
|
-
ModelsResource,
|
|
5
|
-
AsyncModelsResource,
|
|
6
|
-
ModelsResourceWithRawResponse,
|
|
7
|
-
AsyncModelsResourceWithRawResponse,
|
|
8
|
-
ModelsResourceWithStreamingResponse,
|
|
9
|
-
AsyncModelsResourceWithStreamingResponse,
|
|
10
|
-
)
|
|
11
3
|
from .flavors import (
|
|
12
4
|
FlavorsResource,
|
|
13
5
|
AsyncFlavorsResource,
|
|
@@ -48,6 +40,14 @@ from .deployments import (
|
|
|
48
40
|
DeploymentsResourceWithStreamingResponse,
|
|
49
41
|
AsyncDeploymentsResourceWithStreamingResponse,
|
|
50
42
|
)
|
|
43
|
+
from .applications import (
|
|
44
|
+
ApplicationsResource,
|
|
45
|
+
AsyncApplicationsResource,
|
|
46
|
+
ApplicationsResourceWithRawResponse,
|
|
47
|
+
AsyncApplicationsResourceWithRawResponse,
|
|
48
|
+
ApplicationsResourceWithStreamingResponse,
|
|
49
|
+
AsyncApplicationsResourceWithStreamingResponse,
|
|
50
|
+
)
|
|
51
51
|
from .registry_credentials import (
|
|
52
52
|
RegistryCredentialsResource,
|
|
53
53
|
AsyncRegistryCredentialsResource,
|
|
@@ -64,12 +64,6 @@ __all__ = [
|
|
|
64
64
|
"AsyncFlavorsResourceWithRawResponse",
|
|
65
65
|
"FlavorsResourceWithStreamingResponse",
|
|
66
66
|
"AsyncFlavorsResourceWithStreamingResponse",
|
|
67
|
-
"ModelsResource",
|
|
68
|
-
"AsyncModelsResource",
|
|
69
|
-
"ModelsResourceWithRawResponse",
|
|
70
|
-
"AsyncModelsResourceWithRawResponse",
|
|
71
|
-
"ModelsResourceWithStreamingResponse",
|
|
72
|
-
"AsyncModelsResourceWithStreamingResponse",
|
|
73
67
|
"DeploymentsResource",
|
|
74
68
|
"AsyncDeploymentsResource",
|
|
75
69
|
"DeploymentsResourceWithRawResponse",
|
|
@@ -94,6 +88,12 @@ __all__ = [
|
|
|
94
88
|
"AsyncAPIKeysResourceWithRawResponse",
|
|
95
89
|
"APIKeysResourceWithStreamingResponse",
|
|
96
90
|
"AsyncAPIKeysResourceWithStreamingResponse",
|
|
91
|
+
"ApplicationsResource",
|
|
92
|
+
"AsyncApplicationsResource",
|
|
93
|
+
"ApplicationsResourceWithRawResponse",
|
|
94
|
+
"AsyncApplicationsResourceWithRawResponse",
|
|
95
|
+
"ApplicationsResourceWithStreamingResponse",
|
|
96
|
+
"AsyncApplicationsResourceWithStreamingResponse",
|
|
97
97
|
"InferenceResource",
|
|
98
98
|
"AsyncInferenceResource",
|
|
99
99
|
"InferenceResourceWithRawResponse",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .templates import (
|
|
4
|
+
TemplatesResource,
|
|
5
|
+
AsyncTemplatesResource,
|
|
6
|
+
TemplatesResourceWithRawResponse,
|
|
7
|
+
AsyncTemplatesResourceWithRawResponse,
|
|
8
|
+
TemplatesResourceWithStreamingResponse,
|
|
9
|
+
AsyncTemplatesResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .deployments import (
|
|
12
|
+
DeploymentsResource,
|
|
13
|
+
AsyncDeploymentsResource,
|
|
14
|
+
DeploymentsResourceWithRawResponse,
|
|
15
|
+
AsyncDeploymentsResourceWithRawResponse,
|
|
16
|
+
DeploymentsResourceWithStreamingResponse,
|
|
17
|
+
AsyncDeploymentsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .applications import (
|
|
20
|
+
ApplicationsResource,
|
|
21
|
+
AsyncApplicationsResource,
|
|
22
|
+
ApplicationsResourceWithRawResponse,
|
|
23
|
+
AsyncApplicationsResourceWithRawResponse,
|
|
24
|
+
ApplicationsResourceWithStreamingResponse,
|
|
25
|
+
AsyncApplicationsResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"DeploymentsResource",
|
|
30
|
+
"AsyncDeploymentsResource",
|
|
31
|
+
"DeploymentsResourceWithRawResponse",
|
|
32
|
+
"AsyncDeploymentsResourceWithRawResponse",
|
|
33
|
+
"DeploymentsResourceWithStreamingResponse",
|
|
34
|
+
"AsyncDeploymentsResourceWithStreamingResponse",
|
|
35
|
+
"TemplatesResource",
|
|
36
|
+
"AsyncTemplatesResource",
|
|
37
|
+
"TemplatesResourceWithRawResponse",
|
|
38
|
+
"AsyncTemplatesResourceWithRawResponse",
|
|
39
|
+
"TemplatesResourceWithStreamingResponse",
|
|
40
|
+
"AsyncTemplatesResourceWithStreamingResponse",
|
|
41
|
+
"ApplicationsResource",
|
|
42
|
+
"AsyncApplicationsResource",
|
|
43
|
+
"ApplicationsResourceWithRawResponse",
|
|
44
|
+
"AsyncApplicationsResourceWithRawResponse",
|
|
45
|
+
"ApplicationsResourceWithStreamingResponse",
|
|
46
|
+
"AsyncApplicationsResourceWithStreamingResponse",
|
|
47
|
+
]
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .templates import (
|
|
6
|
+
TemplatesResource,
|
|
7
|
+
AsyncTemplatesResource,
|
|
8
|
+
TemplatesResourceWithRawResponse,
|
|
9
|
+
AsyncTemplatesResourceWithRawResponse,
|
|
10
|
+
TemplatesResourceWithStreamingResponse,
|
|
11
|
+
AsyncTemplatesResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ....._compat import cached_property
|
|
14
|
+
from .deployments import (
|
|
15
|
+
DeploymentsResource,
|
|
16
|
+
AsyncDeploymentsResource,
|
|
17
|
+
DeploymentsResourceWithRawResponse,
|
|
18
|
+
AsyncDeploymentsResourceWithRawResponse,
|
|
19
|
+
DeploymentsResourceWithStreamingResponse,
|
|
20
|
+
AsyncDeploymentsResourceWithStreamingResponse,
|
|
21
|
+
)
|
|
22
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
23
|
+
|
|
24
|
+
__all__ = ["ApplicationsResource", "AsyncApplicationsResource"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ApplicationsResource(SyncAPIResource):
|
|
28
|
+
@cached_property
|
|
29
|
+
def deployments(self) -> DeploymentsResource:
|
|
30
|
+
return DeploymentsResource(self._client)
|
|
31
|
+
|
|
32
|
+
@cached_property
|
|
33
|
+
def templates(self) -> TemplatesResource:
|
|
34
|
+
return TemplatesResource(self._client)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_raw_response(self) -> ApplicationsResourceWithRawResponse:
|
|
38
|
+
"""
|
|
39
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
40
|
+
the raw response object instead of the parsed content.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
43
|
+
"""
|
|
44
|
+
return ApplicationsResourceWithRawResponse(self)
|
|
45
|
+
|
|
46
|
+
@cached_property
|
|
47
|
+
def with_streaming_response(self) -> ApplicationsResourceWithStreamingResponse:
|
|
48
|
+
"""
|
|
49
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
50
|
+
|
|
51
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
52
|
+
"""
|
|
53
|
+
return ApplicationsResourceWithStreamingResponse(self)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class AsyncApplicationsResource(AsyncAPIResource):
|
|
57
|
+
@cached_property
|
|
58
|
+
def deployments(self) -> AsyncDeploymentsResource:
|
|
59
|
+
return AsyncDeploymentsResource(self._client)
|
|
60
|
+
|
|
61
|
+
@cached_property
|
|
62
|
+
def templates(self) -> AsyncTemplatesResource:
|
|
63
|
+
return AsyncTemplatesResource(self._client)
|
|
64
|
+
|
|
65
|
+
@cached_property
|
|
66
|
+
def with_raw_response(self) -> AsyncApplicationsResourceWithRawResponse:
|
|
67
|
+
"""
|
|
68
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
69
|
+
the raw response object instead of the parsed content.
|
|
70
|
+
|
|
71
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
72
|
+
"""
|
|
73
|
+
return AsyncApplicationsResourceWithRawResponse(self)
|
|
74
|
+
|
|
75
|
+
@cached_property
|
|
76
|
+
def with_streaming_response(self) -> AsyncApplicationsResourceWithStreamingResponse:
|
|
77
|
+
"""
|
|
78
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
79
|
+
|
|
80
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
81
|
+
"""
|
|
82
|
+
return AsyncApplicationsResourceWithStreamingResponse(self)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class ApplicationsResourceWithRawResponse:
|
|
86
|
+
def __init__(self, applications: ApplicationsResource) -> None:
|
|
87
|
+
self._applications = applications
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def deployments(self) -> DeploymentsResourceWithRawResponse:
|
|
91
|
+
return DeploymentsResourceWithRawResponse(self._applications.deployments)
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def templates(self) -> TemplatesResourceWithRawResponse:
|
|
95
|
+
return TemplatesResourceWithRawResponse(self._applications.templates)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class AsyncApplicationsResourceWithRawResponse:
|
|
99
|
+
def __init__(self, applications: AsyncApplicationsResource) -> None:
|
|
100
|
+
self._applications = applications
|
|
101
|
+
|
|
102
|
+
@cached_property
|
|
103
|
+
def deployments(self) -> AsyncDeploymentsResourceWithRawResponse:
|
|
104
|
+
return AsyncDeploymentsResourceWithRawResponse(self._applications.deployments)
|
|
105
|
+
|
|
106
|
+
@cached_property
|
|
107
|
+
def templates(self) -> AsyncTemplatesResourceWithRawResponse:
|
|
108
|
+
return AsyncTemplatesResourceWithRawResponse(self._applications.templates)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class ApplicationsResourceWithStreamingResponse:
|
|
112
|
+
def __init__(self, applications: ApplicationsResource) -> None:
|
|
113
|
+
self._applications = applications
|
|
114
|
+
|
|
115
|
+
@cached_property
|
|
116
|
+
def deployments(self) -> DeploymentsResourceWithStreamingResponse:
|
|
117
|
+
return DeploymentsResourceWithStreamingResponse(self._applications.deployments)
|
|
118
|
+
|
|
119
|
+
@cached_property
|
|
120
|
+
def templates(self) -> TemplatesResourceWithStreamingResponse:
|
|
121
|
+
return TemplatesResourceWithStreamingResponse(self._applications.templates)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class AsyncApplicationsResourceWithStreamingResponse:
|
|
125
|
+
def __init__(self, applications: AsyncApplicationsResource) -> None:
|
|
126
|
+
self._applications = applications
|
|
127
|
+
|
|
128
|
+
@cached_property
|
|
129
|
+
def deployments(self) -> AsyncDeploymentsResourceWithStreamingResponse:
|
|
130
|
+
return AsyncDeploymentsResourceWithStreamingResponse(self._applications.deployments)
|
|
131
|
+
|
|
132
|
+
@cached_property
|
|
133
|
+
def templates(self) -> AsyncTemplatesResourceWithStreamingResponse:
|
|
134
|
+
return AsyncTemplatesResourceWithStreamingResponse(self._applications.templates)
|