diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6538ca9..6d78745 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.8.0" + ".": "0.9.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 377ee95..4838a30 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-28e78b73c796f9ee866671ed946402b5d569e683c3207d57c9143eb7d6f83fb6.yml -openapi_spec_hash: fce0ac8713369a5f048bac684ed34fc8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-cfdd18a303e2e6c87d671e6ae3ecdcd1d9642b053c2ef6bc507eee3f55cc6aa8.yml +openapi_spec_hash: 0b038c955d95740ace74103a9c18d5a3 config_hash: f65a6a2bcef49a9f623212f9de6d6f6f diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b777d4..f290c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.9.0 (2025-12-23) + +Full Changelog: [v0.8.0...v0.9.0](https://github.com/onkernel/hypeman-go/compare/v0.8.0...v0.9.0) + +### Features + +* QEMU support ([d708091](https://github.com/onkernel/hypeman-go/commit/d70809169d136df3f1efbf961f2a90084e1f9fa5)) + ## 0.8.0 (2025-12-23) Full Changelog: [v0.7.0...v0.8.0](https://github.com/onkernel/hypeman-go/compare/v0.7.0...v0.8.0) diff --git a/README.md b/README.md index 7f8b79a..98ae5ac 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Or to pin the version: ```sh -go get -u 'github.com/onkernel/hypeman-go@v0.8.0' +go get -u 'github.com/onkernel/hypeman-go@v0.9.0' ``` diff --git a/instance.go b/instance.go index d393460..e9e743f 100644 --- a/instance.go +++ b/instance.go @@ -197,6 +197,10 @@ type Instance struct { HasSnapshot bool `json:"has_snapshot"` // Hotplug memory size (human-readable) HotplugSize string `json:"hotplug_size"` + // Hypervisor running this instance + // + // Any of "cloud-hypervisor", "qemu". + Hypervisor InstanceHypervisor `json:"hypervisor"` // Network configuration of the instance Network InstanceNetwork `json:"network"` // Writable overlay disk size (human-readable) @@ -223,6 +227,7 @@ type Instance struct { Env respjson.Field HasSnapshot respjson.Field HotplugSize respjson.Field + Hypervisor respjson.Field Network respjson.Field OverlaySize respjson.Field Size respjson.Field @@ -263,6 +268,14 @@ const ( InstanceStateUnknown InstanceState = "Unknown" ) +// Hypervisor running this instance +type InstanceHypervisor string + +const ( + InstanceHypervisorCloudHypervisor InstanceHypervisor = "cloud-hypervisor" + InstanceHypervisorQemu InstanceHypervisor = "qemu" +) + // Network configuration of the instance type InstanceNetwork struct { // Whether instance is attached to the default network @@ -410,6 +423,10 @@ type InstanceNewParams struct { Devices []string `json:"devices,omitzero"` // Environment variables Env map[string]string `json:"env,omitzero"` + // Hypervisor to use for this instance. Defaults to server configuration. + // + // Any of "cloud-hypervisor", "qemu". + Hypervisor InstanceNewParamsHypervisor `json:"hypervisor,omitzero"` // Network configuration for the instance Network InstanceNewParamsNetwork `json:"network,omitzero"` // Volumes to attach to the instance at creation time @@ -425,6 +442,14 @@ func (r *InstanceNewParams) UnmarshalJSON(data []byte) error { return apijson.UnmarshalRoot(data, r) } +// Hypervisor to use for this instance. Defaults to server configuration. +type InstanceNewParamsHypervisor string + +const ( + InstanceNewParamsHypervisorCloudHypervisor InstanceNewParamsHypervisor = "cloud-hypervisor" + InstanceNewParamsHypervisorQemu InstanceNewParamsHypervisor = "qemu" +) + // Network configuration for the instance type InstanceNewParamsNetwork struct { // Whether to attach instance to the default network diff --git a/instance_test.go b/instance_test.go index 8b83e37..5a4840c 100644 --- a/instance_test.go +++ b/instance_test.go @@ -35,6 +35,7 @@ func TestInstanceNewWithOptionalParams(t *testing.T) { "NODE_ENV": "production", }, HotplugSize: hypeman.String("2GB"), + Hypervisor: hypeman.InstanceNewParamsHypervisorCloudHypervisor, Network: hypeman.InstanceNewParamsNetwork{ Enabled: hypeman.Bool(true), }, diff --git a/internal/version.go b/internal/version.go index 3c8392e..0e818c5 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.8.0" // x-release-please-version +const PackageVersion = "0.9.0" // x-release-please-version