cloudhypervisor

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package cloudhypervisor provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Package cloudhypervisor implements the hypervisor interfaces with Cloud Hypervisor. It embeds the supported VMM binaries and drives them over their API socket using the generated client in client_gen.go.

Index

Constants

View Source
const DefaultVersion = V53

DefaultVersion is the version used when no explicit version is requested.

Variables

This section is empty.

Functions

func Extract

func Extract(dstPath string, version Version) (string, error)

Extract atomically writes the embedded binary for version to dstPath, unless a file is already there, and returns dstPath.

func NewBootVMRequest

func NewBootVMRequest(server string) (*http.Request, error)

NewBootVMRequest generates requests for BootVM

func NewCreateVMRequest

func NewCreateVMRequest(server string, body CreateVMJSONRequestBody) (*http.Request, error)

NewCreateVMRequest calls the generic CreateVM builder with application/json body

func NewCreateVMRequestWithBody

func NewCreateVMRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateVMRequestWithBody generates requests for CreateVM with any type of body

func NewDeleteVMRequest

func NewDeleteVMRequest(server string) (*http.Request, error)

NewDeleteVMRequest generates requests for DeleteVM

func NewGetVmCountersRequest

func NewGetVmCountersRequest(server string) (*http.Request, error)

NewGetVmCountersRequest generates requests for GetVmCounters

func NewGetVmInfoRequest

func NewGetVmInfoRequest(server string) (*http.Request, error)

NewGetVmInfoRequest generates requests for GetVmInfo

func NewGetVmmPingRequest

func NewGetVmmPingRequest(server string) (*http.Request, error)

NewGetVmmPingRequest generates requests for GetVmmPing

func NewPauseVMRequest

func NewPauseVMRequest(server string) (*http.Request, error)

NewPauseVMRequest generates requests for PauseVM

func NewPowerButtonVMRequest

func NewPowerButtonVMRequest(server string) (*http.Request, error)

NewPowerButtonVMRequest generates requests for PowerButtonVM

func NewPutVmAddDeviceRequest

func NewPutVmAddDeviceRequest(server string, body PutVmAddDeviceJSONRequestBody) (*http.Request, error)

NewPutVmAddDeviceRequest calls the generic PutVmAddDevice builder with application/json body

func NewPutVmAddDeviceRequestWithBody

func NewPutVmAddDeviceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddDeviceRequestWithBody generates requests for PutVmAddDevice with any type of body

func NewPutVmAddDiskRequest

func NewPutVmAddDiskRequest(server string, body PutVmAddDiskJSONRequestBody) (*http.Request, error)

NewPutVmAddDiskRequest calls the generic PutVmAddDisk builder with application/json body

func NewPutVmAddDiskRequestWithBody

func NewPutVmAddDiskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddDiskRequestWithBody generates requests for PutVmAddDisk with any type of body

func NewPutVmAddFsRequest

func NewPutVmAddFsRequest(server string, body PutVmAddFsJSONRequestBody) (*http.Request, error)

NewPutVmAddFsRequest calls the generic PutVmAddFs builder with application/json body

func NewPutVmAddFsRequestWithBody

func NewPutVmAddFsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddFsRequestWithBody generates requests for PutVmAddFs with any type of body

func NewPutVmAddGenericVhostUserRequest added in v0.4.0

func NewPutVmAddGenericVhostUserRequest(server string, body PutVmAddGenericVhostUserJSONRequestBody) (*http.Request, error)

NewPutVmAddGenericVhostUserRequest calls the generic PutVmAddGenericVhostUser builder with application/json body

func NewPutVmAddGenericVhostUserRequestWithBody added in v0.4.0

func NewPutVmAddGenericVhostUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddGenericVhostUserRequestWithBody generates requests for PutVmAddGenericVhostUser with any type of body

func NewPutVmAddNetRequest

func NewPutVmAddNetRequest(server string, body PutVmAddNetJSONRequestBody) (*http.Request, error)

NewPutVmAddNetRequest calls the generic PutVmAddNet builder with application/json body

func NewPutVmAddNetRequestWithBody

func NewPutVmAddNetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddNetRequestWithBody generates requests for PutVmAddNet with any type of body

func NewPutVmAddPmemRequest

func NewPutVmAddPmemRequest(server string, body PutVmAddPmemJSONRequestBody) (*http.Request, error)

NewPutVmAddPmemRequest calls the generic PutVmAddPmem builder with application/json body

func NewPutVmAddPmemRequestWithBody

func NewPutVmAddPmemRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddPmemRequestWithBody generates requests for PutVmAddPmem with any type of body

func NewPutVmAddUserDeviceRequest

func NewPutVmAddUserDeviceRequest(server string, body PutVmAddUserDeviceJSONRequestBody) (*http.Request, error)

NewPutVmAddUserDeviceRequest calls the generic PutVmAddUserDevice builder with application/json body

func NewPutVmAddUserDeviceRequestWithBody

func NewPutVmAddUserDeviceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddUserDeviceRequestWithBody generates requests for PutVmAddUserDevice with any type of body

func NewPutVmAddVdpaRequest

func NewPutVmAddVdpaRequest(server string, body PutVmAddVdpaJSONRequestBody) (*http.Request, error)

NewPutVmAddVdpaRequest calls the generic PutVmAddVdpa builder with application/json body

func NewPutVmAddVdpaRequestWithBody

func NewPutVmAddVdpaRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddVdpaRequestWithBody generates requests for PutVmAddVdpa with any type of body

func NewPutVmAddVsockRequest

func NewPutVmAddVsockRequest(server string, body PutVmAddVsockJSONRequestBody) (*http.Request, error)

NewPutVmAddVsockRequest calls the generic PutVmAddVsock builder with application/json body

func NewPutVmAddVsockRequestWithBody

func NewPutVmAddVsockRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmAddVsockRequestWithBody generates requests for PutVmAddVsock with any type of body

func NewPutVmCoredumpRequest

func NewPutVmCoredumpRequest(server string, body PutVmCoredumpJSONRequestBody) (*http.Request, error)

NewPutVmCoredumpRequest calls the generic PutVmCoredump builder with application/json body

func NewPutVmCoredumpRequestWithBody

func NewPutVmCoredumpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmCoredumpRequestWithBody generates requests for PutVmCoredump with any type of body

func NewPutVmNmiRequest added in v0.4.0

func NewPutVmNmiRequest(server string) (*http.Request, error)

NewPutVmNmiRequest generates requests for PutVmNmi

func NewPutVmReceiveMigrationRequest

func NewPutVmReceiveMigrationRequest(server string, body PutVmReceiveMigrationJSONRequestBody) (*http.Request, error)

NewPutVmReceiveMigrationRequest calls the generic PutVmReceiveMigration builder with application/json body

func NewPutVmReceiveMigrationRequestWithBody

func NewPutVmReceiveMigrationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmReceiveMigrationRequestWithBody generates requests for PutVmReceiveMigration with any type of body

func NewPutVmRemoveDeviceRequest

func NewPutVmRemoveDeviceRequest(server string, body PutVmRemoveDeviceJSONRequestBody) (*http.Request, error)

NewPutVmRemoveDeviceRequest calls the generic PutVmRemoveDevice builder with application/json body

func NewPutVmRemoveDeviceRequestWithBody

func NewPutVmRemoveDeviceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmRemoveDeviceRequestWithBody generates requests for PutVmRemoveDevice with any type of body

func NewPutVmResizeDiskRequest added in v0.4.0

func NewPutVmResizeDiskRequest(server string, body PutVmResizeDiskJSONRequestBody) (*http.Request, error)

NewPutVmResizeDiskRequest calls the generic PutVmResizeDisk builder with application/json body

func NewPutVmResizeDiskRequestWithBody added in v0.4.0

func NewPutVmResizeDiskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmResizeDiskRequestWithBody generates requests for PutVmResizeDisk with any type of body

func NewPutVmResizeRequest

func NewPutVmResizeRequest(server string, body PutVmResizeJSONRequestBody) (*http.Request, error)

NewPutVmResizeRequest calls the generic PutVmResize builder with application/json body

func NewPutVmResizeRequestWithBody

func NewPutVmResizeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmResizeRequestWithBody generates requests for PutVmResize with any type of body

func NewPutVmResizeZoneRequest

func NewPutVmResizeZoneRequest(server string, body PutVmResizeZoneJSONRequestBody) (*http.Request, error)

NewPutVmResizeZoneRequest calls the generic PutVmResizeZone builder with application/json body

func NewPutVmResizeZoneRequestWithBody

func NewPutVmResizeZoneRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmResizeZoneRequestWithBody generates requests for PutVmResizeZone with any type of body

func NewPutVmRestoreRequest

func NewPutVmRestoreRequest(server string, body PutVmRestoreJSONRequestBody) (*http.Request, error)

NewPutVmRestoreRequest calls the generic PutVmRestore builder with application/json body

func NewPutVmRestoreRequestWithBody

func NewPutVmRestoreRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmRestoreRequestWithBody generates requests for PutVmRestore with any type of body

func NewPutVmSendMigrationRequest

func NewPutVmSendMigrationRequest(server string, body PutVmSendMigrationJSONRequestBody) (*http.Request, error)

NewPutVmSendMigrationRequest calls the generic PutVmSendMigration builder with application/json body

func NewPutVmSendMigrationRequestWithBody

func NewPutVmSendMigrationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmSendMigrationRequestWithBody generates requests for PutVmSendMigration with any type of body

func NewPutVmSnapshotRequest

func NewPutVmSnapshotRequest(server string, body PutVmSnapshotJSONRequestBody) (*http.Request, error)

NewPutVmSnapshotRequest calls the generic PutVmSnapshot builder with application/json body

func NewPutVmSnapshotRequestWithBody

func NewPutVmSnapshotRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPutVmSnapshotRequestWithBody generates requests for PutVmSnapshot with any type of body

func NewRebootVMRequest

func NewRebootVMRequest(server string) (*http.Request, error)

NewRebootVMRequest generates requests for RebootVM

func NewResumeVMRequest

func NewResumeVMRequest(server string) (*http.Request, error)

NewResumeVMRequest generates requests for ResumeVM

func NewShutdownVMMRequest

func NewShutdownVMMRequest(server string) (*http.Request, error)

NewShutdownVMMRequest generates requests for ShutdownVMM

func NewShutdownVMRequest

func NewShutdownVMRequest(server string) (*http.Request, error)

NewShutdownVMRequest generates requests for ShutdownVM

Types

type BalloonConfig

