diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f81bf992..f04d0896 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.31.0" + ".": "0.32.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f736874a..db538af3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 645 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-58d9afa7f8342ead022bd8fa12bb8abbeb9c0fb1e16f052ee6c4a59fae373e27.yml -openapi_spec_hash: 2ae4db03cfc907be71d44288503838d7 -config_hash: 8d4711ed72633b7443249124a49781da +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-8eb7ecc40c6f877877db9f74bc9e0838fbe7a95cbf4cf785ad94249f37cff798.yml +openapi_spec_hash: bbde489ef2bf0e85721ab713a3ea9773 +config_hash: 8dbb16a29d92c3261d318b18543cf843 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fbb5e5f..5c799e11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.32.0 (2026-02-03) + +Full Changelog: [v0.31.0...v0.32.0](https://github.com/G-Core/gcore-python/compare/v0.31.0...v0.32.0) + +### Features + +* **api:** aggregated API specs update ([3b5292a](https://github.com/G-Core/gcore-python/commit/3b5292a5403a6cfa880072fbbb8dde2ca311f0bd)) +* **api:** aggregated API specs update ([9bf5580](https://github.com/G-Core/gcore-python/commit/9bf55800ab1b90ac5f82e406b31fd61a5225afd9)) + ## 0.31.0 (2026-01-30) Full Changelog: [v0.30.0...v0.31.0](https://github.com/G-Core/gcore-python/compare/v0.30.0...v0.31.0) diff --git a/pyproject.toml b/pyproject.toml index 3ad9b84a..4b9b2d7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gcore" -version = "0.31.0" +version = "0.32.0" description = "The official Python library for the gcore API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gcore/_version.py b/src/gcore/_version.py index d06a94b9..0211e7f4 100644 --- a/src/gcore/_version.py +++ b/src/gcore/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gcore" -__version__ = "0.31.0" # x-release-please-version +__version__ = "0.32.0" # x-release-please-version diff --git a/src/gcore/resources/cloud/k8s/clusters/clusters.py b/src/gcore/resources/cloud/k8s/clusters/clusters.py index 52ab2f78..ca2c3529 100644 --- a/src/gcore/resources/cloud/k8s/clusters/clusters.py +++ b/src/gcore/resources/cloud/k8s/clusters/clusters.py @@ -111,6 +111,10 @@ def create( Create k8s cluster Args: + project_id: Project ID + + region_id: Region ID + keypair: The keypair of the cluster name: The name of the cluster @@ -269,6 +273,12 @@ def update( Update k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + add_ons: Cluster add-ons configuration authentication: Authentication settings @@ -386,6 +396,10 @@ def list( List k8s clusters Args: + project_id: Project ID + + region_id: Region ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -424,6 +438,12 @@ def delete( Delete k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + volumes: Comma separated list of volume IDs to be deleted with the cluster extra_headers: Send extra headers @@ -469,6 +489,12 @@ def get( Get k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -508,6 +534,12 @@ def get_certificate( Get k8s cluster CA certificate Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -547,6 +579,12 @@ def get_kubeconfig( Get k8s cluster kubeconfig Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -586,6 +624,12 @@ def list_versions_for_upgrade( List available k8s cluster versions for upgrade Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -626,6 +670,12 @@ def upgrade( Upgrade k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + version: Target k8s cluster version extra_headers: Send extra headers @@ -714,6 +764,10 @@ async def create( Create k8s cluster Args: + project_id: Project ID + + region_id: Region ID + keypair: The keypair of the cluster name: The name of the cluster @@ -872,6 +926,12 @@ async def update( Update k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + add_ons: Cluster add-ons configuration authentication: Authentication settings @@ -989,6 +1049,10 @@ async def list( List k8s clusters Args: + project_id: Project ID + + region_id: Region ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1027,6 +1091,12 @@ async def delete( Delete k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + volumes: Comma separated list of volume IDs to be deleted with the cluster extra_headers: Send extra headers @@ -1072,6 +1142,12 @@ async def get( Get k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1111,6 +1187,12 @@ async def get_certificate( Get k8s cluster CA certificate Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1150,6 +1232,12 @@ async def get_kubeconfig( Get k8s cluster kubeconfig Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1189,6 +1277,12 @@ async def list_versions_for_upgrade( List available k8s cluster versions for upgrade Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1229,6 +1323,12 @@ async def upgrade( Upgrade k8s cluster Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + version: Target k8s cluster version extra_headers: Send extra headers diff --git a/src/gcore/resources/cloud/k8s/clusters/nodes.py b/src/gcore/resources/cloud/k8s/clusters/nodes.py index 4518d8b9..482ece84 100644 --- a/src/gcore/resources/cloud/k8s/clusters/nodes.py +++ b/src/gcore/resources/cloud/k8s/clusters/nodes.py @@ -59,6 +59,12 @@ def list( List k8s cluster nodes Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + with_ddos: Include DDoS profile information if set to true. Default is false. extra_headers: Send extra headers @@ -106,6 +112,14 @@ def delete( pool size. Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + instance_id: Instance ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -170,6 +184,12 @@ async def list( List k8s cluster nodes Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + with_ddos: Include DDoS profile information if set to true. Default is false. extra_headers: Send extra headers @@ -217,6 +237,14 @@ async def delete( pool size. Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + instance_id: Instance ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py b/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py index 797c0e6e..5d360e78 100644 --- a/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py +++ b/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py @@ -60,6 +60,14 @@ def list( List k8s cluster pool nodes Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + with_ddos: Include DDoS profile information if set to true. Default is false. extra_headers: Send extra headers @@ -110,6 +118,16 @@ def delete( pool size. Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + + instance_id: Instance ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -177,6 +195,14 @@ async def list( List k8s cluster pool nodes Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + with_ddos: Include DDoS profile information if set to true. Default is false. extra_headers: Send extra headers @@ -227,6 +253,16 @@ async def delete( pool size. Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + + instance_id: Instance ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/gcore/resources/cloud/k8s/clusters/pools/pools.py b/src/gcore/resources/cloud/k8s/clusters/pools/pools.py index 7de8cf65..d23019c4 100644 --- a/src/gcore/resources/cloud/k8s/clusters/pools/pools.py +++ b/src/gcore/resources/cloud/k8s/clusters/pools/pools.py @@ -95,6 +95,12 @@ def create( Create k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + flavor_id: Flavor ID min_node_count: Minimum node count @@ -185,6 +191,14 @@ def update( Update k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + auto_healing_enabled: Enable/disable auto healing labels: Labels applied to the cluster pool @@ -249,6 +263,12 @@ def list( List k8s cluster pools Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -289,6 +309,14 @@ def delete( Delete k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -408,6 +436,14 @@ def get( Get k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -451,6 +487,14 @@ def resize( Resize k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + node_count: Target node count extra_headers: Send extra headers @@ -534,6 +578,12 @@ async def create( Create k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + flavor_id: Flavor ID min_node_count: Minimum node count @@ -624,6 +674,14 @@ async def update( Update k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + auto_healing_enabled: Enable/disable auto healing labels: Labels applied to the cluster pool @@ -688,6 +746,12 @@ async def list( List k8s cluster pools Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -728,6 +792,14 @@ async def delete( Delete k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -847,6 +919,14 @@ async def get( Get k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -890,6 +970,14 @@ async def resize( Resize k8s cluster pool Args: + project_id: Project ID + + region_id: Region ID + + cluster_name: Cluster name + + pool_name: Pool name + node_count: Target node count extra_headers: Send extra headers diff --git a/src/gcore/resources/cloud/k8s/flavors.py b/src/gcore/resources/cloud/k8s/flavors.py index 0823633e..36f4fc54 100644 --- a/src/gcore/resources/cloud/k8s/flavors.py +++ b/src/gcore/resources/cloud/k8s/flavors.py @@ -47,6 +47,7 @@ def list( project_id: int | None = None, region_id: int | None = None, exclude_gpu: bool | Omit = omit, + include_capacity: bool | Omit = omit, include_prices: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -62,7 +63,13 @@ def list( price values as 0. If you get Pricing Error contact the support Args: - exclude_gpu: Set to false to include GPU flavors. Default is True. + project_id: Project ID + + region_id: Region ID + + exclude_gpu: Set to true to exclude GPU flavors. Default is false. + + include_capacity: Set to true to include flavor capacity. Default is False. include_prices: Set to true to include flavor prices. Default is False. @@ -88,6 +95,7 @@ def list( query=maybe_transform( { "exclude_gpu": exclude_gpu, + "include_capacity": include_capacity, "include_prices": include_prices, }, flavor_list_params.FlavorListParams, @@ -123,6 +131,7 @@ async def list( project_id: int | None = None, region_id: int | None = None, exclude_gpu: bool | Omit = omit, + include_capacity: bool | Omit = omit, include_prices: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -138,7 +147,13 @@ async def list( price values as 0. If you get Pricing Error contact the support Args: - exclude_gpu: Set to false to include GPU flavors. Default is True. + project_id: Project ID + + region_id: Region ID + + exclude_gpu: Set to true to exclude GPU flavors. Default is false. + + include_capacity: Set to true to include flavor capacity. Default is False. include_prices: Set to true to include flavor prices. Default is False. @@ -164,6 +179,7 @@ async def list( query=await async_maybe_transform( { "exclude_gpu": exclude_gpu, + "include_capacity": include_capacity, "include_prices": include_prices, }, flavor_list_params.FlavorListParams, diff --git a/src/gcore/resources/cloud/k8s/k8s.py b/src/gcore/resources/cloud/k8s/k8s.py index e1dabed0..7a31e244 100644 --- a/src/gcore/resources/cloud/k8s/k8s.py +++ b/src/gcore/resources/cloud/k8s/k8s.py @@ -79,6 +79,10 @@ def list_versions( List available k8s cluster versions for creation Args: + project_id: Project ID + + region_id: Region ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -144,6 +148,10 @@ async def list_versions( List available k8s cluster versions for creation Args: + project_id: Project ID + + region_id: Region ID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/gcore/resources/cloud/load_balancers/listeners.py b/src/gcore/resources/cloud/load_balancers/listeners.py index 518b61b1..b6c26d17 100644 --- a/src/gcore/resources/cloud/load_balancers/listeners.py +++ b/src/gcore/resources/cloud/load_balancers/listeners.py @@ -166,6 +166,7 @@ def update( *, project_id: int | None = None, region_id: int | None = None, + admin_state_up: bool | Omit = omit, allowed_cidrs: Optional[SequenceNotStr[str]] | Omit = omit, connection_limit: int | Omit = omit, name: str | Omit = omit, @@ -192,6 +193,10 @@ def update( listener_id: Listener ID + admin_state_up: Administrative state of the resource. When set to true, the resource is enabled + and operational. When set to false, the resource is disabled and will not + process traffic. Defaults to true. + allowed_cidrs: Network CIDRs from which service will be accessible connection_limit: Limit of simultaneous connections. If -1 is provided, it is translated to the @@ -233,6 +238,7 @@ def update( f"/cloud/v2/lblisteners/{project_id}/{region_id}/{listener_id}", body=maybe_transform( { + "admin_state_up": admin_state_up, "allowed_cidrs": allowed_cidrs, "connection_limit": connection_limit, "name": name, @@ -714,6 +720,7 @@ async def update( *, project_id: int | None = None, region_id: int | None = None, + admin_state_up: bool | Omit = omit, allowed_cidrs: Optional[SequenceNotStr[str]] | Omit = omit, connection_limit: int | Omit = omit, name: str | Omit = omit, @@ -740,6 +747,10 @@ async def update( listener_id: Listener ID + admin_state_up: Administrative state of the resource. When set to true, the resource is enabled + and operational. When set to false, the resource is disabled and will not + process traffic. Defaults to true. + allowed_cidrs: Network CIDRs from which service will be accessible connection_limit: Limit of simultaneous connections. If -1 is provided, it is translated to the @@ -781,6 +792,7 @@ async def update( f"/cloud/v2/lblisteners/{project_id}/{region_id}/{listener_id}", body=await async_maybe_transform( { + "admin_state_up": admin_state_up, "allowed_cidrs": allowed_cidrs, "connection_limit": connection_limit, "name": name, diff --git a/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py b/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py index cc1baa93..33f56bcc 100644 --- a/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py +++ b/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py @@ -56,6 +56,7 @@ def create( max_retries: int, api_timeout: int, type: LbHealthMonitorType, + admin_state_up: bool | Omit = omit, expected_codes: Optional[str] | Omit = omit, http_method: Optional[HTTPMethod] | Omit = omit, max_retries_down: int | Omit = omit, @@ -88,6 +89,10 @@ def create( type: Health monitor type. Once health monitor is created, cannot be changed. + admin_state_up: Administrative state of the resource. When set to true, the resource is enabled + and operational. When set to false, the resource is disabled and will not + process traffic. Defaults to true. + expected_codes: Expected HTTP response codes. Can be a single code or a range of codes. Can only be used together with `HTTP` or `HTTPS` health monitor type. For example, 200,202,300-302,401,403,404,500-504. If not specified, the default is 200. @@ -122,6 +127,7 @@ def create( "max_retries": max_retries, "api_timeout": api_timeout, "type": type, + "admin_state_up": admin_state_up, "expected_codes": expected_codes, "http_method": http_method, "max_retries_down": max_retries_down, @@ -215,6 +221,7 @@ async def create( max_retries: int, api_timeout: int, type: LbHealthMonitorType, + admin_state_up: bool | Omit = omit, expected_codes: Optional[str] | Omit = omit, http_method: Optional[HTTPMethod] | Omit = omit, max_retries_down: int | Omit = omit, @@ -247,6 +254,10 @@ async def create( type: Health monitor type. Once health monitor is created, cannot be changed. + admin_state_up: Administrative state of the resource. When set to true, the resource is enabled + and operational. When set to false, the resource is disabled and will not + process traffic. Defaults to true. + expected_codes: Expected HTTP response codes. Can be a single code or a range of codes. Can only be used together with `HTTP` or `HTTPS` health monitor type. For example, 200,202,300-302,401,403,404,500-504. If not specified, the default is 200. @@ -281,6 +292,7 @@ async def create( "max_retries": max_retries, "api_timeout": api_timeout, "type": type, + "admin_state_up": admin_state_up, "expected_codes": expected_codes, "http_method": http_method, "max_retries_down": max_retries_down, diff --git a/src/gcore/resources/cloud/load_balancers/pools/members.py b/src/gcore/resources/cloud/load_balancers/pools/members.py index 2e475708..d28d22ef 100644 --- a/src/gcore/resources/cloud/load_balancers/pools/members.py +++ b/src/gcore/resources/cloud/load_balancers/pools/members.py @@ -81,7 +81,7 @@ def create( admin_state_up: Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, the resource is disabled and will not - process traffic. When null is passed, the value is skipped and defaults to true. + process traffic. Defaults to true. backup: Set to true if the member is a backup member, to which traffic will be sent exclusively when all non-backup members will be unreachable. It allows to @@ -261,7 +261,7 @@ async def create( admin_state_up: Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, the resource is disabled and will not - process traffic. When null is passed, the value is skipped and defaults to true. + process traffic. Defaults to true. backup: Set to true if the member is a backup member, to which traffic will be sent exclusively when all non-backup members will be unreachable. It allows to diff --git a/src/gcore/resources/cloud/load_balancers/pools/pools.py b/src/gcore/resources/cloud/load_balancers/pools/pools.py index 5b5b7909..67c9cb79 100644 --- a/src/gcore/resources/cloud/load_balancers/pools/pools.py +++ b/src/gcore/resources/cloud/load_balancers/pools/pools.py @@ -180,6 +180,7 @@ def update( *, project_id: int | None = None, region_id: int | None = None, + admin_state_up: bool | Omit = omit, ca_secret_id: Optional[str] | Omit = omit, crl_secret_id: Optional[str] | Omit = omit, healthmonitor: Optional[pool_update_params.Healthmonitor] | Omit = omit, @@ -226,6 +227,10 @@ def update( pool_id: Pool ID + admin_state_up: Administrative state of the resource. When set to true, the resource is enabled + and operational. When set to false, the resource is disabled and will not + process traffic. Defaults to true. + ca_secret_id: Secret ID of CA certificate bundle crl_secret_id: Secret ID of CA revocation list file @@ -270,6 +275,7 @@ def update( f"/cloud/v2/lbpools/{project_id}/{region_id}/{pool_id}", body=maybe_transform( { + "admin_state_up": admin_state_up, "ca_secret_id": ca_secret_id, "crl_secret_id": crl_secret_id, "healthmonitor": healthmonitor, @@ -749,6 +755,7 @@ async def update( *, project_id: int | None = None, region_id: int | None = None, + admin_state_up: bool | Omit = omit, ca_secret_id: Optional[str] | Omit = omit, crl_secret_id: Optional[str] | Omit = omit, healthmonitor: Optional[pool_update_params.Healthmonitor] | Omit = omit, @@ -795,6 +802,10 @@ async def update( pool_id: Pool ID + admin_state_up: Administrative state of the resource. When set to true, the resource is enabled + and operational. When set to false, the resource is disabled and will not + process traffic. Defaults to true. + ca_secret_id: Secret ID of CA certificate bundle crl_secret_id: Secret ID of CA revocation list file @@ -839,6 +850,7 @@ async def update( f"/cloud/v2/lbpools/{project_id}/{region_id}/{pool_id}", body=await async_maybe_transform( { + "admin_state_up": admin_state_up, "ca_secret_id": ca_secret_id, "crl_secret_id": crl_secret_id, "healthmonitor": healthmonitor, diff --git a/src/gcore/resources/cloud/tasks.py b/src/gcore/resources/cloud/tasks.py index f88d9b39..46ddb0ef 100644 --- a/src/gcore/resources/cloud/tasks.py +++ b/src/gcore/resources/cloud/tasks.py @@ -170,7 +170,8 @@ def list( 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container', 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace', 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule', - 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group', + 'rebuild_bm', 'rebuild_gpu_baremetal_cluster', 'rebuild_gpu_baremetal_node', + 'rebuild_gpu_baremetal_server', 'remove_from_server_group', 'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer', 'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server', 'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server', @@ -180,9 +181,10 @@ def list( 'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip', 'update_inference_application', 'update_inference_instance', 'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata', - 'update_port_allowed_address_pairs', 'update_router', 'update_security_group', - 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2', - 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster'] + 'update_loadbalancer', 'update_port_allowed_address_pairs', 'update_router', + 'update_security_group', 'update_sfs', 'update_tags_gpu_virtual_cluster', + 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu', + 'upscale_gpu_virtual_cluster'] to_timestamp: ISO formatted datetime string. Filter the tasks by creation date less than or equal to `to_timestamp` @@ -484,7 +486,8 @@ def list( 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container', 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace', 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule', - 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group', + 'rebuild_bm', 'rebuild_gpu_baremetal_cluster', 'rebuild_gpu_baremetal_node', + 'rebuild_gpu_baremetal_server', 'remove_from_server_group', 'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer', 'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server', 'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server', @@ -494,9 +497,10 @@ def list( 'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip', 'update_inference_application', 'update_inference_instance', 'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata', - 'update_port_allowed_address_pairs', 'update_router', 'update_security_group', - 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2', - 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster'] + 'update_loadbalancer', 'update_port_allowed_address_pairs', 'update_router', + 'update_security_group', 'update_sfs', 'update_tags_gpu_virtual_cluster', + 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu', + 'upscale_gpu_virtual_cluster'] to_timestamp: ISO formatted datetime string. Filter the tasks by creation date less than or equal to `to_timestamp` diff --git a/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py b/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py index 786af310..e5f040a9 100644 --- a/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py +++ b/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py @@ -59,6 +59,8 @@ class ConfigUnionMember2(BaseModel): directory: Optional[str] = None + endpoint: Optional[str] = None + region: Optional[str] = None diff --git a/src/gcore/types/cdn/logs_uploader/target_create_params.py b/src/gcore/types/cdn/logs_uploader/target_create_params.py index f8d8e8e9..d48e6374 100644 --- a/src/gcore/types/cdn/logs_uploader/target_create_params.py +++ b/src/gcore/types/cdn/logs_uploader/target_create_params.py @@ -78,6 +78,8 @@ class ConfigS3OssConfig(TypedDict, total=False): directory: Optional[str] + endpoint: Optional[str] + region: Optional[str] diff --git a/src/gcore/types/cdn/logs_uploader/target_replace_params.py b/src/gcore/types/cdn/logs_uploader/target_replace_params.py index 77281c94..2a97435c 100644 --- a/src/gcore/types/cdn/logs_uploader/target_replace_params.py +++ b/src/gcore/types/cdn/logs_uploader/target_replace_params.py @@ -78,6 +78,8 @@ class ConfigS3OssConfig(TypedDict, total=False): directory: Optional[str] + endpoint: Optional[str] + region: Optional[str] diff --git a/src/gcore/types/cdn/logs_uploader/target_update_params.py b/src/gcore/types/cdn/logs_uploader/target_update_params.py index e93ab4d9..34730db0 100644 --- a/src/gcore/types/cdn/logs_uploader/target_update_params.py +++ b/src/gcore/types/cdn/logs_uploader/target_update_params.py @@ -78,6 +78,8 @@ class ConfigS3OssConfig(TypedDict, total=False): directory: Optional[str] + endpoint: Optional[str] + region: Optional[str] diff --git a/src/gcore/types/cloud/health_monitor.py b/src/gcore/types/cloud/health_monitor.py index 501c3782..44b8ab67 100644 --- a/src/gcore/types/cloud/health_monitor.py +++ b/src/gcore/types/cloud/health_monitor.py @@ -19,8 +19,7 @@ class HealthMonitor(BaseModel): """Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, - the resource is disabled and will not process traffic. When null is passed, the - value is skipped and defaults to true. + the resource is disabled and will not process traffic. Defaults to true. """ delay: int diff --git a/src/gcore/types/cloud/k8s/cluster_create_params.py b/src/gcore/types/cloud/k8s/cluster_create_params.py index 8f97757c..6888e441 100644 --- a/src/gcore/types/cloud/k8s/cluster_create_params.py +++ b/src/gcore/types/cloud/k8s/cluster_create_params.py @@ -27,8 +27,10 @@ class ClusterCreateParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" keypair: Required[str] """The keypair of the cluster""" @@ -211,6 +213,8 @@ class AddOnsSlurm(TypedDict, total=False): Each Slurm worker node will be backed by a Pod scheduled on one of cluster's GPU nodes. + + Note: Downscaling (reducing worker count) is not supported. """ diff --git a/src/gcore/types/cloud/k8s/cluster_delete_params.py b/src/gcore/types/cloud/k8s/cluster_delete_params.py index 49b5e580..e1b433ea 100644 --- a/src/gcore/types/cloud/k8s/cluster_delete_params.py +++ b/src/gcore/types/cloud/k8s/cluster_delete_params.py @@ -9,8 +9,10 @@ class ClusterDeleteParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" volumes: str """Comma separated list of volume IDs to be deleted with the cluster""" diff --git a/src/gcore/types/cloud/k8s/cluster_update_params.py b/src/gcore/types/cloud/k8s/cluster_update_params.py index 4216b832..911a71e8 100644 --- a/src/gcore/types/cloud/k8s/cluster_update_params.py +++ b/src/gcore/types/cloud/k8s/cluster_update_params.py @@ -26,8 +26,10 @@ class ClusterUpdateParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" add_ons: AddOns """Cluster add-ons configuration""" @@ -131,6 +133,8 @@ class AddOnsSlurmK8SClusterSlurmAddonEnableV2Serializer(TypedDict, total=False): Each Slurm worker node will be backed by a Pod scheduled on one of cluster's GPU nodes. + + Note: Downscaling (reducing worker count) is not supported. """ diff --git a/src/gcore/types/cloud/k8s/cluster_upgrade_params.py b/src/gcore/types/cloud/k8s/cluster_upgrade_params.py index 5301fc15..dd92d0ac 100644 --- a/src/gcore/types/cloud/k8s/cluster_upgrade_params.py +++ b/src/gcore/types/cloud/k8s/cluster_upgrade_params.py @@ -9,8 +9,10 @@ class ClusterUpgradeParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" version: Required[str] """Target k8s cluster version""" diff --git a/src/gcore/types/cloud/k8s/clusters/node_list_params.py b/src/gcore/types/cloud/k8s/clusters/node_list_params.py index 027c6cf4..390c627e 100644 --- a/src/gcore/types/cloud/k8s/clusters/node_list_params.py +++ b/src/gcore/types/cloud/k8s/clusters/node_list_params.py @@ -9,8 +9,10 @@ class NodeListParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" with_ddos: bool """Include DDoS profile information if set to true. Default is false.""" diff --git a/src/gcore/types/cloud/k8s/clusters/pool_create_params.py b/src/gcore/types/cloud/k8s/clusters/pool_create_params.py index f7b626a9..c7fa5d12 100644 --- a/src/gcore/types/cloud/k8s/clusters/pool_create_params.py +++ b/src/gcore/types/cloud/k8s/clusters/pool_create_params.py @@ -10,8 +10,10 @@ class PoolCreateParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" flavor_id: Required[str] """Flavor ID""" diff --git a/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py b/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py index 60450f3e..356f779d 100644 --- a/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py +++ b/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py @@ -9,10 +9,13 @@ class PoolResizeParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" cluster_name: Required[str] + """Cluster name""" node_count: Required[int] """Target node count""" diff --git a/src/gcore/types/cloud/k8s/clusters/pool_update_params.py b/src/gcore/types/cloud/k8s/clusters/pool_update_params.py index 16a46ed7..eb7c4b71 100644 --- a/src/gcore/types/cloud/k8s/clusters/pool_update_params.py +++ b/src/gcore/types/cloud/k8s/clusters/pool_update_params.py @@ -10,10 +10,13 @@ class PoolUpdateParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" cluster_name: Required[str] + """Cluster name""" auto_healing_enabled: Optional[bool] """Enable/disable auto healing""" diff --git a/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py b/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py index 9a31c51b..fd6f0bb2 100644 --- a/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py +++ b/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py @@ -9,10 +9,13 @@ class NodeListParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" cluster_name: Required[str] + """Cluster name""" with_ddos: bool """Include DDoS profile information if set to true. Default is false.""" diff --git a/src/gcore/types/cloud/k8s/flavor_list_params.py b/src/gcore/types/cloud/k8s/flavor_list_params.py index 26890db9..10232583 100644 --- a/src/gcore/types/cloud/k8s/flavor_list_params.py +++ b/src/gcore/types/cloud/k8s/flavor_list_params.py @@ -9,11 +9,16 @@ class FlavorListParams(TypedDict, total=False): project_id: int + """Project ID""" region_id: int + """Region ID""" exclude_gpu: bool - """Set to false to include GPU flavors. Default is True.""" + """Set to true to exclude GPU flavors. Default is false.""" + + include_capacity: bool + """Set to true to include flavor capacity. Default is False.""" include_prices: bool """Set to true to include flavor prices. Default is False.""" diff --git a/src/gcore/types/cloud/k8s/k8s_cluster.py b/src/gcore/types/cloud/k8s/k8s_cluster.py index c219d2fa..283626ba 100644 --- a/src/gcore/types/cloud/k8s/k8s_cluster.py +++ b/src/gcore/types/cloud/k8s/k8s_cluster.py @@ -48,6 +48,8 @@ class AddOnsSlurm(BaseModel): Each Slurm worker node is backed by a Pod scheduled on one of cluster's GPU nodes. + + Note: Downscaling (reducing worker count) is not supported. """ diff --git a/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py b/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py index 717dddc5..6ee2cccd 100644 --- a/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +++ b/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from datetime import datetime from ...._models import BaseModel @@ -21,11 +20,11 @@ class K8SClusterKubeconfig(BaseModel): config: str """Cluster kubeconfig""" - host: str - """Cluster host""" - - created_at: Optional[datetime] = None + created_at: datetime """Kubeconfig creation date""" - expires_at: Optional[datetime] = None + expires_at: datetime """Kubeconfig expiration date""" + + host: str + """Cluster host""" diff --git a/src/gcore/types/cloud/load_balancer.py b/src/gcore/types/cloud/load_balancer.py index 1763aa95..ebd56ccd 100644 --- a/src/gcore/types/cloud/load_balancer.py +++ b/src/gcore/types/cloud/load_balancer.py @@ -62,6 +62,13 @@ class LoadBalancer(BaseModel): id: str """Load balancer ID""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + created_at: datetime """Datetime when the load balancer was created""" diff --git a/src/gcore/types/cloud/load_balancer_create_params.py b/src/gcore/types/cloud/load_balancer_create_params.py index 49939fac..cf4eb547 100644 --- a/src/gcore/types/cloud/load_balancer_create_params.py +++ b/src/gcore/types/cloud/load_balancer_create_params.py @@ -154,6 +154,13 @@ class ListenerPoolHealthmonitor(TypedDict, total=False): type: Required[LbHealthMonitorType] """Health monitor type. Once health monitor is created, cannot be changed.""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + expected_codes: Optional[str] """Expected HTTP response codes. @@ -190,8 +197,7 @@ class ListenerPoolMember(TypedDict, total=False): """Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, - the resource is disabled and will not process traffic. When null is passed, the - value is skipped and defaults to true. + the resource is disabled and will not process traffic. Defaults to true. """ backup: bool diff --git a/src/gcore/types/cloud/load_balancer_listener_detail.py b/src/gcore/types/cloud/load_balancer_listener_detail.py index c04b3d43..c54675d9 100644 --- a/src/gcore/types/cloud/load_balancer_listener_detail.py +++ b/src/gcore/types/cloud/load_balancer_listener_detail.py @@ -23,6 +23,13 @@ class LoadBalancerListenerDetail(BaseModel): id: str """Load balancer listener ID""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + allowed_cidrs: Optional[List[str]] = None """Network CIDRs from which service will be accessible""" diff --git a/src/gcore/types/cloud/load_balancer_pool.py b/src/gcore/types/cloud/load_balancer_pool.py index 9b7267b2..3e67e0a0 100644 --- a/src/gcore/types/cloud/load_balancer_pool.py +++ b/src/gcore/types/cloud/load_balancer_pool.py @@ -28,6 +28,13 @@ class LoadBalancerPool(BaseModel): id: str """Pool ID""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + ca_secret_id: Optional[str] = None """Secret ID of CA certificate bundle""" diff --git a/src/gcore/types/cloud/load_balancer_pool_list.py b/src/gcore/types/cloud/load_balancer_pool_list.py index d846c6ca..08f1422a 100644 --- a/src/gcore/types/cloud/load_balancer_pool_list.py +++ b/src/gcore/types/cloud/load_balancer_pool_list.py @@ -44,6 +44,13 @@ class Result(BaseModel): id: str """Pool ID""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + ca_secret_id: Optional[str] = None """Secret ID of CA certificate bundle""" diff --git a/src/gcore/types/cloud/load_balancers/listener_update_params.py b/src/gcore/types/cloud/load_balancers/listener_update_params.py index 002bb912..e537da9b 100644 --- a/src/gcore/types/cloud/load_balancers/listener_update_params.py +++ b/src/gcore/types/cloud/load_balancers/listener_update_params.py @@ -17,6 +17,13 @@ class ListenerUpdateParams(TypedDict, total=False): region_id: int """Region ID""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + allowed_cidrs: Optional[SequenceNotStr[str]] """Network CIDRs from which service will be accessible""" diff --git a/src/gcore/types/cloud/load_balancers/pool_create_params.py b/src/gcore/types/cloud/load_balancers/pool_create_params.py index 81987648..2feef950 100644 --- a/src/gcore/types/cloud/load_balancers/pool_create_params.py +++ b/src/gcore/types/cloud/load_balancers/pool_create_params.py @@ -82,6 +82,13 @@ class Healthmonitor(TypedDict, total=False): type: Required[LbHealthMonitorType] """Health monitor type. Once health monitor is created, cannot be changed.""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + expected_codes: Optional[str] """Expected HTTP response codes. @@ -118,8 +125,7 @@ class Member(TypedDict, total=False): """Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, - the resource is disabled and will not process traffic. When null is passed, the - value is skipped and defaults to true. + the resource is disabled and will not process traffic. Defaults to true. """ backup: bool diff --git a/src/gcore/types/cloud/load_balancers/pool_update_params.py b/src/gcore/types/cloud/load_balancers/pool_update_params.py index b5a32f86..e18d418e 100644 --- a/src/gcore/types/cloud/load_balancers/pool_update_params.py +++ b/src/gcore/types/cloud/load_balancers/pool_update_params.py @@ -21,6 +21,13 @@ class PoolUpdateParams(TypedDict, total=False): region_id: int """Region ID""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + ca_secret_id: Optional[str] """Secret ID of CA certificate bundle""" @@ -77,6 +84,13 @@ class Healthmonitor(TypedDict, total=False): timeout: Required[int] """The maximum time to connect. Must be less than the delay value""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + expected_codes: Optional[str] """Expected HTTP response codes. @@ -116,8 +130,7 @@ class Member(TypedDict, total=False): """Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, - the resource is disabled and will not process traffic. When null is passed, the - value is skipped and defaults to true. + the resource is disabled and will not process traffic. Defaults to true. """ backup: bool diff --git a/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py b/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py index d8de1a60..a1cabcbe 100644 --- a/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +++ b/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py @@ -31,6 +31,13 @@ class HealthMonitorCreateParams(TypedDict, total=False): type: Required[LbHealthMonitorType] """Health monitor type. Once health monitor is created, cannot be changed.""" + admin_state_up: bool + """Administrative state of the resource. + + When set to true, the resource is enabled and operational. When set to false, + the resource is disabled and will not process traffic. Defaults to true. + """ + expected_codes: Optional[str] """Expected HTTP response codes. diff --git a/src/gcore/types/cloud/load_balancers/pools/member_create_params.py b/src/gcore/types/cloud/load_balancers/pools/member_create_params.py index ceab4077..b05d79d6 100644 --- a/src/gcore/types/cloud/load_balancers/pools/member_create_params.py +++ b/src/gcore/types/cloud/load_balancers/pools/member_create_params.py @@ -25,8 +25,7 @@ class MemberCreateParams(TypedDict, total=False): """Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, - the resource is disabled and will not process traffic. When null is passed, the - value is skipped and defaults to true. + the resource is disabled and will not process traffic. Defaults to true. """ backup: bool diff --git a/src/gcore/types/cloud/member.py b/src/gcore/types/cloud/member.py index 98acfa1e..c9e2fc0d 100644 --- a/src/gcore/types/cloud/member.py +++ b/src/gcore/types/cloud/member.py @@ -20,8 +20,7 @@ class Member(BaseModel): """Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, - the resource is disabled and will not process traffic. When null is passed, the - value is skipped and defaults to true. + the resource is disabled and will not process traffic. Defaults to true. """ backup: bool diff --git a/src/gcore/types/cloud/task.py b/src/gcore/types/cloud/task.py index 7eae7f01..3aea7a7a 100644 --- a/src/gcore/types/cloud/task.py +++ b/src/gcore/types/cloud/task.py @@ -148,8 +148,10 @@ class Task(BaseModel): detailed_state: Optional[ Literal[ "CLUSTER_CLEAN_UP", + "CLUSTER_REBUILD", "CLUSTER_RESIZE", "CLUSTER_RESUME", + "CLUSTER_SERVER_REBUILD", "CLUSTER_SUSPEND", "ERROR", "FINISHED", diff --git a/src/gcore/types/cloud/task_list_params.py b/src/gcore/types/cloud/task_list_params.py index 23658f26..9915c84e 100644 --- a/src/gcore/types/cloud/task_list_params.py +++ b/src/gcore/types/cloud/task_list_params.py @@ -89,7 +89,8 @@ class TaskListParams(TypedDict, total=False): 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container', 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace', 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule', - 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group', + 'rebuild_bm', 'rebuild_gpu_baremetal_cluster', 'rebuild_gpu_baremetal_node', + 'rebuild_gpu_baremetal_server', 'remove_from_server_group', 'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer', 'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server', 'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server', @@ -99,9 +100,10 @@ class TaskListParams(TypedDict, total=False): 'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip', 'update_inference_application', 'update_inference_instance', 'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata', - 'update_port_allowed_address_pairs', 'update_router', 'update_security_group', - 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2', - 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster'] + 'update_loadbalancer', 'update_port_allowed_address_pairs', 'update_router', + 'update_security_group', 'update_sfs', 'update_tags_gpu_virtual_cluster', + 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu', + 'upscale_gpu_virtual_cluster'] """ to_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py b/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py index 1f283cc8..db1bce7d 100644 --- a/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py +++ b/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py @@ -20,31 +20,31 @@ class TestNodes: @parametrize def test_method_list(self, client: Gcore) -> None: node = client.cloud.k8s.clusters.pools.nodes.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Gcore) -> None: node = client.cloud.k8s.clusters.pools.nodes.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", - with_ddos=True, + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", + with_ddos=False, ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize def test_raw_response_list(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.nodes.with_raw_response.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -55,10 +55,10 @@ def test_raw_response_list(self, client: Gcore) -> None: @parametrize def test_streaming_response_list(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.nodes.with_streaming_response.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -72,39 +72,39 @@ def test_streaming_response_list(self, client: Gcore) -> None: def test_path_params_list(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.nodes.with_raw_response.list( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): client.cloud.k8s.clusters.pools.nodes.with_raw_response.list( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize def test_method_delete(self, client: Gcore) -> None: node = client.cloud.k8s.clusters.pools.nodes.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) assert node is None @parametrize def test_raw_response_delete(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) assert response.is_closed is True @@ -115,11 +115,11 @@ def test_raw_response_delete(self, client: Gcore) -> None: @parametrize def test_streaming_response_delete(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.nodes.with_streaming_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -133,29 +133,29 @@ def test_streaming_response_delete(self, client: Gcore) -> None: def test_path_params_delete(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, cluster_name="", - pool_name="pool_name", + pool_name="my-pool", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", pool_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"): client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( instance_id="", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) @@ -167,31 +167,31 @@ class TestAsyncNodes: @parametrize async def test_method_list(self, async_client: AsyncGcore) -> None: node = await async_client.cloud.k8s.clusters.pools.nodes.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None: node = await async_client.cloud.k8s.clusters.pools.nodes.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", - with_ddos=True, + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", + with_ddos=False, ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -202,10 +202,10 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.nodes.with_streaming_response.list( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -219,39 +219,39 @@ async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: async def test_path_params_list(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.list( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.list( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize async def test_method_delete(self, async_client: AsyncGcore) -> None: node = await async_client.cloud.k8s.clusters.pools.nodes.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) assert node is None @parametrize async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) assert response.is_closed is True @@ -262,11 +262,11 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.nodes.with_streaming_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,27 +280,27 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None async def test_path_params_delete(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, cluster_name="", - pool_name="pool_name", + pool_name="my-pool", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", pool_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"): await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete( instance_id="", - project_id=0, - region_id=0, - cluster_name="cluster_name", - pool_name="pool_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", + pool_name="my-pool", ) diff --git a/tests/api_resources/cloud/k8s/clusters/test_nodes.py b/tests/api_resources/cloud/k8s/clusters/test_nodes.py index 624fdf56..7e5c41c3 100644 --- a/tests/api_resources/cloud/k8s/clusters/test_nodes.py +++ b/tests/api_resources/cloud/k8s/clusters/test_nodes.py @@ -20,28 +20,28 @@ class TestNodes: @parametrize def test_method_list(self, client: Gcore) -> None: node = client.cloud.k8s.clusters.nodes.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Gcore) -> None: node = client.cloud.k8s.clusters.nodes.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, - with_ddos=True, + cluster_name="my-cluster", + project_id=1, + region_id=7, + with_ddos=False, ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize def test_raw_response_list(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.nodes.with_raw_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -52,9 +52,9 @@ def test_raw_response_list(self, client: Gcore) -> None: @parametrize def test_streaming_response_list(self, client: Gcore) -> None: with client.cloud.k8s.clusters.nodes.with_streaming_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,27 +69,27 @@ def test_path_params_list(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.nodes.with_raw_response.list( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_delete(self, client: Gcore) -> None: node = client.cloud.k8s.clusters.nodes.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert node is None @parametrize def test_raw_response_delete(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -100,10 +100,10 @@ def test_raw_response_delete(self, client: Gcore) -> None: @parametrize def test_streaming_response_delete(self, client: Gcore) -> None: with client.cloud.k8s.clusters.nodes.with_streaming_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -117,18 +117,18 @@ def test_streaming_response_delete(self, client: Gcore) -> None: def test_path_params_delete(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"): client.cloud.k8s.clusters.nodes.with_raw_response.delete( instance_id="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @@ -140,28 +140,28 @@ class TestAsyncNodes: @parametrize async def test_method_list(self, async_client: AsyncGcore) -> None: node = await async_client.cloud.k8s.clusters.nodes.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None: node = await async_client.cloud.k8s.clusters.nodes.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, - with_ddos=True, + cluster_name="my-cluster", + project_id=1, + region_id=7, + with_ddos=False, ) assert_matches_type(InstanceList, node, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.nodes.with_raw_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -172,9 +172,9 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.nodes.with_streaming_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -189,27 +189,27 @@ async def test_path_params_list(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.nodes.with_raw_response.list( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_delete(self, async_client: AsyncGcore) -> None: node = await async_client.cloud.k8s.clusters.nodes.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert node is None @parametrize async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -220,10 +220,10 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.nodes.with_streaming_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, - cluster_name="cluster_name", + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,16 +237,16 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None async def test_path_params_delete(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.nodes.with_raw_response.delete( - instance_id="instance_id", - project_id=0, - region_id=0, + instance_id="550e8400-e29b-41d4-a716-446655440000", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"): await async_client.cloud.k8s.clusters.nodes.with_raw_response.delete( instance_id="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) diff --git a/tests/api_resources/cloud/k8s/clusters/test_pools.py b/tests/api_resources/cloud/k8s/clusters/test_pools.py index bc2d028a..b928939a 100644 --- a/tests/api_resources/cloud/k8s/clusters/test_pools.py +++ b/tests/api_resources/cloud/k8s/clusters/test_pools.py @@ -25,9 +25,9 @@ class TestPools: @parametrize def test_method_create(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -37,9 +37,9 @@ def test_method_create(self, client: Gcore) -> None: @parametrize def test_method_create_with_all_params(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -59,9 +59,9 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: @parametrize def test_raw_response_create(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.with_raw_response.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -75,9 +75,9 @@ def test_raw_response_create(self, client: Gcore) -> None: @parametrize def test_streaming_response_create(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.with_streaming_response.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -95,8 +95,8 @@ def test_path_params_create(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.create( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -105,20 +105,20 @@ def test_path_params_create(self, client: Gcore) -> None: @parametrize def test_method_update(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(K8SClusterPool, pool, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", auto_healing_enabled=True, labels={"my-label": "foo"}, max_node_count=3, @@ -131,10 +131,10 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: @parametrize def test_raw_response_update(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.with_raw_response.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -145,10 +145,10 @@ def test_raw_response_update(self, client: Gcore) -> None: @parametrize def test_streaming_response_update(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.with_streaming_response.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -162,35 +162,35 @@ def test_streaming_response_update(self, client: Gcore) -> None: def test_path_params_update(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.update( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.update( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize def test_method_list(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterPoolList, pool, path=["response"]) @parametrize def test_raw_response_list(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.with_raw_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -201,9 +201,9 @@ def test_raw_response_list(self, client: Gcore) -> None: @parametrize def test_streaming_response_list(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.with_streaming_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -218,27 +218,27 @@ def test_path_params_list(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.list( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_delete(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.delete( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(TaskIDList, pool, path=["response"]) @parametrize def test_raw_response_delete(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.with_raw_response.delete( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -249,10 +249,10 @@ def test_raw_response_delete(self, client: Gcore) -> None: @parametrize def test_streaming_response_delete(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.with_streaming_response.delete( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -266,18 +266,18 @@ def test_streaming_response_delete(self, client: Gcore) -> None: def test_path_params_delete(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.delete( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.delete( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize @@ -335,20 +335,20 @@ def test_streaming_response_check_quota(self, client: Gcore) -> None: @parametrize def test_method_get(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.get( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(K8SClusterPool, pool, path=["response"]) @parametrize def test_raw_response_get(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.with_raw_response.get( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -359,10 +359,10 @@ def test_raw_response_get(self, client: Gcore) -> None: @parametrize def test_streaming_response_get(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.with_streaming_response.get( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -376,27 +376,27 @@ def test_streaming_response_get(self, client: Gcore) -> None: def test_path_params_get(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.get( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.get( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize def test_method_resize(self, client: Gcore) -> None: pool = client.cloud.k8s.clusters.pools.resize( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) assert_matches_type(TaskIDList, pool, path=["response"]) @@ -404,10 +404,10 @@ def test_method_resize(self, client: Gcore) -> None: @parametrize def test_raw_response_resize(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.pools.with_raw_response.resize( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) @@ -419,10 +419,10 @@ def test_raw_response_resize(self, client: Gcore) -> None: @parametrize def test_streaming_response_resize(self, client: Gcore) -> None: with client.cloud.k8s.clusters.pools.with_streaming_response.resize( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) as response: assert not response.is_closed @@ -437,9 +437,9 @@ def test_streaming_response_resize(self, client: Gcore) -> None: def test_path_params_resize(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.resize( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", node_count=2, ) @@ -447,9 +447,9 @@ def test_path_params_resize(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): client.cloud.k8s.clusters.pools.with_raw_response.resize( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) @@ -462,9 +462,9 @@ class TestAsyncPools: @parametrize async def test_method_create(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -474,9 +474,9 @@ async def test_method_create(self, async_client: AsyncGcore) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -496,9 +496,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> @parametrize async def test_raw_response_create(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.with_raw_response.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -512,9 +512,9 @@ async def test_raw_response_create(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.with_streaming_response.create( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -532,8 +532,8 @@ async def test_path_params_create(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.create( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, flavor_id="g1-standard-1-2", min_node_count=3, name="my-pool", @@ -542,20 +542,20 @@ async def test_path_params_create(self, async_client: AsyncGcore) -> None: @parametrize async def test_method_update(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(K8SClusterPool, pool, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", auto_healing_enabled=True, labels={"my-label": "foo"}, max_node_count=3, @@ -568,10 +568,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> @parametrize async def test_raw_response_update(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.with_raw_response.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -582,10 +582,10 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.with_streaming_response.update( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -599,35 +599,35 @@ async def test_streaming_response_update(self, async_client: AsyncGcore) -> None async def test_path_params_update(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.update( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.update( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize async def test_method_list(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterPoolList, pool, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.with_raw_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -638,9 +638,9 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.with_streaming_response.list( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -655,27 +655,27 @@ async def test_path_params_list(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.list( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_delete(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.delete( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(TaskIDList, pool, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.with_raw_response.delete( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -686,10 +686,10 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.with_streaming_response.delete( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -703,18 +703,18 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None async def test_path_params_delete(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.delete( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.delete( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize @@ -772,20 +772,20 @@ async def test_streaming_response_check_quota(self, async_client: AsyncGcore) -> @parametrize async def test_method_get(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.get( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert_matches_type(K8SClusterPool, pool, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.with_raw_response.get( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) assert response.is_closed is True @@ -796,10 +796,10 @@ async def test_raw_response_get(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.with_streaming_response.get( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -813,27 +813,27 @@ async def test_streaming_response_get(self, async_client: AsyncGcore) -> None: async def test_path_params_get(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.get( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.get( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", ) @parametrize async def test_method_resize(self, async_client: AsyncGcore) -> None: pool = await async_client.cloud.k8s.clusters.pools.resize( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) assert_matches_type(TaskIDList, pool, path=["response"]) @@ -841,10 +841,10 @@ async def test_method_resize(self, async_client: AsyncGcore) -> None: @parametrize async def test_raw_response_resize(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.pools.with_raw_response.resize( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) @@ -856,10 +856,10 @@ async def test_raw_response_resize(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_resize(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.pools.with_streaming_response.resize( - pool_name="pool_name", - project_id=0, - region_id=0, - cluster_name="cluster_name", + pool_name="my-pool", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) as response: assert not response.is_closed @@ -874,9 +874,9 @@ async def test_streaming_response_resize(self, async_client: AsyncGcore) -> None async def test_path_params_resize(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.resize( - pool_name="pool_name", - project_id=0, - region_id=0, + pool_name="my-pool", + project_id=1, + region_id=7, cluster_name="", node_count=2, ) @@ -884,8 +884,8 @@ async def test_path_params_resize(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"): await async_client.cloud.k8s.clusters.pools.with_raw_response.resize( pool_name="", - project_id=0, - region_id=0, - cluster_name="cluster_name", + project_id=1, + region_id=7, + cluster_name="my-cluster", node_count=2, ) diff --git a/tests/api_resources/cloud/k8s/test_clusters.py b/tests/api_resources/cloud/k8s/test_clusters.py index d9296b23..1fd9c956 100644 --- a/tests/api_resources/cloud/k8s/test_clusters.py +++ b/tests/api_resources/cloud/k8s/test_clusters.py @@ -26,8 +26,8 @@ class TestClusters: @parametrize def test_method_create(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -44,8 +44,8 @@ def test_method_create(self, client: Gcore) -> None: @parametrize def test_method_create_with_all_params(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -133,8 +133,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: @parametrize def test_raw_response_create(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -155,8 +155,8 @@ def test_raw_response_create(self, client: Gcore) -> None: @parametrize def test_streaming_response_create(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -179,18 +179,18 @@ def test_streaming_response_create(self, client: Gcore) -> None: @parametrize def test_method_update(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(TaskIDList, cluster, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, add_ons={ "slurm": { "enabled": True, @@ -250,9 +250,9 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: @parametrize def test_raw_response_update(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -263,9 +263,9 @@ def test_raw_response_update(self, client: Gcore) -> None: @parametrize def test_streaming_response_update(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,23 +280,23 @@ def test_path_params_update(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.update( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_list(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterList, cluster, path=["response"]) @parametrize def test_raw_response_list(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -307,8 +307,8 @@ def test_raw_response_list(self, client: Gcore) -> None: @parametrize def test_streaming_response_list(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -321,28 +321,28 @@ def test_streaming_response_list(self, client: Gcore) -> None: @parametrize def test_method_delete(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(TaskIDList, cluster, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, - volumes="volumes", + cluster_name="my-cluster", + project_id=1, + region_id=7, + volumes="550e8400-e29b-41d4-a716-446655440000", ) assert_matches_type(TaskIDList, cluster, path=["response"]) @parametrize def test_raw_response_delete(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -353,9 +353,9 @@ def test_raw_response_delete(self, client: Gcore) -> None: @parametrize def test_streaming_response_delete(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -370,25 +370,25 @@ def test_path_params_delete(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.delete( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_get(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.get( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SCluster, cluster, path=["response"]) @parametrize def test_raw_response_get(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.get( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -399,9 +399,9 @@ def test_raw_response_get(self, client: Gcore) -> None: @parametrize def test_streaming_response_get(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.get( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -416,25 +416,25 @@ def test_path_params_get(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.get( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_get_certificate(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.get_certificate( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterCertificate, cluster, path=["response"]) @parametrize def test_raw_response_get_certificate(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.get_certificate( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -445,9 +445,9 @@ def test_raw_response_get_certificate(self, client: Gcore) -> None: @parametrize def test_streaming_response_get_certificate(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.get_certificate( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -462,25 +462,25 @@ def test_path_params_get_certificate(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.get_certificate( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_get_kubeconfig(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.get_kubeconfig( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterKubeconfig, cluster, path=["response"]) @parametrize def test_raw_response_get_kubeconfig(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.get_kubeconfig( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -491,9 +491,9 @@ def test_raw_response_get_kubeconfig(self, client: Gcore) -> None: @parametrize def test_streaming_response_get_kubeconfig(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.get_kubeconfig( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -508,25 +508,25 @@ def test_path_params_get_kubeconfig(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.get_kubeconfig( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_list_versions_for_upgrade(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.list_versions_for_upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterVersionList, cluster, path=["response"]) @parametrize def test_raw_response_list_versions_for_upgrade(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -537,9 +537,9 @@ def test_raw_response_list_versions_for_upgrade(self, client: Gcore) -> None: @parametrize def test_streaming_response_list_versions_for_upgrade(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.list_versions_for_upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -554,16 +554,16 @@ def test_path_params_list_versions_for_upgrade(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize def test_method_upgrade(self, client: Gcore) -> None: cluster = client.cloud.k8s.clusters.upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, version="v1.28.1", ) assert_matches_type(TaskIDList, cluster, path=["response"]) @@ -571,9 +571,9 @@ def test_method_upgrade(self, client: Gcore) -> None: @parametrize def test_raw_response_upgrade(self, client: Gcore) -> None: response = client.cloud.k8s.clusters.with_raw_response.upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, version="v1.28.1", ) @@ -585,9 +585,9 @@ def test_raw_response_upgrade(self, client: Gcore) -> None: @parametrize def test_streaming_response_upgrade(self, client: Gcore) -> None: with client.cloud.k8s.clusters.with_streaming_response.upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, version="v1.28.1", ) as response: assert not response.is_closed @@ -603,8 +603,8 @@ def test_path_params_upgrade(self, client: Gcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): client.cloud.k8s.clusters.with_raw_response.upgrade( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, version="v1.28.1", ) @@ -617,8 +617,8 @@ class TestAsyncClusters: @parametrize async def test_method_create(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -635,8 +635,8 @@ async def test_method_create(self, async_client: AsyncGcore) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -724,8 +724,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> @parametrize async def test_raw_response_create(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -746,8 +746,8 @@ async def test_raw_response_create(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.create( - project_id=0, - region_id=0, + project_id=1, + region_id=7, keypair="some_keypair", name="string", pools=[ @@ -770,18 +770,18 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None @parametrize async def test_method_update(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(TaskIDList, cluster, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, add_ons={ "slurm": { "enabled": True, @@ -841,9 +841,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> @parametrize async def test_raw_response_update(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -854,9 +854,9 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.update( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -871,23 +871,23 @@ async def test_path_params_update(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.update( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_list(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterList, cluster, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -898,8 +898,8 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -912,28 +912,28 @@ async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: @parametrize async def test_method_delete(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(TaskIDList, cluster, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, - volumes="volumes", + cluster_name="my-cluster", + project_id=1, + region_id=7, + volumes="550e8400-e29b-41d4-a716-446655440000", ) assert_matches_type(TaskIDList, cluster, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -944,9 +944,9 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.delete( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -961,25 +961,25 @@ async def test_path_params_delete(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.delete( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_get(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.get( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SCluster, cluster, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.get( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -990,9 +990,9 @@ async def test_raw_response_get(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.get( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1007,25 +1007,25 @@ async def test_path_params_get(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.get( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_get_certificate(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.get_certificate( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterCertificate, cluster, path=["response"]) @parametrize async def test_raw_response_get_certificate(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.get_certificate( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -1036,9 +1036,9 @@ async def test_raw_response_get_certificate(self, async_client: AsyncGcore) -> N @parametrize async def test_streaming_response_get_certificate(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.get_certificate( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1053,25 +1053,25 @@ async def test_path_params_get_certificate(self, async_client: AsyncGcore) -> No with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.get_certificate( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_get_kubeconfig(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.get_kubeconfig( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterKubeconfig, cluster, path=["response"]) @parametrize async def test_raw_response_get_kubeconfig(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.get_kubeconfig( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -1082,9 +1082,9 @@ async def test_raw_response_get_kubeconfig(self, async_client: AsyncGcore) -> No @parametrize async def test_streaming_response_get_kubeconfig(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.get_kubeconfig( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1099,25 +1099,25 @@ async def test_path_params_get_kubeconfig(self, async_client: AsyncGcore) -> Non with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.get_kubeconfig( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_list_versions_for_upgrade(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.list_versions_for_upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterVersionList, cluster, path=["response"]) @parametrize async def test_raw_response_list_versions_for_upgrade(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -1128,9 +1128,9 @@ async def test_raw_response_list_versions_for_upgrade(self, async_client: AsyncG @parametrize async def test_streaming_response_list_versions_for_upgrade(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.list_versions_for_upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1145,16 +1145,16 @@ async def test_path_params_list_versions_for_upgrade(self, async_client: AsyncGc with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) @parametrize async def test_method_upgrade(self, async_client: AsyncGcore) -> None: cluster = await async_client.cloud.k8s.clusters.upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, version="v1.28.1", ) assert_matches_type(TaskIDList, cluster, path=["response"]) @@ -1162,9 +1162,9 @@ async def test_method_upgrade(self, async_client: AsyncGcore) -> None: @parametrize async def test_raw_response_upgrade(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.clusters.with_raw_response.upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, version="v1.28.1", ) @@ -1176,9 +1176,9 @@ async def test_raw_response_upgrade(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_upgrade(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.clusters.with_streaming_response.upgrade( - cluster_name="cluster_name", - project_id=0, - region_id=0, + cluster_name="my-cluster", + project_id=1, + region_id=7, version="v1.28.1", ) as response: assert not response.is_closed @@ -1194,7 +1194,7 @@ async def test_path_params_upgrade(self, async_client: AsyncGcore) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"): await async_client.cloud.k8s.clusters.with_raw_response.upgrade( cluster_name="", - project_id=0, - region_id=0, + project_id=1, + region_id=7, version="v1.28.1", ) diff --git a/tests/api_resources/cloud/k8s/test_flavors.py b/tests/api_resources/cloud/k8s/test_flavors.py index 4aabd062..898e9a30 100644 --- a/tests/api_resources/cloud/k8s/test_flavors.py +++ b/tests/api_resources/cloud/k8s/test_flavors.py @@ -20,26 +20,27 @@ class TestFlavors: @parametrize def test_method_list(self, client: Gcore) -> None: flavor = client.cloud.k8s.flavors.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert_matches_type(BaremetalFlavorList, flavor, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Gcore) -> None: flavor = client.cloud.k8s.flavors.list( - project_id=0, - region_id=0, - exclude_gpu=True, - include_prices=True, + project_id=1, + region_id=7, + exclude_gpu=False, + include_capacity=False, + include_prices=False, ) assert_matches_type(BaremetalFlavorList, flavor, path=["response"]) @parametrize def test_raw_response_list(self, client: Gcore) -> None: response = client.cloud.k8s.flavors.with_raw_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -50,8 +51,8 @@ def test_raw_response_list(self, client: Gcore) -> None: @parametrize def test_streaming_response_list(self, client: Gcore) -> None: with client.cloud.k8s.flavors.with_streaming_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -70,26 +71,27 @@ class TestAsyncFlavors: @parametrize async def test_method_list(self, async_client: AsyncGcore) -> None: flavor = await async_client.cloud.k8s.flavors.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert_matches_type(BaremetalFlavorList, flavor, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None: flavor = await async_client.cloud.k8s.flavors.list( - project_id=0, - region_id=0, - exclude_gpu=True, - include_prices=True, + project_id=1, + region_id=7, + exclude_gpu=False, + include_capacity=False, + include_prices=False, ) assert_matches_type(BaremetalFlavorList, flavor, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.flavors.with_raw_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -100,8 +102,8 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.flavors.with_streaming_response.list( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py b/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py index 0fecec7c..71eb353d 100644 --- a/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py +++ b/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: max_retries=2, api_timeout=5, type="HTTP", + admin_state_up=True, expected_codes="200,301,302", http_method="CONNECT", max_retries_down=2, @@ -171,6 +172,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> max_retries=2, api_timeout=5, type="HTTP", + admin_state_up=True, expected_codes="200,301,302", http_method="CONNECT", max_retries_down=2, diff --git a/tests/api_resources/cloud/load_balancers/test_listeners.py b/tests/api_resources/cloud/load_balancers/test_listeners.py index 2e098f0f..98a2a658 100644 --- a/tests/api_resources/cloud/load_balancers/test_listeners.py +++ b/tests/api_resources/cloud/load_balancers/test_listeners.py @@ -105,6 +105,7 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: listener_id="00000000-0000-4000-8000-000000000000", project_id=1, region_id=1, + admin_state_up=True, allowed_cidrs=["10.0.0.0/8"], connection_limit=100000, name="new_listener_name", @@ -409,6 +410,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> listener_id="00000000-0000-4000-8000-000000000000", project_id=1, region_id=1, + admin_state_up=True, allowed_cidrs=["10.0.0.0/8"], connection_limit=100000, name="new_listener_name", diff --git a/tests/api_resources/cloud/load_balancers/test_pools.py b/tests/api_resources/cloud/load_balancers/test_pools.py index 3a381afc..7039089f 100644 --- a/tests/api_resources/cloud/load_balancers/test_pools.py +++ b/tests/api_resources/cloud/load_balancers/test_pools.py @@ -43,6 +43,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: "max_retries": 3, "timeout": 5, "type": "HTTP", + "admin_state_up": True, "expected_codes": "200,301,302", "http_method": "GET", "max_retries_down": 3, @@ -134,12 +135,14 @@ def test_method_update_with_all_params(self, client: Gcore) -> None: pool_id="00000000-0000-4000-8000-000000000000", project_id=1, region_id=1, + admin_state_up=True, ca_secret_id="ca_secret_id", crl_secret_id="crl_secret_id", healthmonitor={ "delay": 10, "max_retries": 2, "timeout": 5, + "admin_state_up": True, "expected_codes": "200,301,302", "http_method": "CONNECT", "max_retries_down": 2, @@ -381,6 +384,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> "max_retries": 3, "timeout": 5, "type": "HTTP", + "admin_state_up": True, "expected_codes": "200,301,302", "http_method": "GET", "max_retries_down": 3, @@ -472,12 +476,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> pool_id="00000000-0000-4000-8000-000000000000", project_id=1, region_id=1, + admin_state_up=True, ca_secret_id="ca_secret_id", crl_secret_id="crl_secret_id", healthmonitor={ "delay": 10, "max_retries": 2, "timeout": 5, + "admin_state_up": True, "expected_codes": "200,301,302", "http_method": "CONNECT", "max_retries_down": 2, diff --git a/tests/api_resources/cloud/test_k8s.py b/tests/api_resources/cloud/test_k8s.py index 98602a71..43c912f3 100644 --- a/tests/api_resources/cloud/test_k8s.py +++ b/tests/api_resources/cloud/test_k8s.py @@ -20,16 +20,16 @@ class TestK8S: @parametrize def test_method_list_versions(self, client: Gcore) -> None: k8s = client.cloud.k8s.list_versions( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterVersionList, k8s, path=["response"]) @parametrize def test_raw_response_list_versions(self, client: Gcore) -> None: response = client.cloud.k8s.with_raw_response.list_versions( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -40,8 +40,8 @@ def test_raw_response_list_versions(self, client: Gcore) -> None: @parametrize def test_streaming_response_list_versions(self, client: Gcore) -> None: with client.cloud.k8s.with_streaming_response.list_versions( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,16 +60,16 @@ class TestAsyncK8S: @parametrize async def test_method_list_versions(self, async_client: AsyncGcore) -> None: k8s = await async_client.cloud.k8s.list_versions( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert_matches_type(K8SClusterVersionList, k8s, path=["response"]) @parametrize async def test_raw_response_list_versions(self, async_client: AsyncGcore) -> None: response = await async_client.cloud.k8s.with_raw_response.list_versions( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) assert response.is_closed is True @@ -80,8 +80,8 @@ async def test_raw_response_list_versions(self, async_client: AsyncGcore) -> Non @parametrize async def test_streaming_response_list_versions(self, async_client: AsyncGcore) -> None: async with async_client.cloud.k8s.with_streaming_response.list_versions( - project_id=0, - region_id=0, + project_id=1, + region_id=7, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/cloud/test_load_balancers.py b/tests/api_resources/cloud/test_load_balancers.py index 814fbc75..85bd2997 100644 --- a/tests/api_resources/cloud/test_load_balancers.py +++ b/tests/api_resources/cloud/test_load_balancers.py @@ -59,6 +59,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None: "max_retries": 3, "timeout": 5, "type": "HTTP", + "admin_state_up": True, "expected_codes": "200,301,302", "http_method": "GET", "max_retries_down": 3, @@ -525,6 +526,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> "max_retries": 3, "timeout": 5, "type": "HTTP", + "admin_state_up": True, "expected_codes": "200,301,302", "http_method": "GET", "max_retries_down": 3,