diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock
new file mode 100644
index 0000000..04cda9e
--- /dev/null
+++ b/.github/workflows/actions.lock
@@ -0,0 +1,54 @@
+# This file is machine-generated by `gh actions-lock`.
+# Do not edit by hand; run `gh actions-lock` to update.
+# Docs: https://gh.io/actions-lockfile
+version: 'v0.0.3'
+workflows:
+ '.github/workflows/ci.yml':
+ - 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
+ '.github/workflows/publish-pypi.yml':
+ - 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
+ - 'pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33'
+ '.github/workflows/release-doctor.yml':
+ - 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
+ '.github/workflows/release-please.yml':
+ - 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547'
+ - 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
+ - 'pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1'
+ '.github/workflows/stlc-promote.yml':
+ - 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
+ - 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547'
+ '.github/workflows/stlc-sync.yml':
+ - 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
+dependencies:
+ 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd':
+ ref: 'v6.0.2'
+ commit: 'sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd'
+ owner_id: 44036562
+ repo_id: 197814629
+ 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547':
+ ref: 'v1.12.0'
+ commit: 'sha1-d72941d797fd3113feb6b93fd0dec494b13a2547'
+ owner_id: 44036562
+ repo_id: 642580244
+ 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020':
+ ref: 'v4.4.0'
+ commit: 'sha1-49933ea5288caeca8642d1e84afbd3f7d6820020'
+ owner_id: 44036562
+ repo_id: 189476904
+ 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405':
+ ref: 'v6.2.0'
+ commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
+ owner_id: 44036562
+ repo_id: 192625525
+ 'pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1':
+ ref: 'v4.3.0'
+ commit: 'sha1-b906affcce14559ad1aafd4ab0e942779e9f58b1'
+ owner_id: 21320719
+ repo_id: 262289747
+ 'pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33':
+ ref: 'v1.14.2'
+ commit: 'sha1-dc37677b2e1c63e2034f94d8a5b11f265b73ba33'
+ owner_id: 647025
+ repo_id: 178055147
+ uses:
+ - 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405'
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index c71687d..4eaffa3 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -41,7 +41,7 @@ jobs:
node-version: '18.20.2'
- name: Set up pnpm
- uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
+ uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
with:
version: '9.11.0'
run_install: false
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 8935e93..b8dda9b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.28.0"
+ ".": "0.29.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ed65ca..864ca77 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
# Changelog
+## [0.29.0](https://github.com/kernel/hypeman-python/compare/v0.28.0...v0.29.0) (2026-11-16)
+
+
+### Features
+
+* Add force option to instance stop ([3ae497e](https://github.com/kernel/hypeman-python/commit/3ae497eeaf68f8a45cd2a4fd12073b80c26a0677))
+* Add Windows hypervisor primitives ([5c037b9](https://github.com/kernel/hypeman-python/commit/5c037b9f9c5926025ba9e5852bea964b4e1ace7c))
+* Integrate vendor VFIO vGPUs into the instance lifecycle ([24934bb](https://github.com/kernel/hypeman-python/commit/24934bb5e6f4a2ab636e0d893d056276ce2fd3dd))
+* Place vGPU profiles the driver hides from creatable lists ([3578ec1](https://github.com/kernel/hypeman-python/commit/3578ec14db5cf79817e7e8606c9e260865deafd3))
+* Update Hypeman build toolchains to Go 1.26.10 ([6a79c69](https://github.com/kernel/hypeman-python/commit/6a79c6927c90a1b35c971dcb749d1cddc0ecf8e3))
+
## [0.28.0](https://github.com/kernel/hypeman-python/compare/v0.27.0...v0.28.0) (2026-09-01)
diff --git a/api.md b/api.md
index 9f28555..1486000 100644
--- a/api.md
+++ b/api.md
@@ -97,7 +97,7 @@ Methods:
- client.instances.start(id, \*\*params) -> Instance
- client.instances.stat(id, \*\*params) -> PathInfo
- client.instances.stats(id) -> InstanceStats
-- client.instances.stop(id) -> Instance
+- client.instances.stop(id, \*\*params) -> Instance
- client.instances.wait(id, \*\*params) -> WaitForStateResponse
## AutoStandby
diff --git a/pyproject.toml b/pyproject.toml
index 510aa2f..5eca9c0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "hypeman"
-version = "0.28.0"
+version = "0.29.0"
description = "The official Python library for the hypeman API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/hypeman/_version.py b/src/hypeman/_version.py
index 8b63c5a..2605750 100644
--- a/src/hypeman/_version.py
+++ b/src/hypeman/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "hypeman"
-__version__ = "0.28.0" # x-release-please-version
+__version__ = "0.29.0" # x-release-please-version
diff --git a/src/hypeman/resources/instances/instances.py b/src/hypeman/resources/instances/instances.py
index 513e422..e293e3a 100644
--- a/src/hypeman/resources/instances/instances.py
+++ b/src/hypeman/resources/instances/instances.py
@@ -13,6 +13,7 @@
instance_list_params,
instance_logs_params,
instance_stat_params,
+ instance_stop_params,
instance_wait_params,
instance_start_params,
instance_create_params,
@@ -200,16 +201,19 @@ def create(
network: Network configuration for the instance
- overlay_size: Writable overlay disk size (human-readable format like "10GB", "50G")
+ overlay_size: Writable overlay disk size (human-readable format like "10GB", "50G"). Omit this
+ field for macOS guests, which clone the image's complete boot disk instead.
- platform: Target platform as os/arch[/variant] (e.g. "linux/amd64"), matching Docker
- --platform. Omit for the host platform. Not a fixed enum: the os/arch[/variant]
- grammar is validated server-side and invalid values return 400 invalid_platform.
- Only os "linux" with arch amd64 or arm64 is accepted today.
+ platform: Target platform as os/arch[/variant]. Linux container guests support amd64 and
+ arm64. Experimental darwin/arm64 guests require an offline-imported macOS disk
+ image and vz on Apple silicon. Omit to use the cached native image or host
+ platform.
restart_policy: Whole-instance restart supervision policy.
- size: Base memory size (human-readable format like "1GB", "512MB", "2G")
+ size: Base memory size (human-readable format like "1GB", "512MB", "2G"). macOS guests
+ default to their image's memory; explicit sizes must be at least 4 GiB in whole
+ MiB and within VZ host limits.
skip_guest_agent: Skip guest-agent installation during boot. When true, the exec and stat APIs
will not work for this instance. The instance will still run, but remote command
@@ -230,7 +234,8 @@ def create(
omit both expiration fields to disable automatic expiration. Mutually exclusive
with expires_at.
- vcpus: Number of virtual CPUs
+ vcpus: Number of virtual CPUs. macOS guests default to their image's vCPUs; explicit
+ counts must be at least 2 and within VZ host limits.
volumes: Volumes to attach to the instance at creation time
@@ -536,7 +541,7 @@ def logs(
id: str,
*,
follow: bool | Omit = omit,
- source: Literal["app", "vmm", "hypeman"] | Omit = omit,
+ source: Literal["app", "vmm", "hypeman", "swtpm"] | Omit = omit,
tail: int | 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.
@@ -819,6 +824,7 @@ def stop(
self,
id: str,
*,
+ force: 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.
extra_headers: Headers | None = None,
@@ -827,9 +833,14 @@ def stop(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Instance:
"""
- Stop instance (graceful shutdown)
+ Stop instance (graceful shutdown, or forced power-off)
Args:
+ force: Power the VM off without asking the guest to shut down. Use when the guest state
+ will be discarded, for example before restoring a snapshot. A forced stop of a
+ macOS guest is never graceful, so it cannot be used for a stopped snapshot or
+ fork until the guest is booted and stopped gracefully again.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -842,6 +853,7 @@ def stop(
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return self._post(
path_template("/instances/{id}/stop", id=id),
+ body=maybe_transform({"force": force}, instance_stop_params.InstanceStopParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -1022,16 +1034,19 @@ async def create(
network: Network configuration for the instance
- overlay_size: Writable overlay disk size (human-readable format like "10GB", "50G")
+ overlay_size: Writable overlay disk size (human-readable format like "10GB", "50G"). Omit this
+ field for macOS guests, which clone the image's complete boot disk instead.
- platform: Target platform as os/arch[/variant] (e.g. "linux/amd64"), matching Docker
- --platform. Omit for the host platform. Not a fixed enum: the os/arch[/variant]
- grammar is validated server-side and invalid values return 400 invalid_platform.
- Only os "linux" with arch amd64 or arm64 is accepted today.
+ platform: Target platform as os/arch[/variant]. Linux container guests support amd64 and
+ arm64. Experimental darwin/arm64 guests require an offline-imported macOS disk
+ image and vz on Apple silicon. Omit to use the cached native image or host
+ platform.
restart_policy: Whole-instance restart supervision policy.
- size: Base memory size (human-readable format like "1GB", "512MB", "2G")
+ size: Base memory size (human-readable format like "1GB", "512MB", "2G"). macOS guests
+ default to their image's memory; explicit sizes must be at least 4 GiB in whole
+ MiB and within VZ host limits.
skip_guest_agent: Skip guest-agent installation during boot. When true, the exec and stat APIs
will not work for this instance. The instance will still run, but remote command
@@ -1052,7 +1067,8 @@ async def create(
omit both expiration fields to disable automatic expiration. Mutually exclusive
with expires_at.
- vcpus: Number of virtual CPUs
+ vcpus: Number of virtual CPUs. macOS guests default to their image's vCPUs; explicit
+ counts must be at least 2 and within VZ host limits.
volumes: Volumes to attach to the instance at creation time
@@ -1358,7 +1374,7 @@ async def logs(
id: str,
*,
follow: bool | Omit = omit,
- source: Literal["app", "vmm", "hypeman"] | Omit = omit,
+ source: Literal["app", "vmm", "hypeman", "swtpm"] | Omit = omit,
tail: int | 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.
@@ -1641,6 +1657,7 @@ async def stop(
self,
id: str,
*,
+ force: 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.
extra_headers: Headers | None = None,
@@ -1649,9 +1666,14 @@ async def stop(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Instance:
"""
- Stop instance (graceful shutdown)
+ Stop instance (graceful shutdown, or forced power-off)
Args:
+ force: Power the VM off without asking the guest to shut down. Use when the guest state
+ will be discarded, for example before restoring a snapshot. A forced stop of a
+ macOS guest is never graceful, so it cannot be used for a stopped snapshot or
+ fork until the guest is booted and stopped gracefully again.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1664,6 +1686,7 @@ async def stop(
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
return await self._post(
path_template("/instances/{id}/stop", id=id),
+ body=await async_maybe_transform({"force": force}, instance_stop_params.InstanceStopParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
diff --git a/src/hypeman/types/__init__.py b/src/hypeman/types/__init__.py
index e786532..f7bc4f5 100644
--- a/src/hypeman/types/__init__.py
+++ b/src/hypeman/types/__init__.py
@@ -75,6 +75,7 @@
from .instance_list_params import InstanceListParams as InstanceListParams
from .instance_logs_params import InstanceLogsParams as InstanceLogsParams
from .instance_stat_params import InstanceStatParams as InstanceStatParams
+from .instance_stop_params import InstanceStopParams as InstanceStopParams
from .instance_wait_params import InstanceWaitParams as InstanceWaitParams
from .restart_policy_param import RestartPolicyParam as RestartPolicyParam
from .snapshot_fork_params import SnapshotForkParams as SnapshotForkParams
diff --git a/src/hypeman/types/gpu_profile.py b/src/hypeman/types/gpu_profile.py
index 109beb3..d55a9d2 100644
--- a/src/hypeman/types/gpu_profile.py
+++ b/src/hypeman/types/gpu_profile.py
@@ -9,7 +9,11 @@ class GPUProfile(BaseModel):
"""Available vGPU profile"""
available: int
- """Number of instances that can be created with this profile"""
+ """
+ Number of additional instances of this profile the host can take if only this
+ profile is added. Counts for different profiles are not additive: an instance of
+ one profile can reduce availability of others on the same GPU.
+ """
framebuffer_mb: int
"""Frame buffer size in MB"""
diff --git a/src/hypeman/types/gpu_resource_status.py b/src/hypeman/types/gpu_resource_status.py
index e3e9b26..d39268e 100644
--- a/src/hypeman/types/gpu_resource_status.py
+++ b/src/hypeman/types/gpu_resource_status.py
@@ -13,17 +13,40 @@
class GPUResourceStatus(BaseModel):
"""GPU resource status. Null if no GPUs available."""
+ allocatable_slots: int
+ """
+ Free slots eligible for placement, matching admission control (excludes
+ quarantined VFs; 0 while VF health state is unavailable)
+ """
+
mode: Literal["vgpu", "passthrough"]
"""GPU mode (vgpu for SR-IOV/mdev, passthrough for whole GPU)"""
+ quarantined_slots: int
+ """VFs quarantined after guest driver init failures (vGPU mode only).
+
+ May overlap used_slots until the affected instance releases its VF.
+ """
+
total_slots: int
"""Total slots (VFs for vGPU, physical GPUs for passthrough)"""
used_slots: int
- """Slots currently in use"""
+ """Slots currently in use.
+
+ Includes quarantined VFs that are still assigned, so this can overlap
+ quarantined_slots.
+ """
devices: Optional[List[PassthroughDevice]] = None
"""Physical GPUs (only in passthrough mode)"""
+ placement_disabled_reason: Optional[str] = None
+ """
+ Present when allocatable_slots is 0 because the VF health state could not be
+ read or written rather than because the host is full. vGPU placement is refused
+ until the state file is repaired or the next write succeeds.
+ """
+
profiles: Optional[List[GPUProfile]] = None
"""Available vGPU profiles (only in vGPU mode)"""
diff --git a/src/hypeman/types/instance.py b/src/hypeman/types/instance.py
index 254db1b..fc5d857 100644
--- a/src/hypeman/types/instance.py
+++ b/src/hypeman/types/instance.py
@@ -19,8 +19,11 @@
class GPU(BaseModel):
"""GPU information attached to the instance"""
+ device_path: Optional[str] = None
+ """sysfs path of the assigned vGPU device"""
+
mdev_uuid: Optional[str] = None
- """mdev device UUID"""
+ """mdev device UUID (mdev hosts only)"""
profile: Optional[str] = None
"""vGPU profile name"""
diff --git a/src/hypeman/types/instance_create_params.py b/src/hypeman/types/instance_create_params.py
index 9938f15..f7f9215 100644
--- a/src/hypeman/types/instance_create_params.py
+++ b/src/hypeman/types/instance_create_params.py
@@ -108,22 +108,29 @@ class InstanceCreateParams(TypedDict, total=False):
"""Network configuration for the instance"""
overlay_size: str
- """Writable overlay disk size (human-readable format like "10GB", "50G")"""
+ """Writable overlay disk size (human-readable format like "10GB", "50G").
+
+ Omit this field for macOS guests, which clone the image's complete boot disk
+ instead.
+ """
platform: str
- """Target platform as os/arch[/variant] (e.g.
+ """Target platform as os/arch[/variant].
- "linux/amd64"), matching Docker --platform. Omit for the host platform. Not a
- fixed enum: the os/arch[/variant] grammar is validated server-side and invalid
- values return 400 invalid_platform. Only os "linux" with arch amd64 or arm64 is
- accepted today.
+ Linux container guests support amd64 and arm64. Experimental darwin/arm64 guests
+ require an offline-imported macOS disk image and vz on Apple silicon. Omit to
+ use the cached native image or host platform.
"""
restart_policy: RestartPolicyParam
"""Whole-instance restart supervision policy."""
size: str
- """Base memory size (human-readable format like "1GB", "512MB", "2G")"""
+ """Base memory size (human-readable format like "1GB", "512MB", "2G").
+
+ macOS guests default to their image's memory; explicit sizes must be at least 4
+ GiB in whole MiB and within VZ host limits.
+ """
skip_guest_agent: bool
"""
@@ -158,7 +165,11 @@ class InstanceCreateParams(TypedDict, total=False):
"""
vcpus: int
- """Number of virtual CPUs"""
+ """Number of virtual CPUs.
+
+ macOS guests default to their image's vCPUs; explicit counts must be at least 2
+ and within VZ host limits.
+ """
volumes: Iterable[VolumeMountParam]
"""Volumes to attach to the instance at creation time"""
diff --git a/src/hypeman/types/instance_logs_params.py b/src/hypeman/types/instance_logs_params.py
index a56923f..e016411 100644
--- a/src/hypeman/types/instance_logs_params.py
+++ b/src/hypeman/types/instance_logs_params.py
@@ -11,7 +11,7 @@ class InstanceLogsParams(TypedDict, total=False):
follow: bool
"""Continue streaming new lines after initial output"""
- source: Literal["app", "vmm", "hypeman"]
+ source: Literal["app", "vmm", "hypeman", "swtpm"]
"""Log source to stream:
- app: Guest application logs (serial console output)
diff --git a/src/hypeman/types/instance_stats.py b/src/hypeman/types/instance_stats.py
index 905e3fb..70b5560 100644
--- a/src/hypeman/types/instance_stats.py
+++ b/src/hypeman/types/instance_stats.py
@@ -32,7 +32,10 @@ class InstanceStats(BaseModel):
"""Virtual Memory Size - total virtual memory allocated in bytes"""
network_rx_bytes: int
- """Total network bytes received by the VM (from TAP interface)"""
+ """Total network bytes received by the VM (from TAP interface).
+
+ Always 0 for macOS guests, which use NAT with no per-instance interface.
+ """
network_tx_bytes: int
"""Total network bytes transmitted by the VM (from TAP interface)"""
diff --git a/src/hypeman/types/instance_stop_params.py b/src/hypeman/types/instance_stop_params.py
new file mode 100644
index 0000000..4138d4a
--- /dev/null
+++ b/src/hypeman/types/instance_stop_params.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["InstanceStopParams"]
+
+
+class InstanceStopParams(TypedDict, total=False):
+ force: bool
+ """Power the VM off without asking the guest to shut down.
+
+ Use when the guest state will be discarded, for example before restoring a
+ snapshot. A forced stop of a macOS guest is never graceful, so it cannot be used
+ for a stopped snapshot or fork until the guest is booted and stopped gracefully
+ again.
+ """
diff --git a/tests/api_resources/test_instances.py b/tests/api_resources/test_instances.py
index 8f8a731..dbbff7b 100644
--- a/tests/api_resources/test_instances.py
+++ b/tests/api_resources/test_instances.py
@@ -742,7 +742,16 @@ def test_path_params_stats(self, client: Hypeman) -> None:
@parametrize
def test_method_stop(self, client: Hypeman) -> None:
instance = client.instances.stop(
- "id",
+ id="id",
+ )
+ assert_matches_type(Instance, instance, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_stop_with_all_params(self, client: Hypeman) -> None:
+ instance = client.instances.stop(
+ id="id",
+ force=True,
)
assert_matches_type(Instance, instance, path=["response"])
@@ -750,7 +759,7 @@ def test_method_stop(self, client: Hypeman) -> None:
@parametrize
def test_raw_response_stop(self, client: Hypeman) -> None:
response = client.instances.with_raw_response.stop(
- "id",
+ id="id",
)
assert response.is_closed is True
@@ -762,7 +771,7 @@ def test_raw_response_stop(self, client: Hypeman) -> None:
@parametrize
def test_streaming_response_stop(self, client: Hypeman) -> None:
with client.instances.with_streaming_response.stop(
- "id",
+ id="id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -777,7 +786,7 @@ def test_streaming_response_stop(self, client: Hypeman) -> None:
def test_path_params_stop(self, client: Hypeman) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
client.instances.with_raw_response.stop(
- "",
+ id="",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@@ -1560,7 +1569,16 @@ async def test_path_params_stats(self, async_client: AsyncHypeman) -> None:
@parametrize
async def test_method_stop(self, async_client: AsyncHypeman) -> None:
instance = await async_client.instances.stop(
- "id",
+ id="id",
+ )
+ assert_matches_type(Instance, instance, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_stop_with_all_params(self, async_client: AsyncHypeman) -> None:
+ instance = await async_client.instances.stop(
+ id="id",
+ force=True,
)
assert_matches_type(Instance, instance, path=["response"])
@@ -1568,7 +1586,7 @@ async def test_method_stop(self, async_client: AsyncHypeman) -> None:
@parametrize
async def test_raw_response_stop(self, async_client: AsyncHypeman) -> None:
response = await async_client.instances.with_raw_response.stop(
- "id",
+ id="id",
)
assert response.is_closed is True
@@ -1580,7 +1598,7 @@ async def test_raw_response_stop(self, async_client: AsyncHypeman) -> None:
@parametrize
async def test_streaming_response_stop(self, async_client: AsyncHypeman) -> None:
async with async_client.instances.with_streaming_response.stop(
- "id",
+ id="id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1595,7 +1613,7 @@ async def test_streaming_response_stop(self, async_client: AsyncHypeman) -> None
async def test_path_params_stop(self, async_client: AsyncHypeman) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
await async_client.instances.with_raw_response.stop(
- "",
+ id="",
)
@pytest.mark.skip(reason="Mock server tests are disabled")