type BalloonConfig struct {
	// DeflateOnOom Deflate balloon when the guest is under memory pressure.
	DeflateOnOom *bool `json:"deflate_on_oom,omitempty"`

	// FreePageReporting Enable guest to report free pages.
	FreePageReporting *bool   `json:"free_page_reporting,omitempty"`
	Id                *string `json:"id,omitempty"`
	Iommu             *bool   `json:"iommu,omitempty"`
	PciDeviceId       *uint8  `json:"pci_device_id,omitempty"`
	PciSegment        *int16  `json:"pci_segment,omitempty"`
	Size              int64   `json:"size"`
}

BalloonConfig defines model for BalloonConfig.

type BootVMResponse

type BootVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseBootVMResponse

func ParseBootVMResponse(rsp *http.Response) (*BootVMResponse, error)

ParseBootVMResponse parses an HTTP response from a BootVMWithResponse call

func (BootVMResponse) Status

func (r BootVMResponse) Status() string

Status returns HTTPResponse.Status

func (BootVMResponse) StatusCode

func (r BootVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) BootVM

func (c *Client) BootVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateVM

func (c *Client) CreateVM(ctx context.Context, body CreateVMJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateVMWithBody

func (c *Client) CreateVMWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteVM

func (c *Client) DeleteVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetVmCounters

func (c *Client) GetVmCounters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetVmInfo

func (c *Client) GetVmInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetVmmPing

func (c *Client) GetVmmPing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PauseVM

func (c *Client) PauseVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PowerButtonVM

func (c *Client) PowerButtonVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddDevice

func (c *Client) PutVmAddDevice(ctx context.Context, body PutVmAddDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddDeviceWithBody

func (c *Client) PutVmAddDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddDisk

func (c *Client) PutVmAddDisk(ctx context.Context, body PutVmAddDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddDiskWithBody

func (c *Client) PutVmAddDiskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddFs

func (c *Client) PutVmAddFs(ctx context.Context, body PutVmAddFsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddFsWithBody

func (c *Client) PutVmAddFsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddGenericVhostUser added in v0.4.0

func (c *Client) PutVmAddGenericVhostUser(ctx context.Context, body PutVmAddGenericVhostUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddGenericVhostUserWithBody added in v0.4.0

func (c *Client) PutVmAddGenericVhostUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddNet

func (c *Client) PutVmAddNet(ctx context.Context, body PutVmAddNetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddNetWithBody

func (c *Client) PutVmAddNetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddPmem

func (c *Client) PutVmAddPmem(ctx context.Context, body PutVmAddPmemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddPmemWithBody

func (c *Client) PutVmAddPmemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddUserDevice

func (c *Client) PutVmAddUserDevice(ctx context.Context, body PutVmAddUserDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddUserDeviceWithBody

func (c *Client) PutVmAddUserDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddVdpa

func (c *Client) PutVmAddVdpa(ctx context.Context, body PutVmAddVdpaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddVdpaWithBody

func (c *Client) PutVmAddVdpaWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddVsock

func (c *Client) PutVmAddVsock(ctx context.Context, body PutVmAddVsockJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmAddVsockWithBody

func (c *Client) PutVmAddVsockWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmCoredump

func (c *Client) PutVmCoredump(ctx context.Context, body PutVmCoredumpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmCoredumpWithBody

func (c *Client) PutVmCoredumpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmNmi added in v0.4.0

func (c *Client) PutVmNmi(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmReceiveMigration

func (c *Client) PutVmReceiveMigration(ctx context.Context, body PutVmReceiveMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmReceiveMigrationWithBody

func (c *Client) PutVmReceiveMigrationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmRemoveDevice

func (c *Client) PutVmRemoveDevice(ctx context.Context, body PutVmRemoveDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmRemoveDeviceWithBody

func (c *Client) PutVmRemoveDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmResize

func (c *Client) PutVmResize(ctx context.Context, body PutVmResizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmResizeDisk added in v0.4.0

func (c *Client) PutVmResizeDisk(ctx context.Context, body PutVmResizeDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmResizeDiskWithBody added in v0.4.0

func (c *Client) PutVmResizeDiskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmResizeWithBody

func (c *Client) PutVmResizeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmResizeZone

func (c *Client) PutVmResizeZone(ctx context.Context, body PutVmResizeZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmResizeZoneWithBody

func (c *Client) PutVmResizeZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmRestore

func (c *Client) PutVmRestore(ctx context.Context, body PutVmRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmRestoreWithBody

func (c *Client) PutVmRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmSendMigration

func (c *Client) PutVmSendMigration(ctx context.Context, body PutVmSendMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmSendMigrationWithBody

func (c *Client) PutVmSendMigrationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmSnapshot

func (c *Client) PutVmSnapshot(ctx context.Context, body PutVmSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PutVmSnapshotWithBody

func (c *Client) PutVmSnapshotWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RebootVM

func (c *Client) RebootVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ResumeVM

func (c *Client) ResumeVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ShutdownVM

func (c *Client) ShutdownVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ShutdownVMM

func (c *Client) ShutdownVMM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// PutVmAddDeviceWithBody request with any body
	PutVmAddDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddDevice(ctx context.Context, body PutVmAddDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddDiskWithBody request with any body
	PutVmAddDiskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddDisk(ctx context.Context, body PutVmAddDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddFsWithBody request with any body
	PutVmAddFsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddFs(ctx context.Context, body PutVmAddFsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddGenericVhostUserWithBody request with any body
	PutVmAddGenericVhostUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddGenericVhostUser(ctx context.Context, body PutVmAddGenericVhostUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddNetWithBody request with any body
	PutVmAddNetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddNet(ctx context.Context, body PutVmAddNetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddPmemWithBody request with any body
	PutVmAddPmemWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddPmem(ctx context.Context, body PutVmAddPmemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddUserDeviceWithBody request with any body
	PutVmAddUserDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddUserDevice(ctx context.Context, body PutVmAddUserDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddVdpaWithBody request with any body
	PutVmAddVdpaWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddVdpa(ctx context.Context, body PutVmAddVdpaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmAddVsockWithBody request with any body
	PutVmAddVsockWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmAddVsock(ctx context.Context, body PutVmAddVsockJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// BootVM request
	BootVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmCoredumpWithBody request with any body
	PutVmCoredumpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmCoredump(ctx context.Context, body PutVmCoredumpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVmCounters request
	GetVmCounters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateVMWithBody request with any body
	CreateVMWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateVM(ctx context.Context, body CreateVMJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteVM request
	DeleteVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVmInfo request
	GetVmInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmNmi request
	PutVmNmi(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PauseVM request
	PauseVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PowerButtonVM request
	PowerButtonVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RebootVM request
	RebootVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmReceiveMigrationWithBody request with any body
	PutVmReceiveMigrationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmReceiveMigration(ctx context.Context, body PutVmReceiveMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmRemoveDeviceWithBody request with any body
	PutVmRemoveDeviceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmRemoveDevice(ctx context.Context, body PutVmRemoveDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmResizeWithBody request with any body
	PutVmResizeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmResize(ctx context.Context, body PutVmResizeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmResizeDiskWithBody request with any body
	PutVmResizeDiskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmResizeDisk(ctx context.Context, body PutVmResizeDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmResizeZoneWithBody request with any body
	PutVmResizeZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmResizeZone(ctx context.Context, body PutVmResizeZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmRestoreWithBody request with any body
	PutVmRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmRestore(ctx context.Context, body PutVmRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ResumeVM request
	ResumeVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmSendMigrationWithBody request with any body
	PutVmSendMigrationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmSendMigration(ctx context.Context, body PutVmSendMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ShutdownVM request
	ShutdownVM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PutVmSnapshotWithBody request with any body
	PutVmSnapshotWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PutVmSnapshot(ctx context.Context, body PutVmSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVmmPing request
	GetVmmPing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ShutdownVMM request
	ShutdownVMM(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) BootVMWithResponse

func (c *ClientWithResponses) BootVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BootVMResponse, error)

BootVMWithResponse request returning *BootVMResponse

func (*ClientWithResponses) CreateVMWithBodyWithResponse

func (c *ClientWithResponses) CreateVMWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVMResponse, error)

CreateVMWithBodyWithResponse request with arbitrary body returning *CreateVMResponse

func (*ClientWithResponses) CreateVMWithResponse

func (c *ClientWithResponses) CreateVMWithResponse(ctx context.Context, body CreateVMJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVMResponse, error)

func (*ClientWithResponses) DeleteVMWithResponse

func (c *ClientWithResponses) DeleteVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteVMResponse, error)

DeleteVMWithResponse request returning *DeleteVMResponse

func (*ClientWithResponses) GetVmCountersWithResponse

func (c *ClientWithResponses) GetVmCountersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVmCountersResponse, error)

GetVmCountersWithResponse request returning *GetVmCountersResponse

func (*ClientWithResponses) GetVmInfoWithResponse

func (c *ClientWithResponses) GetVmInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVmInfoResponse, error)

GetVmInfoWithResponse request returning *GetVmInfoResponse

func (*ClientWithResponses) GetVmmPingWithResponse

func (c *ClientWithResponses) GetVmmPingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVmmPingResponse, error)

GetVmmPingWithResponse request returning *GetVmmPingResponse

func (*ClientWithResponses) PauseVMWithResponse

func (c *ClientWithResponses) PauseVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PauseVMResponse, error)

PauseVMWithResponse request returning *PauseVMResponse

func (*ClientWithResponses) PowerButtonVMWithResponse

func (c *ClientWithResponses) PowerButtonVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PowerButtonVMResponse, error)

PowerButtonVMWithResponse request returning *PowerButtonVMResponse

func (*ClientWithResponses) PutVmAddDeviceWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddDeviceResponse, error)

PutVmAddDeviceWithBodyWithResponse request with arbitrary body returning *PutVmAddDeviceResponse

func (*ClientWithResponses) PutVmAddDeviceWithResponse

func (c *ClientWithResponses) PutVmAddDeviceWithResponse(ctx context.Context, body PutVmAddDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddDeviceResponse, error)

func (*ClientWithResponses) PutVmAddDiskWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddDiskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddDiskResponse, error)

PutVmAddDiskWithBodyWithResponse request with arbitrary body returning *PutVmAddDiskResponse

func (*ClientWithResponses) PutVmAddDiskWithResponse

func (c *ClientWithResponses) PutVmAddDiskWithResponse(ctx context.Context, body PutVmAddDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddDiskResponse, error)

func (*ClientWithResponses) PutVmAddFsWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddFsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddFsResponse, error)

PutVmAddFsWithBodyWithResponse request with arbitrary body returning *PutVmAddFsResponse

func (*ClientWithResponses) PutVmAddFsWithResponse

func (c *ClientWithResponses) PutVmAddFsWithResponse(ctx context.Context, body PutVmAddFsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddFsResponse, error)

func (*ClientWithResponses) PutVmAddGenericVhostUserWithBodyWithResponse added in v0.4.0

func (c *ClientWithResponses) PutVmAddGenericVhostUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddGenericVhostUserResponse, error)

PutVmAddGenericVhostUserWithBodyWithResponse request with arbitrary body returning *PutVmAddGenericVhostUserResponse

func (*ClientWithResponses) PutVmAddGenericVhostUserWithResponse added in v0.4.0

func (c *ClientWithResponses) PutVmAddGenericVhostUserWithResponse(ctx context.Context, body PutVmAddGenericVhostUserJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddGenericVhostUserResponse, error)

func (*ClientWithResponses) PutVmAddNetWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddNetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddNetResponse, error)

PutVmAddNetWithBodyWithResponse request with arbitrary body returning *PutVmAddNetResponse

func (*ClientWithResponses) PutVmAddNetWithResponse

func (c *ClientWithResponses) PutVmAddNetWithResponse(ctx context.Context, body PutVmAddNetJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddNetResponse, error)

func (*ClientWithResponses) PutVmAddPmemWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddPmemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddPmemResponse, error)

PutVmAddPmemWithBodyWithResponse request with arbitrary body returning *PutVmAddPmemResponse

func (*ClientWithResponses) PutVmAddPmemWithResponse

func (c *ClientWithResponses) PutVmAddPmemWithResponse(ctx context.Context, body PutVmAddPmemJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddPmemResponse, error)

func (*ClientWithResponses) PutVmAddUserDeviceWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddUserDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddUserDeviceResponse, error)

PutVmAddUserDeviceWithBodyWithResponse request with arbitrary body returning *PutVmAddUserDeviceResponse

func (*ClientWithResponses) PutVmAddUserDeviceWithResponse

func (c *ClientWithResponses) PutVmAddUserDeviceWithResponse(ctx context.Context, body PutVmAddUserDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddUserDeviceResponse, error)

func (*ClientWithResponses) PutVmAddVdpaWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddVdpaWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddVdpaResponse, error)

PutVmAddVdpaWithBodyWithResponse request with arbitrary body returning *PutVmAddVdpaResponse

func (*ClientWithResponses) PutVmAddVdpaWithResponse

func (c *ClientWithResponses) PutVmAddVdpaWithResponse(ctx context.Context, body PutVmAddVdpaJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddVdpaResponse, error)

func (*ClientWithResponses) PutVmAddVsockWithBodyWithResponse

func (c *ClientWithResponses) PutVmAddVsockWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddVsockResponse, error)

PutVmAddVsockWithBodyWithResponse request with arbitrary body returning *PutVmAddVsockResponse

func (*ClientWithResponses) PutVmAddVsockWithResponse

func (c *ClientWithResponses) PutVmAddVsockWithResponse(ctx context.Context, body PutVmAddVsockJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddVsockResponse, error)

func (*ClientWithResponses) PutVmCoredumpWithBodyWithResponse

func (c *ClientWithResponses) PutVmCoredumpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmCoredumpResponse, error)

PutVmCoredumpWithBodyWithResponse request with arbitrary body returning *PutVmCoredumpResponse

func (*ClientWithResponses) PutVmCoredumpWithResponse

func (c *ClientWithResponses) PutVmCoredumpWithResponse(ctx context.Context, body PutVmCoredumpJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmCoredumpResponse, error)

func (*ClientWithResponses) PutVmNmiWithResponse added in v0.4.0

func (c *ClientWithResponses) PutVmNmiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PutVmNmiResponse, error)

PutVmNmiWithResponse request returning *PutVmNmiResponse

func (*ClientWithResponses) PutVmReceiveMigrationWithBodyWithResponse

func (c *ClientWithResponses) PutVmReceiveMigrationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmReceiveMigrationResponse, error)

PutVmReceiveMigrationWithBodyWithResponse request with arbitrary body returning *PutVmReceiveMigrationResponse

func (*ClientWithResponses) PutVmReceiveMigrationWithResponse

func (c *ClientWithResponses) PutVmReceiveMigrationWithResponse(ctx context.Context, body PutVmReceiveMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmReceiveMigrationResponse, error)

func (*ClientWithResponses) PutVmRemoveDeviceWithBodyWithResponse

func (c *ClientWithResponses) PutVmRemoveDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmRemoveDeviceResponse, error)

PutVmRemoveDeviceWithBodyWithResponse request with arbitrary body returning *PutVmRemoveDeviceResponse

func (*ClientWithResponses) PutVmRemoveDeviceWithResponse

func (c *ClientWithResponses) PutVmRemoveDeviceWithResponse(ctx context.Context, body PutVmRemoveDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmRemoveDeviceResponse, error)

func (*ClientWithResponses) PutVmResizeDiskWithBodyWithResponse added in v0.4.0

func (c *ClientWithResponses) PutVmResizeDiskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmResizeDiskResponse, error)

PutVmResizeDiskWithBodyWithResponse request with arbitrary body returning *PutVmResizeDiskResponse

func (*ClientWithResponses) PutVmResizeDiskWithResponse added in v0.4.0

func (c *ClientWithResponses) PutVmResizeDiskWithResponse(ctx context.Context, body PutVmResizeDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmResizeDiskResponse, error)

func (*ClientWithResponses) PutVmResizeWithBodyWithResponse

func (c *ClientWithResponses) PutVmResizeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmResizeResponse, error)

PutVmResizeWithBodyWithResponse request with arbitrary body returning *PutVmResizeResponse

func (*ClientWithResponses) PutVmResizeWithResponse

func (c *ClientWithResponses) PutVmResizeWithResponse(ctx context.Context, body PutVmResizeJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmResizeResponse, error)

func (*ClientWithResponses) PutVmResizeZoneWithBodyWithResponse

func (c *ClientWithResponses) PutVmResizeZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmResizeZoneResponse, error)

PutVmResizeZoneWithBodyWithResponse request with arbitrary body returning *PutVmResizeZoneResponse

func (*ClientWithResponses) PutVmResizeZoneWithResponse

func (c *ClientWithResponses) PutVmResizeZoneWithResponse(ctx context.Context, body PutVmResizeZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmResizeZoneResponse, error)

func (*ClientWithResponses) PutVmRestoreWithBodyWithResponse

func (c *ClientWithResponses) PutVmRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmRestoreResponse, error)

PutVmRestoreWithBodyWithResponse request with arbitrary body returning *PutVmRestoreResponse

func (*ClientWithResponses) PutVmRestoreWithResponse

func (c *ClientWithResponses) PutVmRestoreWithResponse(ctx context.Context, body PutVmRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmRestoreResponse, error)

func (*ClientWithResponses) PutVmSendMigrationWithBodyWithResponse

func (c *ClientWithResponses) PutVmSendMigrationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmSendMigrationResponse, error)

PutVmSendMigrationWithBodyWithResponse request with arbitrary body returning *PutVmSendMigrationResponse

func (*ClientWithResponses) PutVmSendMigrationWithResponse

func (c *ClientWithResponses) PutVmSendMigrationWithResponse(ctx context.Context, body PutVmSendMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmSendMigrationResponse, error)

func (*ClientWithResponses) PutVmSnapshotWithBodyWithResponse

func (c *ClientWithResponses) PutVmSnapshotWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmSnapshotResponse, error)

PutVmSnapshotWithBodyWithResponse request with arbitrary body returning *PutVmSnapshotResponse

func (*ClientWithResponses) PutVmSnapshotWithResponse

func (c *ClientWithResponses) PutVmSnapshotWithResponse(ctx context.Context, body PutVmSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmSnapshotResponse, error)

func (*ClientWithResponses) RebootVMWithResponse

func (c *ClientWithResponses) RebootVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RebootVMResponse, error)

RebootVMWithResponse request returning *RebootVMResponse

func (*ClientWithResponses) ResumeVMWithResponse

func (c *ClientWithResponses) ResumeVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ResumeVMResponse, error)

ResumeVMWithResponse request returning *ResumeVMResponse

func (*ClientWithResponses) ShutdownVMMWithResponse

func (c *ClientWithResponses) ShutdownVMMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ShutdownVMMResponse, error)

ShutdownVMMWithResponse request returning *ShutdownVMMResponse

func (*ClientWithResponses) ShutdownVMWithResponse

func (c *ClientWithResponses) ShutdownVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ShutdownVMResponse, error)

ShutdownVMWithResponse request returning *ShutdownVMResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PutVmAddDeviceWithBodyWithResponse request with any body
	PutVmAddDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddDeviceResponse, error)

	PutVmAddDeviceWithResponse(ctx context.Context, body PutVmAddDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddDeviceResponse, error)

	// PutVmAddDiskWithBodyWithResponse request with any body
	PutVmAddDiskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddDiskResponse, error)

	PutVmAddDiskWithResponse(ctx context.Context, body PutVmAddDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddDiskResponse, error)

	// PutVmAddFsWithBodyWithResponse request with any body
	PutVmAddFsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddFsResponse, error)

	PutVmAddFsWithResponse(ctx context.Context, body PutVmAddFsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddFsResponse, error)

	// PutVmAddGenericVhostUserWithBodyWithResponse request with any body
	PutVmAddGenericVhostUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddGenericVhostUserResponse, error)

	PutVmAddGenericVhostUserWithResponse(ctx context.Context, body PutVmAddGenericVhostUserJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddGenericVhostUserResponse, error)

	// PutVmAddNetWithBodyWithResponse request with any body
	PutVmAddNetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddNetResponse, error)

	PutVmAddNetWithResponse(ctx context.Context, body PutVmAddNetJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddNetResponse, error)

	// PutVmAddPmemWithBodyWithResponse request with any body
	PutVmAddPmemWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddPmemResponse, error)

	PutVmAddPmemWithResponse(ctx context.Context, body PutVmAddPmemJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddPmemResponse, error)

	// PutVmAddUserDeviceWithBodyWithResponse request with any body
	PutVmAddUserDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddUserDeviceResponse, error)

	PutVmAddUserDeviceWithResponse(ctx context.Context, body PutVmAddUserDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddUserDeviceResponse, error)

	// PutVmAddVdpaWithBodyWithResponse request with any body
	PutVmAddVdpaWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddVdpaResponse, error)

	PutVmAddVdpaWithResponse(ctx context.Context, body PutVmAddVdpaJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddVdpaResponse, error)

	// PutVmAddVsockWithBodyWithResponse request with any body
	PutVmAddVsockWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmAddVsockResponse, error)

	PutVmAddVsockWithResponse(ctx context.Context, body PutVmAddVsockJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmAddVsockResponse, error)

	// BootVMWithResponse request
	BootVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*BootVMResponse, error)

	// PutVmCoredumpWithBodyWithResponse request with any body
	PutVmCoredumpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmCoredumpResponse, error)

	PutVmCoredumpWithResponse(ctx context.Context, body PutVmCoredumpJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmCoredumpResponse, error)

	// GetVmCountersWithResponse request
	GetVmCountersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVmCountersResponse, error)

	// CreateVMWithBodyWithResponse request with any body
	CreateVMWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateVMResponse, error)

	CreateVMWithResponse(ctx context.Context, body CreateVMJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateVMResponse, error)

	// DeleteVMWithResponse request
	DeleteVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DeleteVMResponse, error)

	// GetVmInfoWithResponse request
	GetVmInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVmInfoResponse, error)

	// PutVmNmiWithResponse request
	PutVmNmiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PutVmNmiResponse, error)

	// PauseVMWithResponse request
	PauseVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PauseVMResponse, error)

	// PowerButtonVMWithResponse request
	PowerButtonVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PowerButtonVMResponse, error)

	// RebootVMWithResponse request
	RebootVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*RebootVMResponse, error)

	// PutVmReceiveMigrationWithBodyWithResponse request with any body
	PutVmReceiveMigrationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmReceiveMigrationResponse, error)

	PutVmReceiveMigrationWithResponse(ctx context.Context, body PutVmReceiveMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmReceiveMigrationResponse, error)

	// PutVmRemoveDeviceWithBodyWithResponse request with any body
	PutVmRemoveDeviceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmRemoveDeviceResponse, error)

	PutVmRemoveDeviceWithResponse(ctx context.Context, body PutVmRemoveDeviceJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmRemoveDeviceResponse, error)

	// PutVmResizeWithBodyWithResponse request with any body
	PutVmResizeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmResizeResponse, error)

	PutVmResizeWithResponse(ctx context.Context, body PutVmResizeJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmResizeResponse, error)

	// PutVmResizeDiskWithBodyWithResponse request with any body
	PutVmResizeDiskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmResizeDiskResponse, error)

	PutVmResizeDiskWithResponse(ctx context.Context, body PutVmResizeDiskJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmResizeDiskResponse, error)

	// PutVmResizeZoneWithBodyWithResponse request with any body
	PutVmResizeZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmResizeZoneResponse, error)

	PutVmResizeZoneWithResponse(ctx context.Context, body PutVmResizeZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmResizeZoneResponse, error)

	// PutVmRestoreWithBodyWithResponse request with any body
	PutVmRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmRestoreResponse, error)

	PutVmRestoreWithResponse(ctx context.Context, body PutVmRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmRestoreResponse, error)

	// ResumeVMWithResponse request
	ResumeVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ResumeVMResponse, error)

	// PutVmSendMigrationWithBodyWithResponse request with any body
	PutVmSendMigrationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmSendMigrationResponse, error)

	PutVmSendMigrationWithResponse(ctx context.Context, body PutVmSendMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmSendMigrationResponse, error)

	// ShutdownVMWithResponse request
	ShutdownVMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ShutdownVMResponse, error)

	// PutVmSnapshotWithBodyWithResponse request with any body
	PutVmSnapshotWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVmSnapshotResponse, error)

	PutVmSnapshotWithResponse(ctx context.Context, body PutVmSnapshotJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVmSnapshotResponse, error)

	// GetVmmPingWithResponse request
	GetVmmPingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVmmPingResponse, error)

	// ShutdownVMMWithResponse request
	ShutdownVMMWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ShutdownVMMResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type ConsoleConfig

type ConsoleConfig struct {
	File        *string     `json:"file,omitempty"`
	Id          *string     `json:"id,omitempty"`
	Iommu       *bool       `json:"iommu,omitempty"`
	Mode        ConsoleMode `json:"mode"`
	PciDeviceId *uint8      `json:"pci_device_id,omitempty"`
	PciSegment  *int16      `json:"pci_segment,omitempty"`
	Socket      *string     `json:"socket,omitempty"`
}

ConsoleConfig defines model for ConsoleConfig.

type ConsoleMode added in v0.4.0

type ConsoleMode string

ConsoleMode defines model for ConsoleMode.

const (
	ConsoleModeFile   ConsoleMode = "File"
	ConsoleModeNull   ConsoleMode = "Null"
	ConsoleModeOff    ConsoleMode = "Off"
	ConsoleModePty    ConsoleMode = "Pty"
	ConsoleModeSocket ConsoleMode = "Socket"
	ConsoleModeTty    ConsoleMode = "Tty"
)

Defines values for ConsoleMode.

type CoreSchedulingMode added in v0.4.0

type CoreSchedulingMode string

CoreSchedulingMode defines model for CoreSchedulingMode.

const (
	CoreSchedulingModeOff  CoreSchedulingMode = "Off"
	CoreSchedulingModeVcpu CoreSchedulingMode = "Vcpu"
	CoreSchedulingModeVm   CoreSchedulingMode = "Vm"
)

Defines values for CoreSchedulingMode.

type CpuAffinity

type CpuAffinity struct {
	HostCpus []int `json:"host_cpus"`
	Vcpu     int   `json:"vcpu"`
}

CpuAffinity defines model for CpuAffinity.

type CpuFeatures

type CpuFeatures struct {
	Amx *bool `json:"amx,omitempty"`
}

CpuFeatures defines model for CpuFeatures.

type CpuTopology

type CpuTopology struct {
	CoresPerDie    *int `json:"cores_per_die,omitempty"`
	DiesPerPackage *int `json:"dies_per_package,omitempty"`
	Packages       *int `json:"packages,omitempty"`
	ThreadsPerCore *int `json:"threads_per_core,omitempty"`
}

CpuTopology defines model for CpuTopology.

type CpusConfig

type CpusConfig struct {
	Affinity       *[]CpuAffinity      `json:"affinity,omitempty"`
	BootVcpus      int                 `json:"boot_vcpus"`
	CoreScheduling *CoreSchedulingMode `json:"core_scheduling,omitempty"`
	Features       *CpuFeatures        `json:"features,omitempty"`
	KvmHyperv      *bool               `json:"kvm_hyperv,omitempty"`
	MaxPhysBits    *int                `json:"max_phys_bits,omitempty"`
	MaxVcpus       int                 `json:"max_vcpus"`
	Nested         *bool               `json:"nested,omitempty"`
	Topology       *CpuTopology        `json:"topology,omitempty"`
}

CpusConfig defines model for CpusConfig.

type CreateVMJSONRequestBody

type CreateVMJSONRequestBody = VmConfig

CreateVMJSONRequestBody defines body for CreateVM for application/json ContentType.

type CreateVMResponse

type CreateVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseCreateVMResponse

func ParseCreateVMResponse(rsp *http.Response) (*CreateVMResponse, error)

ParseCreateVMResponse parses an HTTP response from a CreateVMWithResponse call

func (CreateVMResponse) Status

func (r CreateVMResponse) Status() string

Status returns HTTPResponse.Status

func (CreateVMResponse) StatusCode

func (r CreateVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DebugConsoleConfig

type DebugConsoleConfig struct {
	File   *string     `json:"file,omitempty"`
	Iobase *int        `json:"iobase,omitempty"`
	Mode   ConsoleMode `json:"mode"`
}

DebugConsoleConfig defines model for DebugConsoleConfig.

type DeleteVMResponse

type DeleteVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteVMResponse

func ParseDeleteVMResponse(rsp *http.Response) (*DeleteVMResponse, error)

ParseDeleteVMResponse parses an HTTP response from a DeleteVMWithResponse call

func (DeleteVMResponse) Status

func (r DeleteVMResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteVMResponse) StatusCode

func (r DeleteVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeviceConfig

type DeviceConfig struct {
	Id    *string `json:"id,omitempty"`
	Iommu *bool   `json:"iommu,omitempty"`

	// Path Sysfs path of the VFIO device. Exactly one of `path` or an
	// externally-opened cdev FD must be supplied; an FD is passed
	// out of band via SCM_RIGHTS on the UNIX domain socket, never
	// in this body.
	Path               *string  `json:"path,omitempty"`
	PciDeviceId        *uint8   `json:"pci_device_id,omitempty"`
	PciSegment         *int16   `json:"pci_segment,omitempty"`
	XExcludeMmapBars   *[]int64 `json:"x_exclude_mmap_bars,omitempty"`
	XNvGpudirectClique *int8    `json:"x_nv_gpudirect_clique,omitempty"`
}

DeviceConfig defines model for DeviceConfig.

type DeviceNode

type DeviceNode struct {
	Children  *[]string                 `json:"children,omitempty"`
	Id        *string                   `json:"id,omitempty"`
	PciBdf    *string                   `json:"pci_bdf,omitempty"`
	Resources *[]map[string]interface{} `json:"resources,omitempty"`
}

DeviceNode defines model for DeviceNode.

type DiskConfig

type DiskConfig struct {
	BackingFiles    *bool                `json:"backing_files,omitempty"`
	Direct          *bool                `json:"direct,omitempty"`
	Id              *string              `json:"id,omitempty"`
	ImageType       *ImageType           `json:"image_type,omitempty"`
	Iommu           *bool                `json:"iommu,omitempty"`
	LockGranularity *LockGranularity     `json:"lock_granularity,omitempty"`
	NumQueues       *int                 `json:"num_queues,omitempty"`
	Path            *string              `json:"path,omitempty"`
	PciDeviceId     *uint8               `json:"pci_device_id,omitempty"`
	PciSegment      *int16               `json:"pci_segment,omitempty"`
	QueueAffinity   *[]VirtQueueAffinity `json:"queue_affinity,omitempty"`
	QueueSize       *int                 `json:"queue_size,omitempty"`
	RateLimitGroup  *string              `json:"rate_limit_group,omitempty"`

	// RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
	RateLimiterConfig *RateLimiterConfig `json:"rate_limiter_config,omitempty"`
	Readonly          *bool              `json:"readonly,omitempty"`
	Serial            *string            `json:"serial,omitempty"`
	Sparse            *bool              `json:"sparse,omitempty"`
	VhostSocket       *string            `json:"vhost_socket,omitempty"`
	VhostUser         *bool              `json:"vhost_user,omitempty"`
}

DiskConfig defines model for DiskConfig.

type FsConfig

type FsConfig struct {
	Id          *string `json:"id,omitempty"`
	NumQueues   int     `json:"num_queues"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`
	QueueSize   int     `json:"queue_size"`
	Socket      string  `json:"socket"`
	Tag         string  `json:"tag"`
}

FsConfig defines model for FsConfig.

type GenericVhostUserConfig added in v0.4.0

type GenericVhostUserConfig struct {
	DeviceType  uint32   `json:"device_type"`
	PciDeviceId *uint8   `json:"pci_device_id,omitempty"`
	PciSegment  *int16   `json:"pci_segment,omitempty"`
	QueueSizes  []uint16 `json:"queue_sizes"`
	Socket      string   `json:"socket"`
}

GenericVhostUserConfig defines model for GenericVhostUserConfig.

type GetVmCountersResponse

type GetVmCountersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *VmCounters
}

func ParseGetVmCountersResponse

func ParseGetVmCountersResponse(rsp *http.Response) (*GetVmCountersResponse, error)

ParseGetVmCountersResponse parses an HTTP response from a GetVmCountersWithResponse call

func (GetVmCountersResponse) Status

func (r GetVmCountersResponse) Status() string

Status returns HTTPResponse.Status

func (GetVmCountersResponse) StatusCode

func (r GetVmCountersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVmInfoResponse

type GetVmInfoResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *VmInfo
}

func ParseGetVmInfoResponse

func ParseGetVmInfoResponse(rsp *http.Response) (*GetVmInfoResponse, error)

ParseGetVmInfoResponse parses an HTTP response from a GetVmInfoWithResponse call

func (GetVmInfoResponse) Status

func (r GetVmInfoResponse) Status() string

Status returns HTTPResponse.Status

func (GetVmInfoResponse) StatusCode

func (r GetVmInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVmmPingResponse

type GetVmmPingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *VmmPingResponse
}

func ParseGetVmmPingResponse

func ParseGetVmmPingResponse(rsp *http.Response) (*GetVmmPingResponse, error)

ParseGetVmmPingResponse parses an HTTP response from a GetVmmPingWithResponse call

func (GetVmmPingResponse) Status

func (r GetVmmPingResponse) Status() string

Status returns HTTPResponse.Status

func (GetVmmPingResponse) StatusCode

func (r GetVmmPingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Hypervisor

type Hypervisor struct {
	// contains filtered or unexported fields
}

Hypervisor controls one Cloud Hypervisor VMM over its API socket.

func NewHypervisor

func NewHypervisor(socketPath string) *Hypervisor

NewHypervisor returns a Hypervisor for the VMM serving its API on socketPath. It does not connect until the first request.

func (*Hypervisor) DestroyVM

func (h *Hypervisor) DestroyVM(ctx context.Context) error

DestroyVM implements hypervisor.Hypervisor.

func (*Hypervisor) PauseVM

func (h *Hypervisor) PauseVM(ctx context.Context) error

PauseVM implements hypervisor.Hypervisor.

func (*Hypervisor) ResizeVMCPU

func (h *Hypervisor) ResizeVMCPU(ctx context.Context, count int) error

ResizeVMCPU implements hypervisor.Hypervisor.

func (*Hypervisor) ResizeVMMemory

func (h *Hypervisor) ResizeVMMemory(ctx context.Context, bytes int64) error

ResizeVMMemory implements hypervisor.Hypervisor. Cloud Hypervisor reports the memory asked for, not what the guest has plugged, so it returns as soon as the request is taken. It refuses memory below the boot memory, which Cloud Hypervisor would ignore.

func (*Hypervisor) ResumeVM

func (h *Hypervisor) ResumeVM(ctx context.Context) error

ResumeVM implements hypervisor.Hypervisor.

func (*Hypervisor) Shutdown

func (h *Hypervisor) Shutdown(ctx context.Context) error

Shutdown implements hypervisor.Hypervisor.

func (*Hypervisor) ShutdownVM

func (h *Hypervisor) ShutdownVM(ctx context.Context) error

ShutdownVM implements hypervisor.Hypervisor by pressing the guest's ACPI power button.

func (*Hypervisor) SnapshotVM

func (h *Hypervisor) SnapshotVM(ctx context.Context, destPath string) error

SnapshotVM implements hypervisor.Hypervisor. For a few seconds after a restore on demand, Cloud Hypervisor is still restoring the guest's memory and refuses to snapshot it. SnapshotVM then fails with hypervisor.ErrRestoringMemory.

func (*Hypervisor) VMInfo added in v0.4.0

func (h *Hypervisor) VMInfo(ctx context.Context) (*hypervisor.VMInfo, error)

VMInfo implements hypervisor.Hypervisor. A VMM with no guest reports VMStateStopped.

type ImageType added in v0.4.0

type ImageType string

ImageType defines model for ImageType.

const (
	FixedVhd ImageType = "FixedVhd"
	Qcow2    ImageType = "Qcow2"
	Raw      ImageType = "Raw"
	Unknown  ImageType = "Unknown"
	Vhdx     ImageType = "Vhdx"
)

Defines values for ImageType.

type LandlockConfig

type LandlockConfig struct {
	Access string `json:"access"`
	Path   string `json:"path"`
}

LandlockConfig defines model for LandlockConfig.

type LockGranularity added in v0.4.0

type LockGranularity string

LockGranularity defines model for LockGranularity.

const (
	ByteRange LockGranularity = "ByteRange"
	Full      LockGranularity = "Full"
)

Defines values for LockGranularity.

type MemoryConfig

type MemoryConfig struct {
	HotplugMethod  *string             `json:"hotplug_method,omitempty"`
	HotplugSize    *int64              `json:"hotplug_size,omitempty"`
	HotpluggedSize *int64              `json:"hotplugged_size,omitempty"`
	HugepageSize   *int64              `json:"hugepage_size,omitempty"`
	Hugepages      *bool               `json:"hugepages,omitempty"`
	Mergeable      *bool               `json:"mergeable,omitempty"`
	Prefault       *bool               `json:"prefault,omitempty"`
	Reserve        *bool               `json:"reserve,omitempty"`
	Shared         *bool               `json:"shared,omitempty"`
	Size           int64               `json:"size"`
	Thp            *bool               `json:"thp,omitempty"`
	Zones          *[]MemoryZoneConfig `json:"zones,omitempty"`
}

MemoryConfig defines model for MemoryConfig.

type MemoryRestoreMode added in v0.4.0

type MemoryRestoreMode string

MemoryRestoreMode defines model for MemoryRestoreMode.

const (
	Copy     MemoryRestoreMode = "Copy"
	OnDemand MemoryRestoreMode = "OnDemand"
)

Defines values for MemoryRestoreMode.

type MemoryZoneConfig

type MemoryZoneConfig struct {
	File           *string `json:"file,omitempty"`
	HostNumaNode   *int32  `json:"host_numa_node,omitempty"`
	HotplugSize    *int64  `json:"hotplug_size,omitempty"`
	HotpluggedSize *int64  `json:"hotplugged_size,omitempty"`
	HugepageSize   *int64  `json:"hugepage_size,omitempty"`
	Hugepages      *bool   `json:"hugepages,omitempty"`
	Id             string  `json:"id"`
	Mergeable      *bool   `json:"mergeable,omitempty"`
	Prefault       *bool   `json:"prefault,omitempty"`
	Reserve        *bool   `json:"reserve,omitempty"`
	Shared         *bool   `json:"shared,omitempty"`
	Size           int64   `json:"size"`
}

MemoryZoneConfig defines model for MemoryZoneConfig.

type MigrationMode added in v0.4.0

type MigrationMode string

MigrationMode Memory transfer mode. Precopy transfers all guest memory before the destination resumes. Postcopy resumes the destination first and faults guest pages in on demand.

const (
	Postcopy MigrationMode = "Postcopy"
	Precopy  MigrationMode = "Precopy"
)

Defines values for MigrationMode.

type NetConfig

type NetConfig struct {
	HostMac *string `json:"host_mac,omitempty"`
	Id      *string `json:"id,omitempty"`
	Iommu   *bool   `json:"iommu,omitempty"`

	// Ip IPv4 or IPv6 address
	Ip  *string `json:"ip,omitempty"`
	Mac *string `json:"mac,omitempty"`

	// Mask Must be a valid IPv4 netmask if ip is an IPv4 address or a valid IPv6 netmask if ip is an IPv6 address.
	Mask        *string `json:"mask,omitempty"`
	Mtu         *int    `json:"mtu,omitempty"`
	NumQueues   *int    `json:"num_queues,omitempty"`
	OffloadCsum *bool   `json:"offload_csum,omitempty"`
	OffloadTso  *bool   `json:"offload_tso,omitempty"`
	OffloadUfo  *bool   `json:"offload_ufo,omitempty"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`
	QueueSize   *int    `json:"queue_size,omitempty"`

	// RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
	RateLimiterConfig *RateLimiterConfig `json:"rate_limiter_config,omitempty"`
	Tap               *string            `json:"tap,omitempty"`
	VhostMode         *string            `json:"vhost_mode,omitempty"`
	VhostSocket       *string            `json:"vhost_socket,omitempty"`
	VhostUser         *bool              `json:"vhost_user,omitempty"`
}

NetConfig defines model for NetConfig.

type NumaConfig

type NumaConfig struct {
	Cpus        *[]int32        `json:"cpus,omitempty"`
	DeviceId    *string         `json:"device_id,omitempty"`
	Distances   *[]NumaDistance `json:"distances,omitempty"`
	GuestNumaId int32           `json:"guest_numa_id"`
	MemoryZones *[]string       `json:"memory_zones,omitempty"`
	PciSegments *[]int32        `json:"pci_segments,omitempty"`
}

NumaConfig defines model for NumaConfig.

type NumaDistance

type NumaDistance struct {
	Destination int32 `json:"destination"`
	Distance    int32 `json:"distance"`
}

NumaDistance defines model for NumaDistance.

type PauseVMResponse

type PauseVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePauseVMResponse

func ParsePauseVMResponse(rsp *http.Response) (*PauseVMResponse, error)

ParsePauseVMResponse parses an HTTP response from a PauseVMWithResponse call

func (PauseVMResponse) Status

func (r PauseVMResponse) Status() string

Status returns HTTPResponse.Status

func (PauseVMResponse) StatusCode

func (r PauseVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PayloadConfig

type PayloadConfig struct {
	Cmdline   *string `json:"cmdline,omitempty"`
	Firmware  *string `json:"firmware,omitempty"`
	HostData  *string `json:"host_data,omitempty"`
	Igvm      *string `json:"igvm,omitempty"`
	Initramfs *string `json:"initramfs,omitempty"`
	Kernel    *string `json:"kernel,omitempty"`
}

PayloadConfig Payloads to boot in guest

type PciDeviceInfo

type PciDeviceInfo struct {
	Bdf string `json:"bdf"`
	Id  string `json:"id"`
}

PciDeviceInfo Information about a PCI device

type PciSegmentConfig

type PciSegmentConfig struct {
	Mmio32ApertureWeight *int32 `json:"mmio32_aperture_weight,omitempty"`
	Mmio64ApertureWeight *int32 `json:"mmio64_aperture_weight,omitempty"`
	PciSegment           int16  `json:"pci_segment"`
}

PciSegmentConfig defines model for PciSegmentConfig.

type PlatformConfig

type PlatformConfig struct {
	ChassisAssetTag       *string   `json:"chassis_asset_tag,omitempty"`
	IommuAddressWidthBits *uint8    `json:"iommu_address_width_bits,omitempty"`
	IommuSegments         *[]int16  `json:"iommu_segments,omitempty"`
	Iommufd               *bool     `json:"iommufd,omitempty"`
	NumPciSegments        *int16    `json:"num_pci_segments,omitempty"`
	OemStrings            *[]string `json:"oem_strings,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SerialNumber       *string `json:"serial_number,omitempty"`
	SevSnp             *bool   `json:"sev_snp,omitempty"`
	SystemFamily       *string `json:"system_family,omitempty"`
	SystemManufacturer *string `json:"system_manufacturer,omitempty"`
	SystemProductName  *string `json:"system_product_name,omitempty"`
	SystemSerialNumber *string `json:"system_serial_number,omitempty"`
	SystemSkuNumber    *string `json:"system_sku_number,omitempty"`
	SystemUuid         *string `json:"system_uuid,omitempty"`
	SystemVersion      *string `json:"system_version,omitempty"`
	Tdx                *bool   `json:"tdx,omitempty"`
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Uuid       *string `json:"uuid,omitempty"`
	VfioP2pDma *bool   `json:"vfio_p2p_dma,omitempty"`
}

PlatformConfig defines model for PlatformConfig.

type PmemConfig

type PmemConfig struct {
	DiscardWrites *bool   `json:"discard_writes,omitempty"`
	File          string  `json:"file"`
	Id            *string `json:"id,omitempty"`
	Iommu         *bool   `json:"iommu,omitempty"`
	PciDeviceId   *uint8  `json:"pci_device_id,omitempty"`
	PciSegment    *int16  `json:"pci_segment,omitempty"`
	Size          *int64  `json:"size,omitempty"`
}

PmemConfig defines model for PmemConfig.

type PowerButtonVMResponse

type PowerButtonVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePowerButtonVMResponse

func ParsePowerButtonVMResponse(rsp *http.Response) (*PowerButtonVMResponse, error)

ParsePowerButtonVMResponse parses an HTTP response from a PowerButtonVMWithResponse call

func (PowerButtonVMResponse) Status

func (r PowerButtonVMResponse) Status() string

Status returns HTTPResponse.Status

func (PowerButtonVMResponse) StatusCode

func (r PowerButtonVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddDeviceJSONRequestBody

type PutVmAddDeviceJSONRequestBody = DeviceConfig

PutVmAddDeviceJSONRequestBody defines body for PutVmAddDevice for application/json ContentType.

type PutVmAddDeviceResponse

type PutVmAddDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddDeviceResponse

func ParsePutVmAddDeviceResponse(rsp *http.Response) (*PutVmAddDeviceResponse, error)

ParsePutVmAddDeviceResponse parses an HTTP response from a PutVmAddDeviceWithResponse call

func (PutVmAddDeviceResponse) Status

func (r PutVmAddDeviceResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddDeviceResponse) StatusCode

func (r PutVmAddDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddDiskJSONRequestBody

type PutVmAddDiskJSONRequestBody = DiskConfig

PutVmAddDiskJSONRequestBody defines body for PutVmAddDisk for application/json ContentType.

type PutVmAddDiskResponse

type PutVmAddDiskResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddDiskResponse

func ParsePutVmAddDiskResponse(rsp *http.Response) (*PutVmAddDiskResponse, error)

ParsePutVmAddDiskResponse parses an HTTP response from a PutVmAddDiskWithResponse call

func (PutVmAddDiskResponse) Status

func (r PutVmAddDiskResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddDiskResponse) StatusCode

func (r PutVmAddDiskResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddFsJSONRequestBody

type PutVmAddFsJSONRequestBody = FsConfig

PutVmAddFsJSONRequestBody defines body for PutVmAddFs for application/json ContentType.

type PutVmAddFsResponse

type PutVmAddFsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddFsResponse

func ParsePutVmAddFsResponse(rsp *http.Response) (*PutVmAddFsResponse, error)

ParsePutVmAddFsResponse parses an HTTP response from a PutVmAddFsWithResponse call

func (PutVmAddFsResponse) Status

func (r PutVmAddFsResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddFsResponse) StatusCode

func (r PutVmAddFsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddGenericVhostUserJSONRequestBody added in v0.4.0

type PutVmAddGenericVhostUserJSONRequestBody = GenericVhostUserConfig

PutVmAddGenericVhostUserJSONRequestBody defines body for PutVmAddGenericVhostUser for application/json ContentType.

type PutVmAddGenericVhostUserResponse added in v0.4.0

type PutVmAddGenericVhostUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddGenericVhostUserResponse added in v0.4.0

func ParsePutVmAddGenericVhostUserResponse(rsp *http.Response) (*PutVmAddGenericVhostUserResponse, error)

ParsePutVmAddGenericVhostUserResponse parses an HTTP response from a PutVmAddGenericVhostUserWithResponse call

func (PutVmAddGenericVhostUserResponse) Status added in v0.4.0

Status returns HTTPResponse.Status

func (PutVmAddGenericVhostUserResponse) StatusCode added in v0.4.0

func (r PutVmAddGenericVhostUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddNetJSONRequestBody

type PutVmAddNetJSONRequestBody = NetConfig

PutVmAddNetJSONRequestBody defines body for PutVmAddNet for application/json ContentType.

type PutVmAddNetResponse

type PutVmAddNetResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddNetResponse

func ParsePutVmAddNetResponse(rsp *http.Response) (*PutVmAddNetResponse, error)

ParsePutVmAddNetResponse parses an HTTP response from a PutVmAddNetWithResponse call

func (PutVmAddNetResponse) Status

func (r PutVmAddNetResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddNetResponse) StatusCode

func (r PutVmAddNetResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddPmemJSONRequestBody

type PutVmAddPmemJSONRequestBody = PmemConfig

PutVmAddPmemJSONRequestBody defines body for PutVmAddPmem for application/json ContentType.

type PutVmAddPmemResponse

type PutVmAddPmemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddPmemResponse

func ParsePutVmAddPmemResponse(rsp *http.Response) (*PutVmAddPmemResponse, error)

ParsePutVmAddPmemResponse parses an HTTP response from a PutVmAddPmemWithResponse call

func (PutVmAddPmemResponse) Status

func (r PutVmAddPmemResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddPmemResponse) StatusCode

func (r PutVmAddPmemResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddUserDeviceJSONRequestBody

type PutVmAddUserDeviceJSONRequestBody = VmAddUserDevice

PutVmAddUserDeviceJSONRequestBody defines body for PutVmAddUserDevice for application/json ContentType.

type PutVmAddUserDeviceResponse

type PutVmAddUserDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddUserDeviceResponse

func ParsePutVmAddUserDeviceResponse(rsp *http.Response) (*PutVmAddUserDeviceResponse, error)

ParsePutVmAddUserDeviceResponse parses an HTTP response from a PutVmAddUserDeviceWithResponse call

func (PutVmAddUserDeviceResponse) Status

Status returns HTTPResponse.Status

func (PutVmAddUserDeviceResponse) StatusCode

func (r PutVmAddUserDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddVdpaJSONRequestBody

type PutVmAddVdpaJSONRequestBody = VdpaConfig

PutVmAddVdpaJSONRequestBody defines body for PutVmAddVdpa for application/json ContentType.

type PutVmAddVdpaResponse

type PutVmAddVdpaResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddVdpaResponse

func ParsePutVmAddVdpaResponse(rsp *http.Response) (*PutVmAddVdpaResponse, error)

ParsePutVmAddVdpaResponse parses an HTTP response from a PutVmAddVdpaWithResponse call

func (PutVmAddVdpaResponse) Status

func (r PutVmAddVdpaResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddVdpaResponse) StatusCode

func (r PutVmAddVdpaResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmAddVsockJSONRequestBody

type PutVmAddVsockJSONRequestBody = VsockConfig

PutVmAddVsockJSONRequestBody defines body for PutVmAddVsock for application/json ContentType.

type PutVmAddVsockResponse

type PutVmAddVsockResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PciDeviceInfo
}

func ParsePutVmAddVsockResponse

func ParsePutVmAddVsockResponse(rsp *http.Response) (*PutVmAddVsockResponse, error)

ParsePutVmAddVsockResponse parses an HTTP response from a PutVmAddVsockWithResponse call

func (PutVmAddVsockResponse) Status

func (r PutVmAddVsockResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmAddVsockResponse) StatusCode

func (r PutVmAddVsockResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmCoredumpJSONRequestBody

type PutVmCoredumpJSONRequestBody = VmCoredumpData

PutVmCoredumpJSONRequestBody defines body for PutVmCoredump for application/json ContentType.

type PutVmCoredumpResponse

type PutVmCoredumpResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmCoredumpResponse

func ParsePutVmCoredumpResponse(rsp *http.Response) (*PutVmCoredumpResponse, error)

ParsePutVmCoredumpResponse parses an HTTP response from a PutVmCoredumpWithResponse call

func (PutVmCoredumpResponse) Status

func (r PutVmCoredumpResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmCoredumpResponse) StatusCode

func (r PutVmCoredumpResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmNmiResponse added in v0.4.0

type PutVmNmiResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmNmiResponse added in v0.4.0

func ParsePutVmNmiResponse(rsp *http.Response) (*PutVmNmiResponse, error)

ParsePutVmNmiResponse parses an HTTP response from a PutVmNmiWithResponse call

func (PutVmNmiResponse) Status added in v0.4.0

func (r PutVmNmiResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmNmiResponse) StatusCode added in v0.4.0

func (r PutVmNmiResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmReceiveMigrationJSONRequestBody

type PutVmReceiveMigrationJSONRequestBody = ReceiveMigrationData

PutVmReceiveMigrationJSONRequestBody defines body for PutVmReceiveMigration for application/json ContentType.

type PutVmReceiveMigrationResponse

type PutVmReceiveMigrationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmReceiveMigrationResponse

func ParsePutVmReceiveMigrationResponse(rsp *http.Response) (*PutVmReceiveMigrationResponse, error)

ParsePutVmReceiveMigrationResponse parses an HTTP response from a PutVmReceiveMigrationWithResponse call

func (PutVmReceiveMigrationResponse) Status

Status returns HTTPResponse.Status

func (PutVmReceiveMigrationResponse) StatusCode

func (r PutVmReceiveMigrationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmRemoveDeviceJSONRequestBody

type PutVmRemoveDeviceJSONRequestBody = VmRemoveDevice

PutVmRemoveDeviceJSONRequestBody defines body for PutVmRemoveDevice for application/json ContentType.

type PutVmRemoveDeviceResponse

type PutVmRemoveDeviceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmRemoveDeviceResponse

func ParsePutVmRemoveDeviceResponse(rsp *http.Response) (*PutVmRemoveDeviceResponse, error)

ParsePutVmRemoveDeviceResponse parses an HTTP response from a PutVmRemoveDeviceWithResponse call

func (PutVmRemoveDeviceResponse) Status

func (r PutVmRemoveDeviceResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmRemoveDeviceResponse) StatusCode

func (r PutVmRemoveDeviceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmResizeDiskJSONRequestBody added in v0.4.0

type PutVmResizeDiskJSONRequestBody = VmResizeDisk

PutVmResizeDiskJSONRequestBody defines body for PutVmResizeDisk for application/json ContentType.

type PutVmResizeDiskResponse added in v0.4.0

type PutVmResizeDiskResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmResizeDiskResponse added in v0.4.0

func ParsePutVmResizeDiskResponse(rsp *http.Response) (*PutVmResizeDiskResponse, error)

ParsePutVmResizeDiskResponse parses an HTTP response from a PutVmResizeDiskWithResponse call

func (PutVmResizeDiskResponse) Status added in v0.4.0

func (r PutVmResizeDiskResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmResizeDiskResponse) StatusCode added in v0.4.0

func (r PutVmResizeDiskResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmResizeJSONRequestBody

type PutVmResizeJSONRequestBody = VmResize

PutVmResizeJSONRequestBody defines body for PutVmResize for application/json ContentType.

type PutVmResizeResponse

type PutVmResizeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmResizeResponse

func ParsePutVmResizeResponse(rsp *http.Response) (*PutVmResizeResponse, error)

ParsePutVmResizeResponse parses an HTTP response from a PutVmResizeWithResponse call

func (PutVmResizeResponse) Status

func (r PutVmResizeResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmResizeResponse) StatusCode

func (r PutVmResizeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmResizeZoneJSONRequestBody

type PutVmResizeZoneJSONRequestBody = VmResizeZone

PutVmResizeZoneJSONRequestBody defines body for PutVmResizeZone for application/json ContentType.

type PutVmResizeZoneResponse

type PutVmResizeZoneResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmResizeZoneResponse

func ParsePutVmResizeZoneResponse(rsp *http.Response) (*PutVmResizeZoneResponse, error)

ParsePutVmResizeZoneResponse parses an HTTP response from a PutVmResizeZoneWithResponse call

func (PutVmResizeZoneResponse) Status

func (r PutVmResizeZoneResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmResizeZoneResponse) StatusCode

func (r PutVmResizeZoneResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmRestoreJSONRequestBody

type PutVmRestoreJSONRequestBody = RestoreConfig

PutVmRestoreJSONRequestBody defines body for PutVmRestore for application/json ContentType.

type PutVmRestoreResponse

type PutVmRestoreResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmRestoreResponse

func ParsePutVmRestoreResponse(rsp *http.Response) (*PutVmRestoreResponse, error)

ParsePutVmRestoreResponse parses an HTTP response from a PutVmRestoreWithResponse call

func (PutVmRestoreResponse) Status

func (r PutVmRestoreResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmRestoreResponse) StatusCode

func (r PutVmRestoreResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmSendMigrationJSONRequestBody

type PutVmSendMigrationJSONRequestBody = SendMigrationData

PutVmSendMigrationJSONRequestBody defines body for PutVmSendMigration for application/json ContentType.

type PutVmSendMigrationResponse

type PutVmSendMigrationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmSendMigrationResponse

func ParsePutVmSendMigrationResponse(rsp *http.Response) (*PutVmSendMigrationResponse, error)

ParsePutVmSendMigrationResponse parses an HTTP response from a PutVmSendMigrationWithResponse call

func (PutVmSendMigrationResponse) Status

Status returns HTTPResponse.Status

func (PutVmSendMigrationResponse) StatusCode

func (r PutVmSendMigrationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PutVmSnapshotJSONRequestBody

type PutVmSnapshotJSONRequestBody = VmSnapshotConfig

PutVmSnapshotJSONRequestBody defines body for PutVmSnapshot for application/json ContentType.

type PutVmSnapshotResponse

type PutVmSnapshotResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParsePutVmSnapshotResponse

func ParsePutVmSnapshotResponse(rsp *http.Response) (*PutVmSnapshotResponse, error)

ParsePutVmSnapshotResponse parses an HTTP response from a PutVmSnapshotWithResponse call

func (PutVmSnapshotResponse) Status

func (r PutVmSnapshotResponse) Status() string

Status returns HTTPResponse.Status

func (PutVmSnapshotResponse) StatusCode

func (r PutVmSnapshotResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RateLimitGroupConfig

type RateLimitGroupConfig struct {
	Id string `json:"id"`

	// RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
	RateLimiterConfig RateLimiterConfig `json:"rate_limiter_config"`
}

RateLimitGroupConfig defines model for RateLimitGroupConfig.

type RateLimiterConfig

type RateLimiterConfig struct {
	// Bandwidth Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
	Bandwidth *TokenBucket `json:"bandwidth,omitempty"`

	// Ops Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.
	Ops *TokenBucket `json:"ops,omitempty"`
}

RateLimiterConfig Defines an IO rate limiter with independent bytes/s and ops/s limits. Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.

type RebootVMResponse

type RebootVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseRebootVMResponse

func ParseRebootVMResponse(rsp *http.Response) (*RebootVMResponse, error)

ParseRebootVMResponse parses an HTTP response from a RebootVMWithResponse call

func (RebootVMResponse) Status

func (r RebootVMResponse) Status() string

Status returns HTTPResponse.Status

func (RebootVMResponse) StatusCode

func (r RebootVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReceiveMigrationData

type ReceiveMigrationData struct {
	// MemoryMode Memory transfer mode. Precopy transfers all guest memory before the destination resumes. Postcopy resumes the destination first and faults guest pages in on demand.
	MemoryMode  *MigrationMode `json:"memory_mode,omitempty"`
	ReceiverUrl string         `json:"receiver_url"`

	// TlsDir Directory containing the TLS server certificate (server-cert.pem), the TLS server key (server-key.pem), and the client TLS root CA certificate (ca-cert.pem). TLS is only supported with tcp:<host>:<port> receiver URLs.
	TlsDir *string `json:"tls_dir,omitempty"`
}

ReceiveMigrationData defines model for ReceiveMigrationData.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RestoreConfig

type RestoreConfig struct {
	MemoryRestoreMode *MemoryRestoreMode `json:"memory_restore_mode,omitempty"`
	Prefault          *bool              `json:"prefault,omitempty"`
	Resume            *bool              `json:"resume,omitempty"`
	SourceUrl         string             `json:"source_url"`
}

RestoreConfig defines model for RestoreConfig.

type ResumeVMResponse

type ResumeVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseResumeVMResponse

func ParseResumeVMResponse(rsp *http.Response) (*ResumeVMResponse, error)

ParseResumeVMResponse parses an HTTP response from a ResumeVMWithResponse call

func (ResumeVMResponse) Status

func (r ResumeVMResponse) Status() string

Status returns HTTPResponse.Status

func (ResumeVMResponse) StatusCode

func (r ResumeVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RngConfig

type RngConfig struct {
	Id          *string `json:"id,omitempty"`
	Iommu       *bool   `json:"iommu,omitempty"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`
	Src         string  `json:"src"`
}

RngConfig defines model for RngConfig.

type RtcConfig added in v0.4.0

type RtcConfig struct {
	Id          *string `json:"id,omitempty"`
	Iommu       *bool   `json:"iommu,omitempty"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`
}

RtcConfig defines model for RtcConfig.

type SendMigrationData

type SendMigrationData struct {
	// Connections The number of parallel TCP connections to use for migration. Must be between 1 and 128. Multiple connections are not supported with local UNIX-socket migration.
	Connections    *int64 `json:"connections,omitempty"`
	DestinationUrl string `json:"destination_url"`

	// DowntimeMs The maximum downtime the migration aims for, in milliseconds. Defaults to 300ms.
	DowntimeMs *int64 `json:"downtime_ms,omitempty"`
	Local      *bool  `json:"local,omitempty"`

	// MemoryMode Memory transfer mode. Precopy transfers all guest memory before the destination resumes. Postcopy resumes the destination first and faults guest pages in on demand.
	MemoryMode *MigrationMode `json:"memory_mode,omitempty"`

	// TimeoutS The timeout for the migration (maximum total duration), in seconds. Defaults to 3600s (one hour).
	TimeoutS *int64 `json:"timeout_s,omitempty"`

	// TimeoutStrategy The strategy to apply when the migration timeout is reached. Cancel will abort the migration and keep the VM running on the source. Ignore will proceed with the migration regardless of the downtime requirement.
	TimeoutStrategy *TimeoutStrategy `json:"timeout_strategy,omitempty"`

	// TlsDir Directory containing the TLS root CA certificate (ca-cert.pem), the TLS client certificate (client-cert.pem), and TLS client key (client-key.pem). TLS is only supported with tcp:<host>:<port> destination URLs.
	TlsDir *string `json:"tls_dir,omitempty"`
}

SendMigrationData defines model for SendMigrationData.

type SerialConfig added in v0.4.0

type SerialConfig struct {
	File   *string     `json:"file,omitempty"`
	Mode   ConsoleMode `json:"mode"`
	Socket *string     `json:"socket,omitempty"`
}

SerialConfig defines model for SerialConfig.

type ShutdownVMMResponse

type ShutdownVMMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseShutdownVMMResponse

func ParseShutdownVMMResponse(rsp *http.Response) (*ShutdownVMMResponse, error)

ParseShutdownVMMResponse parses an HTTP response from a ShutdownVMMWithResponse call

func (ShutdownVMMResponse) Status

func (r ShutdownVMMResponse) Status() string

Status returns HTTPResponse.Status

func (ShutdownVMMResponse) StatusCode

func (r ShutdownVMMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ShutdownVMResponse

type ShutdownVMResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseShutdownVMResponse

func ParseShutdownVMResponse(rsp *http.Response) (*ShutdownVMResponse, error)

ParseShutdownVMResponse parses an HTTP response from a ShutdownVMWithResponse call

func (ShutdownVMResponse) Status

func (r ShutdownVMResponse) Status() string

Status returns HTTPResponse.Status

func (ShutdownVMResponse) StatusCode

func (r ShutdownVMResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Starter

type Starter struct {
	// contains filtered or unexported fields
}

Starter implements hypervisor.Starter for Cloud Hypervisor.

func NewStarter

func NewStarter(binaryPath string) (*Starter, error)

NewStarter creates a Starter for a Cloud Hypervisor binary. It invokes the binary once to parse and validate its version.

func (*Starter) Capabilities added in v0.4.0

func (s *Starter) Capabilities() hypervisor.Capabilities

Capabilities reports what Cloud Hypervisor supports on this host.

func (*Starter) Connect

func (s *Starter) Connect(socketPath string) (hypervisor.Hypervisor, error)

Connect returns a client for an already-running Cloud Hypervisor VMM.

func (*Starter) DefaultKernelArgs added in v0.4.0

func (s *Starter) DefaultKernelArgs() string

DefaultKernelArgs returns the kernel command line Cloud Hypervisor guests need: output on the serial port, which is the console, a reboot on panic, and memory that a resize can take back.

func (*Starter) PowerOffEndsVM

func (s *Starter) PowerOffEndsVM() bool

PowerOffEndsVM is true: Cloud Hypervisor exits when its guest powers off over ACPI. A reset, by contrast, reboots the guest in place.

func (*Starter) RestoreVM

func (s *Starter) RestoreVM(
	ctx context.Context, socketPath string, snapshotPath string, spec hypervisor.RestoreSpec,
) (*process.Process, hypervisor.Hypervisor, error)

RestoreVM launches Cloud Hypervisor and restores a guest from a snapshot, leaving it paused. The console is unused: the snapshot carries it.

If the version and the host allow it, it restores the guest's memory on demand. The guest resumes at once, and Cloud Hypervisor restores each page from the snapshot when the guest first uses it, and the rest in the background. Otherwise it restores all of the memory before returning.

func (*Starter) StartVM

func (s *Starter) StartVM(
	ctx context.Context, socketPath string, spec hypervisor.VMSpec,
) (*process.Process, hypervisor.Hypervisor, error)

StartVM launches Cloud Hypervisor, configures the guest and boots it. It returns the VMM process and a client for controlling it.

func (*Starter) Version

func (s *Starter) Version() string

Version returns the Cloud Hypervisor binary version string.

type TimeoutStrategy added in v0.4.0

type TimeoutStrategy string

TimeoutStrategy The strategy to apply when the migration timeout is reached. Cancel will abort the migration and keep the VM running on the source. Ignore will proceed with the migration regardless of the downtime requirement.

const (
	Cancel TimeoutStrategy = "Cancel"
	Ignore TimeoutStrategy = "Ignore"
)

Defines values for TimeoutStrategy.

type TokenBucket

type TokenBucket struct {
	// OneTimeBurst The initial size of a token bucket.
	OneTimeBurst *int64 `json:"one_time_burst,omitempty"`

	// RefillTime The amount of milliseconds it takes for the bucket to refill.
	RefillTime int64 `json:"refill_time"`

	// Size The total number of tokens this bucket can hold.
	Size int64 `json:"size"`
}

TokenBucket Defines a token bucket with a maximum capacity (_size_), an initial burst size (_one_time_burst_) and an interval for refilling purposes (_refill_time_). The refill-rate is derived from _size_ and _refill_time_, and it is the constant rate at which the tokens replenish. The refill process only starts happening after the initial burst budget is consumed. Consumption from the token bucket is unbounded in speed which allows for bursts bound in size by the amount of tokens available. Once the token bucket is empty, consumption speed is bound by the refill-rate.

type TpmConfig

type TpmConfig struct {
	Socket string `json:"socket"`
}

TpmConfig defines model for TpmConfig.

type UserDeviceConfig added in v0.4.0

type UserDeviceConfig struct {
	Id          *string `json:"id,omitempty"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`
	Socket      string  `json:"socket"`
}

UserDeviceConfig defines model for UserDeviceConfig.

type VdpaConfig

type VdpaConfig struct {
	Id          *string `json:"id,omitempty"`
	Iommu       *bool   `json:"iommu,omitempty"`
	NumQueues   int     `json:"num_queues"`
	Path        string  `json:"path"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`
}

VdpaConfig defines model for VdpaConfig.

type Version

type Version string

Version identifies a supported Cloud Hypervisor release.

const (
	V48 Version = "v48.0.0"
	V49 Version = "v49.0.0"
	V53 Version = "v53.0.0"
)

The Cloud Hypervisor releases Dicer ships binaries for.

func SupportedVersions

func SupportedVersions() []Version

SupportedVersions returns the versions whose binaries are embedded.

type VirtQueueAffinity

type VirtQueueAffinity struct {
	HostCpus   []int `json:"host_cpus"`
	QueueIndex int   `json:"queue_index"`
}

VirtQueueAffinity defines model for VirtQueueAffinity.

type VmAddUserDevice

type VmAddUserDevice struct {
	PciDeviceId *uint8 `json:"pci_device_id,omitempty"`
	PciSegment  *int16 `json:"pci_segment,omitempty"`
	Socket      string `json:"socket"`
}

VmAddUserDevice defines model for VmAddUserDevice.

type VmConfig

type VmConfig struct {
	Balloon          *BalloonConfig            `json:"balloon,omitempty"`
	Console          *ConsoleConfig            `json:"console,omitempty"`
	Cpus             *CpusConfig               `json:"cpus,omitempty"`
	DebugConsole     *DebugConsoleConfig       `json:"debug_console,omitempty"`
	Devices          *[]DeviceConfig           `json:"devices,omitempty"`
	Disks            *[]DiskConfig             `json:"disks,omitempty"`
	Fs               *[]FsConfig               `json:"fs,omitempty"`
	GenericVhostUser *[]GenericVhostUserConfig `json:"generic-vhost-user,omitempty"`
	Iommu            *bool                     `json:"iommu,omitempty"`
	LandlockEnable   *bool                     `json:"landlock_enable,omitempty"`
	LandlockRules    *[]LandlockConfig         `json:"landlock_rules,omitempty"`
	Memory           *MemoryConfig             `json:"memory,omitempty"`
	Net              *[]NetConfig              `json:"net,omitempty"`
	Numa             *[]NumaConfig             `json:"numa,omitempty"`

	// Payload Payloads to boot in guest
	Payload         PayloadConfig           `json:"payload"`
	PciSegments     *[]PciSegmentConfig     `json:"pci_segments,omitempty"`
	Platform        *PlatformConfig         `json:"platform,omitempty"`
	Pmem            *[]PmemConfig           `json:"pmem,omitempty"`
	Pvpanic         *bool                   `json:"pvpanic,omitempty"`
	RateLimitGroups *[]RateLimitGroupConfig `json:"rate_limit_groups,omitempty"`
	Rng             *RngConfig              `json:"rng,omitempty"`
	Rtc             *RtcConfig              `json:"rtc,omitempty"`
	Serial          *SerialConfig           `json:"serial,omitempty"`
	Tpm             *TpmConfig              `json:"tpm,omitempty"`
	UserDevices     *[]UserDeviceConfig     `json:"user_devices,omitempty"`
	Vdpa            *[]VdpaConfig           `json:"vdpa,omitempty"`
	Vsock           *VsockConfig            `json:"vsock,omitempty"`
	Watchdog        *bool                   `json:"watchdog,omitempty"`
}

VmConfig Virtual machine configuration

type VmCoredumpData

type VmCoredumpData struct {
	DestinationUrl *string `json:"destination_url,omitempty"`
}

VmCoredumpData defines model for VmCoredumpData.

type VmCounters

type VmCounters map[string]map[string]int64

VmCounters defines model for VmCounters.

type VmInfo

type VmInfo struct {
	// Config Virtual machine configuration
	Config           VmConfig               `json:"config"`
	DeviceTree       *map[string]DeviceNode `json:"device_tree,omitempty"`
	MemoryActualSize *int64                 `json:"memory_actual_size,omitempty"`
	State            VmState                `json:"state"`
}

VmInfo Virtual Machine information

type VmRemoveDevice

type VmRemoveDevice struct {
	Id *string `json:"id,omitempty"`
}

VmRemoveDevice defines model for VmRemoveDevice.

type VmResize

type VmResize struct {
	// DesiredBalloon desired balloon size in bytes
	DesiredBalloon *int64 `json:"desired_balloon,omitempty"`

	// DesiredRam desired memory ram in bytes
	DesiredRam   *int64 `json:"desired_ram,omitempty"`
	DesiredVcpus *int   `json:"desired_vcpus,omitempty"`
}

VmResize defines model for VmResize.

type VmResizeDisk added in v0.4.0

type VmResizeDisk struct {
	// DesiredSize desired disk size in bytes
	DesiredSize *int64 `json:"desired_size,omitempty"`

	// Id disk identifier
	Id *string `json:"id,omitempty"`
}

VmResizeDisk defines model for VmResizeDisk.

type VmResizeZone

type VmResizeZone struct {
	// DesiredRam desired memory zone size in bytes
	DesiredRam *int64  `json:"desired_ram,omitempty"`
	Id         *string `json:"id,omitempty"`
}

VmResizeZone defines model for VmResizeZone.

type VmSnapshotConfig

type VmSnapshotConfig struct {
	DestinationUrl *string `json:"destination_url,omitempty"`
}

VmSnapshotConfig defines model for VmSnapshotConfig.

type VmState added in v0.4.0

type VmState string

VmState defines model for VmState.

const (
	Created  VmState = "Created"
	Paused   VmState = "Paused"
	Running  VmState = "Running"
	Shutdown VmState = "Shutdown"
)

Defines values for VmState.

type VmmPingResponse

type VmmPingResponse struct {
	BuildVersion *string   `json:"build_version,omitempty"`
	Features     *[]string `json:"features,omitempty"`
	Pid          *int64    `json:"pid,omitempty"`
	Version      string    `json:"version"`
}

VmmPingResponse Virtual Machine Monitor information

type VsockConfig

type VsockConfig struct {
	// Cid Guest Vsock CID
	Cid         int64   `json:"cid"`
	Id          *string `json:"id,omitempty"`
	Iommu       *bool   `json:"iommu,omitempty"`
	PciDeviceId *uint8  `json:"pci_device_id,omitempty"`
	PciSegment  *int16  `json:"pci_segment,omitempty"`

	// Socket Path to UNIX domain socket, used to proxy vsock connections.
	Socket string `json:"socket"`
}

VsockConfig defines model for VsockConfig.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL